fix: gives default empty dict to the config of model

This commit is contained in:
weiensong
2023-11-23 09:22:57 +08:00
parent 2f37ab9780
commit 49af6e2e13
2 changed files with 8 additions and 5 deletions

View File

@@ -28,9 +28,10 @@ class Config(object):
yconfig = self._load_config()
logging.config.dictConfig(yconfig["logging"])
self.GROUPS = yconfig["groups"]["enable"]
self.CHATGPT = yconfig.get("chatgpt")
self.NEWS = yconfig["news"]["receivers"]
self.REPORT_REMINDERS = yconfig["report_reminder"]["receivers"]
self.TIGERBOT = yconfig.get("tigerbot")
self.XINGHUO_WEB = yconfig.get("xinghuo_web")
self.CHATGLM = yconfig.get("chatglm")
self.CHATGPT = yconfig.get("chatgpt", {})
self.TIGERBOT = yconfig.get("tigerbot", {})
self.XINGHUO_WEB = yconfig.get("xinghuo_web", {})
self.CHATGLM = yconfig.get("chatglm", {})