mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
add safety
This commit is contained in:
parent
256f1d5991
commit
13e1667e7a
5 changed files with 279 additions and 106 deletions
|
@ -18,6 +18,7 @@ from model_types import (
|
|||
PretrainedModel,
|
||||
SamplingParams,
|
||||
StopReason,
|
||||
ShieldConfig,
|
||||
ToolCall,
|
||||
ToolDefinition,
|
||||
ToolResponse,
|
||||
|
@ -118,13 +119,16 @@ class AgenticSystemCreateRequest:
|
|||
instructions: str
|
||||
model: InstructModel
|
||||
|
||||
# zero-shot tool definitions as input to the model
|
||||
available_tools: List[Union[BuiltinTool, ToolDefinition]] = field(
|
||||
default_factory=list
|
||||
)
|
||||
# zero-shot or built-in tool configurations as input to the model
|
||||
available_tools: List[ToolDefinition] = field(default_factory=list)
|
||||
|
||||
# tools which aren't executable are emitted as tool calls which the users can
|
||||
# execute themselves.
|
||||
executable_tools: Set[str] = field(default_factory=set)
|
||||
|
||||
input_shields: List[ShieldConfig] = field(default_factory=list)
|
||||
output_shields: List[ShieldConfig] = field(default_factory=list)
|
||||
|
||||
|
||||
@json_schema_type
|
||||
@dataclass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue