Skip to content

Commit 8c00bcb

Browse files
committed
reorder
1 parent ac9d1e2 commit 8c00bcb

File tree

1 file changed

+6
-5
lines changed
  • src/llama_stack_client/lib/agents/react

1 file changed

+6
-5
lines changed

src/llama_stack_client/lib/agents/react/agent.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,6 @@ def __init__(
184184
)
185185

186186
else:
187-
# build REACT instructions
188-
client_tools = AgentUtils.get_client_tools(tools)
189-
builtin_toolgroups = [x for x in tools if isinstance(x, str) or isinstance(x, dict)]
190-
if not instructions:
191-
instructions = get_default_react_instructions(client, builtin_toolgroups, client_tools)
192187
if not tool_config:
193188
tool_config = {
194189
"tool_choice": "auto",
@@ -206,6 +201,12 @@ def __init__(
206201
"json_schema": ReActOutput.model_json_schema(),
207202
}
208203

204+
# build REACT instructions
205+
client_tools = AgentUtils.get_client_tools(tools)
206+
builtin_toolgroups = [x for x in tools if isinstance(x, str) or isinstance(x, dict)]
207+
if not instructions:
208+
instructions = get_default_react_instructions(client, builtin_toolgroups, client_tools)
209+
209210
super().__init__(
210211
client=client,
211212
model=model,

0 commit comments

Comments
 (0)