mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-27 06:28:50 +00:00
Merge 7123e9723c
into cbe89d2bdd
This commit is contained in:
commit
b76d629ed2
9 changed files with 168 additions and 0 deletions
|
@ -801,6 +801,7 @@ class ChatAgent(ShieldRunnerMixin):
|
|||
)
|
||||
for param in tool_def.parameters
|
||||
},
|
||||
annotations=tool_def.annotations,
|
||||
)
|
||||
for toolgroup_name_with_maybe_tool_name in agent_config_toolgroups:
|
||||
toolgroup_name, input_tool_name = self._parse_toolgroup_name(toolgroup_name_with_maybe_tool_name)
|
||||
|
@ -844,6 +845,7 @@ class ChatAgent(ShieldRunnerMixin):
|
|||
)
|
||||
for param in tool_def.parameters
|
||||
},
|
||||
annotations=tool_def.annotations,
|
||||
)
|
||||
tool_name_to_args[tool_def.identifier] = toolgroup_to_args.get(toolgroup_name, {})
|
||||
|
||||
|
|
|
@ -671,6 +671,7 @@ class OpenAIResponsesImpl:
|
|||
},
|
||||
"required": [p.name for p in t.parameters if p.required],
|
||||
},
|
||||
annotations=t.annotations,
|
||||
)
|
||||
)
|
||||
else:
|
||||
|
|
|
@ -57,6 +57,7 @@ async def list_mcp_tools(endpoint: str, headers: dict[str, str]) -> ListToolDefs
|
|||
description=param_schema.get("description", ""),
|
||||
)
|
||||
)
|
||||
annotations = getattr(tool, "annotations", None)
|
||||
tools.append(
|
||||
ToolDef(
|
||||
name=tool.name,
|
||||
|
@ -65,6 +66,7 @@ async def list_mcp_tools(endpoint: str, headers: dict[str, str]) -> ListToolDefs
|
|||
metadata={
|
||||
"endpoint": endpoint,
|
||||
},
|
||||
annotations=annotations,
|
||||
)
|
||||
)
|
||||
return ListToolDefsResponse(data=tools)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue