Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: error logging for stop reasons
Andy Lifbc69e6a0c0b
diff --git a/letta/agents/letta_agent.py b/letta/agents/letta_agent.pyindex 3c7960bce..3f7faab79 100644--- a/letta/agents/letta_agent.py+++ b/letta/agents/letta_agent.py@@ -359,6 +359,8 @@ class LettaAgent(BaseAgent):# Update step if it needs to be updatedfinally:if settings.track_stop_reason:+ if step_progression == StepProgression.FINISHED and should_continue:+ continueself.logger.info("Running final update. Step Progression: %s", step_progression)try:if step_progression < StepProgression.STEP_LOGGED:@@ -586,6 +588,8 @@ class LettaAgent(BaseAgent):# Update step if it needs to be updatedfinally:if settings.track_stop_reason:+ if step_progression == StepProgression.FINISHED and should_continue:+ continueself.logger.info("Running final update. Step Progression: %s", step_progression)try:if step_progression < StepProgression.STEP_LOGGED:@@ -897,6 +901,8 @@ class LettaAgent(BaseAgent):# Update step if it needs to be updatedfinally:if settings.track_stop_reason:+ if step_progression == StepProgression.FINISHED and should_continue:+ continueself.logger.info("Running final update. Step Progression: %s", step_progression)try:if step_progression < StepProgression.STEP_LOGGED:diff --git a/tests/test_utils.py b/tests/test_utils.pyindex 846228826..87cfc127f 100644--- a/tests/test_utils.py+++ b/tests/test_utils.py@@ -1,3 +1,5 @@+import asyncio+import pytestfrom letta.constants import MAX_FILENAME_LENGTH