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
28.35k stars 7.53k forks source link

Start auto replying.后给bot发信息没反应,有加“bot”前缀 #1354

Open 8ijuu opened 11 months ago

8ijuu commented 11 months ago

前置确认

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

操作系统类型?

Ubuntu香港服务器

运行的python版本是?

python 3.8

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

Master (branch)

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

按照教程正常操作,可以成功登录

问题描述 😯

No response

终端日志 📒

[2] 1942
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Error: no "view" rule for type "image/png" passed its test case
       (for more information, add "--debug=1" on the command line)
Please press confirm on your phone.
Loading the contact, this may take a little while.
Login successfully as Bot
[INFO][2023-08-04 23:47:14][wechat_channel.py:126] - Wechat login success, user_id: @7696dcaeb711e108bd35a36cdafd9d9e8d8fd707575cf3c79222e8fda949aaf7, nickname: Bot
Start auto replying.
nohup: ignoring input and appending output to 'nohup.out'
[INFO][2023-08-04 23:51:40][config.py:205] - [INIT] load config: {'open_ai_api_key': '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', 'model': 'gpt-3.5-turbo', 'proxy': '', 'hot_reload': False, 'single_chat_prefix': ['bot', '@bot'], 'single_chat_reply_prefix': '[bot] ', 'group_chat_prefix': ['@bot'], 'group_name_white_list': ['ALL_GROUP'], 'group_chat_in_one_session': ['ALL_GROUP'], '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训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。', 'subscribe_msg': '感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件���\n输入{trigger_prefix}#help 查看详细指令。', 'use_linkai': False, 'linkai_api_key': '', 'linkai_app_code': ''}
[INFO][2023-08-04 23:51:40][config.py:155] - [Config] User datas file not found, ignore.
[INFO][2023-08-04 23:51:40][plugin_manager.py:50] - Loading plugins config...
[INFO][2023-08-04 23:51:40][plugin_manager.py:88] - Scaning plugins ...
[INFO][2023-08-04 23:51:40][plugin_manager.py:41] - Plugin linkai_v0.1.0 registered, path=./plugins/linkai
[INFO][2023-08-04 23:51:40][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon
[INFO][2023-08-04 23:51:40][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins/keyword
[INFO][2023-08-04 23:51:40][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins/hello
chatgpt-tool-hub version: 0.4.6
[INFO][2023-08-04 23:51:41][plugin_manager.py:41] - Plugin tool_v0.4 registered, path=./plugins/tool
[INFO][2023-08-04 23:51:41][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit
[INFO][2023-08-04 23:51:41][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd
[INFO][2023-08-04 23:51:41][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins/finish
[INFO][2023-08-04 23:51:41][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins/banwords
[INFO][2023-08-04 23:51:41][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins/role
[INFO][2023-08-04 23:51:41][godcmd.py:190] - [Godcmd] 因未设置口令,本次的临时口令为0571。
[INFO][2023-08-04 23:51:41][godcmd.py:205] - [Godcmd] inited
[INFO][2023-08-04 23:51:41][keyword.py:40] - [keyword] {}
[INFO][2023-08-04 23:51:41][keyword.py:42] - [keyword] inited.
[INFO][2023-08-04 23:51:41][__init__.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[INFO][2023-08-04 23:51:41][__init__.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[INFO][2023-08-04 23:51:41][chatgpt.py:186] - proxy no find, directly request to chatgpt instead
[INFO][2023-08-04 23:51:41][chatgpt.py:186] - proxy no find, directly request to chatgpt instead
[INFO][2023-08-04 23:51:41][victorinox.py:86] - use_tools=['python', 'terminal', 'meteo-weather', 'url-get'], params: {'debug': False, 'openai_api_key': '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', 'open_ai_api_base': 'https://api.openai.com/v1', 'deployment_id': '', 'proxy': '', 'request_timeout': 120, 'model_name': 'gpt-3.5-turbo', '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': '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', 'llm_api_base_url': 'https://api.openai.com/v1'}
[INFO][2023-08-04 23:51:41][tool.py:31] - [tool] inited
[INFO][2023-08-04 23:51:41][role.py:69] - [Role] inited
[INFO][2023-08-04 23:51:41][linkai.py:32] - [LinkAI] inited
[INFO][2023-08-04 23:51:41][dungeon.py:56] - [Dungeon] inited
[INFO][2023-08-04 23:51:41][hello.py:23] - [Hello] inited
[INFO][2023-08-04 23:51:41][finish.py:23] - [Finish] inited
/home/lighthouse/.local/lib/python3.8/site-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)
Ready to login.
Getting uuid of QR code.
Downloading QR code.
You can also scan QRCode in any website below:
https://api.pwmqr.com/qrcode/create/?url=https://login.weixin.qq.com/l/oa4idkO0Vw==
https://my.tv.sohu.com/user/a/wvideo/getQRCode.do?text=https://login.weixin.qq.com/l/oa4idkO0Vw==
https://api.qrserver.com/v1/create-qr-code/?size=400×400&data=https://login.weixin.qq.com/l/oa4idkO0Vw==
https://api.isoyu.com/qr/?m=1&e=L&p=20&url=https://login.weixin.qq.com/l/oa4idkO0Vw==
█▀▀▀▀▀▀▀█▀█▀█▀▀█▀▀██▀▀█▀▀▀▀▀▀▀█
█ █▀▀▀█ █▄   ▀ ▀▀ ▄▀▀██ █▀▀▀█ █
█ █   █ █▄  ▀ ▄█▀▀▄▄▀▄█ █   █ █
█ ▀▀▀▀▀ █▀▄▀█▀▄▀█ ▄ ▄▀█ ▀▀▀▀▀ █
█▀█▀▀█▀▀▀▄▀▄ █▀ █  ▀▄██▀██▀█▀▀█
█▀  ▀▄▀▀▀██▄▀▄▀▄█ █▄▄▀  ▄▄█▀▀▄█
███▀▄  ▀▄  ▄██ ▀█▄▀▄▀▄▀██▄▀▀█▄█
█▄▀█▀▀ ▀▀█▄██ █▀▄ ▀▀ ▀▀▄▀▀█   █
█▀▀  ▄█▀ ▀█▄ ▄▀ ▄ █▀▀▀ ▄  ▀█ ██
█▀▄   ▀▀█▀ ▄▀▄█   ▄██▄▄█ █▄ ▄██
██▀  ▀█▀▀▄▀ ▄████▀ ▄█   ▀ ▀ ███
█▀▀▀▀▀▀▀█ █▀ ▀▄▄█ ▄   █▀█  ▄ ▄█
█ █▀▀▀█ █▄█▀█▄▄▄▄█▀▄█ ▀▀▀ ▄▀▀▀█
█ █   █ █ ▄ ▀█▀ ▄▄█▀  ▄█ ▄▄▀█ █
█ ▀▀▀▀▀ █▀▄▀██▄ ▀▄█▄▀ ▀██ ▄█ ██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Error: no "view" rule for type "image/png" passed its test case
       (for more information, add "--debug=1" on the command line)
Please press confirm on your phone.
Loading the contact, this may take a little while.
Login successfully as XX
[INFO][2023-08-04 23:52:00][wechat_channel.py:126] - Wechat login success, user_id: @1ab7c4d9071bda0e3001bf8a4b9ac4782de40469e92e4c7f287c6f3332b5c49e, nickname: 林沁
Start auto replying.
zhayujie commented 11 months ago

群聊还是私聊,服务器在哪个地区

zjulihao commented 11 months ago

遇到了同样的问题

cuncaosama commented 11 months ago

问题一样

zhayujie commented 11 months ago

私聊的话,需要加前缀, 比如 "bot 你好", 群聊的话需要把群名字配置在白名单

你们是哪里的服务器呢 @zjulihao @cuncaosama

cuncaosama commented 11 months ago

本地运行

zhayujie @.***> 于2023年8月16日周三 10:07写道:

私聊的话,需要加前缀, 比如 "bot 你好", 群聊的话需要把群名字配置在白名单

你们是哪里的服务器呢 @zjulihao https://github.com/zjulihao @cuncaosama https://github.com/cuncaosama

— Reply to this email directly, view it on GitHub https://github.com/zhayujie/chatgpt-on-wechat/issues/1354#issuecomment-1679860463, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PCMMYGRVX4NSEFOC6ZP3LXVQTO5ANCNFSM6AAAAAA3EM27MM . You are receiving this because you were mentioned.Message ID: @.***>

phoben commented 10 months ago

我也遇到相同问题,登录正常,但是不能触发回复,本地运行

ArtoriaShu commented 10 months ago

一样的问题,之前用都是正常的,今天换到了最新的代码,就不回复了

linnnff commented 10 months ago

一样的问题,有人解决了嘛

zhilong-12138 commented 10 months ago

同样问题,没反应

anqi666 commented 9 months ago

同问 现在只有和自己私聊和群聊是正常 和别人私聊无法触发

AnduZhang commented 7 months ago

猜测是本地部署的一般性情况,因为服务网络和自己微信是一个,所以自己发出的信息没有触发服务query

StormLiangMS commented 6 months ago

同问 现在只有和自己私聊和群聊是正常 和别人私聊无法触发

我也碰到同样的问题

leapyear1969 commented 6 months ago

我也遇到类似的问题,在美国服务器部署的,卡在start auto replying 上...

换到国内服务器开代理之后,可以正常回复,是不是微信限制了区域?

update:是 我的config文件写的有问题,group white list名字写错了。

gllgoe commented 6 months ago

我也是同样的问题, 加了前缀了,都不行,群聊是可以的,私聊不行

LuckMonkey2000 commented 5 months ago

问题解决了吗?有没有人分享下答案。

bdtelbdtel commented 4 months ago

We can fix this problem by changing lines 62-64 in _wechatchannel.py to comments.