From ecab072890c29a26f7b6630a1ddd070170f37269 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Wed, 7 Feb 2024 17:41:10 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=94=B9=E5=8F=98=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=EF=BC=9B=E6=B8=85=E7=90=86=E4=B8=80=E4=BA=9B=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/qqbot/core.py | 5 ++--- model/provider/openai_official.py | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index ade964af4..3165d0bc8 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -43,12 +43,11 @@ frequency_time = 60 frequency_count = 2 # 版本 -version = '3.1.2' +version = '3.1.4' # 语言模型 REV_CHATGPT = 'rev_chatgpt' OPENAI_OFFICIAL = 'openai_official' -REV_ERNIE = 'rev_ernie' NONE_LLM = 'none_llm' chosen_provider = None # 语言模型对象 @@ -270,7 +269,7 @@ def initBot(cfg): logger.log("请给 https://github.com/Soulter/AstrBot 点个 star。", gu.LEVEL_INFO) if platform_str == '': platform_str = "(未启动任何平台,请前往面板添加)" - logger.log(f"🎉 项目启动完成\n - 启动的LLM: {len(llm_instance)}个\n - 启动的平台: {platform_str}\n - 启动的插件: {len(_global_object.cached_plugins)}个") + logger.log(f"🎉 项目启动完成") dashboard_thread.join() diff --git a/model/provider/openai_official.py b/model/provider/openai_official.py index 18fb5d2ce..9f9847d2b 100644 --- a/model/provider/openai_official.py +++ b/model/provider/openai_official.py @@ -26,12 +26,9 @@ class ProviderOpenAIOfficial(Provider): # 如果 cfg['key'] 中有长度为 1 的字符串,那么是格式错误,直接报错 for key in cfg['key']: if len(key) == 1: - input("检查到了长度为 1 的Key。配置文件中的 openai.key 处的格式错误 (符号 - 的后面要加空格),请退出程序并检查配置文件,按回车跳过。") - raise BaseException("配置文件格式错误") + raise BaseException("检查到了长度为 1 的Key。配置文件中的 openai.key 处的格式错误 (符号 - 的后面要加空格)。") if cfg['key'] != '' and cfg['key'] != None: self.key_list = cfg['key'] - else: - input("[System] 请先填写 Key。详情请前往 https://beta.openai.com/account/api-keys 或使用中转 Key 方案。") if len(self.key_list) == 0: raise Exception("您打开了 OpenAI 模型服务,但是未填写 key。请前往填写。")