From db66cbfb9c372f20f11c45485f2ed045401645e3 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Fri, 3 Mar 2023 17:29:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=80=86=E5=90=91?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=BA=9B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/qqbot/core.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index 9aa0adebd..239cc1aa3 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -188,11 +188,14 @@ def initBot(cfg, prov): from addons.revChatGPT.revchatgpt import revChatGPT for i in range(0, len(cfg['rev_ChatGPT']['account'])): print(f"[System] 正在创建rev_ChatGPT负载{str(i)}: " + cfg['rev_ChatGPT']['account'][i]['email']) - revstat = { - 'obj': revChatGPT(cfg['rev_ChatGPT']['account'][i]), - 'busy': False - } - rev_chatgpt.append(revstat) + try: + revstat = { + 'obj': revChatGPT(cfg['rev_ChatGPT']['account'][i]), + 'busy': False + } + rev_chatgpt.append(revstat) + except: + print("[System] 创建rev_ChatGPT负载失败") else: input("[System-err] 请退出本程序, 然后在配置文件中填写rev_ChatGPT的email和password") elif prov == OPENAI_OFFICIAL: