Hi! I’m encountering an issue when trying to send a message to a thread using the OpenAI API. I’m using the following URL for my POST request:
…/v1/threads/thread_Nz3FCZlsQxb11zcOzB38UQcf/messages
{
"messages": [
{
"role": "user",
"content": "How does AI work?"
}
]
}
However, I keep getting a 400 Bad Request error with the following message: ```
“Missing required parameter: ‘role’”
I’ve double-checked that the role parameter is correctly set to "user", and the content field is properly formatted. I also ensured that the headers, including Authorization and Content-Type, are set correctly. I’ve tried simplifying the request and removing unnecessary characters, but the error persists.
Question:
Are there any specific details or requirements I might be missing when sending messages to a thread via the OpenAI API? Could there be any new constraints or mandatory parameters that I overlooked?