From eeee97a35a9a7c95b4e0eacf551058ff54ac4d7f Mon Sep 17 00:00:00 2001 From: zzzmc <75374117+zzzmc@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:59:59 +0800 Subject: [PATCH] [HOTFIX] Fix the bug in ReAct Agent that the parameter `max_retries` doesn't work (#464) Co-authored-by: zengminchen --- src/agentscope/agents/react_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agentscope/agents/react_agent.py b/src/agentscope/agents/react_agent.py index a806c40a9..87025afdd 100644 --- a/src/agentscope/agents/react_agent.py +++ b/src/agentscope/agents/react_agent.py @@ -123,7 +123,7 @@ def reply(self, x: Optional[Union[Msg, Sequence[Msg]]] = None) -> Msg: """The reply method of the agent.""" self.memory.add(x) - for _ in range(10): + for _ in range(self.max_iters): # Step 1: Reasoning: decide what function to call function_call = self._reasoning()