perf: The server is overloaded or not ready yet.时进行中文提示 #59

This commit is contained in:
Rock Chin 2022-12-26 23:59:45 +08:00
parent 5c0cd841f9
commit 4de70abf47

View File

@ -163,6 +163,9 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str) ->
"completion_api_params中的max_tokens参数数值过大导致的请尝试将其降低".format(
session_name, e))
reply = ["[bot]err:API调用参数错误请联系作者或等待修复"]
except openai.error.ServiceUnavailableError as e:
# mgr.notify_admin("{}API调用服务不可用:{}".format(session_name, e))
reply = ["[bot]err:API调用服务暂不可用请尝试重试"]
except Exception as e:
logging.exception(e)
reply = ["[bot]err:{}".format(e)]