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 += (