Bug Fixing based on basy.py

Repair from Bob Feng8 Xu
This commit is contained in:
liangxinbing 2025-03-11 13:13:24 +08:00
parent 35de1f9e15
commit eeefddf6bf

View File

@ -144,6 +144,8 @@ class BaseAgent(BaseModel, ABC):
results.append(f"Step {self.current_step}: {step_result}")
if self.current_step >= self.max_steps:
self.current_step = 0 # setting back to 0 when reached max steps
self.state = AgentState.IDLE # setting the status
results.append(f"Terminated: Reached max steps ({self.max_steps})")
return "\n".join(results) if results else "No steps executed"