From cb7b6a111f9edcb549b86d52fdf457779eeb6ce6 Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Wed, 18 Oct 2023 21:16:20 +0800 Subject: [PATCH] feat(Agent): ChatAgent And AgentHub 1.Upgrade sqlalchemy to version 2.0 --- pilot/scene/base_chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pilot/scene/base_chat.py b/pilot/scene/base_chat.py index d1e6ad8ac..26c1f0aa6 100644 --- a/pilot/scene/base_chat.py +++ b/pilot/scene/base_chat.py @@ -359,7 +359,7 @@ class BaseChat(ABC): ) if len(self.history_message) > self.chat_retention_rounds: for first_message in self.history_message[0]["messages"]: - if not first_message["type"] in [ModelMessageRoleType.VIEW]: + if not first_message["type"] in [ModelMessageRoleType.VIEW, ModelMessageRoleType.SYSTEM]: message_type = first_message["type"] message_content = first_message["data"]["content"] history_text += (