@@ -15,7 +15,7 @@ class ChatType(IntEnum):
|
|||||||
def is_in_chat_types(chat_type: int) -> bool:
|
def is_in_chat_types(chat_type: int) -> bool:
|
||||||
if chat_type in [ChatType.TIGER_BOT.value, ChatType.CHATGPT.value,
|
if chat_type in [ChatType.TIGER_BOT.value, ChatType.CHATGPT.value,
|
||||||
ChatType.XINGHUO_WEB.value, ChatType.CHATGLM.value,
|
ChatType.XINGHUO_WEB.value, ChatType.CHATGLM.value,
|
||||||
ChatType.BardAssistant.value]:
|
ChatType.BardAssistant.value, ChatType.ZhiPu.value]:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
4
robot.py
4
robot.py
@@ -46,8 +46,8 @@ class Robot(Job):
|
|||||||
self.chat = ChatGLM(self.config.CHATGLM)
|
self.chat = ChatGLM(self.config.CHATGLM)
|
||||||
elif chat_type == ChatType.BardAssistant.value and BardAssistant.value_check(self.config.BardAssistant):
|
elif chat_type == ChatType.BardAssistant.value and BardAssistant.value_check(self.config.BardAssistant):
|
||||||
self.chat = BardAssistant(self.config.BardAssistant)
|
self.chat = BardAssistant(self.config.BardAssistant)
|
||||||
elif chat_type == ChatType.ZhiPu.value and ZhiPu.value_check(self.config.ZHIPU):
|
elif chat_type == ChatType.ZhiPu.value and ZhiPu.value_check(self.config.ZhiPu):
|
||||||
self.chat = ZhiPu(self.config.ZHIPU)
|
self.chat = ZhiPu(self.config.ZhiPu)
|
||||||
else:
|
else:
|
||||||
self.LOG.warning("未配置模型")
|
self.LOG.warning("未配置模型")
|
||||||
self.chat = None
|
self.chat = None
|
||||||
|
|||||||
Reference in New Issue
Block a user