请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Operation timed out

在完成openai_flutter代码编写后,在test中进行测试出现以下问题:
ClientException with SocketException: Operation timed out (OS Error: Operation timed out, errno = 60), address = api.openai.com, port = 63201, uri=https://api.openai.com/v1/chat/completions
测试的时候使用了ClashX,
咋Mac的终端直接通过curl https://api.openai.com/v1/models -H "Authorization: Bearer k-M8MXv0NEmwec1eAusXiMT3BlbkFJiH9TXLhAbpLtNnxX"测试的时候也会报错:curl: (28) Failed to connect to api.openai.com port 443 after 75347 ms: Couldn’t connect to server。
但是在网页中可以打开ChatGPT。

正在回答 回答被采纳积分+3

1回答

CrazyCodeBoy 2023-10-18 08:22:55
需要给openai_flutter设置下代理。
0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号