lian11
1
When I call the OpenAI API, I encounter the following error message. How can I resolve it? Thank you.
$ curl https://api.openai.com/v1/chat/completions \
> -H "Authorization: Bearer xxxx" \
> -H "Content-Type: application/json" \
> -d '{
> "model": "gpt-3.5-turbo",
> "messages": [{"role": "user", "content": "What is the OpenAI mission?"}]
> }'
curl: (28) SSL connection timeout
(base)
1 Like
Have you tried increasing your own timeout threshold?
$ curl https://api.openai.com/v1/chat/completions
-H âAuthorization: Bearer xxxxâ
-H âContent-Type: application/jsonâ
-m 60
-d â{
âmodelâ: âgpt-3.5-turboâ,
âmessagesâ: [{âroleâ: âuserâ, âcontentâ: âWhat is the OpenAI mission?â}]
}â
or
$ curl https://api.openai.com/v1/chat/completions
-H âAuthorization: Bearer xxxxâ
-H âContent-Type: application/jsonâ
âconnect-timeout 30
-d â{
âmodelâ: âgpt-3.5-turboâ,
âmessagesâ: [{âroleâ: âuserâ, âcontentâ: âWhat is the OpenAI mission?â}]
}â