mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 10:54:19 +00:00
Merge 4b1330a84b
into 40fdce79b3
This commit is contained in:
commit
0c871c59bc
9 changed files with 160 additions and 0 deletions
|
@ -27,6 +27,15 @@ class ToolParameter(BaseModel):
|
|||
default: Any | None = None
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class ToolAnnotations(BaseModel):
|
||||
title: str | None = None
|
||||
readOnlyHint: bool | None = None
|
||||
destructiveHint: bool | None = None
|
||||
idempotentHint: bool | None = None
|
||||
openWorldHint: bool | None = None
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class Tool(Resource):
|
||||
type: Literal[ResourceType.tool] = ResourceType.tool
|
||||
|
@ -34,6 +43,7 @@ class Tool(Resource):
|
|||
description: str
|
||||
parameters: list[ToolParameter]
|
||||
metadata: dict[str, Any] | None = None
|
||||
annotations: ToolAnnotations | None = None
|
||||
|
||||
|
||||
@json_schema_type
|
||||
|
@ -42,6 +52,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