Skip to content

Commit

Permalink
Merge pull request #87 from ServiceNow/workarena_max_iters
Browse files Browse the repository at this point in the history
update workarena agent max iterations to allow longer chain of thoughts
  • Loading branch information
ollmer authored Nov 7, 2024
2 parents 9014094 + efd7b0f commit 4d0c6ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/workarena/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ def prepare_tape(self, tape: WorkArenaTape, max_chars: int = 100):

class WorkArenaAgent(Agent):
@classmethod
def create(cls, llm: LLM):
def create(cls, llm: LLM, max_iterations: int = 4):
return super().create(
llm,
nodes=[
WorkArenaNode(name="set_goal", guidance=PromptRegistry.start),
WorkArenaNode(name="reflect", guidance=PromptRegistry.reflect),
WorkArenaNode(name="act", guidance=PromptRegistry.act, next_node="reflect"),
],
max_iterations=2,
max_iterations=max_iterations,
)

0 comments on commit 4d0c6ab

Please sign in to comment.