-
Notifications
You must be signed in to change notification settings - Fork 5k
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
测试OPENAI接口成功 #813
Conversation
… dev pull for 2023--6-15
… into dev merge dev.
There was a problem hiding this comment.
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' ,但还是不行。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果将将urllib3版本修改为1.25.11无效那我也不知道了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢回复!这个降过版本了,也不行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还有一种可能是SSL协议不对,你可以检查一下ssl的版本,或更换ssl协议,但具体的细节我就不清楚了
测试OPENAI接口成功,但仍存在两个注意事项:
调用chatgpt时如果报出: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openai.com', port=443):
Max retries exceeded with url: /v1/chat/completions
则需要将urllib3版本修改为1.25.11