From 66f5a219d246caf3b5d16c5b59f3bad4896ecc53 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Thu, 16 Mar 2023 21:10:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8D=E5=86=8D=E6=8F=90=E7=A4=BAInv?= =?UTF-8?q?alidRequestError=E7=9A=84=E5=8F=AF=E8=83=BD=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/qqbot/message.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/qqbot/message.py b/pkg/qqbot/message.py index 9ef729db..9d124fc3 100644 --- a/pkg/qqbot/message.py +++ b/pkg/qqbot/message.py @@ -116,8 +116,7 @@ def process_normal_message(text_message: str, mgr, config, launcher_type: str, reply = handle_exception("{}会话调用API失败:{}".format(session_name, e), "[bot]err:RateLimitError,请重试或联系作者,或等待修复") except openai.error.InvalidRequestError as e: - reply = handle_exception("{}API调用参数错误:{}\n\n这可能是由于config.py中的prompt_submit_length参数或" - "completion_api_params中的max_tokens参数数值过大导致的,请尝试将其降低".format( + reply = handle_exception("{}API调用参数错误:{}\n".format( session_name, e), "[bot]err:API调用参数错误,请联系管理员,或等待修复") except openai.error.ServiceUnavailableError as e: reply = handle_exception("{}API调用服务不可用:{}".format(session_name, e), "[bot]err:API调用服务不可用,请重试或联系管理员,或等待修复")