From 0941af39fbc52018310c5c422370d4b449f978a6 Mon Sep 17 00:00:00 2001 From: zyzhang1130 <36942574+zyzhang1130@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:09:18 +0800 Subject: [PATCH] Update react_agent.py Slight modification to the format_instruction to improve the success rate of `RegexTaggedContentParser` parsing the model API output. --- 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..a65d575f0 100644 --- a/src/agentscope/agents/react_agent.py +++ b/src/agentscope/agents/react_agent.py @@ -109,7 +109,7 @@ def __init__( # Initialize a parser object to formulate the response from the model self.parser = RegexTaggedContentParser( - format_instruction="""Respond with specific tags as outlined below: + format_instruction="""Respond with specific tags as outlined below in json format: {what you thought} {the function name you want to call} <{argument name}>{argument value}