diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index 9310bb158..9ccbae2f7 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -524,6 +524,9 @@ def oper_msg(message, # gu.log("检测到管理员身份", gu.LEVEL_INFO, tag="GOCQ") role = "admin" + if platform == PLATFORM_QQCHAN: + with_tag = True + if qq_msg == "": send_message(platform, message, f"Hi~", msg_ref=msg_ref) return diff --git a/model/command/command.py b/model/command/command.py index d3ef840fb..f3cf638af 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -415,7 +415,6 @@ class Command: else: return True, [Plain("设置成功: "+l[1]+" "+" ".join(l[2:])), Image.fromURL(image_url)], "keyword" except BaseException as e: - raise e return False, "设置失败: "+str(e), "keyword" def update(self, message: str, role: str): diff --git a/model/provider/provider.py b/model/provider/provider.py index ad366c331..5ddd7c749 100644 --- a/model/provider/provider.py +++ b/model/provider/provider.py @@ -5,7 +5,7 @@ class Provider: pass @abc.abstractmethod - def text_chat(self, prompt): + def text_chat(self, prompt, session_id): pass @abc.abstractmethod diff --git a/model/provider/provider_rev_chatgpt.py b/model/provider/provider_rev_chatgpt.py index 0a1eb4ff5..266275c9e 100644 --- a/model/provider/provider_rev_chatgpt.py +++ b/model/provider/provider_rev_chatgpt.py @@ -82,7 +82,7 @@ class ProviderRevChatGPT(Provider): # print("[RevChatGPT] "+str(resp)) return resp - def text_chat(self, prompt) -> str: + def text_chat(self, prompt, session_id = None) -> str: while self.is_all_busy(): time.sleep(1) res = ''