This commit is contained in:
Soulter
2023-09-02 11:11:54 +08:00
parent 7d08f57b32
commit 8a017ff693
4 changed files with 5 additions and 3 deletions
+3
View File
@@ -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
-1
View File
@@ -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):
+1 -1
View File
@@ -5,7 +5,7 @@ class Provider:
pass
@abc.abstractmethod
def text_chat(self, prompt):
def text_chat(self, prompt, session_id):
pass
@abc.abstractmethod
+1 -1
View File
@@ -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 = ''