chore: 改变版本号;清理一些无用变量

This commit is contained in:
Soulter
2024-02-07 17:41:10 +08:00
parent 148534d3c2
commit ecab072890
2 changed files with 3 additions and 7 deletions

View File

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

View File

@@ -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。请前往填写。")