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
27.96k stars 7.45k forks source link

多次尝试,工具从openai换成claude,微信显示登陆成功,也触发关键词回复,但是不能回复信息,运行日志显示get other_user_id failed: 'NickName' #2074

Closed gillnotfail closed 1 week ago

gillnotfail commented 3 weeks ago

前置确认

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

操作系统类型?

Windows

运行的python版本是?

python 3.10

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

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

先尝试openai的3.5模型,显示get other_user_id failed: 'NickName'。以为网络问题,换成claude模型,显示网络连接问题,443接口出错,设置了proxy,问题解决,再次运行,还是显示get other_user_id failed。于是在config.json里将channel_type从wx设置成itchat,显示raise RuntimeError

问题描述 😯

根据以上问题,已在群内咨询AI助手,已检查config.json配置,按照要求设置。已经采用最新的代码,对于获取用户信息的部分不知如何处理。

终端日志 📒

[INFO][2024-06-14 14:02:35][config.py:293] - [INIT] load config: {'channel_type': 'wx', 'model': 'claude', 'open_ai_api_key': '**', 'claude_api_key': '**', 'text_to_image': 'dall-e-2', 'voice_to_text': 'claude', 'text_to_voice': 'claude', 'proxy': 'http://127.0.0.1:7890', 'hot_reload': False, 'single_chat_prefix': ['Jeo', '方平'], 'single_chat_reply_prefix': '我在,', 'group_chat_prefix': ['@方平'], 'group_name_white_list': [], 'image_create_prefix': ['画'], 'speech_recognition': True, 'group_speech_recognition': False, 'voice_reply_voice': False, 'conversation_max_tokens': 2500, 'expires_in_seconds': 3600, 'character_desc': '你是基于大语言模型的AI智能助手,旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。', 'temperature': 0.7, 'subscribe_msg': '感谢您的关注!\n这里是AI智能助手,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。', 'use_linkai': False, 'linkai_api_key': '***', 'linkai_app_code': ''} [INFO][2024-06-14 14:02:35][config.py:219] - [Config] User datas file not found, ignore. [INFO][2024-06-14 14:02:35][plugin_manager.py:50] - Loading plugins config... [INFO][2024-06-14 14:02:35][plugin_manager.py:88] - Scaning plugins ... [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins\banwords [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins\bdunit [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins\dungeon [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins\finish [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins\godcmd [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins\hello [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins\keyword [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin linkai_v0.1.0 registered, path=./plugins\linkai [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins\role [INFO][2024-06-14 14:02:35][plugin_manager.py:41] - Plugin tool_v0.5 registered, path=./plugins\tool [INFO][2024-06-14 14:02:35][godcmd.py:194] - [Godcmd] 因未设置口令,本次的临时口令为7268。 [INFO][2024-06-14 14:02:35][godcmd.py:210] - [Godcmd] inited [INFO][2024-06-14 14:02:35][keyword.py:40] - [keyword] {} [INFO][2024-06-14 14:02:35][keyword.py:42] - [keyword] inited. [INFO][2024-06-14 14:02:35][linkai.py:35] - [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, 'type': ['FILE', 'SHARING']}} [INFO][2024-06-14 14:02:38][tool.py:28] - [tool] inited [INFO][2024-06-14 14:02:38][role.py:69] - [Role] inited [INFO][2024-06-14 14:02:38][dungeon.py:56] - [Dungeon] inited [INFO][2024-06-14 14:02:38][hello.py:38] - [Hello] inited [INFO][2024-06-14 14:02:38][finish.py:23] - [Finish] inited [INFO][2024-06-14 14:03:01][wechat_channel.py:131] - Wechat login success, user_id: @642eefb27bebfa9aac2ebc00369d8b24c9cfc304637705540da64392bb4849e9, nickname: 🌚 [WARNING][2024-06-14 14:03:11][wechat_message.py:92] - [WX]get other_user_id failed: 'NickName'

6vision commented 2 weeks ago

换个微信号试试

gillnotfail commented 2 weeks ago

换个微信号试试

换过微信号了,同样的bug

6vision commented 2 weeks ago

这个应该是陌生人发来的消息,拿不到信息,应该不影响正常好友的回复,检查配置文件,触发前缀,群白名单等看看