From d8173122e0c7f438e09dbd797effe2c9a3376b66 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Thu, 6 Apr 2023 22:39:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbing=20text=5Fchat?= =?UTF-8?q?=E6=8A=A5too=20many=20values=20to=20unpack=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/qqbot/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index 404fcc447..1d42d49ed 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -488,14 +488,15 @@ def oper_msg(message, at=False, msg_ref = None): send_qq_msg(message, f"[RevBing] 正忙,请稍后再试",msg_ref=msg_ref) return else: - chatgpt_res, res_code = str(asyncio.run_coroutine_threadsafe(rev_edgegpt.text_chat(qq_msg), client.loop).result()) + res, res_code = asyncio.run_coroutine_threadsafe(rev_edgegpt.text_chat(qq_msg), client.loop).result() if res_code == 0: # bing不想继续话题,重置会话后重试。 send_qq_msg(message, f"Bing不想继续话题了, 正在自动重置会话并重试。", msg_ref=msg_ref) asyncio.run_coroutine_threadsafe(rev_edgegpt.forget(), client.loop) - chatgpt_res, res_code = str(asyncio.run_coroutine_threadsafe(rev_edgegpt.text_chat(qq_msg), client.loop).result()) + res, res_code = asyncio.run_coroutine_threadsafe(rev_edgegpt.text_chat(qq_msg), client.loop).result() if res_code == 0: # bing还是不想继续话题,大概率说明提问有问题。 send_qq_msg(message, f"Bing仍然不想继续话题, 请检查您的提问。", msg_ref=msg_ref) return + chatgpt_res = str(res) if REV_EDGEGPT in reply_prefix: chatgpt_res = reply_prefix[REV_EDGEGPT] + chatgpt_res except BaseException as e: