zhayujie / chatgpt-on-wechat

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

#指令均无响应 #1831

Closed biubiushaka closed 4 months ago

biubiushaka commented 8 months ago

前置确认

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

操作系统类型?

Docker

运行的python版本是?

python 3.7

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

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

No response

问题描述 😯

auth xxx #plist #help等指令均无回应

微信截图_20240323210204

/app/config.json如下: { "channel_type": "wx", "open_ai_api_key": "sk-xxxxxxxxxxxxxx", "open_ai_api_base":"https://api.chatanywhere.tech", "model": "gpt-3.5-turbo", "proxy": "", "text_to_image": "dall-e-2", "voice_to_text": "openai", "text_to_voice": "openai", "hot_reload": true, "single_chat_prefix": ["bot", "@bot"], "single_chat_reply_prefix": "[bot] ", "group_chat_prefix": ["@bot"], "group_name_white_list": ["ChatGPT测试群", "ChatGPT测试群2"], "group_chat_in_one_session": ["ChatGPT测试群"], "image_create_prefix": ["画", "看", "找"], "conversation_max_tokens": 2500, "speech_recognition": false, "group_speech_recognition": false, "azure_api_version": "", "character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。", "subscribe_msg": "感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持角色扮演和文字冒险等丰富插件。\n输入{trigger_prefix}#help 查看详细指令。", "use_linkai": false, "linkai_api_key": "", "linkai_app_code": ""

app/plugins/plugins.json如下: { "plugins": { "Godcmd": { "enabled": true, "priority": 999 }, "Keyword": { "enabled": true, "priority": 900 }, "Banwords": { "enabled": false, "priority": 100 }, "linkai": { "enabled": true, "priority": 99 }, "tool": { "enabled": true, "priority": 0 }, "Role": { "enabled": true, "priority": 0 }, "Dungeon": { "enabled": true, "priority": 0 }, "BDunit": { "enabled": false, "priority": 0 }, "Hello": { "enabled": true, "priority": -1 }, "Finish": { "enabled": true, "priority": -999 } }

app/plugins/config.json如下: { "godcmd": { "password": "9527", "admin_users": [] }, "banwords": { "action": "replace", "reply_filter": true, "reply_action": "ignore" }, "tool": { "tools": [ "bing-search", "python", "url-get", "terminal", "meteo-weather" ], "kwargs": { "llm_api_key": "", "proxy": "", "debug": false, "top_k_results": 2, "no_default": false, "model_name": "gpt-3.5-turbo", "bing_subscription_key": "XXXXXXXXXXXXXXXXXXXXXXXX" } }, "linkai": { "group_app_map": { "测试群1": "default", "测试群2": "Kv2fXJcH" }, "midjourney": { "enabled": true, "auto_translate": true, "img_proxy": true, "max_tasks": 3, "max_tasks_per_user": 1, "use_image_create_prefix": true }, "summary": { "enabled": true, "group_enabled": true, "max_file_size": 5000, "type": ["FILE", "SHARING"] } }

终端日志 📒

y2024-03-23T12:47:08.100741521Z [WARNING][2024-03-23 12:47:08][tool.py:234] - [tool] filter invalid tool: 'meteo-weather' �2024-03-23T12:47:08.108426640Z [INFO][2024-03-23 12:47:08][victorinox.py:83] - use_tools=['meteo', 'python', 'url-get', 'terminal', 'bing-search'], params: {'log': True, 'debug': False, 'no_default': False, 'think_depth': 2, 'proxy': '', 'request_timeout': 120, 'temperature': 0, 'llm_api_key': 'sk-XXXXXXXXXXX', 'llm_api_base_url': 'https://api.chatanywhere.tech', 'deployment_id': '', 'model_name': 'gpt-3.5-turbo', 'arxiv_simple': True, 'arxiv_top_k_results': 2, 'arxiv_sort_by': 'relevance', 'arxiv_sort_order': 'descending', 'arxiv_output_type': 'text', 'bing_subscription_key': 'XXXXXXXXXX', 'bing_search_url': 'https://api.bing.microsoft.com/v7.0/search', 'bing_search_top_k_results': 2, 'bing_search_simple': True, 'bing_search_output_type': 'text', 'email_nickname_mapping': '{}', 'email_smtp_host': '', 'email_smtp_port': '', 'email_sender': '', 'email_authorization_code': '', 'google_api_key': '', 'google_cse_id': '', 'google_simple': True, 'google_output_type': 'text', 'finance_news_filter': False, 'finance_news_filter_list': [], 'finance_news_simple': True, 'finance_news_repeat_news': False, 'morning_news_api_key': '', 'morning_news_simple': True, 'morning_news_output_type': 'text', 'news_api_key': '', 'searxng_search_host': '', 'searxng_search_top_k_results': 2, 'searxng_search_output_type': 'text', 'sms_nickname_mapping': '{}', 'sms_username': '', 'sms_apikey': '', 'stt_api_key': '', 'stt_api_region': '', 'stt_recognition_language': 'zh-CN', 'tts_api_key': '', 'tts_api_region': '', 'tts_auto_detect': True, 'tts_speech_id': 'zh-CN-XiaozhenNeural', 'summary_max_segment_length': 2500, 'terminal_nsfc_filter': True, 'terminal_return_err_output': True, 'terminal_timeout': 20, 'caption_api_key': '', 'browser_use_summary': True, 'url_get_use_summary': True, 'wechat_hot_reload': True, 'wechat_cpt_path': '/app/itchat.pkl', 'wechat_send_group': False, 'wechat_nickname_mapping': '{}', 'wikipedia_top_k_results': 2, 'wolfram_alpha_appid': ''} W2024-03-23T12:47:08.108631586Z [INFO][2024-03-23 12:47:08][tool.py:28] - [tool] inited W2024-03-23T12:47:08.109081951Z [INFO][2024-03-23 12:47:08][role.py:69] - [Role] inited ]2024-03-23T12:47:08.109093867Z [INFO][2024-03-23 12:47:08][dungeon.py:56] - [Dungeon] inited l2024-03-23T12:47:08.109162957Z [WARNING][2024-03-23 12:47:08][bdunit.py:42] - [BDunit] init failed, ignore �2024-03-23T12:47:08.109207218Z [WARNING][2024-03-23 12:47:08][plugin_manager.py:148] - Failed to init BDUNIT, diabled. config.json not found Y2024-03-23T12:47:08.109510963Z [INFO][2024-03-23 12:47:08][hello.py:24] - [Hello] inited [2024-03-23T12:47:08.109594819Z [INFO][2024-03-23 12:47:08][finish.py:23] - [Finish] inited �2024-03-23T12:47:08.362516713Z Hot reload failed, logging in normally, error={'BaseResponse': {'ErrMsg': '文件位置错误', 'Ret': -1002, 'RawMsg': 'No such file, loading login status failed.'}} /2024-03-23T12:47:08.362588124Z Ready to login. 82024-03-23T12:47:08.362665048Z Getting uuid of QR code. 42024-03-23T12:47:08.639125856Z Downloading QR code. N2024-03-23T12:47:08.704069842Z You can also scan QRCode in any website below: s2024-03-23T12:47:08.704095810Z https://api.pwmqr.com/qrcode/create/?url=https://login.weixin.qq.com/l/wXXXXXg== �2024-03-23T12:47:08.704100210Z https://my.tv.sohu.com/user/a/wvideo/getQRCode.do?text=https://login.weixin.qq.com/l/XXXXXXog== �2024-03-23T12:47:08.704103481Z https://api.qrserver.com/v1/create-qr-code/?size=400×400&data=https://login.weixin.qq.com/l/wXXXXXXXg== u2024-03-23T12:47:08.704107833Z https://api.isoyu.com/qr/?m=1&e=L&p=20&url=https://login.weixin.qq.com/l/wXXXXXXg== }2024-03-23T12:47:08.704111268Z █▀▀▀▀▀▀▀█████████▀▀████▀▀▀▀▀▀▀█ p2024-03-23T12:47:08.704126597Z █▀     ▀  █▄▀█   ▄▀ ▄▄█▀  █▄▄██ t2024-03-23T12:47:08.704129686Z █▀▄  ▄▀▀  ▄▀ ▄█▄  ██▄ ▀ ▀█▄██▀█ w2024-03-23T12:47:08.704132800Z █▄█ █▀▀▀▄▀▀██▄▀▀ ▄ ▄▄ █  ▄▀▀▄▄█ x2024-03-23T12:47:08.704135787Z ██ ▄▀▀ ▀▀ ▄▄▄█▀██ ▀█▀▄██▄▄▀ █▄█ s2024-03-23T12:47:08.704138702Z █  ▀▀ █▀▄▄█ █▀ ▄▀▄ ▄  ▄ ▄▄▀▄▄ █ x2024-03-23T12:47:08.704142621Z █ █▄█▄ ▀█▀▄▀█▀▀▄█▀▀▀▀▀   ▀█▀▀▀█ x2024-03-23T12:47:08.704146332Z █▀▀▀▀▀▀▀█▄▄▀▄▄▄▀▀▀ ▄  █▀█  ▀███ u2024-03-23T12:47:08.704149104Z █ █▀▀▀█ ██▀█ ▀▀  ▄██  ▀▀▀ ▀█▀▄█ q2024-03-23T12:47:08.704151876Z █ █   █ ██ ▄▀ ▀▀  ▄▄▄▀ ▀▀▀  ▀▄█ y2024-03-23T12:47:08.704154765Z █ ▀▀▀▀▀ █▀▄██▀▀█▄█▀ ▀█▄▄▀▄▄ █▄█ }2024-03-23T12:47:08.704157611Z ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ C2024-03-23T12:47:46.674991904Z Please press confirm on your phone. R2024-03-23T12:48:05.917225450Z Loading the contact, this may take a little while. �2024-03-23T12:48:06.918121651Z [INFO][2024-03-23 12:48:06][wechat_channel.py:131] - Wechat login success, user_id: @XXXXXXXX44c8af4f06c6b4, nickname: biubiu 42024-03-23T12:48:06.918151486Z Start auto replying. B2024-03-23T12:48:29.698755557Z Traceback (most recent call last): �2024-03-23T12:48:29.698828732Z File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen J2024-03-23T12:48:29.698847262Z httplib_response = self._make_request( �2024-03-23T12:48:29.698860846Z File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request ;2024-03-23T12:48:29.698873200Z six.raise_from(e, None) H2024-03-23T12:48:29.698884212Z File "", line 3, in raise_from �2024-03-23T12:48:29.698896294Z File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request I2024-03-23T12:48:29.698907728Z httplib_response = conn.getresponse() l2024-03-23T12:48:29.698918667Z File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse 42024-03-23T12:48:29.698931238Z response.begin() e2024-03-23T12:48:29.698941952Z File "/usr/local/lib/python3.10/http/client.py", line 318, in begin Q2024-03-23T12:48:29.698953212Z version, status, reason = self._read_status() l2024-03-23T12:48:29.698963926Z File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status c2024-03-23T12:48:29.698974747Z raise RemoteDisconnected("Remote end closed connection without" m2024-03-23T12:48:29.698985625Z http.client.RemoteDisconnected: Remote end closed connection without response  2024-03-23T12:48:29.698996507Z c2024-03-23T12:48:29.699006966Z During handling of the above exception, another exception occurred:  2024-03-23T12:48:29.699017567Z B2024-03-23T12:48:29.699027803Z Traceback (most recent call last): x2024-03-23T12:48:29.699038720Z File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send 82024-03-23T12:48:29.699050049Z resp = conn.urlopen( �2024-03-23T12:48:29.699060393Z File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen @2024-03-23T12:48:29.699071503Z retries = retries.increment( ~2024-03-23T12:48:29.699082264Z File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment V2024-03-23T12:48:29.699093441Z raise six.reraise(type(error), error, _stacktrace) ~2024-03-23T12:48:29.699103953Z File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise B2024-03-23T12:48:29.699115104Z raise value.with_traceback(tb) �2024-03-23T12:48:29.699125781Z File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen J2024-03-23T12:48:29.699136718Z httplib_response = self._make_request( �2024-03-23T12:48:29.699200126Z File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request ;2024-03-23T12:48:29.699216329Z six.raise_from(e, None) H2024-03-23T12:48:29.699228022Z File "", line 3, in raise_from �2024-03-23T12:48:29.699239701Z File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request I2024-03-23T12:48:29.699251004Z httplib_response = conn.getresponse() l2024-03-23T12:48:29.699264936Z File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse 42024-03-23T12:48:29.699277216Z response.begin() e2024-03-23T12:48:29.699287776Z File "/usr/local/lib/python3.10/http/client.py", line 318, in begin Q2024-03-23T12:48:29.699298892Z version, status, reason = self._read_status() l2024-03-23T12:48:29.699309713Z File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status c2024-03-23T12:48:29.699321479Z raise RemoteDisconnected("Remote end closed connection without" �2024-03-23T12:48:29.699332999Z urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))  2024-03-23T12:48:29.699344685Z c2024-03-23T12:48:29.699355372Z During handling of the above exception, another exception occurred:  2024-03-23T12:48:29.699366613Z B2024-03-23T12:48:29.699377012Z Traceback (most recent call last): h2024-03-23T12:48:29.699387585Z File "/app/lib/itchat/components/login.py", line 301, in maintain_loop I2024-03-23T12:48:29.699399002Z msgList, contactList = self.get_msg() b2024-03-23T12:48:29.699409711Z File "/app/lib/itchat/components/login.py", line 390, in get_msg O2024-03-23T12:48:29.699420594Z r = self.s.post(url, data=json.dumps(data), x2024-03-23T12:48:29.699431001Z File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 637, in post d2024-03-23T12:48:29.699442018Z return self.request("POST", url, data=data, json=json, kwargs) {2024-03-23T12:48:29.699453455Z File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request I2024-03-23T12:48:29.699464519Z resp = self.send(prep, send_kwargs) x2024-03-23T12:48:29.699475466Z File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send G2024-03-23T12:48:29.699486446Z r = adapter.send(request, **kwargs) x2024-03-23T12:48:29.699496983Z File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 501, in send O2024-03-23T12:48:29.699508071Z raise ConnectionError(err, request=request) �2024-03-23T12:48:29.699519077Z requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))  2024-03-23T12:48:29.699530678Z g2024-03-23T12:54:13.709875358Z [INFO][2024-03-23 12:54:13][bridge.py:51] - create bot chatGPT for chat h2024-03-23T12:54:13.718075013Z [INFO][2024-03-23 12:54:13][chat_gpt_bot.py:49] - [CHATGPT] query=你好 2024-03-23T12:54:18.237009931Z [INFO][2024-03-23 12:54:18][wechat_channel.py:214] - [WX] sendMsg=Reply(type=TEXT, content=[bot] 你好!有什么可以帮到您的吗?如果你有任何问题或需要帮助,请随时告诉我。), receiver=@6df3cb172f0bab672801e7cf4b2adcec

llyyoo commented 8 months ago

同样问题,请问解决了吗?

a-Dmears commented 6 months ago

"single_chat_prefix": ["bot", "@bot"], 前面加上口令呢bot或者@bot

wcgjoy commented 5 months ago

同样RIP

willzzq commented 5 months ago

我测试过了,回复的内容太长了,微信聊天窗口只能接受2048个汉字。要把长内容分隔成几段

6vision commented 4 months ago

需要先加上触发前缀,触发前缀是由"single_chat_prefix": ["bot", "@bot"], 设定的