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

小爱回答正常,GPT回答出错,提示以下是GPT的回答: GPT回答出错 Error communicating with OpenAI #221

Open
caobo1860 opened this issue Apr 12, 2023 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@caobo1860
Copy link

Running xiaogpt now, 用帮我/请回答开头来提问
或用开始持续对话开始持续对话

问题:查明天的天气?
以下是小爱的回答: 西安雁塔明天小雨转阴,要带伞哦,10度到21度,降温5度,西风1级转西风3级,空气质量良。
以下是GPT的回答: GPT回答出错 Error communicating with OpenAI

@caobo1860
Copy link
Author

终于好了,每次回答一半就报错
[04/13/23 00:49:47] ERROR Response payload is not completed xiaogpt.py:378

@MrHongping
Copy link

报错是因为api.openai.com被GFW认证了,可以使用cloudflare的worker功能配置一个代理域名到api.openai.com,然后再openai官方模块里面的__init__.py文件里面把官方的域名替换成代理后的域名,这样就可以不用代理也可以访问了

@wangsmile
Copy link

不是用:--api_base 'https://xxxx/v1'这样的吗?

@danranmmm
Copy link

Running xiaogpt now, 用帮我/请回答开头来提问

或用开始持续对话开始持续对话
问题:查明天的天气? 以下是小爱的回答: 西安雁塔明天小雨转阴,要带伞哦,10度到21度,降温5度,西风1级转西风3级,空气质量良。 以下是GPT的回答: GPT回答出错 Error communicating with OpenAI

你这个问题怎么解决的,求方法,跟你遇到了同样的问题,看到回复下,谢谢好心人~

@danranmmm
Copy link

我遇到了同样的问题:以下是GPT的回答: GPT回答出错 Error communicating with OpenAI 就这一个报错没任何提示了,我用的美国的节点,可以正常访问openai官网,与GPT聊天,但是这里一直报错。

@danranmmm
Copy link

终于好了,每次回答一半就报错 [04/13/23 00:49:47] ERROR Response payload is not completed xiaogpt.py:378

怎么解决的啊

@ZhangJony
Copy link

我遇到了同样的问题:以下是GPT的回答: GPT回答出错 Error communicating with OpenAI 就这一个报错没任何提示了,我用的美国的节点,可以正常访问openai官网,与GPT聊天,但是这里一直报错。

我也遇到了同样的问题

@woiweb
Copy link

woiweb commented Jun 5, 2023

终于好了,每次回答一半就报错 [04/13/23 00:49:47] ERROR Response payload is not completed xiaogpt.py:378

怎么解决的,分享一下经验呀

@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}]}

@FairyWorld
Copy link

不是用:--api_base 'https://xxxx/v1'这样的吗?

解决了吗,我也是配置成"https//代理域名/api.openai.com/v1", 出错了

@yihong0618 yihong0618 added the help wanted Extra attention is needed label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants