From 36def20a070d9089e55da77945d3af433d9ef8dc Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Thu, 12 Jan 2023 14:37:42 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20RateLimitError=E6=97=B6=E4=BB=A5debug?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E5=BC=82=E5=B8=B8=E5=AF=B9=E8=B1=A1=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/qqbot/process.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/qqbot/process.py b/pkg/qqbot/process.py index e66494ae..9aabac9d 100644 --- a/pkg/qqbot/process.py +++ b/pkg/qqbot/process.py @@ -295,6 +295,7 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes mgr.notify_admin("{}会话调用API失败:{}".format(session_name, e)) reply = ["[bot]err:调用API失败,请重试或联系作者,或等待修复"] except openai.error.RateLimitError as e: + logging.debug(type(e)) # 尝试切换api-key current_key_name = pkg.utils.context.get_openai_manager().key_mgr.get_key_name( pkg.utils.context.get_openai_manager().key_mgr.using_key