forked from phoenix-oss/llama-stack-mirror
feat: support tool_choice = {required, none, <function>} (#1059)
Summary: titled Test Plan: added tests and LLAMA_STACK_CONFIG=fireworks pytest -s -v tests/client-sdk/ --safety-shield meta-llama/Llama-Guard-3-8B
This commit is contained in:
parent
37cf60b732
commit
8de7cf103b
7 changed files with 164 additions and 41 deletions
33
docs/_static/llama-stack-spec.html
vendored
33
docs/_static/llama-stack-spec.html
vendored
|
@ -2697,7 +2697,8 @@
|
|||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"required"
|
||||
"required",
|
||||
"none"
|
||||
],
|
||||
"description": "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model."
|
||||
},
|
||||
|
@ -3231,13 +3232,22 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"tool_choice": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"required"
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"required",
|
||||
"none"
|
||||
],
|
||||
"description": "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model."
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"description": "(Optional) Whether tool use is required or automatic. Defaults to ToolChoice.auto.",
|
||||
"default": "auto"
|
||||
"default": "auto",
|
||||
"description": "(Optional) Whether tool use is automatic, required, or none. Can also specify a tool name to use a specific tool. Defaults to ToolChoice.auto."
|
||||
},
|
||||
"tool_prompt_format": {
|
||||
"type": "string",
|
||||
|
@ -3259,9 +3269,6 @@
|
|||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"system_message_behavior"
|
||||
],
|
||||
"description": "Configuration for tool use."
|
||||
},
|
||||
"ToolDef": {
|
||||
|
@ -4100,7 +4107,8 @@
|
|||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"required"
|
||||
"required",
|
||||
"none"
|
||||
],
|
||||
"description": "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model."
|
||||
},
|
||||
|
@ -4384,7 +4392,8 @@
|
|||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"required"
|
||||
"required",
|
||||
"none"
|
||||
],
|
||||
"description": "(Optional) Whether tool use is required or automatic. Defaults to ToolChoice.auto. .. deprecated:: Use tool_config instead."
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue