mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-27 14:38:49 +00:00
Merge 7123e9723c
into cbe89d2bdd
This commit is contained in:
commit
b76d629ed2
9 changed files with 168 additions and 0 deletions
|
@ -95,10 +95,19 @@ class ToolParamDefinition(BaseModel):
|
|||
default: Any | None = None
|
||||
|
||||
|
||||
class ToolAnnotations(BaseModel):
|
||||
title: str | None = None
|
||||
read_only_hint: bool | None = Field(default=None, alias="readOnlyHint")
|
||||
destructive_hint: bool | None = Field(default=None, alias="destructiveHint")
|
||||
idempotent_hint: bool | None = Field(default=None, alias="idempotentHint")
|
||||
open_world_hint: bool | None = Field(default=None, alias="openWorldHint")
|
||||
|
||||
|
||||
class ToolDefinition(BaseModel):
|
||||
tool_name: BuiltinTool | str
|
||||
description: str | None = None
|
||||
parameters: dict[str, ToolParamDefinition] | None = None
|
||||
annotations: ToolAnnotations | None = None
|
||||
|
||||
@field_validator("tool_name", mode="before")
|
||||
@classmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue