fix: gives default empty dict to the config of model
This commit is contained in:
@@ -28,9 +28,10 @@ class Config(object):
|
|||||||
yconfig = self._load_config()
|
yconfig = self._load_config()
|
||||||
logging.config.dictConfig(yconfig["logging"])
|
logging.config.dictConfig(yconfig["logging"])
|
||||||
self.GROUPS = yconfig["groups"]["enable"]
|
self.GROUPS = yconfig["groups"]["enable"]
|
||||||
self.CHATGPT = yconfig.get("chatgpt")
|
|
||||||
self.NEWS = yconfig["news"]["receivers"]
|
self.NEWS = yconfig["news"]["receivers"]
|
||||||
self.REPORT_REMINDERS = yconfig["report_reminder"]["receivers"]
|
self.REPORT_REMINDERS = yconfig["report_reminder"]["receivers"]
|
||||||
self.TIGERBOT = yconfig.get("tigerbot")
|
|
||||||
self.XINGHUO_WEB = yconfig.get("xinghuo_web")
|
self.CHATGPT = yconfig.get("chatgpt", {})
|
||||||
self.CHATGLM = yconfig.get("chatglm")
|
self.TIGERBOT = yconfig.get("tigerbot", {})
|
||||||
|
self.XINGHUO_WEB = yconfig.get("xinghuo_web", {})
|
||||||
|
self.CHATGLM = yconfig.get("chatglm", {})
|
||||||
|
|||||||
4
robot.py
4
robot.py
@@ -60,7 +60,9 @@ class Robot(Job):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def value_check(args: dict) -> bool:
|
def value_check(args: dict) -> bool:
|
||||||
return all(value is not None for key, value in args.items() if key != 'proxy')
|
if args:
|
||||||
|
return all(value is not None for key, value in args.items() if key != 'proxy')
|
||||||
|
return False
|
||||||
|
|
||||||
def toAt(self, msg: WxMsg) -> bool:
|
def toAt(self, msg: WxMsg) -> bool:
|
||||||
"""处理被 @ 消息
|
"""处理被 @ 消息
|
||||||
|
|||||||
Reference in New Issue
Block a user