From b0cba2d9612aaade15e86ebe8dd1310ec146a781 Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Mon, 10 Mar 2025 11:09:24 -0700 Subject: [PATCH] update react example --- examples/agents/react_agent.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/agents/react_agent.py b/examples/agents/react_agent.py index bd39edc5..a60043c8 100644 --- a/examples/agents/react_agent.py +++ b/examples/agents/react_agent.py @@ -3,8 +3,8 @@ # # This source code is licensed under the terms described in the LICENSE file in # the root directory of this source tree. -import uuid import os +import uuid import fire @@ -46,12 +46,14 @@ def main(host: str, port: int): agent = ReActAgent( client=client, model=model, - builtin_toolgroups=["builtin::websearch"], - client_tools=[torchtune], + tools=[ + "builtin::websearch", + torchtune, + ], json_response_format=True, ) - session_id = agent.create_session(f"ttest-session-{uuid.uuid4().hex}") + session_id = agent.create_session(f"test-session-{uuid.uuid4().hex}") response = agent.create_turn( messages=[