Open benedictstrube opened 4 months ago
Attached a PR to fix this for the Assistants API, as those are the requests, that are failing right now without setting the Content-Type
explicitly to application/json
. However, having a look at the documentation, it seems like setting the Content-Type
for all requests is the correct way:
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}'
(example request from their documentation)
Hi @benedictstrube. I was having the same issue but out of nowhere it seems to be working again.
Thanks @propertius for the heads up! I already posted a PR that sets the Content Type explicitly according to specification. I think it still might be a good idea to merge this, as this might happen again anytime in the future, if OpenAI decides to be restrictive regarding that. 😄
I am getting this error when attempting to execute
createThread
on anOpenAiService
instance.Seems like OpenAI changed something internally. Not tested on other requests yet, but if my assumption is correct, that seems quite urgent. As of now, all our requests to OpenAI are failing.