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
|
@ -10,6 +10,7 @@ from pydantic import BaseModel, Field
|
|||
from typing_extensions import TypedDict
|
||||
|
||||
from llama_stack.apis.vector_io import SearchRankingOptions as FileSearchRankingOptions
|
||||
from llama_stack.models.llama.datatypes import ToolAnnotations
|
||||
from llama_stack.schema_utils import json_schema_type, register_schema
|
||||
|
||||
# NOTE(ashwin): this file is literally a copy of the OpenAI responses API schema. We should probably
|
||||
|
@ -161,6 +162,7 @@ class MCPListToolsTool(BaseModel):
|
|||
input_schema: dict[str, Any]
|
||||
name: str
|
||||
description: str | None = None
|
||||
annotations: ToolAnnotations | None = None
|
||||
|
||||
|
||||
@json_schema_type
|
||||
|
|
|
@ -12,6 +12,7 @@ from typing_extensions import runtime_checkable
|
|||
|
||||
from llama_stack.apis.common.content_types import URL, InterleavedContent
|
||||
from llama_stack.apis.resource import Resource, ResourceType
|
||||
from llama_stack.models.llama.datatypes import ToolAnnotations
|
||||
from llama_stack.providers.utils.telemetry.trace_protocol import trace_protocol
|
||||
from llama_stack.schema_utils import json_schema_type, webmethod
|
||||
|
||||
|
@ -34,6 +35,7 @@ class Tool(Resource):
|
|||
description: str
|
||||
parameters: list[ToolParameter]
|
||||
metadata: dict[str, Any] | None = None
|
||||
annotations: ToolAnnotations | None = None
|
||||
|
||||
|
||||
@json_schema_type
|
||||
|
@ -42,6 +44,7 @@ class ToolDef(BaseModel):
|
|||
description: str | None = None
|
||||
parameters: list[ToolParameter] | None = None
|
||||
metadata: dict[str, Any] | None = None
|
||||
annotations: ToolAnnotations | None = None
|
||||
|
||||
|
||||
@json_schema_type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue