Skip to content

Commit

Permalink
fix: 修复默认配置迁移问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulter committed Jul 27, 2024
1 parent b9a8994 commit 185c229
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 138 deletions.
5 changes: 4 additions & 1 deletion astrbot/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,7 @@ def load_plugins(self):
self.plugin_manager.plugin_reload()

def load_platform(self):
return self.platfrom_manager.load_platforms()
platforms = self.platfrom_manager.load_platforms()
if not platforms:
logger.warn("未启用任何消息平台。")
return platforms
137 changes: 0 additions & 137 deletions configs/config.yaml

This file was deleted.

38 changes: 38 additions & 0 deletions util/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,44 @@ def init_configs():
'''
cc = CmdConfig()

cc.init_attributes("qqbot", {
"enable": False,
"appid": "",
"token": "",
})
cc.init_attributes("gocqbot", {
"enable": False,
})
cc.init_attributes("uniqueSessionMode", False)
cc.init_attributes("dump_history_interval", 10)
cc.init_attributes("limit", {
"time": 60,
"count": 30,
})
cc.init_attributes("notice", "")
cc.init_attributes("direct_message_mode", True)
cc.init_attributes("reply_prefix", "")
cc.init_attributes("baidu_aip", {
"enable": False,
"app_id": "",
"api_key": "",
"secret_key": ""
})
cc.init_attributes("openai", {
"key": [],
"api_base": "",
"chatGPTConfigs": {
"model": "gpt-4o",
"max_tokens": 6000,
"temperature": 0.9,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
},
"total_tokens_limit": 10000,
})


cc.init_attributes("qq_forward_threshold", 200)
cc.init_attributes("qq_welcome", "")
cc.init_attributes("qq_pic_mode", True)
Expand Down

0 comments on commit 185c229

Please sign in to comment.