Skip to content

Commit

Permalink
Update react_agent.py
Browse files Browse the repository at this point in the history
Slight modification to the format_instruction to improve the success rate of `RegexTaggedContentParser` parsing the model API output.
  • Loading branch information
zyzhang1130 committed Nov 20, 2024
1 parent 1c5f1ba commit 0941af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/agentscope/agents/react_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
<thought>{what you thought}</thought>
<function>{the function name you want to call}</function>
<{argument name}>{argument value}</{argument name}>
Expand Down

0 comments on commit 0941af3

Please sign in to comment.