JSON object in OpenAI Request
Hi all, I want to make an OpenAI API request by giving the message as an array, denoted as: "messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Who won the world series in 2020?" }
]
Since I want to give the chat history this seems the way OPENAI accepts the messages. However the messages key is not passed in my request. How can I solve this?
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Who won the world series in 2020?" }
]
Since I want to give the chat history this seems the way OPENAI accepts the messages. However the messages key is not passed in my request. How can I solve this?




Solution
I was too quick to post it
I solved it by putting the messages array in the Body.
