mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-13 05:17:26 +00:00
Merge branch 'agents-unify-tools-2' into agents-unify-tools-3
This commit is contained in:
commit
9f2f6c9b30
4 changed files with 673 additions and 673 deletions
824
docs/_static/llama-stack-spec.html
vendored
824
docs/_static/llama-stack-spec.html
vendored
|
@ -274,67 +274,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/continue": {
|
|
||||||
"post": {
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "A single turn in an interaction with an Agentic System. **OR** streamed agent turn completion response.",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/Turn"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"text/event-stream": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/AgentTurnResponseStreamChunk"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tags": [
|
|
||||||
"Agents"
|
|
||||||
],
|
|
||||||
"description": "",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "agent_id",
|
|
||||||
"in": "path",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "session_id",
|
|
||||||
"in": "path",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "turn_id",
|
|
||||||
"in": "path",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/ContinueAgentTurnRequest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/v1/agents": {
|
"/v1/agents": {
|
||||||
"post": {
|
"post": {
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -2376,6 +2315,67 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume": {
|
||||||
|
"post": {
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "A single turn in an interaction with an Agentic System. **OR** streamed agent turn completion response.",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Turn"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"text/event-stream": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/AgentTurnResponseStreamChunk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Agents"
|
||||||
|
],
|
||||||
|
"description": "",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "agent_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "session_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "turn_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ResumeAgentTurnRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/eval/benchmarks/{benchmark_id}/jobs": {
|
"/v1/eval/benchmarks/{benchmark_id}/jobs": {
|
||||||
"post": {
|
"post": {
|
||||||
"responses": {
|
"responses": {
|
||||||
|
@ -3951,24 +3951,349 @@
|
||||||
"title": "CompletionResponseStreamChunk",
|
"title": "CompletionResponseStreamChunk",
|
||||||
"description": "A chunk of a streamed completion response."
|
"description": "A chunk of a streamed completion response."
|
||||||
},
|
},
|
||||||
"ContinueAgentTurnRequest": {
|
"AgentConfig": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"tool_responses": {
|
"sampling_params": {
|
||||||
|
"$ref": "#/components/schemas/SamplingParams"
|
||||||
|
},
|
||||||
|
"input_shields": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/ToolResponseMessage"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"stream": {
|
"output_shields": {
|
||||||
"type": "boolean"
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toolgroups": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/AgentTool"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"client_tools": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ToolDef"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tool_choice": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"auto",
|
||||||
|
"required",
|
||||||
|
"none"
|
||||||
|
],
|
||||||
|
"title": "ToolChoice",
|
||||||
|
"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.",
|
||||||
|
"deprecated": true
|
||||||
|
},
|
||||||
|
"tool_prompt_format": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"json",
|
||||||
|
"function_tag",
|
||||||
|
"python_list"
|
||||||
|
],
|
||||||
|
"title": "ToolPromptFormat",
|
||||||
|
"description": "Prompt format for calling custom / zero shot tools.",
|
||||||
|
"deprecated": true
|
||||||
|
},
|
||||||
|
"tool_config": {
|
||||||
|
"$ref": "#/components/schemas/ToolConfig"
|
||||||
|
},
|
||||||
|
"max_infer_iters": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 10
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"instructions": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"enable_session_persistence": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"response_format": {
|
||||||
|
"$ref": "#/components/schemas/ResponseFormat"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"required": [
|
||||||
"tool_responses"
|
"model",
|
||||||
|
"instructions"
|
||||||
],
|
],
|
||||||
"title": "ContinueAgentTurnRequest"
|
"title": "AgentConfig"
|
||||||
|
},
|
||||||
|
"AgentTool": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"name",
|
||||||
|
"args"
|
||||||
|
],
|
||||||
|
"title": "AgentToolGroupWithArgs"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ToolDef": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ToolParameter"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"title": "ToolDef"
|
||||||
|
},
|
||||||
|
"ToolParameter": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"parameter_type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"required": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"name",
|
||||||
|
"parameter_type",
|
||||||
|
"description",
|
||||||
|
"required"
|
||||||
|
],
|
||||||
|
"title": "ToolParameter"
|
||||||
|
},
|
||||||
|
"CreateAgentRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"agent_config": {
|
||||||
|
"$ref": "#/components/schemas/AgentConfig"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"agent_config"
|
||||||
|
],
|
||||||
|
"title": "CreateAgentRequest"
|
||||||
|
},
|
||||||
|
"AgentCreateResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"agent_id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"agent_id"
|
||||||
|
],
|
||||||
|
"title": "AgentCreateResponse"
|
||||||
|
},
|
||||||
|
"CreateAgentSessionRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"session_name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"session_name"
|
||||||
|
],
|
||||||
|
"title": "CreateAgentSessionRequest"
|
||||||
|
},
|
||||||
|
"AgentSessionCreateResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"session_id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"session_id"
|
||||||
|
],
|
||||||
|
"title": "AgentSessionCreateResponse"
|
||||||
|
},
|
||||||
|
"CreateAgentTurnRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"messages": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/UserMessage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/ToolResponseMessage"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stream": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"documents": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"content": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/InterleavedContentItem"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/InterleavedContentItem"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/URL"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mime_type": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"content",
|
||||||
|
"mime_type"
|
||||||
|
],
|
||||||
|
"title": "Document"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toolgroups": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/AgentTool"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tool_config": {
|
||||||
|
"$ref": "#/components/schemas/ToolConfig"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"messages"
|
||||||
|
],
|
||||||
|
"title": "CreateAgentTurnRequest"
|
||||||
},
|
},
|
||||||
"InferenceStep": {
|
"InferenceStep": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -4581,350 +4906,6 @@
|
||||||
],
|
],
|
||||||
"title": "AgentTurnResponseTurnStartPayload"
|
"title": "AgentTurnResponseTurnStartPayload"
|
||||||
},
|
},
|
||||||
"AgentConfig": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"sampling_params": {
|
|
||||||
"$ref": "#/components/schemas/SamplingParams"
|
|
||||||
},
|
|
||||||
"input_shields": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"output_shields": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toolgroups": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/AgentTool"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"client_tools": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/ToolDef"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tool_choice": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"auto",
|
|
||||||
"required",
|
|
||||||
"none"
|
|
||||||
],
|
|
||||||
"title": "ToolChoice",
|
|
||||||
"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.",
|
|
||||||
"deprecated": true
|
|
||||||
},
|
|
||||||
"tool_prompt_format": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"json",
|
|
||||||
"function_tag",
|
|
||||||
"python_list"
|
|
||||||
],
|
|
||||||
"title": "ToolPromptFormat",
|
|
||||||
"description": "Prompt format for calling custom / zero shot tools.",
|
|
||||||
"deprecated": true
|
|
||||||
},
|
|
||||||
"tool_config": {
|
|
||||||
"$ref": "#/components/schemas/ToolConfig"
|
|
||||||
},
|
|
||||||
"max_infer_iters": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": 10
|
|
||||||
},
|
|
||||||
"model": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"instructions": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"enable_session_persistence": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"response_format": {
|
|
||||||
"$ref": "#/components/schemas/ResponseFormat"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"model",
|
|
||||||
"instructions"
|
|
||||||
],
|
|
||||||
"title": "AgentConfig"
|
|
||||||
},
|
|
||||||
"AgentTool": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"name": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"args": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "array"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"name",
|
|
||||||
"args"
|
|
||||||
],
|
|
||||||
"title": "AgentToolGroupWithArgs"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ToolDef": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"name": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"parameters": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/ToolParameter"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"metadata": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "array"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"title": "ToolDef"
|
|
||||||
},
|
|
||||||
"ToolParameter": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"name": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"parameter_type": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"required": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"default": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "array"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"name",
|
|
||||||
"parameter_type",
|
|
||||||
"description",
|
|
||||||
"required"
|
|
||||||
],
|
|
||||||
"title": "ToolParameter"
|
|
||||||
},
|
|
||||||
"CreateAgentRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"agent_config": {
|
|
||||||
"$ref": "#/components/schemas/AgentConfig"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"agent_config"
|
|
||||||
],
|
|
||||||
"title": "CreateAgentRequest"
|
|
||||||
},
|
|
||||||
"AgentCreateResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"agent_id": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"agent_id"
|
|
||||||
],
|
|
||||||
"title": "AgentCreateResponse"
|
|
||||||
},
|
|
||||||
"CreateAgentSessionRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"session_name": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"session_name"
|
|
||||||
],
|
|
||||||
"title": "CreateAgentSessionRequest"
|
|
||||||
},
|
|
||||||
"AgentSessionCreateResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"session_id": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"session_id"
|
|
||||||
],
|
|
||||||
"title": "AgentSessionCreateResponse"
|
|
||||||
},
|
|
||||||
"CreateAgentTurnRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"messages": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/UserMessage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/ToolResponseMessage"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stream": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"documents": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"content": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/InterleavedContentItem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/InterleavedContentItem"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/URL"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"mime_type": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"content",
|
|
||||||
"mime_type"
|
|
||||||
],
|
|
||||||
"title": "Document"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toolgroups": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/AgentTool"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tool_config": {
|
|
||||||
"$ref": "#/components/schemas/ToolConfig"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"messages"
|
|
||||||
],
|
|
||||||
"title": "CreateAgentTurnRequest"
|
|
||||||
},
|
|
||||||
"CreateUploadSessionRequest": {
|
"CreateUploadSessionRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -8118,6 +8099,25 @@
|
||||||
],
|
],
|
||||||
"title": "RegisterVectorDbRequest"
|
"title": "RegisterVectorDbRequest"
|
||||||
},
|
},
|
||||||
|
"ResumeAgentTurnRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"tool_responses": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ToolResponseMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stream": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"tool_responses"
|
||||||
|
],
|
||||||
|
"title": "ResumeAgentTurnRequest"
|
||||||
|
},
|
||||||
"RunEvalRequest": {
|
"RunEvalRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
516
docs/_static/llama-stack-spec.yaml
vendored
516
docs/_static/llama-stack-spec.yaml
vendored
|
@ -160,45 +160,6 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/CompletionRequest'
|
$ref: '#/components/schemas/CompletionRequest'
|
||||||
required: true
|
required: true
|
||||||
/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/continue:
|
|
||||||
post:
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: >-
|
|
||||||
A single turn in an interaction with an Agentic System. **OR** streamed
|
|
||||||
agent turn completion response.
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/Turn'
|
|
||||||
text/event-stream:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/AgentTurnResponseStreamChunk'
|
|
||||||
tags:
|
|
||||||
- Agents
|
|
||||||
description: ''
|
|
||||||
parameters:
|
|
||||||
- name: agent_id
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- name: session_id
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- name: turn_id
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/ContinueAgentTurnRequest'
|
|
||||||
required: true
|
|
||||||
/v1/agents:
|
/v1/agents:
|
||||||
post:
|
post:
|
||||||
responses:
|
responses:
|
||||||
|
@ -1440,6 +1401,45 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/QueryTracesRequest'
|
$ref: '#/components/schemas/QueryTracesRequest'
|
||||||
required: true
|
required: true
|
||||||
|
/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume:
|
||||||
|
post:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: >-
|
||||||
|
A single turn in an interaction with an Agentic System. **OR** streamed
|
||||||
|
agent turn completion response.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Turn'
|
||||||
|
text/event-stream:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/AgentTurnResponseStreamChunk'
|
||||||
|
tags:
|
||||||
|
- Agents
|
||||||
|
description: ''
|
||||||
|
parameters:
|
||||||
|
- name: agent_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: session_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: turn_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ResumeAgentTurnRequest'
|
||||||
|
required: true
|
||||||
/v1/eval/benchmarks/{benchmark_id}/jobs:
|
/v1/eval/benchmarks/{benchmark_id}/jobs:
|
||||||
post:
|
post:
|
||||||
responses:
|
responses:
|
||||||
|
@ -2570,19 +2570,219 @@ components:
|
||||||
title: CompletionResponseStreamChunk
|
title: CompletionResponseStreamChunk
|
||||||
description: >-
|
description: >-
|
||||||
A chunk of a streamed completion response.
|
A chunk of a streamed completion response.
|
||||||
ContinueAgentTurnRequest:
|
AgentConfig:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
tool_responses:
|
sampling_params:
|
||||||
|
$ref: '#/components/schemas/SamplingParams'
|
||||||
|
input_shields:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ToolResponseMessage'
|
type: string
|
||||||
stream:
|
output_shields:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
toolgroups:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/AgentTool'
|
||||||
|
client_tools:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
tool_choice:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- auto
|
||||||
|
- required
|
||||||
|
- none
|
||||||
|
title: ToolChoice
|
||||||
|
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.
|
||||||
|
deprecated: true
|
||||||
|
tool_prompt_format:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- json
|
||||||
|
- function_tag
|
||||||
|
- python_list
|
||||||
|
title: ToolPromptFormat
|
||||||
|
description: >-
|
||||||
|
Prompt format for calling custom / zero shot tools.
|
||||||
|
deprecated: true
|
||||||
|
tool_config:
|
||||||
|
$ref: '#/components/schemas/ToolConfig'
|
||||||
|
max_infer_iters:
|
||||||
|
type: integer
|
||||||
|
default: 10
|
||||||
|
model:
|
||||||
|
type: string
|
||||||
|
instructions:
|
||||||
|
type: string
|
||||||
|
enable_session_persistence:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
default: false
|
||||||
|
response_format:
|
||||||
|
$ref: '#/components/schemas/ResponseFormat'
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
required:
|
required:
|
||||||
- tool_responses
|
- model
|
||||||
title: ContinueAgentTurnRequest
|
- instructions
|
||||||
|
title: AgentConfig
|
||||||
|
AgentTool:
|
||||||
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
args:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
- args
|
||||||
|
title: AgentToolGroupWithArgs
|
||||||
|
ToolDef:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
parameters:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ToolParameter'
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
title: ToolDef
|
||||||
|
ToolParameter:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
parameter_type:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
default:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
- parameter_type
|
||||||
|
- description
|
||||||
|
- required
|
||||||
|
title: ToolParameter
|
||||||
|
CreateAgentRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
agent_config:
|
||||||
|
$ref: '#/components/schemas/AgentConfig'
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- agent_config
|
||||||
|
title: CreateAgentRequest
|
||||||
|
AgentCreateResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
agent_id:
|
||||||
|
type: string
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- agent_id
|
||||||
|
title: AgentCreateResponse
|
||||||
|
CreateAgentSessionRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
session_name:
|
||||||
|
type: string
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- session_name
|
||||||
|
title: CreateAgentSessionRequest
|
||||||
|
AgentSessionCreateResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
session_id:
|
||||||
|
type: string
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- session_id
|
||||||
|
title: AgentSessionCreateResponse
|
||||||
|
CreateAgentTurnRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
messages:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/UserMessage'
|
||||||
|
- $ref: '#/components/schemas/ToolResponseMessage'
|
||||||
|
stream:
|
||||||
|
type: boolean
|
||||||
|
documents:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
content:
|
||||||
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
- $ref: '#/components/schemas/InterleavedContentItem'
|
||||||
|
- type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/InterleavedContentItem'
|
||||||
|
- $ref: '#/components/schemas/URL'
|
||||||
|
mime_type:
|
||||||
|
type: string
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- content
|
||||||
|
- mime_type
|
||||||
|
title: Document
|
||||||
|
toolgroups:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/AgentTool'
|
||||||
|
tool_config:
|
||||||
|
$ref: '#/components/schemas/ToolConfig'
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- messages
|
||||||
|
title: CreateAgentTurnRequest
|
||||||
InferenceStep:
|
InferenceStep:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -2990,219 +3190,6 @@ components:
|
||||||
- event_type
|
- event_type
|
||||||
- turn_id
|
- turn_id
|
||||||
title: AgentTurnResponseTurnStartPayload
|
title: AgentTurnResponseTurnStartPayload
|
||||||
AgentConfig:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
sampling_params:
|
|
||||||
$ref: '#/components/schemas/SamplingParams'
|
|
||||||
input_shields:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
output_shields:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
toolgroups:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/AgentTool'
|
|
||||||
client_tools:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/ToolDef'
|
|
||||||
tool_choice:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- auto
|
|
||||||
- required
|
|
||||||
- none
|
|
||||||
title: ToolChoice
|
|
||||||
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.
|
|
||||||
deprecated: true
|
|
||||||
tool_prompt_format:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- json
|
|
||||||
- function_tag
|
|
||||||
- python_list
|
|
||||||
title: ToolPromptFormat
|
|
||||||
description: >-
|
|
||||||
Prompt format for calling custom / zero shot tools.
|
|
||||||
deprecated: true
|
|
||||||
tool_config:
|
|
||||||
$ref: '#/components/schemas/ToolConfig'
|
|
||||||
max_infer_iters:
|
|
||||||
type: integer
|
|
||||||
default: 10
|
|
||||||
model:
|
|
||||||
type: string
|
|
||||||
instructions:
|
|
||||||
type: string
|
|
||||||
enable_session_persistence:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
response_format:
|
|
||||||
$ref: '#/components/schemas/ResponseFormat'
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- model
|
|
||||||
- instructions
|
|
||||||
title: AgentConfig
|
|
||||||
AgentTool:
|
|
||||||
oneOf:
|
|
||||||
- type: string
|
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
args:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
oneOf:
|
|
||||||
- type: 'null'
|
|
||||||
- type: boolean
|
|
||||||
- type: number
|
|
||||||
- type: string
|
|
||||||
- type: array
|
|
||||||
- type: object
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
- args
|
|
||||||
title: AgentToolGroupWithArgs
|
|
||||||
ToolDef:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
description:
|
|
||||||
type: string
|
|
||||||
parameters:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/ToolParameter'
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
oneOf:
|
|
||||||
- type: 'null'
|
|
||||||
- type: boolean
|
|
||||||
- type: number
|
|
||||||
- type: string
|
|
||||||
- type: array
|
|
||||||
- type: object
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
title: ToolDef
|
|
||||||
ToolParameter:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
parameter_type:
|
|
||||||
type: string
|
|
||||||
description:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
default:
|
|
||||||
oneOf:
|
|
||||||
- type: 'null'
|
|
||||||
- type: boolean
|
|
||||||
- type: number
|
|
||||||
- type: string
|
|
||||||
- type: array
|
|
||||||
- type: object
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
- parameter_type
|
|
||||||
- description
|
|
||||||
- required
|
|
||||||
title: ToolParameter
|
|
||||||
CreateAgentRequest:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
agent_config:
|
|
||||||
$ref: '#/components/schemas/AgentConfig'
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- agent_config
|
|
||||||
title: CreateAgentRequest
|
|
||||||
AgentCreateResponse:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
agent_id:
|
|
||||||
type: string
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- agent_id
|
|
||||||
title: AgentCreateResponse
|
|
||||||
CreateAgentSessionRequest:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
session_name:
|
|
||||||
type: string
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- session_name
|
|
||||||
title: CreateAgentSessionRequest
|
|
||||||
AgentSessionCreateResponse:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
session_id:
|
|
||||||
type: string
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- session_id
|
|
||||||
title: AgentSessionCreateResponse
|
|
||||||
CreateAgentTurnRequest:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
messages:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/UserMessage'
|
|
||||||
- $ref: '#/components/schemas/ToolResponseMessage'
|
|
||||||
stream:
|
|
||||||
type: boolean
|
|
||||||
documents:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
content:
|
|
||||||
oneOf:
|
|
||||||
- type: string
|
|
||||||
- $ref: '#/components/schemas/InterleavedContentItem'
|
|
||||||
- type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/InterleavedContentItem'
|
|
||||||
- $ref: '#/components/schemas/URL'
|
|
||||||
mime_type:
|
|
||||||
type: string
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- content
|
|
||||||
- mime_type
|
|
||||||
title: Document
|
|
||||||
toolgroups:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/AgentTool'
|
|
||||||
tool_config:
|
|
||||||
$ref: '#/components/schemas/ToolConfig'
|
|
||||||
additionalProperties: false
|
|
||||||
required:
|
|
||||||
- messages
|
|
||||||
title: CreateAgentTurnRequest
|
|
||||||
CreateUploadSessionRequest:
|
CreateUploadSessionRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -5248,6 +5235,19 @@ components:
|
||||||
- vector_db_id
|
- vector_db_id
|
||||||
- embedding_model
|
- embedding_model
|
||||||
title: RegisterVectorDbRequest
|
title: RegisterVectorDbRequest
|
||||||
|
ResumeAgentTurnRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
tool_responses:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ToolResponseMessage'
|
||||||
|
stream:
|
||||||
|
type: boolean
|
||||||
|
additionalProperties: false
|
||||||
|
required:
|
||||||
|
- tool_responses
|
||||||
|
title: ResumeAgentTurnRequest
|
||||||
RunEvalRequest:
|
RunEvalRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -355,10 +355,10 @@ class Agents(Protocol):
|
||||||
) -> Union[Turn, AsyncIterator[AgentTurnResponseStreamChunk]]: ...
|
) -> Union[Turn, AsyncIterator[AgentTurnResponseStreamChunk]]: ...
|
||||||
|
|
||||||
@webmethod(
|
@webmethod(
|
||||||
route="/agents/{agent_id}/session/{session_id}/turn/{turn_id}/continue",
|
route="/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume",
|
||||||
method="POST",
|
method="POST",
|
||||||
)
|
)
|
||||||
async def continue_agent_turn(
|
async def resume_agent_turn(
|
||||||
self,
|
self,
|
||||||
agent_id: str,
|
agent_id: str,
|
||||||
session_id: str,
|
session_id: str,
|
||||||
|
|
|
@ -170,7 +170,7 @@ class MetaReferenceAgentsImpl(Agents):
|
||||||
async for event in agent.create_and_execute_turn(request):
|
async for event in agent.create_and_execute_turn(request):
|
||||||
yield event
|
yield event
|
||||||
|
|
||||||
async def continue_agent_turn(
|
async def resume_agent_turn(
|
||||||
self,
|
self,
|
||||||
agent_id: str,
|
agent_id: str,
|
||||||
session_id: str,
|
session_id: str,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue