From c8896450f651a4db2d103fc99faf91ac5d73607c Mon Sep 17 00:00:00 2001 From: zhayujie Date: Tue, 9 Apr 2024 15:57:59 +0800 Subject: [PATCH] fix: add warn log in glm --- bot/zhipuai/zhipu_ai_session.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot/zhipuai/zhipu_ai_session.py b/bot/zhipuai/zhipu_ai_session.py index 394d521..846d36a 100644 --- a/bot/zhipuai/zhipu_ai_session.py +++ b/bot/zhipuai/zhipu_ai_session.py @@ -7,6 +7,8 @@ class ZhipuAISession(Session): super().__init__(session_id, system_prompt) self.model = model self.reset() + if not system_prompt: + logger.warn("[ZhiPu] `character_desc` can not be empty") def discard_exceeding(self, max_tokens, cur_tokens=None): precise = True