From d1be8f91f210cd1738a9852e240698c1d8802a1d Mon Sep 17 00:00:00 2001 From: rakesh-krishna-a-s Date: Tue, 19 Sep 2023 14:10:35 +0530 Subject: [PATCH] add more condition --- superagi/agent/agent_message_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superagi/agent/agent_message_builder.py b/superagi/agent/agent_message_builder.py index bd654ea4d..08aa9edea 100644 --- a/superagi/agent/agent_message_builder.py +++ b/superagi/agent/agent_message_builder.py @@ -102,7 +102,7 @@ def _build_ltm_summary(self, past_messages, output_token_limit) -> str: self.agent_execution_id, "last_agent_feed_ltm_summary_id") last_agent_feed_ltm_summary_id = ( int(last_agent_feed_ltm_summary_id.value) - if last_agent_feed_ltm_summary_id is not None + if last_agent_feed_ltm_summary_id is not None and last_agent_feed_ltm_summary_id.value is not None else 0 ) past_messages = self.session.query(AgentExecutionFeed.role, AgentExecutionFeed.feed,