Skip to content
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

测试OPENAI接口成功 #813

Merged
merged 15 commits into from
Jul 11, 2023
Merged

测试OPENAI接口成功 #813

merged 15 commits into from
Jul 11, 2023

Conversation

hzg0601
Copy link
Collaborator

@hzg0601 hzg0601 commented Jul 11, 2023

测试OPENAI接口成功,但仍存在两个注意事项:
调用chatgpt时如果报出: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openai.com', port=443):
Max retries exceeded with url: /v1/chat/completions
则需要将urllib3版本修改为1.25.11

如果报出:raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x000001FE4BDB85E0>: 
Failed to establish a new connection: [WinError 10060]
则是因为内地和香港的IP都被OPENAI封了,需要挂切换为日本、新加坡等地

@imClumsyPanda imClumsyPanda merged commit ca13ab8 into chatchat-space:dev Jul 11, 2023
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error communicating with OpenAI: HTTPSConnectionPool(host='api.openapi.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))
请教一下,我的反复显示这个错误,我自己测试了本地代理和 api_key 都没有问题(用 curl 可以正常访问 openai_api),能否帮忙建议一下哪里的问题。我在 webui.py 和 fastchat_openai_llm.py 下面分别写入了代理配置 os.environ['https_proxy'] = 'http://127.0.0.1:8118' ,但还是不行。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果将将urllib3版本修改为1.25.11无效那我也不知道了

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢回复!这个降过版本了,也不行

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有一种可能是SSL协议不对,你可以检查一下ssl的版本,或更换ssl协议,但具体的细节我就不清楚了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants