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

model 为xunfei与wenxin时 角色扮演插件报错 未知插件命令 #1452

Open wangdezhong opened 9 months ago

wangdezhong commented 9 months ago

前置确认

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

操作系统类型?

MacOS

运行的python版本是?

python 3.8

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

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

model 为xunfei与wenxin时 角色扮演插件报错 未知插件命令

问题描述 😯

image

终端日志 📒

[DEBUG][2023-09-26 16:40:01][hello.py:48] - [Hello] on_handle_context. content: $角色 佛祖 [DEBUG][2023-09-26 16:40:01][plugin_manager.py:187] - Plugin FINISH triggered by event Event.ON_HANDLE_CONTEXT [DEBUG][2023-09-26 16:40:01][finish.py:30] - [Finish] on_handle_context. content: $角色 佛祖 [DEBUG][2023-09-26 16:40:01][plugin_manager.py:192] - Plugin FINISH breaked event Event.ON_HANDLE_CONTEXT [DEBUG][2023-09-26 16:40:01][chat_channel.py:157] - [WX] ready to decorate reply: Reply(type=ERROR, content=未知插件命令 查看插件命令列表请输入#help 插件名 ) [DEBUG][2023-09-26 16:40:01][chat_channel.py:263] - [WX] ready to send reply: Reply(type=ERROR, content=[ERROR] 未知插件命令 查看插件命令列表请输入#help 插件名 ), context: Context(type=TEXT, content=$角色 佛祖, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WechatMessage object at 0x107c70790>, 'origin_ctype': <ContextType.TEXT: 1>, 'openai_api_key': None, 'gpt_model': None, 'session_id': '@30478d060cf1bb5a297d6e3836086bf7', 'receiver': '@30478d060cf1bb5a297d6e3836086bf7'}) [INFO][2023-09-26 16:40:01][wechat_channel.py:189] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] 未知插件命令 查看插件命令列表请输入#help 插件名 ), receiver=@30478d060cf1bb5a297d6e3836086bf7 [DEBUG][2023-09-26 16:40:01][chat_channel.py:279] - Worker return success, session_id = @30478d060cf1bb5a297d6e3836086bf7

wangdezhong commented 9 months ago

https://github.com/zhayujie/chatgpt-on-wechat/issues/956 发现类似问题 不知是否wenxin与xunfei也是此问题

BLSM3344 commented 8 months ago

app/plugins/role.py,第102行有一段判断大模型的代码: if btype not in [const.OPEN_AI, const.CHATGPT, const.CHATGPTONAZURE, const.LINKAI]: return 将其改成以下代码就可以了: if btype not in [const.OPEN_AI, const.CHATGPT, const.CHATGPTONAZURE, const.LINKAI,const.XUNFEI,const.BAIDU]: return

wangdezhong commented 8 months ago

app/plugins/role.py,第102行有一段判断大模型的代码: if btype not in [const.OPEN_AI, const.CHATGPT, const.CHATGPTONAZURE, const.LINKAI]: return 将其改成以下代码就可以了: if btype not in [const.OPEN_AI, const.CHATGPT, const.CHATGPTONAZURE, const.LINKAI,const.XUNFEI,const.BAIDU]: return

ok