ChatGPT API conversion

today Open AI released a brand new ChatGPT API very different from davinci. turn this into [language] "curl \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -d '{ "model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Hello!"}] }'" but with only these messages "messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Who won the world series in 2020?"}, {"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."}, {"role": "user", "content": "Where was it played?"} ]". Do not try and use text-davinci-002.
add error catching for debugging
im getting error "[error]"