Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Commit 3db1a7f

Browse files
authored
Merge pull request FoundationAgents#457 from cefengxu/10Mar2025cefengxu
base.py, the 'state' and  'current_step' should be reset after every loop
2 parents 72214b0 + 881ecae commit 3db1a7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/agent/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ async def run(self, request: Optional[str] = None) -> str:
144144
results.append(f"Step {self.current_step}: {step_result}")
145145

146146
if self.current_step >= self.max_steps:
147-
self.current_step = 0 # setting back to 0 when reached max steps
148-
self.state = AgentState.IDLE # setting the status
147+
self.current_step = 0
148+
self.state = AgentState.IDLE
149149
results.append(f"Terminated: Reached max steps ({self.max_steps})")
150150

151151
return "\n".join(results) if results else "No steps executed"

0 commit comments

Comments
 (0)