Update base.py

This commit is contained in:
mannaandpoem 2025-03-12 22:25:02 +08:00 committed by GitHub
parent e183913372
commit 881ecaefa6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -144,8 +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 cefengxu
self.state = AgentState.IDLE # setting the status cefengxu
self.current_step = 0
self.state = AgentState.IDLE
results.append(f"Terminated: Reached max steps ({self.max_steps})")
return "\n".join(results) if results else "No steps executed"