Azure Openai can't add Assistants message content as array
Andres da Silva Santos
115
Reputation points
Hello,
Before yesterday I was able to add a message with an array content as it shows in the OpenAI Assistants Docs, but it stopped working out of nowhere.
Now when I try to send
curl --location 'https://host.openai.azure.com/openai/threads/thread_XyWHo1TnhpomPPuFLf7OtMYH/messages?api-version=2024-05-01-preview' \
--header 'Content-Type: application/json' \
--header 'api-key: key' \
--header 'OpenAI-Beta: assistants=v2' \
--data '{
"role": "user",
"content": [
{
"type": "text",
"text": "Create a chart from 1 to 5."
}
]
}'
I get the response
{
"error": {
"message": "Invalid type for 'content': expected a string, but got an array instead.",
"type": "invalid_request_error",
"param": "content",
"code": "invalid_type"
}
}
Sign in to answer