Skip to content

Commit 429457a

Browse files
authored
Merge pull request #80 from pattern-tech/refactor/ai-v2
Increase agent timeout settings
2 parents e5c1cc9 + f0d0036 commit 429457a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/agent/services/agent_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,16 @@ def __init__(self, tools, memory=None, streaming: bool = True):
182182
return_intermediate_steps=True,
183183
verbose=True,
184184
callbacks=[self.streaming_handler],
185+
max_iterations=20,
186+
max_execution_time=60*3, # second
185187
handle_tool_error=True # Ensure tool errors are also captured
186188
)
187189
else:
188190
self.agent_executor = AgentExecutor(
189191
agent=self.agent,
190192
tools=self.tools,
193+
max_iterations=20,
194+
max_execution_time=60*3, # second
191195
return_intermediate_steps=True,
192196
verbose=True
193197
)

0 commit comments

Comments
 (0)