New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APIConnectionError #271
Comments
@pluto-tu so you're seeing the curl works but generate code doesn't work? Are both running locally? |
yes , both running locally . example is { |
Hmm, I'm really unsure what could be causing the issue then. You could try specifying the base URL with the env var described in the README. I think it needs to be "https://api.openai.com/v1" or "https://api.openai.com" Are you running this code within Docker or in your default OS? You could also try asking people on https://github.com/openai/openai-python to help since that's the library we use. Let me know if you figure out a solution. |
I try now |
same error ,I will to submit issue on https://github.com/openai/openai-python File "/Users/xxx/Library/Caches/pypoetry/virtualenvs/backend-FuQBPevx-py3.11/lib/python3.11/site-packages/openai/_base_client.py", line 1494, in _request |
I meet this error too,how you solve it? |
Hi ,I can call openai api interface with my api key ,but when i run ,it error. can you show how did you slove this problem.
api example:
curl https://api.openai.com/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer key"
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "how to use mysql!"}],
"temperature": 0.7
}'
when run generate code :
pypoetry/virtualenvs/backend-FuQBPevx-py3.11/lib/python3.11/site-packages/openai/_base_client.py", line 1504, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
The text was updated successfully, but these errors were encountered: