From 07abad6a148000e40d5534d263433e5ad0ae5e8a Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Fri, 7 Apr 2023 13:23:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=86tips=E7=9A=84=E5=80=BC?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=B8=BAstr=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/qqbot/cmds/session/reset.py | 2 +- pkg/qqbot/manager.py | 4 ++-- tips-custom-template.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/qqbot/cmds/session/reset.py b/pkg/qqbot/cmds/session/reset.py index 3b43187f..172e5130 100644 --- a/pkg/qqbot/cmds/session/reset.py +++ b/pkg/qqbot/cmds/session/reset.py @@ -23,7 +23,7 @@ class ResetCommand(AbstractCommandNode): if len(params) == 0: pkg.openai.session.get_session(session_name).reset(explicit=True) - reply = tips_custom.command_reset_message + reply = [tips_custom.command_reset_message] else: try: import pkg.openai.dprompt as dprompt diff --git a/pkg/qqbot/manager.py b/pkg/qqbot/manager.py index 2e98f625..041dac19 100644 --- a/pkg/qqbot/manager.py +++ b/pkg/qqbot/manager.py @@ -269,7 +269,7 @@ class QQBotManager: if failed == self.retry: pkg.openai.session.get_session('person_{}'.format(event.sender.id)).release_response_lock() self.notify_admin("{} 请求超时".format("person_{}".format(event.sender.id))) - reply = tips_custom.reply_message + reply = [tips_custom.reply_message] if reply: return self.send(event, reply, check_quote=False) @@ -309,7 +309,7 @@ class QQBotManager: if failed == self.retry: pkg.openai.session.get_session('group_{}'.format(event.group.id)).release_response_lock() self.notify_admin("{} 请求超时".format("group_{}".format(event.group.id))) - replys = tips_custom.replys_message + replys = [tips_custom.replys_message] return replys diff --git a/tips-custom-template.py b/tips-custom-template.py index 5ba44879..f2ebe57c 100644 --- a/tips-custom-template.py +++ b/tips-custom-template.py @@ -32,9 +32,9 @@ help_message = """【可自定义】 # QChatGPT/pkg/qqbot/manager.py # 私聊消息超时提示,line:271 -reply_message = ["私聊请求超时"] +reply_message = "私聊请求超时" # 群聊消息超时提示,line:310 -replys_message = ["群聊请求超时"] +replys_message = "群聊请求超时" # 指令权限不足/无效提示 # QChatGPT/pkg/qqbot/command.py,line:57 @@ -46,5 +46,5 @@ command_err_message = "指令执行出错:" # 会话重置提示 # pkg/qqbot/cmds/session/reset.py,line:25,31 -command_reset_message = ["[bot]会话已重置"] +command_reset_message = "[bot]会话已重置" command_reset_name_message = "[bot]会话已重置,使用场景预设:"