zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT4.0/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
29.49k stars 7.8k forks source link

error 111错误 “我连接不到你的网络‘ #1930

Closed lukiugi closed 3 months ago

lukiugi commented 4 months ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

Windows

运行的python版本是?

python 3.7

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wxy(个人微信, wechaty)

复现步骤 🕹

chatgpt-on-wechat | [INFO][2024-04-29 11:35:28][chat_gpt_bot.py:49] - [CHATGPT] query=你好

问题描述 😯

(1)在clash的规则模式下,PAC模式已开 chatgpt-on-wechat | [WARNING][2024-04-29 11:35:28][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f456ed49f30>: Failed to establish a new connection: [Errno 111] Connection refused'))) chatgpt-on-wechat | [WARNING][2024-04-29 11:35:33][chat_gpt_bot.py:160] - [CHATGPT] 第1次重试 chatgpt-on-wechat | [WARNING][2024-04-29 11:35:33][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f456ed49720>: Failed to establish a new connection: [Errno 111] Connection refused'))) chatgpt-on-wechat | [WARNING][2024-04-29 11:35:38][chat_gpt_bot.py:160] - [CHATGPT] 第2次重试 chatgpt-on-wechat | [WARNING][2024-04-29 11:35:38][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f456e219f30>: Failed to establish a new connection: [Errno 111] Connection refused'))) chatgpt-on-wechat | [INFO][2024-04-29 11:35:38][wechat_channel.py:217] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] chatgpt-on-wechat | 我连接不到你的网络), receiver=@b6a2f363f5d533dc8ae2653461ebc578043d37fb1f5d1486a1f8c83cffce7ed (2)先扫码登陆后开启clash全局模式下的反馈 [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe110fdbc10>: Failed to establish a new connection: [Errno 111] Connection refused')))

终端日志 📒

(1) chatgpt-on-wechat | [WARNING][2024-04-29 11:35:28][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f456ed49f30>: Failed to establish a new connection: [Errno 111] Connection refused'))) chatgpt-on-wechat | [WARNING][2024-04-29 11:35:33][chat_gpt_bot.py:160] - [CHATGPT] 第1次重试 chatgpt-on-wechat | [WARNING][2024-04-29 11:35:33][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f456ed49720>: Failed to establish a new connection: [Errno 111] Connection refused'))) chatgpt-on-wechat | [WARNING][2024-04-29 11:35:38][chat_gpt_bot.py:160] - [CHATGPT] 第2次重试 chatgpt-on-wechat | [WARNING][2024-04-29 11:35:38][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f456e219f30>: Failed to establish a new connection: [Errno 111] Connection refused'))) chatgpt-on-wechat | [INFO][2024-04-29 11:35:38][wechat_channel.py:217] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] chatgpt-on-wechat | 我连接不到你的网络), receiver=@b6a2f363f5d533dc8ae2653461ebc578043d37fb1f5d1486a1f8c83cffce7ed (2) [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe110fdbc10>: Failed to establish a new connection: [Errno 111] Connection refused')))

Wanghh666 commented 4 months ago

看看你的open_ai_api_base的键值对 是不是正确的。

sugar-orange666 commented 3 months ago

我也是这个问题

lukiugi commented 3 months ago

看看你的open_ai_api_base的键值对 是不是正确的。

我之前用的是docker部署,只配置了proxy,没配置base,现在用了个服务器域名来做base 2024-04-30 21:12:01 [WARNING][2024-04-30 13:12:01][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 400 Bad Request'))) 又另外报错

lukiugi commented 3 months ago

这是我的docker配置文件

lukiugi commented 3 months ago
企业微信截图_17144857582472
lukiugi commented 3 months ago

chatgpt-on-wechat | [WARNING][2024-04-29 11:35:28][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Unable to connect to proxy', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f456ed49f30>: Failed to establish a new connection: [Errno 111] Connection refused'))) GPT: 这个警告说明在与 OpenAI 通信时,尝试连接代理时出现了连接拒绝的错误(Connection refused)。这可能是由于代理设置错误、代理服务器不可用或网络问题等原因导致的。 应该是代理的设置问题,但是不知道问题出现在哪里

sbcxk commented 3 months ago

我的docker配置如下,能够正常运行使用,可以试下把base最后后面的/去掉? image

Neoisava commented 3 months ago

我也是这个问题,在open_ai_api_base改好了base_url,不管怎么弄都会转到api.openai.com上面去。