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

报错: Error communicating with OpenAI #235

Closed
danranmmm opened this issue Apr 20, 2023 · 14 comments
Closed

报错: Error communicating with OpenAI #235

danranmmm opened this issue Apr 20, 2023 · 14 comments

Comments

@danranmmm
Copy link

问题:请回答天气
以下是小爱的回答: 西安雁塔明天小雨转阴,要带伞哦,10度到21度,降温5度,西风1级转西风3级,空气质量良。
以下是GPT的回答: GPT回答出错 Error communicating with OpenAI
为什么我的一直GPT报错链接不上啊,我美国服务器的节点,可以正常访问openAI和ChatGPT,我用的windows,把代理端口也改成允许的了,然后使用就一直报错 GPT回答出错 Error communicating with OpenAI,也没其他任何提示了

@yihong0618
Copy link
Owner

请确定 terminal 能访问
比如 curl google.com

@danranmmm
Copy link
Author

请确定 terminal 能访问 比如 curl google.com

我是可以访问的

@danranmmm
Copy link
Author

请确定 terminal 能访问 比如 curl google.com

刚才试了一下 挂着代理也访问不到,什么原因如何解决大佬

@yihong0618
Copy link
Owner

进入 python repl
看看是否能调用 openai 接口试试?

@danranmmm
Copy link
Author

进入 python repl 看看是否能调用 openai 接口试试?

已经尝试可以调用,一开始我使用小爱的时候报错

问题:你是谁?
以下是小爱的回答: 你大哥
以下是GPT的回答: HTTPS proxies https://127.0.0.1:10809 are not supported, ignoring
GPT回答出错 Error communicating with OpenAI

然后我改了代理 set http_proxy=http://127.0.0.1:7890 & set https_proxy=http://127.0.0.1:7890 再用的时候就直接
GPT回答出错 Error communicating with OpenAI ,然后没有其他信息了

@yihong0618
Copy link
Owner

看起来是你的 ip 被 openai block 了

@LongwayX
Copy link

LongwayX commented May 3, 2023

看起来是你的 ip 被 openai block 了

我出现同样的问题 但是测试了我自己用openai.ChatCompletion.create可以拿到答复

@woiweb
Copy link

woiweb commented Jun 5, 2023

问题:写一首诗?
以下是小爱的回答: 嗯哼~我先写首普通的诗热热身
以下是GPT的回答:

GPT回答出错 Error communicating with OpenAI

直接 curl https://api.openai.com/v1/completions 是有反应的

curl https://api.openai.com/v1/chat/completions \ -x socks5h://127.0.0.1:13659 \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-xxxx" \ -d '{ "model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Hello!"}] }' {"id":"chatcmpl-7O0lVLOMrLNsSfpQgh5OI42BdpLka","object":"chat.completion","created":1685957169,"model":"gpt-3.5-turbo-0301","usage":{"prompt_tokens":10,"completion_tokens":10,"total_tokens":20},"choices":[{"message":{"role":"assistant","content":"Hello there! How can I assist you today?"},"finish_reason":"stop","index":0}]}

@jokereven
Copy link
Contributor

image

在 wsl 跑 proxy 得设置成 wsl 的 ip

@yihong0618
Copy link
Owner

image

在 wsl 跑 proxy 得设置成 wsl 的 ip

有兴趣提个 PR 加在 README 里么?

@jokereven
Copy link
Contributor

正好没啥事,好。

@jokereven
Copy link
Contributor

jokereven commented Aug 4, 2023

image
在 wsl 跑 proxy 得设置成 wsl 的 ip

有兴趣提个 PR 加在 README 里么?

image

加在注意这个位置吗?

@yihong0618
Copy link
Owner

可以。加在这没问题

@jokereven
Copy link
Contributor

pr 已提

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

No branches or pull requests

5 participants