acheong08 / ChatGPT

Reverse engineered ChatGPT API
GNU General Public License v2.0
28k stars 4.48k forks source link

[Bug]: API calls to the model of gpt-3.5-turbo may result in errors #1442

Closed ainndejj11 closed 1 year ago

ainndejj11 commented 1 year ago

Is there an existing issue for this?

What happened?

Using the same network and OpenAI key By calling the gpt-3.5-turbo model in my own python code, I can run it correctly

Steps to reproduce the problem

Using the same network and OpenAI key By calling the gpt-3.5-turbo model in my own python code, I can run it correctly

The code example is as follows:

from langchain.llms import OpenAI
openai_api_key = ' '
llm = OpenAI(model_name='gpt-3.5-turbo', openai_api_key=openai_api_key)

promit = "hello"
result = llm(promit)
print(result)

But calling this gpt-3.5 turbo model under another project will cause problems, The error message is as follows: APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openapi.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)')))

What should have happened?

May I ask what is the reason and how should I solve it??

Version where the problem happens

.

What Python version are you running this with?

No response

What is your operating system ?

No response

Command Line Arguments

no

Console logs

APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openapi.com', port=443): Max 
retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of 
protocol (_ssl.c:1131)')))

Additional information

No response

acheong08 commented 1 year ago

SSL errors are caused by your own network