chatgpt-on-wechat icon indicating copy to clipboard operation
chatgpt-on-wechat copied to clipboard

插件正常启动可以#help,但是$唤醒任何插件都报错,比如角色扮演

Open hellangleZ opened this issue 1 year ago • 15 comments

前置确认

  • [X] 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。

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

  • [X] 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue

操作系统类型?

Linux

运行的python版本是?

python 3.10

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

Latest Release

运行的channel类型是?

wxy(个人微信, wechaty)

复现步骤 🕹

每次都可以复现启动时看见plug in成功启动,但是运行报错

问题描述 😯

正常用唤醒词唤醒插件,但是报错

1682434998814

终端日志 📒

DEBUG][2023-04-25 15:34:41][chat_channel.py:307] - [WX] consume context: Context(type=TEXT, content=$role help, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f259b1392d0>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': '@141d86333626a5f1d1912dc1ae698b817faf13ab510451c7fd7819fde40a5439', 'receiver': '@141d86333626a5f1d1912dc1ae698b817faf13ab510451c7fd7819fde40a5439'}) [DEBUG][2023-04-25 15:34:41][chat_channel.py:141] - [WX] ready to handle context: Context(type=TEXT, content=$role help, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f259b1392d0>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': '@141d86333626a5f1d1912dc1ae698b817faf13ab510451c7fd7819fde40a5439', 'receiver': '@141d86333626a5f1d1912dc1ae698b817faf13ab510451c7fd7819fde40a5439'}) [DEBUG][2023-04-25 15:34:41][plugin_manager.py:163] - Plugin ROLE triggered by event Event.ON_HANDLE_CONTEXT [DEBUG][2023-04-25 15:34:41][plugin_manager.py:163] - Plugin GODCMD triggered by event Event.ON_HANDLE_CONTEXT [DEBUG][2023-04-25 15:34:41][godcmd.py:206] - [Godcmd] on_handle_context. content: $role help [DEBUG][2023-04-25 15:34:41][plugin_manager.py:163] - Plugin KEYWORD triggered by event Event.ON_HANDLE_CONTEXT [DEBUG][2023-04-25 15:34:41][keyword.py:52] - [keyword] on_handle_context. content: $role help [DEBUG][2023-04-25 15:34:41][plugin_manager.py:163] - Plugin DUNGEON triggered by event Event.ON_HANDLE_CONTEXT [DEBUG][2023-04-25 15:34:41][plugin_manager.py:163] - Plugin HELLO triggered by event Event.ON_HANDLE_CONTEXT [DEBUG][2023-04-25 15:34:41][hello.py:48] - [Hello] on_handle_context. content: $role help [DEBUG][2023-04-25 15:34:41][plugin_manager.py:163] - Plugin FINISH triggered by event Event.ON_HANDLE_CONTEXT [DEBUG][2023-04-25 15:34:41][finish.py:30] - [Finish] on_handle_context. content: $role help [DEBUG][2023-04-25 15:34:41][chat_channel.py:145] - [WX] ready to decorate reply: Reply(type=ERROR, content=未知插件命令 查看插件命令列表请输入#help 插件名 ) [DEBUG][2023-04-25 15:34:41][chat_channel.py:246] - [WX] ready to send reply: Reply(type=ERROR, content=[ERROR] 未知插件命令 查看插件命令列表请输入#help 插件名 ), context: Context(type=TEXT, content=$role help, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f259b1392d0>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': '@141d86333626a5f1d1912dc1ae698b817faf13ab510451c7fd7819fde40a5439', 'receiver': '@141d86333626a5f1d1912dc1ae698b817faf13ab510451c7fd7819fde40a5439'}) [INFO][2023-04-25 15:34:41][wechat_channel.py:196] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] 未知插件命令 查看插件命令列表请输入#help 插件名 ), receiver=@141d86333626a5f1d1912dc1ae698b817faf13ab510451c7fd7819fde40a5439 [DEBUG][2023-04-25 15:34:41][chat_channel.py:262] - Worker return success, session_id = @141d86333626a5f1d1912dc1ae698b817faf13ab510451c7fd7819fde40a5439

hellangleZ avatar Apr 25 '23 15:04 hellangleZ

输入#help role看看

lanvent avatar Apr 25 '23 16:04 lanvent

这一步也是可以的,但是再下一级就报错了,比如 b $role 猫娘 , 我查了我的json都是存在的

1682439014678

hellangleZ avatar Apr 25 '23 16:04 hellangleZ

只输入#help看一下呢

lanvent avatar Apr 25 '23 16:04 lanvent

只输入#help看一下呢 这个操作也是可以的,就是到role级别不行

1682439678505

hellangleZ avatar Apr 25 '23 16:04 hellangleZ

#plist 看一下

管理员指令参考: https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/godcmd

lanvent avatar Apr 25 '23 16:04 lanvent

#plist 看一下

管理员指令参考: https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/godcmd 1682440982528

我看role是启用状态

hellangleZ avatar Apr 25 '23 16:04 hellangleZ

给我看一下配置文件吧,注意隐去apikey

lanvent avatar Apr 25 '23 16:04 lanvent

给我看一下配置文件吧,注意隐去apikey

您好,我用的是Azure的

"use_azure_chatgpt":true, "open_ai_api_base": "https://a-wxf.openai.azure.com/", "open_ai_api_key": "", "model": "gpt-35-turbo", "azure_deployment_id": "gpt", "image_create_prefix": ["画", "看", "找"], "speech_recognition": true,
"group_speech_recognition": true, "voice_reply_voice": false,
"always_reply_voice": false,
"voice_to_text": "azure",
"text_to_voice": "azure",
"azure_voice_api_key":"", "azure_voice_region":"eastus", "single_chat_prefix": [ "bot","b", "@bot" ], "single_chat_reply_prefix": "[bot] ", "group_chat_prefix": [ "RBQ","机器人" ], "group_name_white_list": [ "ALL_GROUP"

], "group_chat_in_one_session": [ "ALL_GROUP" ], "image_create_size": "256x256", "plugin_trigger_prefix": "$", "debug": true,

"conversation_max_tokens": 1000, "expires_in_seconds": 3600, "character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。"

hellangleZ avatar Apr 25 '23 16:04 hellangleZ

是代码这边的问题,默认关闭了AZURE的角色扮演插件

lanvent avatar Apr 25 '23 17:04 lanvent

是代码这边的问题,默认关闭了AZURE的角色扮演插件

...那我可以在哪个文件改一下,我这找了好就,没找到。。。

hellangleZ avatar Apr 25 '23 17:04 hellangleZ

后面我也提个request把,我Azure dall-E也不行。。。url拼接是有问题的

hellangleZ avatar Apr 25 '23 17:04 hellangleZ

你更新到master的最新代码吧

lanvent avatar Apr 25 '23 17:04 lanvent

麻烦你提交PR了,我们没有账号来测试Azure上的OpenAI service 🥲

lanvent avatar Apr 25 '23 17:04 lanvent

麻烦你提交PR了,我们没有账号来测试Azure上的OpenAI service 🥲

多谢了,我后面会提的,然后这个问题,用新的代码仓库已经fix,非常感谢

1682442848077

hellangleZ avatar Apr 25 '23 17:04 hellangleZ

好的,感谢反馈!

lanvent avatar Apr 25 '23 17:04 lanvent