[WARNING][2023-06-08 08:58:49][chat_gpt_bot.py:149] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='xxx.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/xxx/chat/completions?api-version=2023-05-15 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f977a52d450>: Failed to establish a new connection: [Errno 111] Connection refused')))
[INFO][2023-06-08 08:58:49][wechat_channel.py:186] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR]
我连接不到你的网络), receiver=@d4973909e235276a4a70f5d2299a31c3138e2b86a437ef93566d823e6af5474a
前置确认
⚠️ 搜索issues中是否已存在类似问题
操作系统类型?
Linux
运行的python版本是?
python 3.8
使用的chatgpt-on-wechat版本是?
Latest Release
运行的
channel
类型是?wx(个人微信, itchat)
复现步骤 🕹
调用azure openai api,设置config如下: { "open_ai_api_key": "xxxx", "model": "gpt-35-turbo", "proxy": "127.0.0.1:7890", "single_chat_prefix": [], "single_chat_reply_prefix": "[] ", "group_chat_prefix": [""], "group_name_white_list": [""], "group_chat_in_one_session": [""], "image_create_prefix": ["画", "看", "找"], "conversation_max_tokens": 1000, "speech_recognition": false, "open_ai_api_base": "https://xxx.openai.azure.com/", "group_speech_recognition": false, "use_azure_chatgpt": true, "azure_deployment_id": "xxxx", "character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。", "subscribe_msg": "感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持角色扮演和文字冒险等丰富插件。\n输入{trigger_prefix}#help 查看详细指令。" }
问题描述 😯
尝试修改config.json来调用azure openai的api,但是发现无法连接过去。求解 调用azure openai api,设置config如下: { "open_ai_api_key": "xxxx", "model": "gpt-35-turbo", "proxy": "127.0.0.1:7890", "single_chat_prefix": [], "single_chat_reply_prefix": "[] ", "group_chat_prefix": [""], "group_name_white_list": [""], "group_chat_in_one_session": [""], "image_create_prefix": ["画", "看", "找"], "conversation_max_tokens": 1000, "speech_recognition": false, "open_ai_api_base": "https://xxx.openai.azure.com/", "group_speech_recognition": false, "use_azure_chatgpt": true, "azure_deployment_id": "xxxx", "character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。", "subscribe_msg": "感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持角色扮演和文字冒险等丰富插件。\n输入{trigger_prefix}#help 查看详细指令。" }
终端日志 📒
[WARNING][2023-06-08 08:58:49][chat_gpt_bot.py:149] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='xxx.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/xxx/chat/completions?api-version=2023-05-15 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f977a52d450>: Failed to establish a new connection: [Errno 111] Connection refused'))) [INFO][2023-06-08 08:58:49][wechat_channel.py:186] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] 我连接不到你的网络), receiver=@d4973909e235276a4a70f5d2299a31c3138e2b86a437ef93566d823e6af5474a