debug: RateLimitError时以debug输出异常对象类型

This commit is contained in:
Rock Chin
2023-01-12 14:37:42 +08:00
parent c7689d3c89
commit 36def20a07

View File

@@ -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