You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
I am getting this error when attempting to execute createThread on an OpenAiService instance.
Unsupported content type: 'application/json; charset=UTF-8'. This API method only accepts 'application/json' requests, but you specified the header 'Content-Type: application/json; charset=UTF-8'. Please try again with a supported content type.
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.
The text was updated successfully, but these errors were encountered:
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
}'
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. 😄
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: