Closed miaoteng closed 9 months ago
你这请求地址不正确,微信公众号后台配置的地址应为http://xxxxxxx/wx
注意后边是有个/wx
的,给你看下我的日志。
[INFO][2023-11-23 13:04:27][hello.py:24] - [Hello] inited
[INFO][2023-11-23 13:04:27][finish.py:23] - [Finish] inited
http://0.0.0.0:8080/
[INFO][2023-11-23 13:04:32][passive_reply.py:97] - [wechatmp] Request 1 from oI1XS0q3f5y9svLY_P3UANos3k9A 24348808410671888 172.18.0.1:38902
哈喽
[INFO][2023-11-23 13:04:32][bridge.py:43] - create bot linkai for chat
[INFO][2023-11-23 13:04:33][link_ai_bot.py:84] - [LINKAI] query=哈喽, app_code=E30Ibe7R, mode=, file_id=None
[INFO][2023-11-23 13:04:37][passive_reply.py:97] - [wechatmp] Request 2 from oI1XS0q3f5y9svLY_P3UANos3k9A 24348808410671888 172.18.0.1:39210
哈喽
[INFO][2023-11-23 13:04:37][link_ai_bot.py:96] - [LINKAI] reply=你好!有什么可以帮助你的吗?, total_tokens=69
[INFO][2023-11-23 13:04:37][wechatmp_channel.py:85] - [wechatmp] text cached, receiver oI1XS0q3f5y9svLY_P3UANos3k9A
你好!有什么可以帮助你的吗?
[INFO][2023-11-23 13:04:37][passive_reply.py:153] - [wechatmp] Request 2 do send to oI1XS0q3f5y9svLY_P3UANos3k9A 24348808410671888: 哈喽
你好!有什么可以帮助你的吗?
172.18.0.1:39210 - - [23/Nov/2023 13:04:37] "HTTP/1.1 POST /wx" - 200 OK
172.18.0.1:38902 - - [23/Nov/2023 13:04:38] "HTTP/1.1 POST /wx" - 200 OK
前置确认
⚠️ 搜索issues中是否已存在类似问题
操作系统类型?
Linux
运行的python版本是?
python 3.8
使用的chatgpt-on-wechat版本是?
Latest Release
运行的
channel
类型是?wechatmp(公众号, 订阅号)
复现步骤 🕹
按照说明文档部署的
问题描述 😯
微信公众号没有任何反应。后台日志显示404,部署大佬另外一个项目bot-on-anything是正常的
终端日志 📒
这是服务器日志 root@instance-1:/opt/chatgpt-on-wechat# python3 app.py [INFO][2023-10-10 07:19:52][config.py:222] - [INIT] load config: {'open_ai_api_key': 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'model': 'gpt-4', 'channel_type': 'wechatmp', 'proxy': '', 'hot_reload': False, 'single_chat_prefix': [''], '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': ['画', '看', '找'], 'speech_recognition': False, 'group_speech_recognition': False, 'voice_reply_voice': False, 'conversation_max_tokens': 1000, 'expires_in_seconds': 3600, 'character_desc': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。', 'temperature': 0.7, 'top_p': 1, 'subscribe_msg': '感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。', 'use_linkai': False, 'linkai_api_key': '', 'linkai_app_code': '', 'wechatmp_app_id': 'wxxxxxxxxxxxxx', 'wechatmp_app_secret': 'xxxxxxxxxxxxxxx', 'wechatmp_aes_key': '', 'wechatmp_token': 'xxxxxxxxxx', 'wechatmp_port': 80} [INFO][2023-10-10 07:19:52][config.py:170] - [Config] User datas loaded. [WARNING][2023-10-10 07:19:52][audio_convert.py:9] - import pysilk failed, wechaty voice message will not be supported. /usr/local/lib/python3.9/dist-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) [INFO][2023-10-10 07:19:52][plugin_manager.py:50] - Loading plugins config... [INFO][2023-10-10 07:19:52][plugin_manager.py:88] - Scaning plugins ... [INFO][2023-10-10 07:19:52][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins/keyword [INFO][2023-10-10 07:19:52][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins/banwords [INFO][2023-10-10 07:19:52][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd chatgpt-tool-hub version: 0.4.6 [INFO][2023-10-10 07:19:53][plugin_manager.py:41] - Plugin tool_v0.4 registered, path=./plugins/tool [INFO][2023-10-10 07:19:53][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins/finish [INFO][2023-10-10 07:19:53][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins/role [INFO][2023-10-10 07:19:53][plugin_manager.py:41] - Plugin linkai_v0.1.0 registered, path=./plugins/linkai [INFO][2023-10-10 07:19:53][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins/hello [INFO][2023-10-10 07:19:53][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon [INFO][2023-10-10 07:19:53][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit [INFO][2023-10-10 07:19:53][godcmd.py:194] - [Godcmd] 因未设置口令,本次的临时口令为4827。 [INFO][2023-10-10 07:19:53][godcmd.py:210] - [Godcmd] inited [INFO][2023-10-10 07:19:53][keyword.py:40] - [keyword] {} [INFO][2023-10-10 07:19:53][keyword.py:42] - [keyword] inited. [INFO][2023-10-10 07:19:53][linkai.py:34] - [LinkAI] inited, config={'group_app_map': {'测试群名1': 'default', '测试群名2': 'Kv2fXJcH'}, 'midjourney': {'enabled': False, 'auto_translate': True, 'img_proxy': True, 'max_tasks': 3, 'max_tasks_per_user': 1, 'use_image_create_prefix': True}, 'summary': {'enabled': False, 'group_enabled': True, 'max_file_size': 5000}, 'knowledge_base': {'search_miss_text_enabled': False, 'search_miss_similarity': 0.8, 'search_miss_suffix': '\n-------------\n回复仅供参考,请以官方文档为准'}} [INFO][2023-10-10 07:19:53][init.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'") [INFO][2023-10-10 07:19:53][init.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'") [INFO][2023-10-10 07:19:53][chatgpt.py:186] - proxy no find, directly request to chatgpt instead [INFO][2023-10-10 07:19:53][chatgpt.py:186] - proxy no find, directly request to chatgpt instead [INFO][2023-10-10 07:19:53][victorinox.py:86] - use_tools=['terminal', 'meteo-weather', 'python', 'url-get'], params: {'debug': False, 'openai_api_key': 'xxxxxxxxxxxxxxxxxxxxxxxxx', 'open_ai_api_base': 'https://api.openai.com/v1', 'deployment_id': '', 'proxy': '', 'request_timeout': 120, 'model_name': 'gpt-4', 'no_default': False, 'top_k_results': 3, 'news_api_key': '', 'bing_subscription_key': '', 'google_api_key': '', 'google_cse_id': '', 'searx_search_host': '', 'wolfram_alpha_appid': '', 'morning_news_api_key': '', 'cuda_device': 'cpu', 'think_depth': 3, 'arxiv_summary': True, 'morning_news_use_llm': False, 'llm_api_key': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'llm_api_base_url': 'https://api.openai.com/v1'} [INFO][2023-10-10 07:19:53][tool.py:31] - [tool] inited [INFO][2023-10-10 07:19:53][role.py:69] - [Role] inited [INFO][2023-10-10 07:19:53][dungeon.py:56] - [Dungeon] inited [INFO][2023-10-10 07:19:53][hello.py:23] - [Hello] inited [INFO][2023-10-10 07:19:53][finish.py:23] - [Finish] inited http://0.0.0.0:80/ 162.62.80.8:9211 - - [10/Oct/2023 07:20:15] "HTTP/1.1 POST /" - 404 Not Found 162.62.81.123:60728 - - [10/Oct/2023 07:20:16] "HTTP/1.1 POST /" - 404 Not Found 162.62.80.8:9332 - - [10/Oct/2023 07:20:16] "HTTP/1.1 POST /" - 404 Not Found
这是配置文件 { "open_ai_api_key": "xxxxxxxx", "model": "gpt-4", "channel_type": "wx", "proxy": "", "hot_reload": false, "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": [ "画", "看", "找" ], "speech_recognition": false, "group_speech_recognition": false, "voice_reply_voice": false, "conversation_max_tokens": 1000, "expires_in_seconds": 3600, "character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。", "temperature": 0.7, "top_p": 1, "subscribe_msg": "感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。", "use_linkai": false, "linkai_api_key": "", "linkai_app_code": "", "channel_type": "wechatmp", "single_chat_prefix": [""], "wechatmp_app_id": "wxxxxxxxxxxx", "wechatmp_app_secret": "5xxxxxxxxxxx", "wechatmp_aes_key": "", "wechatmp_token": "xxxx", "wechatmp_port": 80 }