Skip to content

Commit

Permalink
Fix 1257 (#1270)
Browse files Browse the repository at this point in the history
Bug Fix
  • Loading branch information
Fluder-Paradyne authored Sep 21, 2023
1 parent e153500 commit 327ebcd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions superagi/agent/agent_message_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ def _build_ltm_summary(self, past_messages, output_token_limit) -> str:
- TokenCounter(session=self.session, organisation_id=self.organisation.id).token_limit(self.llm_model)) > 0:
last_agent_feed_ltm_summary_id = AgentExecutionConfiguration.fetch_value(self.session,
self.agent_execution_id, "last_agent_feed_ltm_summary_id")
last_agent_feed_ltm_summary_id = int(last_agent_feed_ltm_summary_id.value)

last_agent_feed_ltm_summary_id = (
int(last_agent_feed_ltm_summary_id.value)
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,
AgentExecutionFeed.id) \
.filter(AgentExecutionFeed.agent_execution_id == self.agent_execution_id,
Expand Down

0 comments on commit 327ebcd

Please sign in to comment.