mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-12 04:50:39 +00:00
include content, don't include tool args
Summary: Test Plan:
This commit is contained in:
parent
663c6b0537
commit
1ba3ae03c1
1 changed files with 6 additions and 7 deletions
|
@ -1054,9 +1054,6 @@ async def execute_tool_call_maybe(
|
||||||
group_name = tool_to_group.get(name, None)
|
group_name = tool_to_group.get(name, None)
|
||||||
if group_name is None:
|
if group_name is None:
|
||||||
raise ValueError(f"Tool {name} not found in any tool group")
|
raise ValueError(f"Tool {name} not found in any tool group")
|
||||||
# get the arguments generated by the model and augment with toolgroup arg overrides for the agent
|
|
||||||
tool_call_args = tool_call.arguments
|
|
||||||
tool_call_args.update(toolgroup_args.get(group_name, {}))
|
|
||||||
if isinstance(name, BuiltinTool):
|
if isinstance(name, BuiltinTool):
|
||||||
if name == BuiltinTool.brave_search:
|
if name == BuiltinTool.brave_search:
|
||||||
name = WEB_SEARCH_TOOL
|
name = WEB_SEARCH_TOOL
|
||||||
|
@ -1065,10 +1062,12 @@ async def execute_tool_call_maybe(
|
||||||
|
|
||||||
result = await tool_runtime_api.invoke_tool(
|
result = await tool_runtime_api.invoke_tool(
|
||||||
tool_name=name,
|
tool_name=name,
|
||||||
kwargs=dict(
|
kwargs={
|
||||||
session_id=session_id,
|
"session_id": session_id,
|
||||||
**tool_call_args,
|
# get the arguments generated by the model and augment with toolgroup arg overrides for the agent
|
||||||
),
|
**tool_call.arguments,
|
||||||
|
**toolgroup_args.get(group_name, {}),
|
||||||
|
},
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue