diff --git a/docs/openapi_generator/generate.py b/docs/openapi_generator/generate.py index 97d265aeb..46bc32297 100644 --- a/docs/openapi_generator/generate.py +++ b/docs/openapi_generator/generate.py @@ -31,7 +31,12 @@ from .strong_typing.schema import json_schema_type schema_utils.json_schema_type = json_schema_type -from llama_stack.distribution.stack import LlamaStack +# this line needs to be here to ensure json_schema_type has been altered before +# the imports use the annotation +from llama_stack.distribution.stack import ( # noqa: E402 + LLAMA_STACK_API_VERSION, + LlamaStack, +) def main(output_dir: str): @@ -50,7 +55,7 @@ def main(output_dir: str): server=Server(url="http://any-hosted-llama-stack.com"), info=Info( title="[DRAFT] Llama Stack Specification", - version="0.0.1", + version=LLAMA_STACK_API_VERSION, description="""This is the specification of the llama stack that provides a set of endpoints and their corresponding interfaces that are tailored to best leverage Llama Models. The specification is still in draft and subject to change. diff --git a/docs/openapi_generator/pyopenapi/generator.py b/docs/openapi_generator/pyopenapi/generator.py index 12e3396e4..835c4401c 100644 --- a/docs/openapi_generator/pyopenapi/generator.py +++ b/docs/openapi_generator/pyopenapi/generator.py @@ -202,7 +202,9 @@ class ContentBuilder: ) -> MediaType: schema = self.schema_builder.classdef_to_ref(item_type) if self.schema_transformer: - schema_transformer: Callable[[SchemaOrRef], SchemaOrRef] = self.schema_transformer # type: ignore + schema_transformer: Callable[[SchemaOrRef], SchemaOrRef] = ( + self.schema_transformer + ) # type: ignore schema = schema_transformer(schema) if not examples: @@ -630,6 +632,7 @@ class Generator: raise NotImplementedError(f"unknown HTTP method: {op.http_method}") route = op.get_route() + print(f"route: {route}") if route in paths: paths[route].update(pathItem) else: diff --git a/docs/openapi_generator/pyopenapi/operations.py b/docs/openapi_generator/pyopenapi/operations.py index f4238f6f8..c33fa70e2 100644 --- a/docs/openapi_generator/pyopenapi/operations.py +++ b/docs/openapi_generator/pyopenapi/operations.py @@ -12,6 +12,8 @@ import uuid from dataclasses import dataclass from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union +from llama_stack.distribution.stack import LLAMA_STACK_API_VERSION + from termcolor import colored from ..strong_typing.inspection import ( @@ -111,9 +113,12 @@ class EndpointOperation: def get_route(self) -> str: if self.route is not None: - return self.route + assert ( + "_" not in self.route + ), f"route should not contain underscores: {self.route}" + return "/".join(["", LLAMA_STACK_API_VERSION, self.route.lstrip("/")]) - route_parts = ["", self.name] + route_parts = ["", LLAMA_STACK_API_VERSION, self.name] for param_name, _ in self.path_params: route_parts.append("{" + param_name + "}") return "/".join(route_parts) diff --git a/docs/resources/llama-stack-spec.html b/docs/resources/llama-stack-spec.html index ce6226f98..d76c0ba38 100644 --- a/docs/resources/llama-stack-spec.html +++ b/docs/resources/llama-stack-spec.html @@ -20,8 +20,8 @@ "openapi": "3.1.0", "info": { "title": "[DRAFT] Llama Stack Specification", - "version": "0.0.1", - "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-11-14 17:04:24.301559" + "version": "alpha", + "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-11-18 18:52:41.983165" }, "servers": [ { @@ -29,7 +29,7 @@ } ], "paths": { - "/batch_inference/chat_completion": { + "/alpha/batch-inference/chat-completion": { "post": { "responses": { "200": { @@ -69,7 +69,7 @@ } } }, - "/batch_inference/completion": { + "/alpha/batch-inference/completion": { "post": { "responses": { "200": { @@ -109,7 +109,7 @@ } } }, - "/post_training/job/cancel": { + "/alpha/post-training/job/cancel": { "post": { "responses": { "200": { @@ -142,7 +142,7 @@ } } }, - "/inference/chat_completion": { + "/alpha/inference/chat-completion": { "post": { "responses": { "200": { @@ -152,10 +152,433 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/ChatCompletionResponse" + "type": "object", + "properties": { + "completion_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + }, + "logprobs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "logprobs_by_token": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "additionalProperties": false, + "required": [ + "logprobs_by_token" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "completion_message" + ], + "title": "Chat completion response." }, { - "$ref": "#/components/schemas/ChatCompletionResponseStreamChunk" + "type": "object", + "properties": { + "event": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "start", + "complete", + "progress" + ] + }, + "delta": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + ] + }, + "parse_status": { + "type": "string", + "enum": [ + "started", + "in_progress", + "failure", + "success" + ] + } + }, + "additionalProperties": false, + "required": [ + "content", + "parse_status" + ] + } + ] + }, + "logprobs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "logprobs_by_token": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "additionalProperties": false, + "required": [ + "logprobs_by_token" + ] + } + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + } + }, + "additionalProperties": false, + "required": [ + "event_type", + "delta" + ], + "title": "Chat completion response event." + } + }, + "additionalProperties": false, + "required": [ + "event" + ], + "title": "SSE-stream of these events." } ] } @@ -189,7 +612,7 @@ } } }, - "/inference/completion": { + "/alpha/inference/completion": { "post": { "responses": { "200": { @@ -199,10 +622,83 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/CompletionResponse" + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "logprobs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "logprobs_by_token": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "additionalProperties": false, + "required": [ + "logprobs_by_token" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "content", + "stop_reason" + ], + "title": "Completion response." }, { - "$ref": "#/components/schemas/CompletionResponseStreamChunk" + "type": "object", + "properties": { + "delta": { + "type": "string" + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "logprobs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "logprobs_by_token": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + }, + "additionalProperties": false, + "required": [ + "logprobs_by_token" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "delta" + ], + "title": "streamed completion response." } ] } @@ -236,7 +732,7 @@ } } }, - "/agents/create": { + "/alpha/agents/create": { "post": { "responses": { "200": { @@ -276,7 +772,7 @@ } } }, - "/agents/session/create": { + "/alpha/agents/session/create": { "post": { "responses": { "200": { @@ -316,7 +812,7 @@ } } }, - "/agents/turn/create": { + "/alpha/agents/turn/create": { "post": { "responses": { "200": { @@ -326,10 +822,3859 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/Turn" + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "input_messages": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] + } + ] + } + }, + "steps": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "inference", + "default": "inference" + }, + "model_response": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "model_response" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "tool_execution", + "default": "tool_execution" + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + }, + "tool_responses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "content" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "tool_calls", + "tool_responses" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "shield_call", + "default": "shield_call" + }, + "violation": { + "type": "object", + "properties": { + "violation_level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ] + }, + "user_message": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "violation_level", + "metadata" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "memory_retrieval", + "default": "memory_retrieval" + }, + "memory_bank_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "inserted_context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "memory_bank_ids", + "inserted_context" + ] + } + ] + } + }, + "output_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + }, + "output_attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + }, + "mime_type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "content", + "mime_type" + ] + } + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "session_id", + "input_messages", + "steps", + "output_message", + "output_attachments", + "started_at" + ], + "title": "A single turn in an interaction with an Agentic System." }, { - "$ref": "#/components/schemas/AgentTurnResponseStreamChunk" + "type": "object", + "properties": { + "event": { + "type": "object", + "properties": { + "payload": { + "oneOf": [ + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "const": "step_start", + "default": "step_start" + }, + "step_type": { + "type": "string", + "enum": [ + "inference", + "tool_execution", + "shield_call", + "memory_retrieval" + ] + }, + "step_id": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "event_type", + "step_type", + "step_id" + ] + }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "const": "step_progress", + "default": "step_progress" + }, + "step_type": { + "type": "string", + "enum": [ + "inference", + "tool_execution", + "shield_call", + "memory_retrieval" + ] + }, + "step_id": { + "type": "string" + }, + "model_response_text_delta": { + "type": "string" + }, + "tool_call_delta": { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + ] + }, + "parse_status": { + "type": "string", + "enum": [ + "started", + "in_progress", + "failure", + "success" + ] + } + }, + "additionalProperties": false, + "required": [ + "content", + "parse_status" + ] + }, + "tool_response_text_delta": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "event_type", + "step_type", + "step_id" + ] + }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "const": "step_complete", + "default": "step_complete" + }, + "step_type": { + "type": "string", + "enum": [ + "inference", + "tool_execution", + "shield_call", + "memory_retrieval" + ] + }, + "step_details": { + "oneOf": [ + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "inference", + "default": "inference" + }, + "model_response": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "model_response" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "tool_execution", + "default": "tool_execution" + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + }, + "tool_responses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "content" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "tool_calls", + "tool_responses" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "shield_call", + "default": "shield_call" + }, + "violation": { + "type": "object", + "properties": { + "violation_level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ] + }, + "user_message": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "violation_level", + "metadata" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "memory_retrieval", + "default": "memory_retrieval" + }, + "memory_bank_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "inserted_context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "memory_bank_ids", + "inserted_context" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "event_type", + "step_type", + "step_details" + ] + }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "const": "turn_start", + "default": "turn_start" + }, + "turn_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "event_type", + "turn_id" + ] + }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "const": "turn_complete", + "default": "turn_complete" + }, + "turn": { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "input_messages": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] + } + ] + } + }, + "steps": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "inference", + "default": "inference" + }, + "model_response": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "model_response" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "tool_execution", + "default": "tool_execution" + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + }, + "tool_responses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "content" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "tool_calls", + "tool_responses" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "shield_call", + "default": "shield_call" + }, + "violation": { + "type": "object", + "properties": { + "violation_level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ] + }, + "user_message": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "violation_level", + "metadata" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "memory_retrieval", + "default": "memory_retrieval" + }, + "memory_bank_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "inserted_context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "memory_bank_ids", + "inserted_context" + ] + } + ] + } + }, + "output_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + }, + "output_attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + }, + "mime_type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "content", + "mime_type" + ] + } + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "session_id", + "input_messages", + "steps", + "output_message", + "output_attachments", + "started_at" + ], + "title": "A single turn in an interaction with an Agentic System." + } + }, + "additionalProperties": false, + "required": [ + "event_type", + "turn" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "payload" + ], + "title": "Streamed agent execution response." + } + }, + "additionalProperties": false, + "required": [ + "event" + ], + "title": "streamed agent turn completion response." } ] } @@ -363,7 +4708,7 @@ } } }, - "/agents/delete": { + "/alpha/agents/delete": { "post": { "responses": { "200": { @@ -396,7 +4741,7 @@ } } }, - "/agents/session/delete": { + "/alpha/agents/session/delete": { "post": { "responses": { "200": { @@ -429,7 +4774,7 @@ } } }, - "/inference/embeddings": { + "/alpha/inference/embeddings": { "post": { "responses": { "200": { @@ -469,7 +4814,7 @@ } } }, - "/eval/evaluate_rows": { + "/alpha/eval/evaluate-rows": { "post": { "responses": { "200": { @@ -509,7 +4854,7 @@ } } }, - "/agents/session/get": { + "/alpha/agents/session/get": { "post": { "responses": { "200": { @@ -565,7 +4910,7 @@ } } }, - "/agents/step/get": { + "/alpha/agents/step/get": { "get": { "responses": { "200": { @@ -627,7 +4972,7 @@ ] } }, - "/agents/turn/get": { + "/alpha/agents/turn/get": { "get": { "responses": { "200": { @@ -681,7 +5026,7 @@ ] } }, - "/datasets/get": { + "/alpha/datasets/get": { "get": { "responses": { "200": { @@ -691,7 +5036,217 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/Dataset" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "dataset", + "default": "dataset" + }, + "dataset_schema": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "string", + "default": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "number", + "default": "number" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "boolean", + "default": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array", + "default": "array" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "object", + "default": "object" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "json", + "default": "json" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "union", + "default": "union" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "chat_completion_input", + "default": "chat_completion_input" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "completion_input", + "default": "completion_input" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "agent_turn_input", + "default": "agent_turn_input" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + } + }, + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "dataset_schema", + "url", + "metadata" + ] }, { "type": "null" @@ -726,7 +5281,7 @@ ] } }, - "/eval_tasks/get": { + "/alpha/eval-tasks/get": { "get": { "responses": { "200": { @@ -736,7 +5291,67 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/EvalTask" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "eval_task", + "default": "eval_task" + }, + "dataset_id": { + "type": "string" + }, + "scoring_functions": { + "type": "array", + "items": { + "type": "string" + } + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "dataset_id", + "scoring_functions", + "metadata" + ] }, { "type": "null" @@ -771,7 +5386,7 @@ ] } }, - "/memory_banks/get": { + "/alpha/memory-banks/get": { "get": { "responses": { "200": { @@ -783,16 +5398,143 @@ { "oneOf": [ { - "$ref": "#/components/schemas/VectorMemoryBank" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "vector", + "default": "vector" + }, + "embedding_model": { + "type": "string" + }, + "chunk_size_in_tokens": { + "type": "integer" + }, + "overlap_size_in_tokens": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type", + "embedding_model", + "chunk_size_in_tokens" + ] }, { - "$ref": "#/components/schemas/KeyValueMemoryBank" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] }, { - "$ref": "#/components/schemas/KeywordMemoryBank" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] }, { - "$ref": "#/components/schemas/GraphMemoryBank" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "graph", + "default": "graph" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] } ] }, @@ -829,7 +5571,7 @@ ] } }, - "/models/get": { + "/alpha/models/get": { "get": { "responses": { "200": { @@ -839,7 +5581,56 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/Model" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "model", + "default": "model" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "metadata" + ] }, { "type": "null" @@ -874,7 +5665,7 @@ ] } }, - "/datasetio/get_rows_paginated": { + "/alpha/datasetio/get-rows-paginated": { "get": { "responses": { "200": { @@ -936,7 +5727,7 @@ ] } }, - "/scoring_functions/get": { + "/alpha/scoring-functions/get": { "get": { "responses": { "200": { @@ -946,7 +5737,255 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/ScoringFn" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "scoring_function", + "default": "scoring_function" + }, + "description": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "return_type": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "string", + "default": "string" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "number", + "default": "number" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "boolean", + "default": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array", + "default": "array" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "object", + "default": "object" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "json", + "default": "json" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "union", + "default": "union" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "chat_completion_input", + "default": "chat_completion_input" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "completion_input", + "default": "completion_input" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "agent_turn_input", + "default": "agent_turn_input" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + }, + "params": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm_as_judge", + "default": "llm_as_judge" + }, + "judge_model": { + "type": "string" + }, + "prompt_template": { + "type": "string" + }, + "judge_score_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type", + "judge_model" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "regex_parser", + "default": "regex_parser" + }, + "parsing_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "metadata", + "return_type" + ] }, { "type": "null" @@ -981,7 +6020,7 @@ ] } }, - "/shields/get": { + "/alpha/shields/get": { "get": { "responses": { "200": { @@ -991,7 +6030,56 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/Shield" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "shield", + "default": "shield" + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type" + ], + "title": "A safety shield resource that can be used to check content" }, { "type": "null" @@ -1026,7 +6114,7 @@ ] } }, - "/telemetry/get_trace": { + "/alpha/telemetry/get-trace": { "get": { "responses": { "200": { @@ -1064,7 +6152,7 @@ ] } }, - "/post_training/job/artifacts": { + "/alpha/post-training/job/artifacts": { "get": { "responses": { "200": { @@ -1102,7 +6190,7 @@ ] } }, - "/post_training/job/logs": { + "/alpha/post-training/job/logs": { "get": { "responses": { "200": { @@ -1140,7 +6228,7 @@ ] } }, - "/post_training/job/status": { + "/alpha/post-training/job/status": { "get": { "responses": { "200": { @@ -1178,7 +6266,7 @@ ] } }, - "/post_training/jobs": { + "/alpha/post-training/jobs": { "get": { "responses": { "200": { @@ -1208,7 +6296,7 @@ ] } }, - "/health": { + "/alpha/health": { "get": { "responses": { "200": { @@ -1238,7 +6326,7 @@ ] } }, - "/memory/insert": { + "/alpha/memory/insert": { "post": { "responses": { "200": { @@ -1271,7 +6359,7 @@ } } }, - "/eval/job/cancel": { + "/alpha/eval/job/cancel": { "post": { "responses": { "200": { @@ -1304,7 +6392,7 @@ } } }, - "/eval/job/result": { + "/alpha/eval/job/result": { "get": { "responses": { "200": { @@ -1350,7 +6438,7 @@ ] } }, - "/eval/job/status": { + "/alpha/eval/job/status": { "get": { "responses": { "200": { @@ -1360,7 +6448,11 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/JobStatus" + "type": "string", + "enum": [ + "completed", + "in_progress" + ] }, { "type": "null" @@ -1403,7 +6495,7 @@ ] } }, - "/datasets/list": { + "/alpha/datasets/list": { "get": { "responses": { "200": { @@ -1433,7 +6525,7 @@ ] } }, - "/eval_tasks/list": { + "/alpha/eval-tasks/list": { "get": { "responses": { "200": { @@ -1463,7 +6555,7 @@ ] } }, - "/memory_banks/list": { + "/alpha/memory-banks/list": { "get": { "responses": { "200": { @@ -1473,16 +6565,143 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/VectorMemoryBank" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "vector", + "default": "vector" + }, + "embedding_model": { + "type": "string" + }, + "chunk_size_in_tokens": { + "type": "integer" + }, + "overlap_size_in_tokens": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type", + "embedding_model", + "chunk_size_in_tokens" + ] }, { - "$ref": "#/components/schemas/KeyValueMemoryBank" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] }, { - "$ref": "#/components/schemas/KeywordMemoryBank" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] }, { - "$ref": "#/components/schemas/GraphMemoryBank" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "graph", + "default": "graph" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] } ] } @@ -1506,7 +6725,7 @@ ] } }, - "/models/list": { + "/alpha/models/list": { "get": { "responses": { "200": { @@ -1536,7 +6755,7 @@ ] } }, - "/providers/list": { + "/alpha/providers/list": { "get": { "responses": { "200": { @@ -1546,7 +6765,20 @@ "schema": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/ProviderInfo" + "type": "object", + "properties": { + "provider_id": { + "type": "string" + }, + "provider_type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "provider_id", + "provider_type" + ] } } } @@ -1569,7 +6801,7 @@ ] } }, - "/routes/list": { + "/alpha/routes/list": { "get": { "responses": { "200": { @@ -1581,7 +6813,27 @@ "additionalProperties": { "type": "array", "items": { - "$ref": "#/components/schemas/RouteInfo" + "type": "object", + "properties": { + "route": { + "type": "string" + }, + "method": { + "type": "string" + }, + "provider_types": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "route", + "method", + "provider_types" + ] } } } @@ -1605,7 +6857,7 @@ ] } }, - "/scoring_functions/list": { + "/alpha/scoring-functions/list": { "get": { "responses": { "200": { @@ -1635,7 +6887,7 @@ ] } }, - "/shields/list": { + "/alpha/shields/list": { "get": { "responses": { "200": { @@ -1665,7 +6917,7 @@ ] } }, - "/telemetry/log_event": { + "/alpha/telemetry/log-event": { "post": { "responses": { "200": { @@ -1698,7 +6950,7 @@ } } }, - "/post_training/preference_optimize": { + "/alpha/post-training/preference-optimize": { "post": { "responses": { "200": { @@ -1738,7 +6990,7 @@ } } }, - "/memory/query": { + "/alpha/memory/query": { "post": { "responses": { "200": { @@ -1778,7 +7030,7 @@ } } }, - "/datasets/register": { + "/alpha/datasets/register": { "post": { "responses": { "200": { @@ -1811,7 +7063,7 @@ } } }, - "/eval_tasks/register": { + "/alpha/eval-tasks/register": { "post": { "responses": { "200": { @@ -1844,7 +7096,7 @@ } } }, - "/memory_banks/register": { + "/alpha/memory-banks/register": { "post": { "responses": {}, "tags": [ @@ -1873,7 +7125,7 @@ } } }, - "/models/register": { + "/alpha/models/register": { "post": { "responses": { "200": { @@ -1913,7 +7165,7 @@ } } }, - "/scoring_functions/register": { + "/alpha/scoring-functions/register": { "post": { "responses": { "200": { @@ -1946,7 +7198,7 @@ } } }, - "/shields/register": { + "/alpha/shields/register": { "post": { "responses": { "200": { @@ -1986,7 +7238,7 @@ } } }, - "/eval/run_eval": { + "/alpha/eval/run-eval": { "post": { "responses": { "200": { @@ -2026,7 +7278,7 @@ } } }, - "/safety/run_shield": { + "/alpha/safety/run-shield": { "post": { "responses": { "200": { @@ -2066,7 +7318,7 @@ } } }, - "/scoring/score": { + "/alpha/scoring/score": { "post": { "responses": { "200": { @@ -2106,7 +7358,7 @@ } } }, - "/scoring/score_batch": { + "/alpha/scoring/score-batch": { "post": { "responses": { "200": { @@ -2146,7 +7398,7 @@ } } }, - "/post_training/supervised_fine_tune": { + "/alpha/post-training/supervised-fine-tune": { "post": { "responses": { "200": { @@ -2186,7 +7438,7 @@ } } }, - "/synthetic_data_generation/generate": { + "/alpha/synthetic-data-generation/generate": { "post": { "responses": { "200": { @@ -2226,7 +7478,7 @@ } } }, - "/memory_banks/unregister": { + "/alpha/memory-banks/unregister": { "post": { "responses": { "200": { @@ -2259,7 +7511,7 @@ } } }, - "/models/unregister": { + "/alpha/models/unregister": { "post": { "responses": { "200": { @@ -2296,475 +7548,6 @@ "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema", "components": { "schemas": { - "BuiltinTool": { - "type": "string", - "enum": [ - "brave_search", - "wolfram_alpha", - "photogen", - "code_interpreter" - ] - }, - "CompletionMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "assistant", - "default": "assistant" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - } - ] - }, - "stop_reason": { - "$ref": "#/components/schemas/StopReason" - }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolCall" - } - } - }, - "additionalProperties": false, - "required": [ - "role", - "content", - "stop_reason", - "tool_calls" - ] - }, - "ImageMedia": { - "type": "object", - "properties": { - "image": { - "oneOf": [ - { - "type": "object", - "properties": { - "format": { - "type": "string" - }, - "format_description": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "This class represents an image object. To create" - }, - { - "$ref": "#/components/schemas/URL" - } - ] - } - }, - "additionalProperties": false, - "required": [ - "image" - ] - }, - "SamplingParams": { - "type": "object", - "properties": { - "strategy": { - "$ref": "#/components/schemas/SamplingStrategy", - "default": "greedy" - }, - "temperature": { - "type": "number", - "default": 0.0 - }, - "top_p": { - "type": "number", - "default": 0.95 - }, - "top_k": { - "type": "integer", - "default": 0 - }, - "max_tokens": { - "type": "integer", - "default": 0 - }, - "repetition_penalty": { - "type": "number", - "default": 1.0 - } - }, - "additionalProperties": false, - "required": [ - "strategy" - ] - }, - "SamplingStrategy": { - "type": "string", - "enum": [ - "greedy", - "top_p", - "top_k" - ] - }, - "StopReason": { - "type": "string", - "enum": [ - "end_of_turn", - "end_of_message", - "out_of_tokens" - ] - }, - "SystemMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "system", - "default": "system" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - } - ] - } - }, - "additionalProperties": false, - "required": [ - "role", - "content" - ] - }, - "ToolCall": { - "type": "object", - "properties": { - "call_id": { - "type": "string" - }, - "tool_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/BuiltinTool" - }, - { - "type": "string" - } - ] - }, - "arguments": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "null" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "null" - } - ] - } - }, - { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "null" - } - ] - } - } - ] - } - } - }, - "additionalProperties": false, - "required": [ - "call_id", - "tool_name", - "arguments" - ] - }, - "ToolChoice": { - "type": "string", - "enum": [ - "auto", - "required" - ] - }, - "ToolDefinition": { - "type": "object", - "properties": { - "tool_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/BuiltinTool" - }, - { - "type": "string" - } - ] - }, - "description": { - "type": "string" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ToolParamDefinition" - } - } - }, - "additionalProperties": false, - "required": [ - "tool_name" - ] - }, - "ToolParamDefinition": { - "type": "object", - "properties": { - "param_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": [ - "param_type" - ] - }, - "ToolPromptFormat": { - "type": "string", - "enum": [ - "json", - "function_tag", - "python_list" - ], - "title": "This Enum refers to the prompt format for calling custom / zero shot tools", - "description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli" - }, - "ToolResponseMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "ipython", - "default": "ipython" - }, - "call_id": { - "type": "string" - }, - "tool_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/BuiltinTool" - }, - { - "type": "string" - } - ] - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - } - ] - } - }, - "additionalProperties": false, - "required": [ - "role", - "call_id", - "tool_name", - "content" - ] - }, - "URL": { - "type": "string", - "format": "uri", - "pattern": "^(https?://|file://|data:)" - }, - "UserMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "user", - "default": "user" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - } - ] - }, - "context": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - } - ] - } - }, - "additionalProperties": false, - "required": [ - "role", - "content" - ] - }, "BatchChatCompletionRequest": { "type": "object", "properties": { @@ -2778,35 +7561,793 @@ "items": { "oneOf": [ { - "$ref": "#/components/schemas/UserMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/SystemMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/ToolResponseMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] }, { - "$ref": "#/components/schemas/CompletionMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] } ] } } }, "sampling_params": { - "$ref": "#/components/schemas/SamplingParams" + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] }, "tools": { "type": "array", "items": { - "$ref": "#/components/schemas/ToolDefinition" + "type": "object", + "properties": { + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "description": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "param_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": [ + "param_type" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "tool_name" + ] } }, "tool_choice": { - "$ref": "#/components/schemas/ToolChoice" + "type": "string", + "enum": [ + "auto", + "required" + ] }, "tool_prompt_format": { - "$ref": "#/components/schemas/ToolPromptFormat" + "type": "string", + "enum": [ + "json", + "function_tag", + "python_list" + ], + "title": "This Enum refers to the prompt format for calling custom / zero shot tools", + "description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli" }, "logprobs": { "type": "object", @@ -2831,7 +8372,221 @@ "completion_message_batch": { "type": "array", "items": { - "$ref": "#/components/schemas/CompletionMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] } } }, @@ -2854,7 +8609,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] }, { "type": "array", @@ -2864,7 +8654,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] } ] } @@ -2873,7 +8698,42 @@ } }, "sampling_params": { - "$ref": "#/components/schemas/SamplingParams" + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] }, "logprobs": { "type": "object", @@ -2898,7 +8758,221 @@ "completion_message_batch": { "type": "array", "items": { - "$ref": "#/components/schemas/CompletionMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] } } }, @@ -2930,34 +9004,792 @@ "items": { "oneOf": [ { - "$ref": "#/components/schemas/UserMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/SystemMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/ToolResponseMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] }, { - "$ref": "#/components/schemas/CompletionMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] } ] } }, "sampling_params": { - "$ref": "#/components/schemas/SamplingParams" + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] }, "tools": { "type": "array", "items": { - "$ref": "#/components/schemas/ToolDefinition" + "type": "object", + "properties": { + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "description": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "param_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": [ + "param_type" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "tool_name" + ] } }, "tool_choice": { - "$ref": "#/components/schemas/ToolChoice" + "type": "string", + "enum": [ + "auto", + "required" + ] }, "tool_prompt_format": { - "$ref": "#/components/schemas/ToolPromptFormat" + "type": "string", + "enum": [ + "json", + "function_tag", + "python_list" + ], + "title": "This Enum refers to the prompt format for calling custom / zero shot tools", + "description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli" }, "response_format": { "oneOf": [ @@ -3063,126 +9895,6 @@ "messages" ] }, - "ChatCompletionResponse": { - "type": "object", - "properties": { - "completion_message": { - "$ref": "#/components/schemas/CompletionMessage" - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TokenLogProbs" - } - } - }, - "additionalProperties": false, - "required": [ - "completion_message" - ], - "title": "Chat completion response." - }, - "ChatCompletionResponseEvent": { - "type": "object", - "properties": { - "event_type": { - "$ref": "#/components/schemas/ChatCompletionResponseEventType" - }, - "delta": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ToolCallDelta" - } - ] - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TokenLogProbs" - } - }, - "stop_reason": { - "$ref": "#/components/schemas/StopReason" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "delta" - ], - "title": "Chat completion response event." - }, - "ChatCompletionResponseEventType": { - "type": "string", - "enum": [ - "start", - "complete", - "progress" - ] - }, - "ChatCompletionResponseStreamChunk": { - "type": "object", - "properties": { - "event": { - "$ref": "#/components/schemas/ChatCompletionResponseEvent" - } - }, - "additionalProperties": false, - "required": [ - "event" - ], - "title": "SSE-stream of these events." - }, - "TokenLogProbs": { - "type": "object", - "properties": { - "logprobs_by_token": { - "type": "object", - "additionalProperties": { - "type": "number" - } - } - }, - "additionalProperties": false, - "required": [ - "logprobs_by_token" - ] - }, - "ToolCallDelta": { - "type": "object", - "properties": { - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ToolCall" - } - ] - }, - "parse_status": { - "$ref": "#/components/schemas/ToolCallParseStatus" - } - }, - "additionalProperties": false, - "required": [ - "content", - "parse_status" - ] - }, - "ToolCallParseStatus": { - "type": "string", - "enum": [ - "started", - "in_progress", - "failure", - "success" - ] - }, "CompletionRequest": { "type": "object", "properties": { @@ -3195,7 +9907,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] }, { "type": "array", @@ -3205,7 +9952,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] } ] } @@ -3213,7 +9995,42 @@ ] }, "sampling_params": { - "$ref": "#/components/schemas/SamplingParams" + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] }, "response_format": { "oneOf": [ @@ -3319,601 +10136,1034 @@ "content" ] }, - "CompletionResponse": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "stop_reason": { - "$ref": "#/components/schemas/StopReason" - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TokenLogProbs" - } - } - }, - "additionalProperties": false, - "required": [ - "content", - "stop_reason" - ], - "title": "Completion response." - }, - "CompletionResponseStreamChunk": { - "type": "object", - "properties": { - "delta": { - "type": "string" - }, - "stop_reason": { - "$ref": "#/components/schemas/StopReason" - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TokenLogProbs" - } - } - }, - "additionalProperties": false, - "required": [ - "delta" - ], - "title": "streamed completion response." - }, - "AgentConfig": { - "type": "object", - "properties": { - "sampling_params": { - "$ref": "#/components/schemas/SamplingParams" - }, - "input_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "output_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "tools": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/SearchToolDefinition" - }, - { - "$ref": "#/components/schemas/WolframAlphaToolDefinition" - }, - { - "$ref": "#/components/schemas/PhotogenToolDefinition" - }, - { - "$ref": "#/components/schemas/CodeInterpreterToolDefinition" - }, - { - "$ref": "#/components/schemas/FunctionCallToolDefinition" - }, - { - "$ref": "#/components/schemas/MemoryToolDefinition" - } - ] - } - }, - "tool_choice": { - "$ref": "#/components/schemas/ToolChoice", - "default": "auto" - }, - "tool_prompt_format": { - "$ref": "#/components/schemas/ToolPromptFormat", - "default": "json" - }, - "max_infer_iters": { - "type": "integer", - "default": 10 - }, - "model": { - "type": "string" - }, - "instructions": { - "type": "string" - }, - "enable_session_persistence": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "max_infer_iters", - "model", - "instructions", - "enable_session_persistence" - ] - }, - "CodeInterpreterToolDefinition": { - "type": "object", - "properties": { - "input_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "output_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string", - "const": "code_interpreter", - "default": "code_interpreter" - }, - "enable_inline_code_execution": { - "type": "boolean", - "default": true - }, - "remote_execution": { - "$ref": "#/components/schemas/RestAPIExecutionConfig" - } - }, - "additionalProperties": false, - "required": [ - "type", - "enable_inline_code_execution" - ] - }, - "FunctionCallToolDefinition": { - "type": "object", - "properties": { - "input_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "output_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string", - "const": "function_call", - "default": "function_call" - }, - "function_name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ToolParamDefinition" - } - }, - "remote_execution": { - "$ref": "#/components/schemas/RestAPIExecutionConfig" - } - }, - "additionalProperties": false, - "required": [ - "type", - "function_name", - "description", - "parameters" - ] - }, - "MemoryToolDefinition": { - "type": "object", - "properties": { - "input_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "output_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string", - "const": "memory", - "default": "memory" - }, - "memory_bank_configs": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "bank_id": { - "type": "string" - }, - "type": { - "type": "string", - "const": "vector", - "default": "vector" - } - }, - "additionalProperties": false, - "required": [ - "bank_id", - "type" - ] - }, - { - "type": "object", - "properties": { - "bank_id": { - "type": "string" - }, - "type": { - "type": "string", - "const": "keyvalue", - "default": "keyvalue" - }, - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "bank_id", - "type", - "keys" - ] - }, - { - "type": "object", - "properties": { - "bank_id": { - "type": "string" - }, - "type": { - "type": "string", - "const": "keyword", - "default": "keyword" - } - }, - "additionalProperties": false, - "required": [ - "bank_id", - "type" - ] - }, - { - "type": "object", - "properties": { - "bank_id": { - "type": "string" - }, - "type": { - "type": "string", - "const": "graph", - "default": "graph" - }, - "entities": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "bank_id", - "type", - "entities" - ] - } - ] - } - }, - "query_generator_config": { - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "default", - "default": "default" - }, - "sep": { - "type": "string", - "default": " " - } - }, - "additionalProperties": false, - "required": [ - "type", - "sep" - ] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "llm", - "default": "llm" - }, - "model": { - "type": "string" - }, - "template": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "model", - "template" - ] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "custom", - "default": "custom" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - } - ] - }, - "max_tokens_in_context": { - "type": "integer", - "default": 4096 - }, - "max_chunks": { - "type": "integer", - "default": 10 - } - }, - "additionalProperties": false, - "required": [ - "type", - "memory_bank_configs", - "query_generator_config", - "max_tokens_in_context", - "max_chunks" - ] - }, - "PhotogenToolDefinition": { - "type": "object", - "properties": { - "input_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "output_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string", - "const": "photogen", - "default": "photogen" - }, - "remote_execution": { - "$ref": "#/components/schemas/RestAPIExecutionConfig" - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, - "RestAPIExecutionConfig": { - "type": "object", - "properties": { - "url": { - "$ref": "#/components/schemas/URL" - }, - "method": { - "$ref": "#/components/schemas/RestAPIMethod" - }, - "params": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "body": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - }, - "additionalProperties": false, - "required": [ - "url", - "method" - ] - }, - "RestAPIMethod": { - "type": "string", - "enum": [ - "GET", - "POST", - "PUT", - "DELETE" - ] - }, - "SearchToolDefinition": { - "type": "object", - "properties": { - "input_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "output_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string", - "const": "brave_search", - "default": "brave_search" - }, - "api_key": { - "type": "string" - }, - "engine": { - "type": "string", - "enum": [ - "bing", - "brave" - ], - "default": "brave" - }, - "remote_execution": { - "$ref": "#/components/schemas/RestAPIExecutionConfig" - } - }, - "additionalProperties": false, - "required": [ - "type", - "api_key", - "engine" - ] - }, - "WolframAlphaToolDefinition": { - "type": "object", - "properties": { - "input_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "output_shields": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string", - "const": "wolfram_alpha", - "default": "wolfram_alpha" - }, - "api_key": { - "type": "string" - }, - "remote_execution": { - "$ref": "#/components/schemas/RestAPIExecutionConfig" - } - }, - "additionalProperties": false, - "required": [ - "type", - "api_key" - ] - }, "CreateAgentRequest": { "type": "object", "properties": { "agent_config": { - "$ref": "#/components/schemas/AgentConfig" + "type": "object", + "properties": { + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "tools": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "brave_search", + "default": "brave_search" + }, + "api_key": { + "type": "string" + }, + "engine": { + "type": "string", + "enum": [ + "bing", + "brave" + ], + "default": "brave" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key", + "engine" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "wolfram_alpha", + "default": "wolfram_alpha" + }, + "api_key": { + "type": "string" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "photogen", + "default": "photogen" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "code_interpreter", + "default": "code_interpreter" + }, + "enable_inline_code_execution": { + "type": "boolean", + "default": true + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "enable_inline_code_execution" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "function_call", + "default": "function_call" + }, + "function_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "param_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": [ + "param_type" + ] + } + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "function_name", + "description", + "parameters" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "memory", + "default": "memory" + }, + "memory_bank_configs": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "vector", + "default": "vector" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "keys" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "graph", + "default": "graph" + }, + "entities": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "entities" + ] + } + ] + } + }, + "query_generator_config": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "default", + "default": "default" + }, + "sep": { + "type": "string", + "default": " " + } + }, + "additionalProperties": false, + "required": [ + "type", + "sep" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm", + "default": "llm" + }, + "model": { + "type": "string" + }, + "template": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "template" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "custom", + "default": "custom" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + }, + "max_tokens_in_context": { + "type": "integer", + "default": 4096 + }, + "max_chunks": { + "type": "integer", + "default": 10 + } + }, + "additionalProperties": false, + "required": [ + "type", + "memory_bank_configs", + "query_generator_config", + "max_tokens_in_context", + "max_chunks" + ] + } + ] + } + }, + "tool_choice": { + "type": "string", + "enum": [ + "auto", + "required" + ], + "default": "auto" + }, + "tool_prompt_format": { + "type": "string", + "enum": [ + "json", + "function_tag", + "python_list" + ], + "title": "This Enum refers to the prompt format for calling custom / zero shot tools", + "description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli", + "default": "json" + }, + "max_infer_iters": { + "type": "integer", + "default": 10 + }, + "model": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "enable_session_persistence": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "max_infer_iters", + "model", + "instructions", + "enable_session_persistence" + ] } }, "additionalProperties": false, @@ -3961,45 +11211,6 @@ "session_id" ] }, - "Attachment": { - "type": "object", - "properties": { - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - }, - { - "$ref": "#/components/schemas/URL" - } - ] - }, - "mime_type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "content", - "mime_type" - ] - }, "CreateAgentTurnRequest": { "type": "object", "properties": { @@ -4014,10 +11225,334 @@ "items": { "oneOf": [ { - "$ref": "#/components/schemas/UserMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/ToolResponseMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] } ] } @@ -4025,7 +11560,122 @@ "attachments": { "type": "array", "items": { - "$ref": "#/components/schemas/Attachment" + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + }, + "mime_type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "content", + "mime_type" + ] } }, "stream": { @@ -4039,554 +11689,6 @@ "messages" ] }, - "AgentTurnResponseEvent": { - "type": "object", - "properties": { - "payload": { - "oneOf": [ - { - "$ref": "#/components/schemas/AgentTurnResponseStepStartPayload" - }, - { - "$ref": "#/components/schemas/AgentTurnResponseStepProgressPayload" - }, - { - "$ref": "#/components/schemas/AgentTurnResponseStepCompletePayload" - }, - { - "$ref": "#/components/schemas/AgentTurnResponseTurnStartPayload" - }, - { - "$ref": "#/components/schemas/AgentTurnResponseTurnCompletePayload" - } - ] - } - }, - "additionalProperties": false, - "required": [ - "payload" - ], - "title": "Streamed agent execution response." - }, - "AgentTurnResponseStepCompletePayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "const": "step_complete", - "default": "step_complete" - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ] - }, - "step_details": { - "oneOf": [ - { - "$ref": "#/components/schemas/InferenceStep" - }, - { - "$ref": "#/components/schemas/ToolExecutionStep" - }, - { - "$ref": "#/components/schemas/ShieldCallStep" - }, - { - "$ref": "#/components/schemas/MemoryRetrievalStep" - } - ] - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "step_type", - "step_details" - ] - }, - "AgentTurnResponseStepProgressPayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "const": "step_progress", - "default": "step_progress" - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ] - }, - "step_id": { - "type": "string" - }, - "model_response_text_delta": { - "type": "string" - }, - "tool_call_delta": { - "$ref": "#/components/schemas/ToolCallDelta" - }, - "tool_response_text_delta": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "step_type", - "step_id" - ] - }, - "AgentTurnResponseStepStartPayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "const": "step_start", - "default": "step_start" - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ] - }, - "step_id": { - "type": "string" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "step_type", - "step_id" - ] - }, - "AgentTurnResponseStreamChunk": { - "type": "object", - "properties": { - "event": { - "$ref": "#/components/schemas/AgentTurnResponseEvent" - } - }, - "additionalProperties": false, - "required": [ - "event" - ], - "title": "streamed agent turn completion response." - }, - "AgentTurnResponseTurnCompletePayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "const": "turn_complete", - "default": "turn_complete" - }, - "turn": { - "$ref": "#/components/schemas/Turn" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "turn" - ] - }, - "AgentTurnResponseTurnStartPayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "const": "turn_start", - "default": "turn_start" - }, - "turn_id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "turn_id" - ] - }, - "InferenceStep": { - "type": "object", - "properties": { - "turn_id": { - "type": "string" - }, - "step_id": { - "type": "string" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "completed_at": { - "type": "string", - "format": "date-time" - }, - "step_type": { - "type": "string", - "const": "inference", - "default": "inference" - }, - "model_response": { - "$ref": "#/components/schemas/CompletionMessage" - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "step_id", - "step_type", - "model_response" - ] - }, - "MemoryRetrievalStep": { - "type": "object", - "properties": { - "turn_id": { - "type": "string" - }, - "step_id": { - "type": "string" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "completed_at": { - "type": "string", - "format": "date-time" - }, - "step_type": { - "type": "string", - "const": "memory_retrieval", - "default": "memory_retrieval" - }, - "memory_bank_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "inserted_context": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - } - ] - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "step_id", - "step_type", - "memory_bank_ids", - "inserted_context" - ] - }, - "SafetyViolation": { - "type": "object", - "properties": { - "violation_level": { - "$ref": "#/components/schemas/ViolationLevel" - }, - "user_message": { - "type": "string" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - }, - "additionalProperties": false, - "required": [ - "violation_level", - "metadata" - ] - }, - "ShieldCallStep": { - "type": "object", - "properties": { - "turn_id": { - "type": "string" - }, - "step_id": { - "type": "string" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "completed_at": { - "type": "string", - "format": "date-time" - }, - "step_type": { - "type": "string", - "const": "shield_call", - "default": "shield_call" - }, - "violation": { - "$ref": "#/components/schemas/SafetyViolation" - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "step_id", - "step_type" - ] - }, - "ToolExecutionStep": { - "type": "object", - "properties": { - "turn_id": { - "type": "string" - }, - "step_id": { - "type": "string" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "completed_at": { - "type": "string", - "format": "date-time" - }, - "step_type": { - "type": "string", - "const": "tool_execution", - "default": "tool_execution" - }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolCall" - } - }, - "tool_responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolResponse" - } - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "step_id", - "step_type", - "tool_calls", - "tool_responses" - ] - }, - "ToolResponse": { - "type": "object", - "properties": { - "call_id": { - "type": "string" - }, - "tool_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/BuiltinTool" - }, - { - "type": "string" - } - ] - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - } - ] - } - }, - "additionalProperties": false, - "required": [ - "call_id", - "tool_name", - "content" - ] - }, - "Turn": { - "type": "object", - "properties": { - "turn_id": { - "type": "string" - }, - "session_id": { - "type": "string" - }, - "input_messages": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/UserMessage" - }, - { - "$ref": "#/components/schemas/ToolResponseMessage" - } - ] - } - }, - "steps": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/InferenceStep" - }, - { - "$ref": "#/components/schemas/ToolExecutionStep" - }, - { - "$ref": "#/components/schemas/ShieldCallStep" - }, - { - "$ref": "#/components/schemas/MemoryRetrievalStep" - } - ] - } - }, - "output_message": { - "$ref": "#/components/schemas/CompletionMessage" - }, - "output_attachments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Attachment" - } - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "completed_at": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "session_id", - "input_messages", - "steps", - "output_message", - "output_attachments", - "started_at" - ], - "title": "A single turn in an interaction with an Agentic System." - }, - "ViolationLevel": { - "type": "string", - "enum": [ - "info", - "warn", - "error" - ] - }, "DeleteAgentsRequest": { "type": "object", "properties": { @@ -4629,7 +11731,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] }, { "type": "array", @@ -4639,7 +11776,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] } ] } @@ -4672,166 +11844,6 @@ "embeddings" ] }, - "AgentCandidate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "agent", - "default": "agent" - }, - "config": { - "$ref": "#/components/schemas/AgentConfig" - } - }, - "additionalProperties": false, - "required": [ - "type", - "config" - ] - }, - "AppEvalTaskConfig": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "app", - "default": "app" - }, - "eval_candidate": { - "oneOf": [ - { - "$ref": "#/components/schemas/ModelCandidate" - }, - { - "$ref": "#/components/schemas/AgentCandidate" - } - ] - }, - "scoring_params": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/LLMAsJudgeScoringFnParams" - }, - { - "$ref": "#/components/schemas/RegexParserScoringFnParams" - } - ] - } - }, - "num_examples": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "type", - "eval_candidate", - "scoring_params" - ] - }, - "BenchmarkEvalTaskConfig": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "benchmark", - "default": "benchmark" - }, - "eval_candidate": { - "oneOf": [ - { - "$ref": "#/components/schemas/ModelCandidate" - }, - { - "$ref": "#/components/schemas/AgentCandidate" - } - ] - }, - "num_examples": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "type", - "eval_candidate" - ] - }, - "LLMAsJudgeScoringFnParams": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "llm_as_judge", - "default": "llm_as_judge" - }, - "judge_model": { - "type": "string" - }, - "prompt_template": { - "type": "string" - }, - "judge_score_regexes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "type", - "judge_model" - ] - }, - "ModelCandidate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "model", - "default": "model" - }, - "model": { - "type": "string" - }, - "sampling_params": { - "$ref": "#/components/schemas/SamplingParams" - }, - "system_message": { - "$ref": "#/components/schemas/SystemMessage" - } - }, - "additionalProperties": false, - "required": [ - "type", - "model", - "sampling_params" - ] - }, - "RegexParserScoringFnParams": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "regex_parser", - "default": "regex_parser" - }, - "parsing_regexes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "type" - ] - }, "EvaluateRowsRequest": { "type": "object", "properties": { @@ -4875,10 +11887,2515 @@ "task_config": { "oneOf": [ { - "$ref": "#/components/schemas/BenchmarkEvalTaskConfig" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "benchmark", + "default": "benchmark" + }, + "eval_candidate": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "model", + "default": "model" + }, + "model": { + "type": "string" + }, + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "system_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "sampling_params" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "agent", + "default": "agent" + }, + "config": { + "type": "object", + "properties": { + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "tools": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "brave_search", + "default": "brave_search" + }, + "api_key": { + "type": "string" + }, + "engine": { + "type": "string", + "enum": [ + "bing", + "brave" + ], + "default": "brave" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key", + "engine" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "wolfram_alpha", + "default": "wolfram_alpha" + }, + "api_key": { + "type": "string" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "photogen", + "default": "photogen" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "code_interpreter", + "default": "code_interpreter" + }, + "enable_inline_code_execution": { + "type": "boolean", + "default": true + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "enable_inline_code_execution" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "function_call", + "default": "function_call" + }, + "function_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "param_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": [ + "param_type" + ] + } + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "function_name", + "description", + "parameters" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "memory", + "default": "memory" + }, + "memory_bank_configs": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "vector", + "default": "vector" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "keys" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "graph", + "default": "graph" + }, + "entities": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "entities" + ] + } + ] + } + }, + "query_generator_config": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "default", + "default": "default" + }, + "sep": { + "type": "string", + "default": " " + } + }, + "additionalProperties": false, + "required": [ + "type", + "sep" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm", + "default": "llm" + }, + "model": { + "type": "string" + }, + "template": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "template" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "custom", + "default": "custom" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + }, + "max_tokens_in_context": { + "type": "integer", + "default": 4096 + }, + "max_chunks": { + "type": "integer", + "default": 10 + } + }, + "additionalProperties": false, + "required": [ + "type", + "memory_bank_configs", + "query_generator_config", + "max_tokens_in_context", + "max_chunks" + ] + } + ] + } + }, + "tool_choice": { + "type": "string", + "enum": [ + "auto", + "required" + ], + "default": "auto" + }, + "tool_prompt_format": { + "type": "string", + "enum": [ + "json", + "function_tag", + "python_list" + ], + "title": "This Enum refers to the prompt format for calling custom / zero shot tools", + "description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli", + "default": "json" + }, + "max_infer_iters": { + "type": "integer", + "default": 10 + }, + "model": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "enable_session_persistence": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "max_infer_iters", + "model", + "instructions", + "enable_session_persistence" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "config" + ] + } + ] + }, + "num_examples": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "type", + "eval_candidate" + ] }, { - "$ref": "#/components/schemas/AppEvalTaskConfig" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "app", + "default": "app" + }, + "eval_candidate": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "model", + "default": "model" + }, + "model": { + "type": "string" + }, + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "system_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "sampling_params" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "agent", + "default": "agent" + }, + "config": { + "type": "object", + "properties": { + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "tools": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "brave_search", + "default": "brave_search" + }, + "api_key": { + "type": "string" + }, + "engine": { + "type": "string", + "enum": [ + "bing", + "brave" + ], + "default": "brave" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key", + "engine" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "wolfram_alpha", + "default": "wolfram_alpha" + }, + "api_key": { + "type": "string" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "photogen", + "default": "photogen" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "code_interpreter", + "default": "code_interpreter" + }, + "enable_inline_code_execution": { + "type": "boolean", + "default": true + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "enable_inline_code_execution" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "function_call", + "default": "function_call" + }, + "function_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "param_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": [ + "param_type" + ] + } + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "function_name", + "description", + "parameters" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "memory", + "default": "memory" + }, + "memory_bank_configs": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "vector", + "default": "vector" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "keys" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "graph", + "default": "graph" + }, + "entities": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "entities" + ] + } + ] + } + }, + "query_generator_config": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "default", + "default": "default" + }, + "sep": { + "type": "string", + "default": " " + } + }, + "additionalProperties": false, + "required": [ + "type", + "sep" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm", + "default": "llm" + }, + "model": { + "type": "string" + }, + "template": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "template" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "custom", + "default": "custom" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + }, + "max_tokens_in_context": { + "type": "integer", + "default": 4096 + }, + "max_chunks": { + "type": "integer", + "default": 10 + } + }, + "additionalProperties": false, + "required": [ + "type", + "memory_bank_configs", + "query_generator_config", + "max_tokens_in_context", + "max_chunks" + ] + } + ] + } + }, + "tool_choice": { + "type": "string", + "enum": [ + "auto", + "required" + ], + "default": "auto" + }, + "tool_prompt_format": { + "type": "string", + "enum": [ + "json", + "function_tag", + "python_list" + ], + "title": "This Enum refers to the prompt format for calling custom / zero shot tools", + "description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli", + "default": "json" + }, + "max_infer_iters": { + "type": "integer", + "default": 10 + }, + "model": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "enable_session_persistence": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "max_infer_iters", + "model", + "instructions", + "enable_session_persistence" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "config" + ] + } + ] + }, + "scoring_params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm_as_judge", + "default": "llm_as_judge" + }, + "judge_model": { + "type": "string" + }, + "prompt_template": { + "type": "string" + }, + "judge_score_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type", + "judge_model" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "regex_parser", + "default": "regex_parser" + }, + "parsing_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + } + }, + "num_examples": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "type", + "eval_candidate", + "scoring_params" + ] } ] } @@ -4925,7 +14442,67 @@ "scores": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/ScoringResult" + "type": "object", + "properties": { + "score_rows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "aggregated_results": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "score_rows", + "aggregated_results" + ] } } }, @@ -4935,10 +14512,3764 @@ "scores" ] }, - "ScoringResult": { + "GetAgentsSessionRequest": { "type": "object", "properties": { - "score_rows": { + "turn_ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Session": { + "type": "object", + "properties": { + "session_id": { + "type": "string" + }, + "session_name": { + "type": "string" + }, + "turns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "input_messages": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] + } + ] + } + }, + "steps": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "inference", + "default": "inference" + }, + "model_response": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "model_response" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "tool_execution", + "default": "tool_execution" + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + }, + "tool_responses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "content" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "tool_calls", + "tool_responses" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "shield_call", + "default": "shield_call" + }, + "violation": { + "type": "object", + "properties": { + "violation_level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ] + }, + "user_message": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "violation_level", + "metadata" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "memory_retrieval", + "default": "memory_retrieval" + }, + "memory_bank_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "inserted_context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "memory_bank_ids", + "inserted_context" + ] + } + ] + } + }, + "output_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + }, + "output_attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + }, + "mime_type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "content", + "mime_type" + ] + } + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "session_id", + "input_messages", + "steps", + "output_message", + "output_attachments", + "started_at" + ], + "title": "A single turn in an interaction with an Agentic System." + } + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "memory_bank": { + "oneOf": [ + { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "vector", + "default": "vector" + }, + "embedding_model": { + "type": "string" + }, + "chunk_size_in_tokens": { + "type": "integer" + }, + "overlap_size_in_tokens": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type", + "embedding_model", + "chunk_size_in_tokens" + ] + }, + { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] + }, + { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] + }, + { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "memory_bank", + "default": "memory_bank" + }, + "memory_bank_type": { + "type": "string", + "const": "graph", + "default": "graph" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_resource_id", + "provider_id", + "type", + "memory_bank_type" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "session_id", + "session_name", + "turns", + "started_at" + ], + "title": "A single session of an interaction with an Agentic System." + }, + "AgentStepResponse": { + "type": "object", + "properties": { + "step": { + "oneOf": [ + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "inference", + "default": "inference" + }, + "model_response": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "model_response" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "tool_execution", + "default": "tool_execution" + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + }, + "tool_responses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "content" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "tool_calls", + "tool_responses" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "shield_call", + "default": "shield_call" + }, + "violation": { + "type": "object", + "properties": { + "violation_level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ] + }, + "user_message": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "violation_level", + "metadata" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "memory_retrieval", + "default": "memory_retrieval" + }, + "memory_bank_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "inserted_context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "memory_bank_ids", + "inserted_context" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "step" + ] + }, + "Turn": { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "input_messages": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] + } + ] + } + }, + "steps": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "inference", + "default": "inference" + }, + "model_response": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "model_response" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "tool_execution", + "default": "tool_execution" + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + }, + "tool_responses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "content" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "tool_calls", + "tool_responses" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "shield_call", + "default": "shield_call" + }, + "violation": { + "type": "object", + "properties": { + "violation_level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ] + }, + "user_message": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "violation_level", + "metadata" + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type" + ] + }, + { + "type": "object", + "properties": { + "turn_id": { + "type": "string" + }, + "step_id": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "step_type": { + "type": "string", + "const": "memory_retrieval", + "default": "memory_retrieval" + }, + "memory_bank_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "inserted_context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "step_id", + "step_type", + "memory_bank_ids", + "inserted_context" + ] + } + ] + } + }, + "output_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] + }, + "output_attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + }, + "mime_type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "content", + "mime_type" + ] + } + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "turn_id", + "session_id", + "input_messages", + "steps", + "output_message", + "output_attachments", + "started_at" + ], + "title": "A single turn in an interaction with an Agentic System." + }, + "PaginatedRowsResult": { + "type": "object", + "properties": { + "rows": { "type": "array", "items": { "type": "object", @@ -4966,7 +18297,138 @@ } } }, - "aggregated_results": { + "total_count": { + "type": "integer" + }, + "next_page_token": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "rows", + "total_count" + ] + }, + "Trace": { + "type": "object", + "properties": { + "trace_id": { + "type": "string" + }, + "root_span_id": { + "type": "string" + }, + "start_time": { + "type": "string", + "format": "date-time" + }, + "end_time": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "trace_id", + "root_span_id", + "start_time" + ] + }, + "PostTrainingJobArtifactsResponse": { + "type": "object", + "properties": { + "job_uuid": { + "type": "string" + }, + "checkpoints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "iters": { + "type": "integer" + }, + "path": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "epoch": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "iters", + "path", + "epoch" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "job_uuid", + "checkpoints" + ], + "title": "Artifacts of a finetuning job." + }, + "PostTrainingJobLogStream": { + "type": "object", + "properties": { + "job_uuid": { + "type": "string" + }, + "log_lines": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "job_uuid", + "log_lines" + ], + "title": "Stream of logs from a finetuning job." + }, + "PostTrainingJobStatusResponse": { + "type": "object", + "properties": { + "job_uuid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "running", + "completed", + "failed", + "scheduled" + ] + }, + "scheduled_at": { + "type": "string", + "format": "date-time" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + }, + "resources_allocated": { "type": "object", "additionalProperties": { "oneOf": [ @@ -4990,233 +18452,252 @@ } ] } - } - }, - "additionalProperties": false, - "required": [ - "score_rows", - "aggregated_results" - ] - }, - "GetAgentsSessionRequest": { - "type": "object", - "properties": { - "turn_ids": { + }, + "checkpoints": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "iters": { + "type": "integer" + }, + "path": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "epoch": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "iters", + "path", + "epoch" + ] } } }, - "additionalProperties": false - }, - "GraphMemoryBank": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { - "type": "string", - "const": "memory_bank", - "default": "memory_bank" - }, - "memory_bank_type": { - "type": "string", - "const": "graph", - "default": "graph" - } - }, "additionalProperties": false, "required": [ - "identifier", - "provider_resource_id", - "provider_id", - "type", - "memory_bank_type" - ] - }, - "KeyValueMemoryBank": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { - "type": "string", - "const": "memory_bank", - "default": "memory_bank" - }, - "memory_bank_type": { - "type": "string", - "const": "keyvalue", - "default": "keyvalue" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "provider_resource_id", - "provider_id", - "type", - "memory_bank_type" - ] - }, - "KeywordMemoryBank": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { - "type": "string", - "const": "memory_bank", - "default": "memory_bank" - }, - "memory_bank_type": { - "type": "string", - "const": "keyword", - "default": "keyword" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "provider_resource_id", - "provider_id", - "type", - "memory_bank_type" - ] - }, - "Session": { - "type": "object", - "properties": { - "session_id": { - "type": "string" - }, - "session_name": { - "type": "string" - }, - "turns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Turn" - } - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "memory_bank": { - "oneOf": [ - { - "$ref": "#/components/schemas/VectorMemoryBank" - }, - { - "$ref": "#/components/schemas/KeyValueMemoryBank" - }, - { - "$ref": "#/components/schemas/KeywordMemoryBank" - }, - { - "$ref": "#/components/schemas/GraphMemoryBank" - } - ] - } - }, - "additionalProperties": false, - "required": [ - "session_id", - "session_name", - "turns", - "started_at" + "job_uuid", + "status", + "checkpoints" ], - "title": "A single session of an interaction with an Agentic System." + "title": "Status of a finetuning job." }, - "VectorMemoryBank": { + "PostTrainingJob": { "type": "object", "properties": { - "identifier": { + "job_uuid": { "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { - "type": "string", - "const": "memory_bank", - "default": "memory_bank" - }, - "memory_bank_type": { - "type": "string", - "const": "vector", - "default": "vector" - }, - "embedding_model": { - "type": "string" - }, - "chunk_size_in_tokens": { - "type": "integer" - }, - "overlap_size_in_tokens": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "identifier", - "provider_resource_id", - "provider_id", - "type", - "memory_bank_type", - "embedding_model", - "chunk_size_in_tokens" + "job_uuid" ] }, - "AgentStepResponse": { + "HealthInfo": { "type": "object", "properties": { - "step": { - "oneOf": [ - { - "$ref": "#/components/schemas/InferenceStep" - }, - { - "$ref": "#/components/schemas/ToolExecutionStep" - }, - { - "$ref": "#/components/schemas/ShieldCallStep" - }, - { - "$ref": "#/components/schemas/MemoryRetrievalStep" - } - ] + "status": { + "type": "string" } }, "additionalProperties": false, "required": [ - "step" + "status" + ] + }, + "InsertDocumentsRequest": { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "documents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "document_id": { + "type": "string" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + }, + "mime_type": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "document_id", + "content", + "metadata" + ] + } + }, + "ttl_seconds": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "documents" + ] + }, + "JobCancelRequest": { + "type": "object", + "properties": { + "task_id": { + "type": "string" + }, + "job_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "task_id", + "job_id" ] }, "Dataset": { @@ -5384,7 +18865,16 @@ } }, "url": { - "$ref": "#/components/schemas/URL" + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] }, "metadata": { "type": "object", @@ -5538,50 +19028,6 @@ "metadata" ] }, - "PaginatedRowsResult": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - }, - "total_count": { - "type": "integer" - }, - "next_page_token": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "rows", - "total_count" - ] - }, "ScoringFn": { "type": "object", "properties": { @@ -5774,10 +19220,51 @@ "params": { "oneOf": [ { - "$ref": "#/components/schemas/LLMAsJudgeScoringFnParams" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm_as_judge", + "default": "llm_as_judge" + }, + "judge_model": { + "type": "string" + }, + "prompt_template": { + "type": "string" + }, + "judge_score_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type", + "judge_model" + ] }, { - "$ref": "#/components/schemas/RegexParserScoringFnParams" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "regex_parser", + "default": "regex_parser" + }, + "parsing_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] } ] } @@ -5844,584 +19331,249 @@ ], "title": "A safety shield resource that can be used to check content" }, - "Trace": { - "type": "object", - "properties": { - "trace_id": { - "type": "string" - }, - "root_span_id": { - "type": "string" - }, - "start_time": { - "type": "string", - "format": "date-time" - }, - "end_time": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false, - "required": [ - "trace_id", - "root_span_id", - "start_time" - ] - }, - "Checkpoint": { - "description": "Checkpoint created during training runs" - }, - "PostTrainingJobArtifactsResponse": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string" - }, - "checkpoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Checkpoint" - } - } - }, - "additionalProperties": false, - "required": [ - "job_uuid", - "checkpoints" - ], - "title": "Artifacts of a finetuning job." - }, - "PostTrainingJobLogStream": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string" - }, - "log_lines": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "job_uuid", - "log_lines" - ], - "title": "Stream of logs from a finetuning job." - }, - "PostTrainingJobStatus": { - "type": "string", - "enum": [ - "running", - "completed", - "failed", - "scheduled" - ] - }, - "PostTrainingJobStatusResponse": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/PostTrainingJobStatus" - }, - "scheduled_at": { - "type": "string", - "format": "date-time" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "completed_at": { - "type": "string", - "format": "date-time" - }, - "resources_allocated": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "checkpoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Checkpoint" - } - } - }, - "additionalProperties": false, - "required": [ - "job_uuid", - "status", - "checkpoints" - ], - "title": "Status of a finetuning job." - }, - "PostTrainingJob": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "job_uuid" - ] - }, - "HealthInfo": { - "type": "object", - "properties": { - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "status" - ] - }, - "MemoryBankDocument": { - "type": "object", - "properties": { - "document_id": { - "type": "string" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ImageMedia" - } - ] - } - }, - { - "$ref": "#/components/schemas/URL" - } - ] - }, - "mime_type": { - "type": "string" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - }, - "additionalProperties": false, - "required": [ - "document_id", - "content", - "metadata" - ] - }, - "InsertDocumentsRequest": { - "type": "object", - "properties": { - "bank_id": { - "type": "string" - }, - "documents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemoryBankDocument" - } - }, - "ttl_seconds": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "bank_id", - "documents" - ] - }, - "JobCancelRequest": { - "type": "object", - "properties": { - "task_id": { - "type": "string" - }, - "job_id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "task_id", - "job_id" - ] - }, - "JobStatus": { - "type": "string", - "enum": [ - "completed", - "in_progress" - ] - }, - "ProviderInfo": { - "type": "object", - "properties": { - "provider_id": { - "type": "string" - }, - "provider_type": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "provider_id", - "provider_type" - ] - }, - "RouteInfo": { - "type": "object", - "properties": { - "route": { - "type": "string" - }, - "method": { - "type": "string" - }, - "provider_types": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "route", - "method", - "provider_types" - ] - }, - "LogSeverity": { - "type": "string", - "enum": [ - "verbose", - "debug", - "info", - "warn", - "error", - "critical" - ] - }, - "MetricEvent": { - "type": "object", - "properties": { - "trace_id": { - "type": "string" - }, - "span_id": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "type": { - "type": "string", - "const": "metric", - "default": "metric" - }, - "metric": { - "type": "string" - }, - "value": { - "oneOf": [ - { - "type": "integer" - }, - { - "type": "number" - } - ] - }, - "unit": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "trace_id", - "span_id", - "timestamp", - "type", - "metric", - "value", - "unit" - ] - }, - "SpanEndPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "span_end", - "default": "span_end" - }, - "status": { - "$ref": "#/components/schemas/SpanStatus" - } - }, - "additionalProperties": false, - "required": [ - "type", - "status" - ] - }, - "SpanStartPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "span_start", - "default": "span_start" - }, - "name": { - "type": "string" - }, - "parent_span_id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "type", - "name" - ] - }, - "SpanStatus": { - "type": "string", - "enum": [ - "ok", - "error" - ] - }, - "StructuredLogEvent": { - "type": "object", - "properties": { - "trace_id": { - "type": "string" - }, - "span_id": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "type": { - "type": "string", - "const": "structured_log", - "default": "structured_log" - }, - "payload": { - "oneOf": [ - { - "$ref": "#/components/schemas/SpanStartPayload" - }, - { - "$ref": "#/components/schemas/SpanEndPayload" - } - ] - } - }, - "additionalProperties": false, - "required": [ - "trace_id", - "span_id", - "timestamp", - "type", - "payload" - ] - }, - "UnstructuredLogEvent": { - "type": "object", - "properties": { - "trace_id": { - "type": "string" - }, - "span_id": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "type": { - "type": "string", - "const": "unstructured_log", - "default": "unstructured_log" - }, - "message": { - "type": "string" - }, - "severity": { - "$ref": "#/components/schemas/LogSeverity" - } - }, - "additionalProperties": false, - "required": [ - "trace_id", - "span_id", - "timestamp", - "type", - "message", - "severity" - ] - }, "LogEventRequest": { "type": "object", "properties": { "event": { "oneOf": [ { - "$ref": "#/components/schemas/UnstructuredLogEvent" + "type": "object", + "properties": { + "trace_id": { + "type": "string" + }, + "span_id": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "type": { + "type": "string", + "const": "unstructured_log", + "default": "unstructured_log" + }, + "message": { + "type": "string" + }, + "severity": { + "type": "string", + "enum": [ + "verbose", + "debug", + "info", + "warn", + "error", + "critical" + ] + } + }, + "additionalProperties": false, + "required": [ + "trace_id", + "span_id", + "timestamp", + "type", + "message", + "severity" + ] }, { - "$ref": "#/components/schemas/MetricEvent" + "type": "object", + "properties": { + "trace_id": { + "type": "string" + }, + "span_id": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "type": { + "type": "string", + "const": "metric", + "default": "metric" + }, + "metric": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "number" + } + ] + }, + "unit": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "trace_id", + "span_id", + "timestamp", + "type", + "metric", + "value", + "unit" + ] }, { - "$ref": "#/components/schemas/StructuredLogEvent" + "type": "object", + "properties": { + "trace_id": { + "type": "string" + }, + "span_id": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "type": { + "type": "string", + "const": "structured_log", + "default": "structured_log" + }, + "payload": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "span_start", + "default": "span_start" + }, + "name": { + "type": "string" + }, + "parent_span_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "span_end", + "default": "span_end" + }, + "status": { + "type": "string", + "enum": [ + "ok", + "error" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "status" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "trace_id", + "span_id", + "timestamp", + "type", + "payload" + ] } ] } @@ -6431,101 +19583,6 @@ "event" ] }, - "DPOAlignmentConfig": { - "type": "object", - "properties": { - "reward_scale": { - "type": "number" - }, - "reward_clip": { - "type": "number" - }, - "epsilon": { - "type": "number" - }, - "gamma": { - "type": "number" - } - }, - "additionalProperties": false, - "required": [ - "reward_scale", - "reward_clip", - "epsilon", - "gamma" - ] - }, - "OptimizerConfig": { - "type": "object", - "properties": { - "optimizer_type": { - "type": "string", - "enum": [ - "adam", - "adamw", - "sgd" - ] - }, - "lr": { - "type": "number" - }, - "lr_min": { - "type": "number" - }, - "weight_decay": { - "type": "number" - } - }, - "additionalProperties": false, - "required": [ - "optimizer_type", - "lr", - "lr_min", - "weight_decay" - ] - }, - "RLHFAlgorithm": { - "type": "string", - "enum": [ - "dpo" - ] - }, - "TrainingConfig": { - "type": "object", - "properties": { - "n_epochs": { - "type": "integer" - }, - "batch_size": { - "type": "integer" - }, - "shuffle": { - "type": "boolean" - }, - "n_iters": { - "type": "integer" - }, - "enable_activation_checkpointing": { - "type": "boolean" - }, - "memory_efficient_fsdp_wrap": { - "type": "boolean" - }, - "fsdp_cpu_offload": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "n_epochs", - "batch_size", - "shuffle", - "n_iters", - "enable_activation_checkpointing", - "memory_efficient_fsdp_wrap", - "fsdp_cpu_offload" - ] - }, "PreferenceOptimizeRequest": { "type": "object", "properties": { @@ -6533,7 +19590,16 @@ "type": "string" }, "finetuned_model": { - "$ref": "#/components/schemas/URL" + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] }, "dataset_id": { "type": "string" @@ -6542,16 +19608,99 @@ "type": "string" }, "algorithm": { - "$ref": "#/components/schemas/RLHFAlgorithm" + "type": "string", + "enum": [ + "dpo" + ] }, "algorithm_config": { - "$ref": "#/components/schemas/DPOAlignmentConfig" + "type": "object", + "properties": { + "reward_scale": { + "type": "number" + }, + "reward_clip": { + "type": "number" + }, + "epsilon": { + "type": "number" + }, + "gamma": { + "type": "number" + } + }, + "additionalProperties": false, + "required": [ + "reward_scale", + "reward_clip", + "epsilon", + "gamma" + ] }, "optimizer_config": { - "$ref": "#/components/schemas/OptimizerConfig" + "type": "object", + "properties": { + "optimizer_type": { + "type": "string", + "enum": [ + "adam", + "adamw", + "sgd" + ] + }, + "lr": { + "type": "number" + }, + "lr_min": { + "type": "number" + }, + "weight_decay": { + "type": "number" + } + }, + "additionalProperties": false, + "required": [ + "optimizer_type", + "lr", + "lr_min", + "weight_decay" + ] }, "training_config": { - "$ref": "#/components/schemas/TrainingConfig" + "type": "object", + "properties": { + "n_epochs": { + "type": "integer" + }, + "batch_size": { + "type": "integer" + }, + "shuffle": { + "type": "boolean" + }, + "n_iters": { + "type": "integer" + }, + "enable_activation_checkpointing": { + "type": "boolean" + }, + "memory_efficient_fsdp_wrap": { + "type": "boolean" + }, + "fsdp_cpu_offload": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "n_epochs", + "batch_size", + "shuffle", + "n_iters", + "enable_activation_checkpointing", + "memory_efficient_fsdp_wrap", + "fsdp_cpu_offload" + ] }, "hyperparam_search_config": { "type": "object", @@ -6630,7 +19779,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] }, { "type": "array", @@ -6640,7 +19824,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] } ] } @@ -6693,7 +19912,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] }, { "type": "array", @@ -6703,7 +19957,42 @@ "type": "string" }, { - "$ref": "#/components/schemas/ImageMedia" + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] } ] } @@ -6892,7 +20181,16 @@ } }, "url": { - "$ref": "#/components/schemas/URL" + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] }, "provider_dataset_id": { "type": "string" @@ -6987,73 +20285,6 @@ "scoring_functions" ] }, - "GraphMemoryBankParams": { - "type": "object", - "properties": { - "memory_bank_type": { - "type": "string", - "const": "graph", - "default": "graph" - } - }, - "additionalProperties": false, - "required": [ - "memory_bank_type" - ] - }, - "KeyValueMemoryBankParams": { - "type": "object", - "properties": { - "memory_bank_type": { - "type": "string", - "const": "keyvalue", - "default": "keyvalue" - } - }, - "additionalProperties": false, - "required": [ - "memory_bank_type" - ] - }, - "KeywordMemoryBankParams": { - "type": "object", - "properties": { - "memory_bank_type": { - "type": "string", - "const": "keyword", - "default": "keyword" - } - }, - "additionalProperties": false, - "required": [ - "memory_bank_type" - ] - }, - "VectorMemoryBankParams": { - "type": "object", - "properties": { - "memory_bank_type": { - "type": "string", - "const": "vector", - "default": "vector" - }, - "embedding_model": { - "type": "string" - }, - "chunk_size_in_tokens": { - "type": "integer" - }, - "overlap_size_in_tokens": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "memory_bank_type", - "embedding_model", - "chunk_size_in_tokens" - ] - }, "RegisterMemoryBankRequest": { "type": "object", "properties": { @@ -7063,16 +20294,71 @@ "params": { "oneOf": [ { - "$ref": "#/components/schemas/VectorMemoryBankParams" + "type": "object", + "properties": { + "memory_bank_type": { + "type": "string", + "const": "vector", + "default": "vector" + }, + "embedding_model": { + "type": "string" + }, + "chunk_size_in_tokens": { + "type": "integer" + }, + "overlap_size_in_tokens": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "memory_bank_type", + "embedding_model", + "chunk_size_in_tokens" + ] }, { - "$ref": "#/components/schemas/KeyValueMemoryBankParams" + "type": "object", + "properties": { + "memory_bank_type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + } + }, + "additionalProperties": false, + "required": [ + "memory_bank_type" + ] }, { - "$ref": "#/components/schemas/KeywordMemoryBankParams" + "type": "object", + "properties": { + "memory_bank_type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "memory_bank_type" + ] }, { - "$ref": "#/components/schemas/GraphMemoryBankParams" + "type": "object", + "properties": { + "memory_bank_type": { + "type": "string", + "const": "graph", + "default": "graph" + } + }, + "additionalProperties": false, + "required": [ + "memory_bank_type" + ] } ] }, @@ -7294,10 +20580,51 @@ "params": { "oneOf": [ { - "$ref": "#/components/schemas/LLMAsJudgeScoringFnParams" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm_as_judge", + "default": "llm_as_judge" + }, + "judge_model": { + "type": "string" + }, + "prompt_template": { + "type": "string" + }, + "judge_score_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type", + "judge_model" + ] }, { - "$ref": "#/components/schemas/RegexParserScoringFnParams" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "regex_parser", + "default": "regex_parser" + }, + "parsing_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] } ] } @@ -7361,10 +20688,2515 @@ "task_config": { "oneOf": [ { - "$ref": "#/components/schemas/BenchmarkEvalTaskConfig" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "benchmark", + "default": "benchmark" + }, + "eval_candidate": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "model", + "default": "model" + }, + "model": { + "type": "string" + }, + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "system_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "sampling_params" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "agent", + "default": "agent" + }, + "config": { + "type": "object", + "properties": { + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "tools": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "brave_search", + "default": "brave_search" + }, + "api_key": { + "type": "string" + }, + "engine": { + "type": "string", + "enum": [ + "bing", + "brave" + ], + "default": "brave" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key", + "engine" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "wolfram_alpha", + "default": "wolfram_alpha" + }, + "api_key": { + "type": "string" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "photogen", + "default": "photogen" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "code_interpreter", + "default": "code_interpreter" + }, + "enable_inline_code_execution": { + "type": "boolean", + "default": true + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "enable_inline_code_execution" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "function_call", + "default": "function_call" + }, + "function_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "param_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": [ + "param_type" + ] + } + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "function_name", + "description", + "parameters" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "memory", + "default": "memory" + }, + "memory_bank_configs": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "vector", + "default": "vector" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "keys" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "graph", + "default": "graph" + }, + "entities": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "entities" + ] + } + ] + } + }, + "query_generator_config": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "default", + "default": "default" + }, + "sep": { + "type": "string", + "default": " " + } + }, + "additionalProperties": false, + "required": [ + "type", + "sep" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm", + "default": "llm" + }, + "model": { + "type": "string" + }, + "template": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "template" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "custom", + "default": "custom" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + }, + "max_tokens_in_context": { + "type": "integer", + "default": 4096 + }, + "max_chunks": { + "type": "integer", + "default": 10 + } + }, + "additionalProperties": false, + "required": [ + "type", + "memory_bank_configs", + "query_generator_config", + "max_tokens_in_context", + "max_chunks" + ] + } + ] + } + }, + "tool_choice": { + "type": "string", + "enum": [ + "auto", + "required" + ], + "default": "auto" + }, + "tool_prompt_format": { + "type": "string", + "enum": [ + "json", + "function_tag", + "python_list" + ], + "title": "This Enum refers to the prompt format for calling custom / zero shot tools", + "description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli", + "default": "json" + }, + "max_infer_iters": { + "type": "integer", + "default": 10 + }, + "model": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "enable_session_persistence": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "max_infer_iters", + "model", + "instructions", + "enable_session_persistence" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "config" + ] + } + ] + }, + "num_examples": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "type", + "eval_candidate" + ] }, { - "$ref": "#/components/schemas/AppEvalTaskConfig" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "app", + "default": "app" + }, + "eval_candidate": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "model", + "default": "model" + }, + "model": { + "type": "string" + }, + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "system_message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "sampling_params" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "agent", + "default": "agent" + }, + "config": { + "type": "object", + "properties": { + "sampling_params": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "greedy", + "top_p", + "top_k" + ], + "default": "greedy" + }, + "temperature": { + "type": "number", + "default": 0.0 + }, + "top_p": { + "type": "number", + "default": 0.95 + }, + "top_k": { + "type": "integer", + "default": 0 + }, + "max_tokens": { + "type": "integer", + "default": 0 + }, + "repetition_penalty": { + "type": "number", + "default": 1.0 + } + }, + "additionalProperties": false, + "required": [ + "strategy" + ] + }, + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "tools": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "brave_search", + "default": "brave_search" + }, + "api_key": { + "type": "string" + }, + "engine": { + "type": "string", + "enum": [ + "bing", + "brave" + ], + "default": "brave" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key", + "engine" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "wolfram_alpha", + "default": "wolfram_alpha" + }, + "api_key": { + "type": "string" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "api_key" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "photogen", + "default": "photogen" + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "code_interpreter", + "default": "code_interpreter" + }, + "enable_inline_code_execution": { + "type": "boolean", + "default": true + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "enable_inline_code_execution" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "function_call", + "default": "function_call" + }, + "function_name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "param_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": [ + "param_type" + ] + } + }, + "remote_execution": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE" + ] + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "body": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "url", + "method" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "function_name", + "description", + "parameters" + ] + }, + { + "type": "object", + "properties": { + "input_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "output_shields": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "const": "memory", + "default": "memory" + }, + "memory_bank_configs": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "vector", + "default": "vector" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyvalue", + "default": "keyvalue" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "keys" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "keyword", + "default": "keyword" + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type" + ] + }, + { + "type": "object", + "properties": { + "bank_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "graph", + "default": "graph" + }, + "entities": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bank_id", + "type", + "entities" + ] + } + ] + } + }, + "query_generator_config": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "default", + "default": "default" + }, + "sep": { + "type": "string", + "default": " " + } + }, + "additionalProperties": false, + "required": [ + "type", + "sep" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm", + "default": "llm" + }, + "model": { + "type": "string" + }, + "template": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "type", + "model", + "template" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "custom", + "default": "custom" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + }, + "max_tokens_in_context": { + "type": "integer", + "default": 4096 + }, + "max_chunks": { + "type": "integer", + "default": 10 + } + }, + "additionalProperties": false, + "required": [ + "type", + "memory_bank_configs", + "query_generator_config", + "max_tokens_in_context", + "max_chunks" + ] + } + ] + } + }, + "tool_choice": { + "type": "string", + "enum": [ + "auto", + "required" + ], + "default": "auto" + }, + "tool_prompt_format": { + "type": "string", + "enum": [ + "json", + "function_tag", + "python_list" + ], + "title": "This Enum refers to the prompt format for calling custom / zero shot tools", + "description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli", + "default": "json" + }, + "max_infer_iters": { + "type": "integer", + "default": 10 + }, + "model": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "enable_session_persistence": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "max_infer_iters", + "model", + "instructions", + "enable_session_persistence" + ] + } + }, + "additionalProperties": false, + "required": [ + "type", + "config" + ] + } + ] + }, + "scoring_params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm_as_judge", + "default": "llm_as_judge" + }, + "judge_model": { + "type": "string" + }, + "prompt_template": { + "type": "string" + }, + "judge_score_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type", + "judge_model" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "regex_parser", + "default": "regex_parser" + }, + "parsing_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + } + ] + } + }, + "num_examples": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "type", + "eval_candidate", + "scoring_params" + ] } ] } @@ -7398,16 +23230,659 @@ "items": { "oneOf": [ { - "$ref": "#/components/schemas/UserMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/SystemMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/ToolResponseMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] }, { - "$ref": "#/components/schemas/CompletionMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] } ] } @@ -7449,7 +23924,50 @@ "type": "object", "properties": { "violation": { - "$ref": "#/components/schemas/SafetyViolation" + "type": "object", + "properties": { + "violation_level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ] + }, + "user_message": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "violation_level", + "metadata" + ] } }, "additionalProperties": false @@ -7492,10 +24010,51 @@ { "oneOf": [ { - "$ref": "#/components/schemas/LLMAsJudgeScoringFnParams" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm_as_judge", + "default": "llm_as_judge" + }, + "judge_model": { + "type": "string" + }, + "prompt_template": { + "type": "string" + }, + "judge_score_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type", + "judge_model" + ] }, { - "$ref": "#/components/schemas/RegexParserScoringFnParams" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "regex_parser", + "default": "regex_parser" + }, + "parsing_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] } ] }, @@ -7518,7 +24077,67 @@ "results": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/ScoringResult" + "type": "object", + "properties": { + "score_rows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "aggregated_results": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "score_rows", + "aggregated_results" + ] } } }, @@ -7540,10 +24159,51 @@ { "oneOf": [ { - "$ref": "#/components/schemas/LLMAsJudgeScoringFnParams" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "llm_as_judge", + "default": "llm_as_judge" + }, + "judge_model": { + "type": "string" + }, + "prompt_template": { + "type": "string" + }, + "judge_score_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type", + "judge_model" + ] }, { - "$ref": "#/components/schemas/RegexParserScoringFnParams" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "regex_parser", + "default": "regex_parser" + }, + "parsing_regexes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] } ] }, @@ -7573,7 +24233,67 @@ "results": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/ScoringResult" + "type": "object", + "properties": { + "score_rows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "aggregated_results": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "score_rows", + "aggregated_results" + ] } } }, @@ -7582,108 +24302,6 @@ "results" ] }, - "DoraFinetuningConfig": { - "type": "object", - "properties": { - "lora_attn_modules": { - "type": "array", - "items": { - "type": "string" - } - }, - "apply_lora_to_mlp": { - "type": "boolean" - }, - "apply_lora_to_output": { - "type": "boolean" - }, - "rank": { - "type": "integer" - }, - "alpha": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "lora_attn_modules", - "apply_lora_to_mlp", - "apply_lora_to_output", - "rank", - "alpha" - ] - }, - "FinetuningAlgorithm": { - "type": "string", - "enum": [ - "full", - "lora", - "qlora", - "dora" - ] - }, - "LoraFinetuningConfig": { - "type": "object", - "properties": { - "lora_attn_modules": { - "type": "array", - "items": { - "type": "string" - } - }, - "apply_lora_to_mlp": { - "type": "boolean" - }, - "apply_lora_to_output": { - "type": "boolean" - }, - "rank": { - "type": "integer" - }, - "alpha": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "lora_attn_modules", - "apply_lora_to_mlp", - "apply_lora_to_output", - "rank", - "alpha" - ] - }, - "QLoraFinetuningConfig": { - "type": "object", - "properties": { - "lora_attn_modules": { - "type": "array", - "items": { - "type": "string" - } - }, - "apply_lora_to_mlp": { - "type": "boolean" - }, - "apply_lora_to_output": { - "type": "boolean" - }, - "rank": { - "type": "integer" - }, - "alpha": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "lora_attn_modules", - "apply_lora_to_mlp", - "apply_lora_to_output", - "rank", - "alpha" - ] - }, "SupervisedFineTuneRequest": { "type": "object", "properties": { @@ -7700,26 +24318,175 @@ "type": "string" }, "algorithm": { - "$ref": "#/components/schemas/FinetuningAlgorithm" + "type": "string", + "enum": [ + "full", + "lora", + "qlora", + "dora" + ] }, "algorithm_config": { "oneOf": [ { - "$ref": "#/components/schemas/LoraFinetuningConfig" + "type": "object", + "properties": { + "lora_attn_modules": { + "type": "array", + "items": { + "type": "string" + } + }, + "apply_lora_to_mlp": { + "type": "boolean" + }, + "apply_lora_to_output": { + "type": "boolean" + }, + "rank": { + "type": "integer" + }, + "alpha": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "lora_attn_modules", + "apply_lora_to_mlp", + "apply_lora_to_output", + "rank", + "alpha" + ] }, { - "$ref": "#/components/schemas/QLoraFinetuningConfig" + "type": "object", + "properties": { + "lora_attn_modules": { + "type": "array", + "items": { + "type": "string" + } + }, + "apply_lora_to_mlp": { + "type": "boolean" + }, + "apply_lora_to_output": { + "type": "boolean" + }, + "rank": { + "type": "integer" + }, + "alpha": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "lora_attn_modules", + "apply_lora_to_mlp", + "apply_lora_to_output", + "rank", + "alpha" + ] }, { - "$ref": "#/components/schemas/DoraFinetuningConfig" + "type": "object", + "properties": { + "lora_attn_modules": { + "type": "array", + "items": { + "type": "string" + } + }, + "apply_lora_to_mlp": { + "type": "boolean" + }, + "apply_lora_to_output": { + "type": "boolean" + }, + "rank": { + "type": "integer" + }, + "alpha": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "lora_attn_modules", + "apply_lora_to_mlp", + "apply_lora_to_output", + "rank", + "alpha" + ] } ] }, "optimizer_config": { - "$ref": "#/components/schemas/OptimizerConfig" + "type": "object", + "properties": { + "optimizer_type": { + "type": "string", + "enum": [ + "adam", + "adamw", + "sgd" + ] + }, + "lr": { + "type": "number" + }, + "lr_min": { + "type": "number" + }, + "weight_decay": { + "type": "number" + } + }, + "additionalProperties": false, + "required": [ + "optimizer_type", + "lr", + "lr_min", + "weight_decay" + ] }, "training_config": { - "$ref": "#/components/schemas/TrainingConfig" + "type": "object", + "properties": { + "n_epochs": { + "type": "integer" + }, + "batch_size": { + "type": "integer" + }, + "shuffle": { + "type": "boolean" + }, + "n_iters": { + "type": "integer" + }, + "enable_activation_checkpointing": { + "type": "boolean" + }, + "memory_efficient_fsdp_wrap": { + "type": "boolean" + }, + "fsdp_cpu_offload": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "n_epochs", + "batch_size", + "shuffle", + "n_iters", + "enable_activation_checkpointing", + "memory_efficient_fsdp_wrap", + "fsdp_cpu_offload" + ] }, "hyperparam_search_config": { "type": "object", @@ -7794,16 +24561,659 @@ "items": { "oneOf": [ { - "$ref": "#/components/schemas/UserMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/SystemMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ] }, { - "$ref": "#/components/schemas/ToolResponseMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "ipython", + "default": "ipython" + }, + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "tool_name", + "content" + ] }, { - "$ref": "#/components/schemas/CompletionMessage" + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "image": { + "oneOf": [ + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "format_description": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "This class represents an image object. To create" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "image" + ] + } + ] + } + } + ] + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ] + }, + "tool_calls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ] + }, + { + "type": "string" + } + ] + }, + "arguments": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason", + "tool_calls" + ] } ] } @@ -7926,14 +25336,6 @@ } ], "tags": [ - { - "name": "AgentCandidate", - "description": "" - }, - { - "name": "AgentConfig", - "description": "" - }, { "name": "AgentCreateResponse", "description": "" @@ -7946,45 +25348,9 @@ "name": "AgentStepResponse", "description": "" }, - { - "name": "AgentTurnResponseEvent", - "description": "Streamed agent execution response.\n\n" - }, - { - "name": "AgentTurnResponseStepCompletePayload", - "description": "" - }, - { - "name": "AgentTurnResponseStepProgressPayload", - "description": "" - }, - { - "name": "AgentTurnResponseStepStartPayload", - "description": "" - }, - { - "name": "AgentTurnResponseStreamChunk", - "description": "streamed agent turn completion response.\n\n" - }, - { - "name": "AgentTurnResponseTurnCompletePayload", - "description": "" - }, - { - "name": "AgentTurnResponseTurnStartPayload", - "description": "" - }, { "name": "Agents" }, - { - "name": "AppEvalTaskConfig", - "description": "" - }, - { - "name": "Attachment", - "description": "" - }, { "name": "BatchChatCompletionRequest", "description": "" @@ -8004,14 +25370,6 @@ { "name": "BatchInference" }, - { - "name": "BenchmarkEvalTaskConfig", - "description": "" - }, - { - "name": "BuiltinTool", - "description": "" - }, { "name": "CancelTrainingJobRequest", "description": "" @@ -8020,46 +25378,10 @@ "name": "ChatCompletionRequest", "description": "" }, - { - "name": "ChatCompletionResponse", - "description": "Chat completion response.\n\n" - }, - { - "name": "ChatCompletionResponseEvent", - "description": "Chat completion response event.\n\n" - }, - { - "name": "ChatCompletionResponseEventType", - "description": "" - }, - { - "name": "ChatCompletionResponseStreamChunk", - "description": "SSE-stream of these events.\n\n" - }, - { - "name": "Checkpoint", - "description": "Checkpoint created during training runs\n\n" - }, - { - "name": "CodeInterpreterToolDefinition", - "description": "" - }, - { - "name": "CompletionMessage", - "description": "" - }, { "name": "CompletionRequest", "description": "" }, - { - "name": "CompletionResponse", - "description": "Completion response.\n\n" - }, - { - "name": "CompletionResponseStreamChunk", - "description": "streamed completion response.\n\n" - }, { "name": "CreateAgentRequest", "description": "" @@ -8072,10 +25394,6 @@ "name": "CreateAgentTurnRequest", "description": "" }, - { - "name": "DPOAlignmentConfig", - "description": "" - }, { "name": "Dataset", "description": "" @@ -8094,10 +25412,6 @@ "name": "DeleteAgentsSessionRequest", "description": "" }, - { - "name": "DoraFinetuningConfig", - "description": "" - }, { "name": "EmbeddingsRequest", "description": "" @@ -8124,41 +25438,17 @@ "name": "EvaluateRowsRequest", "description": "" }, - { - "name": "FinetuningAlgorithm", - "description": "" - }, - { - "name": "FunctionCallToolDefinition", - "description": "" - }, { "name": "GetAgentsSessionRequest", "description": "" }, - { - "name": "GraphMemoryBank", - "description": "" - }, - { - "name": "GraphMemoryBankParams", - "description": "" - }, { "name": "HealthInfo", "description": "" }, - { - "name": "ImageMedia", - "description": "" - }, { "name": "Inference" }, - { - "name": "InferenceStep", - "description": "" - }, { "name": "InsertDocumentsRequest", "description": "" @@ -8174,87 +25464,27 @@ "name": "JobCancelRequest", "description": "" }, - { - "name": "JobStatus", - "description": "" - }, - { - "name": "KeyValueMemoryBank", - "description": "" - }, - { - "name": "KeyValueMemoryBankParams", - "description": "" - }, - { - "name": "KeywordMemoryBank", - "description": "" - }, - { - "name": "KeywordMemoryBankParams", - "description": "" - }, - { - "name": "LLMAsJudgeScoringFnParams", - "description": "" - }, { "name": "LogEventRequest", "description": "" }, - { - "name": "LogSeverity", - "description": "" - }, - { - "name": "LoraFinetuningConfig", - "description": "" - }, { "name": "Memory" }, - { - "name": "MemoryBankDocument", - "description": "" - }, { "name": "MemoryBanks" }, - { - "name": "MemoryRetrievalStep", - "description": "" - }, - { - "name": "MemoryToolDefinition", - "description": "" - }, - { - "name": "MetricEvent", - "description": "" - }, { "name": "Model", "description": "" }, - { - "name": "ModelCandidate", - "description": "" - }, { "name": "Models" }, - { - "name": "OptimizerConfig", - "description": "" - }, { "name": "PaginatedRowsResult", "description": "" }, - { - "name": "PhotogenToolDefinition", - "description": "" - }, { "name": "PostTraining" }, @@ -8270,10 +25500,6 @@ "name": "PostTrainingJobLogStream", "description": "Stream of logs from a finetuning job.\n\n" }, - { - "name": "PostTrainingJobStatus", - "description": "" - }, { "name": "PostTrainingJobStatusResponse", "description": "Status of a finetuning job.\n\n" @@ -8282,14 +25508,6 @@ "name": "PreferenceOptimizeRequest", "description": "" }, - { - "name": "ProviderInfo", - "description": "" - }, - { - "name": "QLoraFinetuningConfig", - "description": "" - }, { "name": "QueryDocumentsRequest", "description": "" @@ -8298,14 +25516,6 @@ "name": "QueryDocumentsResponse", "description": "" }, - { - "name": "RLHFAlgorithm", - "description": "" - }, - { - "name": "RegexParserScoringFnParams", - "description": "" - }, { "name": "RegisterDatasetRequest", "description": "" @@ -8330,18 +25540,6 @@ "name": "RegisterShieldRequest", "description": "" }, - { - "name": "RestAPIExecutionConfig", - "description": "" - }, - { - "name": "RestAPIMethod", - "description": "" - }, - { - "name": "RouteInfo", - "description": "" - }, { "name": "RunEvalRequest", "description": "" @@ -8357,18 +25555,6 @@ { "name": "Safety" }, - { - "name": "SafetyViolation", - "description": "" - }, - { - "name": "SamplingParams", - "description": "" - }, - { - "name": "SamplingStrategy", - "description": "" - }, { "name": "ScoreBatchRequest", "description": "" @@ -8395,14 +25581,6 @@ { "name": "ScoringFunctions" }, - { - "name": "ScoringResult", - "description": "" - }, - { - "name": "SearchToolDefinition", - "description": "" - }, { "name": "Session", "description": "A single session of an interaction with an Agentic System.\n\n" @@ -8411,33 +25589,9 @@ "name": "Shield", "description": "A safety shield resource that can be used to check content\n\n" }, - { - "name": "ShieldCallStep", - "description": "" - }, { "name": "Shields" }, - { - "name": "SpanEndPayload", - "description": "" - }, - { - "name": "SpanStartPayload", - "description": "" - }, - { - "name": "SpanStatus", - "description": "" - }, - { - "name": "StopReason", - "description": "" - }, - { - "name": "StructuredLogEvent", - "description": "" - }, { "name": "SupervisedFineTuneRequest", "description": "" @@ -8453,73 +25607,17 @@ "name": "SyntheticDataGenerationResponse", "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n" }, - { - "name": "SystemMessage", - "description": "" - }, { "name": "Telemetry" }, - { - "name": "TokenLogProbs", - "description": "" - }, - { - "name": "ToolCall", - "description": "" - }, - { - "name": "ToolCallDelta", - "description": "" - }, - { - "name": "ToolCallParseStatus", - "description": "" - }, - { - "name": "ToolChoice", - "description": "" - }, - { - "name": "ToolDefinition", - "description": "" - }, - { - "name": "ToolExecutionStep", - "description": "" - }, - { - "name": "ToolParamDefinition", - "description": "" - }, - { - "name": "ToolPromptFormat", - "description": "This Enum refers to the prompt format for calling custom / zero shot tools\n\n`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli\n\n" - }, - { - "name": "ToolResponse", - "description": "" - }, - { - "name": "ToolResponseMessage", - "description": "" - }, { "name": "Trace", "description": "" }, - { - "name": "TrainingConfig", - "description": "" - }, { "name": "Turn", "description": "A single turn in an interaction with an Agentic System.\n\n" }, - { - "name": "URL", - "description": "" - }, { "name": "UnregisterMemoryBankRequest", "description": "" @@ -8527,30 +25625,6 @@ { "name": "UnregisterModelRequest", "description": "" - }, - { - "name": "UnstructuredLogEvent", - "description": "" - }, - { - "name": "UserMessage", - "description": "" - }, - { - "name": "VectorMemoryBank", - "description": "" - }, - { - "name": "VectorMemoryBankParams", - "description": "" - }, - { - "name": "ViolationLevel", - "description": "" - }, - { - "name": "WolframAlphaToolDefinition", - "description": "" } ], "x-tagGroups": [ @@ -8580,149 +25654,65 @@ { "name": "Types", "tags": [ - "AgentCandidate", - "AgentConfig", "AgentCreateResponse", "AgentSessionCreateResponse", "AgentStepResponse", - "AgentTurnResponseEvent", - "AgentTurnResponseStepCompletePayload", - "AgentTurnResponseStepProgressPayload", - "AgentTurnResponseStepStartPayload", - "AgentTurnResponseStreamChunk", - "AgentTurnResponseTurnCompletePayload", - "AgentTurnResponseTurnStartPayload", - "AppEvalTaskConfig", - "Attachment", "BatchChatCompletionRequest", "BatchChatCompletionResponse", "BatchCompletionRequest", "BatchCompletionResponse", - "BenchmarkEvalTaskConfig", - "BuiltinTool", "CancelTrainingJobRequest", "ChatCompletionRequest", - "ChatCompletionResponse", - "ChatCompletionResponseEvent", - "ChatCompletionResponseEventType", - "ChatCompletionResponseStreamChunk", - "Checkpoint", - "CodeInterpreterToolDefinition", - "CompletionMessage", "CompletionRequest", - "CompletionResponse", - "CompletionResponseStreamChunk", "CreateAgentRequest", "CreateAgentSessionRequest", "CreateAgentTurnRequest", - "DPOAlignmentConfig", "Dataset", "DeleteAgentsRequest", "DeleteAgentsSessionRequest", - "DoraFinetuningConfig", "EmbeddingsRequest", "EmbeddingsResponse", "EvalTask", "EvaluateResponse", "EvaluateRowsRequest", - "FinetuningAlgorithm", - "FunctionCallToolDefinition", "GetAgentsSessionRequest", - "GraphMemoryBank", - "GraphMemoryBankParams", "HealthInfo", - "ImageMedia", - "InferenceStep", "InsertDocumentsRequest", "Job", "JobCancelRequest", - "JobStatus", - "KeyValueMemoryBank", - "KeyValueMemoryBankParams", - "KeywordMemoryBank", - "KeywordMemoryBankParams", - "LLMAsJudgeScoringFnParams", "LogEventRequest", - "LogSeverity", - "LoraFinetuningConfig", - "MemoryBankDocument", - "MemoryRetrievalStep", - "MemoryToolDefinition", - "MetricEvent", "Model", - "ModelCandidate", - "OptimizerConfig", "PaginatedRowsResult", - "PhotogenToolDefinition", "PostTrainingJob", "PostTrainingJobArtifactsResponse", "PostTrainingJobLogStream", - "PostTrainingJobStatus", "PostTrainingJobStatusResponse", "PreferenceOptimizeRequest", - "ProviderInfo", - "QLoraFinetuningConfig", "QueryDocumentsRequest", "QueryDocumentsResponse", - "RLHFAlgorithm", - "RegexParserScoringFnParams", "RegisterDatasetRequest", "RegisterEvalTaskRequest", "RegisterMemoryBankRequest", "RegisterModelRequest", "RegisterScoringFunctionRequest", "RegisterShieldRequest", - "RestAPIExecutionConfig", - "RestAPIMethod", - "RouteInfo", "RunEvalRequest", "RunShieldRequest", "RunShieldResponse", - "SafetyViolation", - "SamplingParams", - "SamplingStrategy", "ScoreBatchRequest", "ScoreBatchResponse", "ScoreRequest", "ScoreResponse", "ScoringFn", - "ScoringResult", - "SearchToolDefinition", "Session", "Shield", - "ShieldCallStep", - "SpanEndPayload", - "SpanStartPayload", - "SpanStatus", - "StopReason", - "StructuredLogEvent", "SupervisedFineTuneRequest", "SyntheticDataGenerateRequest", "SyntheticDataGenerationResponse", - "SystemMessage", - "TokenLogProbs", - "ToolCall", - "ToolCallDelta", - "ToolCallParseStatus", - "ToolChoice", - "ToolDefinition", - "ToolExecutionStep", - "ToolParamDefinition", - "ToolPromptFormat", - "ToolResponse", - "ToolResponseMessage", "Trace", - "TrainingConfig", "Turn", - "URL", "UnregisterMemoryBankRequest", - "UnregisterModelRequest", - "UnstructuredLogEvent", - "UserMessage", - "VectorMemoryBank", - "VectorMemoryBankParams", - "ViolationLevel", - "WolframAlphaToolDefinition" + "UnregisterModelRequest" ] } ] diff --git a/docs/resources/llama-stack-spec.yaml b/docs/resources/llama-stack-spec.yaml index a0b3d6c5e..10038b0d2 100644 --- a/docs/resources/llama-stack-spec.yaml +++ b/docs/resources/llama-stack-spec.yaml @@ -1,63 +1,6 @@ components: responses: {} schemas: - AgentCandidate: - additionalProperties: false - properties: - config: - $ref: '#/components/schemas/AgentConfig' - type: - const: agent - default: agent - type: string - required: - - type - - config - type: object - AgentConfig: - additionalProperties: false - properties: - enable_session_persistence: - type: boolean - input_shields: - items: - type: string - type: array - instructions: - type: string - max_infer_iters: - default: 10 - type: integer - model: - type: string - output_shields: - items: - type: string - type: array - sampling_params: - $ref: '#/components/schemas/SamplingParams' - tool_choice: - $ref: '#/components/schemas/ToolChoice' - default: auto - tool_prompt_format: - $ref: '#/components/schemas/ToolPromptFormat' - default: json - tools: - items: - oneOf: - - $ref: '#/components/schemas/SearchToolDefinition' - - $ref: '#/components/schemas/WolframAlphaToolDefinition' - - $ref: '#/components/schemas/PhotogenToolDefinition' - - $ref: '#/components/schemas/CodeInterpreterToolDefinition' - - $ref: '#/components/schemas/FunctionCallToolDefinition' - - $ref: '#/components/schemas/MemoryToolDefinition' - type: array - required: - - max_infer_iters - - model - - instructions - - enable_session_persistence - type: object AgentCreateResponse: additionalProperties: false properties: @@ -79,188 +22,414 @@ components: properties: step: oneOf: - - $ref: '#/components/schemas/InferenceStep' - - $ref: '#/components/schemas/ToolExecutionStep' - - $ref: '#/components/schemas/ShieldCallStep' - - $ref: '#/components/schemas/MemoryRetrievalStep' + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + model_response: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: inference + default: inference + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - model_response + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: tool_execution + default: tool_execution + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + tool_responses: + items: + additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - content + type: object + type: array + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - tool_calls + - tool_responses + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: shield_call + default: shield_call + type: string + turn_id: + type: string + violation: + additionalProperties: false + properties: + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + user_message: + type: string + violation_level: + enum: + - info + - warn + - error + type: string + required: + - violation_level + - metadata + type: object + required: + - turn_id + - step_id + - step_type + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + inserted_context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + memory_bank_ids: + items: + type: string + type: array + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: memory_retrieval + default: memory_retrieval + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - memory_bank_ids + - inserted_context + type: object required: - step type: object - AgentTurnResponseEvent: - additionalProperties: false - properties: - payload: - oneOf: - - $ref: '#/components/schemas/AgentTurnResponseStepStartPayload' - - $ref: '#/components/schemas/AgentTurnResponseStepProgressPayload' - - $ref: '#/components/schemas/AgentTurnResponseStepCompletePayload' - - $ref: '#/components/schemas/AgentTurnResponseTurnStartPayload' - - $ref: '#/components/schemas/AgentTurnResponseTurnCompletePayload' - required: - - payload - title: Streamed agent execution response. - type: object - AgentTurnResponseStepCompletePayload: - additionalProperties: false - properties: - event_type: - const: step_complete - default: step_complete - type: string - step_details: - oneOf: - - $ref: '#/components/schemas/InferenceStep' - - $ref: '#/components/schemas/ToolExecutionStep' - - $ref: '#/components/schemas/ShieldCallStep' - - $ref: '#/components/schemas/MemoryRetrievalStep' - step_type: - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - type: string - required: - - event_type - - step_type - - step_details - type: object - AgentTurnResponseStepProgressPayload: - additionalProperties: false - properties: - event_type: - const: step_progress - default: step_progress - type: string - model_response_text_delta: - type: string - step_id: - type: string - step_type: - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - type: string - tool_call_delta: - $ref: '#/components/schemas/ToolCallDelta' - tool_response_text_delta: - type: string - required: - - event_type - - step_type - - step_id - type: object - AgentTurnResponseStepStartPayload: - additionalProperties: false - properties: - event_type: - const: step_start - default: step_start - type: string - metadata: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - step_id: - type: string - step_type: - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - type: string - required: - - event_type - - step_type - - step_id - type: object - AgentTurnResponseStreamChunk: - additionalProperties: false - properties: - event: - $ref: '#/components/schemas/AgentTurnResponseEvent' - required: - - event - title: streamed agent turn completion response. - type: object - AgentTurnResponseTurnCompletePayload: - additionalProperties: false - properties: - event_type: - const: turn_complete - default: turn_complete - type: string - turn: - $ref: '#/components/schemas/Turn' - required: - - event_type - - turn - type: object - AgentTurnResponseTurnStartPayload: - additionalProperties: false - properties: - event_type: - const: turn_start - default: turn_start - type: string - turn_id: - type: string - required: - - event_type - - turn_id - type: object - AppEvalTaskConfig: - additionalProperties: false - properties: - eval_candidate: - oneOf: - - $ref: '#/components/schemas/ModelCandidate' - - $ref: '#/components/schemas/AgentCandidate' - num_examples: - type: integer - scoring_params: - additionalProperties: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - type: object - type: - const: app - default: app - type: string - required: - - type - - eval_candidate - - scoring_params - type: object - Attachment: - additionalProperties: false - properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - - $ref: '#/components/schemas/URL' - mime_type: - type: string - required: - - content - - mime_type - type: object BatchChatCompletionRequest: additionalProperties: false properties: @@ -275,23 +444,468 @@ components: items: items: oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: system + default: system + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object type: array type: array model: type: string sampling_params: - $ref: '#/components/schemas/SamplingParams' + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object tool_choice: - $ref: '#/components/schemas/ToolChoice' + enum: + - auto + - required + type: string tool_prompt_format: - $ref: '#/components/schemas/ToolPromptFormat' + description: "`json` --\n Refers to the json format for calling tools.\n\ + \ The json format takes the form like\n {\n \"type\": \"\ + function\",\n \"function\" : {\n \"name\": \"function_name\"\ + ,\n \"description\": \"function_description\",\n \ + \ \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This\ + \ is an example of how you could define\n your own user defined format\ + \ for making tool calls.\n The function_tag format looks like this,\n\ + \ (parameters)\n\nThe detailed prompts\ + \ for each of these formats are added to llama cli" + enum: + - json + - function_tag + - python_list + title: This Enum refers to the prompt format for calling custom / zero shot + tools + type: string tools: items: - $ref: '#/components/schemas/ToolDefinition' + additionalProperties: false + properties: + description: + type: string + parameters: + additionalProperties: + additionalProperties: false + properties: + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: + type: string + param_type: + type: string + required: + default: true + type: boolean + required: + - param_type + type: object + type: object + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - tool_name + type: object type: array required: - model @@ -302,7 +916,121 @@ components: properties: completion_message_batch: items: - $ref: '#/components/schemas/CompletionMessage' + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object type: array required: - completion_message_batch @@ -314,11 +1042,53 @@ components: items: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object - items: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object type: array type: array logprobs: @@ -331,7 +1101,33 @@ components: model: type: string sampling_params: - $ref: '#/components/schemas/SamplingParams' + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object required: - model - content_batch @@ -341,35 +1137,125 @@ components: properties: completion_message_batch: items: - $ref: '#/components/schemas/CompletionMessage' + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object type: array required: - completion_message_batch type: object - BenchmarkEvalTaskConfig: - additionalProperties: false - properties: - eval_candidate: - oneOf: - - $ref: '#/components/schemas/ModelCandidate' - - $ref: '#/components/schemas/AgentCandidate' - num_examples: - type: integer - type: - const: benchmark - default: benchmark - type: string - required: - - type - - eval_candidate - type: object - BuiltinTool: - enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - type: string CancelTrainingJobRequest: additionalProperties: false properties: @@ -391,10 +1277,368 @@ components: messages: items: oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: system + default: system + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object type: array model_id: type: string @@ -441,134 +1685,156 @@ components: - bnf type: object sampling_params: - $ref: '#/components/schemas/SamplingParams' + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object stream: type: boolean tool_choice: - $ref: '#/components/schemas/ToolChoice' + enum: + - auto + - required + type: string tool_prompt_format: - $ref: '#/components/schemas/ToolPromptFormat' + description: "`json` --\n Refers to the json format for calling tools.\n\ + \ The json format takes the form like\n {\n \"type\": \"\ + function\",\n \"function\" : {\n \"name\": \"function_name\"\ + ,\n \"description\": \"function_description\",\n \ + \ \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This\ + \ is an example of how you could define\n your own user defined format\ + \ for making tool calls.\n The function_tag format looks like this,\n\ + \ (parameters)\n\nThe detailed prompts\ + \ for each of these formats are added to llama cli" + enum: + - json + - function_tag + - python_list + title: This Enum refers to the prompt format for calling custom / zero shot + tools + type: string tools: items: - $ref: '#/components/schemas/ToolDefinition' + additionalProperties: false + properties: + description: + type: string + parameters: + additionalProperties: + additionalProperties: false + properties: + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: + type: string + param_type: + type: string + required: + default: true + type: boolean + required: + - param_type + type: object + type: object + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - tool_name + type: object type: array required: - model_id - messages type: object - ChatCompletionResponse: - additionalProperties: false - properties: - completion_message: - $ref: '#/components/schemas/CompletionMessage' - logprobs: - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - required: - - completion_message - title: Chat completion response. - type: object - ChatCompletionResponseEvent: - additionalProperties: false - properties: - delta: - oneOf: - - type: string - - $ref: '#/components/schemas/ToolCallDelta' - event_type: - $ref: '#/components/schemas/ChatCompletionResponseEventType' - logprobs: - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - stop_reason: - $ref: '#/components/schemas/StopReason' - required: - - event_type - - delta - title: Chat completion response event. - type: object - ChatCompletionResponseEventType: - enum: - - start - - complete - - progress - type: string - ChatCompletionResponseStreamChunk: - additionalProperties: false - properties: - event: - $ref: '#/components/schemas/ChatCompletionResponseEvent' - required: - - event - title: SSE-stream of these events. - type: object - Checkpoint: - description: Checkpoint created during training runs - CodeInterpreterToolDefinition: - additionalProperties: false - properties: - enable_inline_code_execution: - default: true - type: boolean - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: code_interpreter - default: code_interpreter - type: string - required: - - type - - enable_inline_code_execution - type: object - CompletionMessage: - additionalProperties: false - properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - role: - const: assistant - default: assistant - type: string - stop_reason: - $ref: '#/components/schemas/StopReason' - tool_calls: - items: - $ref: '#/components/schemas/ToolCall' - type: array - required: - - role - - content - - stop_reason - - tool_calls - type: object CompletionRequest: additionalProperties: false properties: content: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object - items: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object type: array logprobs: additionalProperties: false @@ -622,49 +1888,645 @@ components: - bnf type: object sampling_params: - $ref: '#/components/schemas/SamplingParams' + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object stream: type: boolean required: - model_id - content type: object - CompletionResponse: - additionalProperties: false - properties: - content: - type: string - logprobs: - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - stop_reason: - $ref: '#/components/schemas/StopReason' - required: - - content - - stop_reason - title: Completion response. - type: object - CompletionResponseStreamChunk: - additionalProperties: false - properties: - delta: - type: string - logprobs: - items: - $ref: '#/components/schemas/TokenLogProbs' - type: array - stop_reason: - $ref: '#/components/schemas/StopReason' - required: - - delta - title: streamed completion response. - type: object CreateAgentRequest: additionalProperties: false properties: agent_config: - $ref: '#/components/schemas/AgentConfig' + additionalProperties: false + properties: + enable_session_persistence: + type: boolean + input_shields: + items: + type: string + type: array + instructions: + type: string + max_infer_iters: + default: 10 + type: integer + model: + type: string + output_shields: + items: + type: string + type: array + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + tool_choice: + default: auto + enum: + - auto + - required + type: string + tool_prompt_format: + default: json + description: "`json` --\n Refers to the json format for calling tools.\n\ + \ The json format takes the form like\n {\n \"type\"\ + : \"function\",\n \"function\" : {\n \"name\": \"\ + function_name\",\n \"description\": \"function_description\"\ + ,\n \"parameters\": {...}\n }\n }\n\n`function_tag`\ + \ --\n This is an example of how you could define\n your own\ + \ user defined format for making tool calls.\n The function_tag\ + \ format looks like this,\n (parameters)\n\ + \nThe detailed prompts for each of these formats are added to llama\ + \ cli" + enum: + - json + - function_tag + - python_list + title: This Enum refers to the prompt format for calling custom / zero + shot tools + type: string + tools: + items: + oneOf: + - additionalProperties: false + properties: + api_key: + type: string + engine: + default: brave + enum: + - bing + - brave + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: brave_search + default: brave_search + type: string + required: + - type + - api_key + - engine + type: object + - additionalProperties: false + properties: + api_key: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: wolfram_alpha + default: wolfram_alpha + type: string + required: + - type + - api_key + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: photogen + default: photogen + type: string + required: + - type + type: object + - additionalProperties: false + properties: + enable_inline_code_execution: + default: true + type: boolean + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: code_interpreter + default: code_interpreter + type: string + required: + - type + - enable_inline_code_execution + type: object + - additionalProperties: false + properties: + description: + type: string + function_name: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + parameters: + additionalProperties: + additionalProperties: false + properties: + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: + type: string + param_type: + type: string + required: + default: true + type: boolean + required: + - param_type + type: object + type: object + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: function_call + default: function_call + type: string + required: + - type + - function_name + - description + - parameters + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + max_chunks: + default: 10 + type: integer + max_tokens_in_context: + default: 4096 + type: integer + memory_bank_configs: + items: + oneOf: + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: vector + default: vector + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + keys: + items: + type: string + type: array + type: + const: keyvalue + default: keyvalue + type: string + required: + - bank_id + - type + - keys + type: object + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: keyword + default: keyword + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + entities: + items: + type: string + type: array + type: + const: graph + default: graph + type: string + required: + - bank_id + - type + - entities + type: object + type: array + output_shields: + items: + type: string + type: array + query_generator_config: + oneOf: + - additionalProperties: false + properties: + sep: + default: ' ' + type: string + type: + const: default + default: default + type: string + required: + - type + - sep + type: object + - additionalProperties: false + properties: + model: + type: string + template: + type: string + type: + const: llm + default: llm + type: string + required: + - type + - model + - template + type: object + - additionalProperties: false + properties: + type: + const: custom + default: custom + type: string + required: + - type + type: object + type: + const: memory + default: memory + type: string + required: + - type + - memory_bank_configs + - query_generator_config + - max_tokens_in_context + - max_chunks + type: object + type: array + required: + - max_infer_iters + - model + - instructions + - enable_session_persistence + type: object required: - agent_config type: object @@ -686,13 +2548,262 @@ components: type: string attachments: items: - $ref: '#/components/schemas/Attachment' + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + mime_type: + type: string + required: + - content + - mime_type + type: object type: array messages: items: oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/ToolResponseMessage' + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object type: array session_id: type: string @@ -703,23 +2814,6 @@ components: - session_id - messages type: object - DPOAlignmentConfig: - additionalProperties: false - properties: - epsilon: - type: number - gamma: - type: number - reward_clip: - type: number - reward_scale: - type: number - required: - - reward_scale - - reward_clip - - epsilon - - gamma - type: object Dataset: additionalProperties: false properties: @@ -838,7 +2932,13 @@ components: default: dataset type: string url: - $ref: '#/components/schemas/URL' + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object required: - identifier - provider_resource_id @@ -867,28 +2967,6 @@ components: - agent_id - session_id type: object - DoraFinetuningConfig: - additionalProperties: false - properties: - alpha: - type: integer - apply_lora_to_mlp: - type: boolean - apply_lora_to_output: - type: boolean - lora_attn_modules: - items: - type: string - type: array - rank: - type: integer - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - type: object EmbeddingsRequest: additionalProperties: false properties: @@ -896,11 +2974,53 @@ components: items: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object - items: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object type: array type: array model_id: @@ -976,7 +3096,34 @@ components: type: array scores: additionalProperties: - $ref: '#/components/schemas/ScoringResult' + additionalProperties: false + properties: + aggregated_results: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + score_rows: + items: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + type: array + required: + - score_rows + - aggregated_results + type: object type: object required: - generations @@ -1003,8 +3150,1510 @@ components: type: array task_config: oneOf: - - $ref: '#/components/schemas/BenchmarkEvalTaskConfig' - - $ref: '#/components/schemas/AppEvalTaskConfig' + - additionalProperties: false + properties: + eval_candidate: + oneOf: + - additionalProperties: false + properties: + model: + type: string + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + system_message: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: system + default: system + type: string + required: + - role + - content + type: object + type: + const: model + default: model + type: string + required: + - type + - model + - sampling_params + type: object + - additionalProperties: false + properties: + config: + additionalProperties: false + properties: + enable_session_persistence: + type: boolean + input_shields: + items: + type: string + type: array + instructions: + type: string + max_infer_iters: + default: 10 + type: integer + model: + type: string + output_shields: + items: + type: string + type: array + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + tool_choice: + default: auto + enum: + - auto + - required + type: string + tool_prompt_format: + default: json + description: "`json` --\n Refers to the json format for\ + \ calling tools.\n The json format takes the form like\n\ + \ {\n \"type\": \"function\",\n \"function\"\ + \ : {\n \"name\": \"function_name\",\n \ + \ \"description\": \"function_description\",\n\ + \ \"parameters\": {...}\n }\n }\n\ + \n`function_tag` --\n This is an example of how you\ + \ could define\n your own user defined format for making\ + \ tool calls.\n The function_tag format looks like\ + \ this,\n (parameters)\n\ + \nThe detailed prompts for each of these formats are added\ + \ to llama cli" + enum: + - json + - function_tag + - python_list + title: This Enum refers to the prompt format for calling + custom / zero shot tools + type: string + tools: + items: + oneOf: + - additionalProperties: false + properties: + api_key: + type: string + engine: + default: brave + enum: + - bing + - brave + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: brave_search + default: brave_search + type: string + required: + - type + - api_key + - engine + type: object + - additionalProperties: false + properties: + api_key: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: wolfram_alpha + default: wolfram_alpha + type: string + required: + - type + - api_key + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: photogen + default: photogen + type: string + required: + - type + type: object + - additionalProperties: false + properties: + enable_inline_code_execution: + default: true + type: boolean + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: code_interpreter + default: code_interpreter + type: string + required: + - type + - enable_inline_code_execution + type: object + - additionalProperties: false + properties: + description: + type: string + function_name: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + parameters: + additionalProperties: + additionalProperties: false + properties: + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: + type: string + param_type: + type: string + required: + default: true + type: boolean + required: + - param_type + type: object + type: object + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: function_call + default: function_call + type: string + required: + - type + - function_name + - description + - parameters + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + max_chunks: + default: 10 + type: integer + max_tokens_in_context: + default: 4096 + type: integer + memory_bank_configs: + items: + oneOf: + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: vector + default: vector + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + keys: + items: + type: string + type: array + type: + const: keyvalue + default: keyvalue + type: string + required: + - bank_id + - type + - keys + type: object + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: keyword + default: keyword + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + entities: + items: + type: string + type: array + type: + const: graph + default: graph + type: string + required: + - bank_id + - type + - entities + type: object + type: array + output_shields: + items: + type: string + type: array + query_generator_config: + oneOf: + - additionalProperties: false + properties: + sep: + default: ' ' + type: string + type: + const: default + default: default + type: string + required: + - type + - sep + type: object + - additionalProperties: false + properties: + model: + type: string + template: + type: string + type: + const: llm + default: llm + type: string + required: + - type + - model + - template + type: object + - additionalProperties: false + properties: + type: + const: custom + default: custom + type: string + required: + - type + type: object + type: + const: memory + default: memory + type: string + required: + - type + - memory_bank_configs + - query_generator_config + - max_tokens_in_context + - max_chunks + type: object + type: array + required: + - max_infer_iters + - model + - instructions + - enable_session_persistence + type: object + type: + const: agent + default: agent + type: string + required: + - type + - config + type: object + num_examples: + type: integer + type: + const: benchmark + default: benchmark + type: string + required: + - type + - eval_candidate + type: object + - additionalProperties: false + properties: + eval_candidate: + oneOf: + - additionalProperties: false + properties: + model: + type: string + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + system_message: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: system + default: system + type: string + required: + - role + - content + type: object + type: + const: model + default: model + type: string + required: + - type + - model + - sampling_params + type: object + - additionalProperties: false + properties: + config: + additionalProperties: false + properties: + enable_session_persistence: + type: boolean + input_shields: + items: + type: string + type: array + instructions: + type: string + max_infer_iters: + default: 10 + type: integer + model: + type: string + output_shields: + items: + type: string + type: array + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + tool_choice: + default: auto + enum: + - auto + - required + type: string + tool_prompt_format: + default: json + description: "`json` --\n Refers to the json format for\ + \ calling tools.\n The json format takes the form like\n\ + \ {\n \"type\": \"function\",\n \"function\"\ + \ : {\n \"name\": \"function_name\",\n \ + \ \"description\": \"function_description\",\n\ + \ \"parameters\": {...}\n }\n }\n\ + \n`function_tag` --\n This is an example of how you\ + \ could define\n your own user defined format for making\ + \ tool calls.\n The function_tag format looks like\ + \ this,\n (parameters)\n\ + \nThe detailed prompts for each of these formats are added\ + \ to llama cli" + enum: + - json + - function_tag + - python_list + title: This Enum refers to the prompt format for calling + custom / zero shot tools + type: string + tools: + items: + oneOf: + - additionalProperties: false + properties: + api_key: + type: string + engine: + default: brave + enum: + - bing + - brave + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: brave_search + default: brave_search + type: string + required: + - type + - api_key + - engine + type: object + - additionalProperties: false + properties: + api_key: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: wolfram_alpha + default: wolfram_alpha + type: string + required: + - type + - api_key + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: photogen + default: photogen + type: string + required: + - type + type: object + - additionalProperties: false + properties: + enable_inline_code_execution: + default: true + type: boolean + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: code_interpreter + default: code_interpreter + type: string + required: + - type + - enable_inline_code_execution + type: object + - additionalProperties: false + properties: + description: + type: string + function_name: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + parameters: + additionalProperties: + additionalProperties: false + properties: + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: + type: string + param_type: + type: string + required: + default: true + type: boolean + required: + - param_type + type: object + type: object + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: function_call + default: function_call + type: string + required: + - type + - function_name + - description + - parameters + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + max_chunks: + default: 10 + type: integer + max_tokens_in_context: + default: 4096 + type: integer + memory_bank_configs: + items: + oneOf: + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: vector + default: vector + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + keys: + items: + type: string + type: array + type: + const: keyvalue + default: keyvalue + type: string + required: + - bank_id + - type + - keys + type: object + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: keyword + default: keyword + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + entities: + items: + type: string + type: array + type: + const: graph + default: graph + type: string + required: + - bank_id + - type + - entities + type: object + type: array + output_shields: + items: + type: string + type: array + query_generator_config: + oneOf: + - additionalProperties: false + properties: + sep: + default: ' ' + type: string + type: + const: default + default: default + type: string + required: + - type + - sep + type: object + - additionalProperties: false + properties: + model: + type: string + template: + type: string + type: + const: llm + default: llm + type: string + required: + - type + - model + - template + type: object + - additionalProperties: false + properties: + type: + const: custom + default: custom + type: string + required: + - type + type: object + type: + const: memory + default: memory + type: string + required: + - type + - memory_bank_configs + - query_generator_config + - max_tokens_in_context + - max_chunks + type: object + type: array + required: + - max_infer_iters + - model + - instructions + - enable_session_persistence + type: object + type: + const: agent + default: agent + type: string + required: + - type + - config + type: object + num_examples: + type: integer + scoring_params: + additionalProperties: + oneOf: + - additionalProperties: false + properties: + judge_model: + type: string + judge_score_regexes: + items: + type: string + type: array + prompt_template: + type: string + type: + const: llm_as_judge + default: llm_as_judge + type: string + required: + - type + - judge_model + type: object + - additionalProperties: false + properties: + parsing_regexes: + items: + type: string + type: array + type: + const: regex_parser + default: regex_parser + type: string + required: + - type + type: object + type: object + type: + const: app + default: app + type: string + required: + - type + - eval_candidate + - scoring_params + type: object task_id: type: string required: @@ -1013,44 +4662,6 @@ components: - scoring_functions - task_config type: object - FinetuningAlgorithm: - enum: - - full - - lora - - qlora - - dora - type: string - FunctionCallToolDefinition: - additionalProperties: false - properties: - description: - type: string - function_name: - type: string - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - parameters: - additionalProperties: - $ref: '#/components/schemas/ToolParamDefinition' - type: object - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: function_call - default: function_call - type: string - required: - - type - - function_name - - description - - parameters - type: object GetAgentsSessionRequest: additionalProperties: false properties: @@ -1059,40 +4670,6 @@ components: type: string type: array type: object - GraphMemoryBank: - additionalProperties: false - properties: - identifier: - type: string - memory_bank_type: - const: graph - default: graph - type: string - provider_id: - type: string - provider_resource_id: - type: string - type: - const: memory_bank - default: memory_bank - type: string - required: - - identifier - - provider_resource_id - - provider_id - - type - - memory_bank_type - type: object - GraphMemoryBankParams: - additionalProperties: false - properties: - memory_bank_type: - const: graph - default: graph - type: string - required: - - memory_bank_type - type: object HealthInfo: additionalProperties: false properties: @@ -1101,48 +4678,6 @@ components: required: - status type: object - ImageMedia: - additionalProperties: false - properties: - image: - oneOf: - - additionalProperties: false - properties: - format: - type: string - format_description: - type: string - title: This class represents an image object. To create - type: object - - $ref: '#/components/schemas/URL' - required: - - image - type: object - InferenceStep: - additionalProperties: false - properties: - completed_at: - format: date-time - type: string - model_response: - $ref: '#/components/schemas/CompletionMessage' - started_at: - format: date-time - type: string - step_id: - type: string - step_type: - const: inference - default: inference - type: string - turn_id: - type: string - required: - - turn_id - - step_id - - step_type - - model_response - type: object InsertDocumentsRequest: additionalProperties: false properties: @@ -1150,7 +4685,85 @@ components: type: string documents: items: - $ref: '#/components/schemas/MemoryBankDocument' + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + document_id: + type: string + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + mime_type: + type: string + required: + - document_id + - content + - metadata + type: object type: array ttl_seconds: type: integer @@ -1177,379 +4790,157 @@ components: - task_id - job_id type: object - JobStatus: - enum: - - completed - - in_progress - type: string - KeyValueMemoryBank: - additionalProperties: false - properties: - identifier: - type: string - memory_bank_type: - const: keyvalue - default: keyvalue - type: string - provider_id: - type: string - provider_resource_id: - type: string - type: - const: memory_bank - default: memory_bank - type: string - required: - - identifier - - provider_resource_id - - provider_id - - type - - memory_bank_type - type: object - KeyValueMemoryBankParams: - additionalProperties: false - properties: - memory_bank_type: - const: keyvalue - default: keyvalue - type: string - required: - - memory_bank_type - type: object - KeywordMemoryBank: - additionalProperties: false - properties: - identifier: - type: string - memory_bank_type: - const: keyword - default: keyword - type: string - provider_id: - type: string - provider_resource_id: - type: string - type: - const: memory_bank - default: memory_bank - type: string - required: - - identifier - - provider_resource_id - - provider_id - - type - - memory_bank_type - type: object - KeywordMemoryBankParams: - additionalProperties: false - properties: - memory_bank_type: - const: keyword - default: keyword - type: string - required: - - memory_bank_type - type: object - LLMAsJudgeScoringFnParams: - additionalProperties: false - properties: - judge_model: - type: string - judge_score_regexes: - items: - type: string - type: array - prompt_template: - type: string - type: - const: llm_as_judge - default: llm_as_judge - type: string - required: - - type - - judge_model - type: object LogEventRequest: additionalProperties: false properties: event: oneOf: - - $ref: '#/components/schemas/UnstructuredLogEvent' - - $ref: '#/components/schemas/MetricEvent' - - $ref: '#/components/schemas/StructuredLogEvent' + - additionalProperties: false + properties: + attributes: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + message: + type: string + severity: + enum: + - verbose + - debug + - info + - warn + - error + - critical + type: string + span_id: + type: string + timestamp: + format: date-time + type: string + trace_id: + type: string + type: + const: unstructured_log + default: unstructured_log + type: string + required: + - trace_id + - span_id + - timestamp + - type + - message + - severity + type: object + - additionalProperties: false + properties: + attributes: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + metric: + type: string + span_id: + type: string + timestamp: + format: date-time + type: string + trace_id: + type: string + type: + const: metric + default: metric + type: string + unit: + type: string + value: + oneOf: + - type: integer + - type: number + required: + - trace_id + - span_id + - timestamp + - type + - metric + - value + - unit + type: object + - additionalProperties: false + properties: + attributes: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + payload: + oneOf: + - additionalProperties: false + properties: + name: + type: string + parent_span_id: + type: string + type: + const: span_start + default: span_start + type: string + required: + - type + - name + type: object + - additionalProperties: false + properties: + status: + enum: + - ok + - error + type: string + type: + const: span_end + default: span_end + type: string + required: + - type + - status + type: object + span_id: + type: string + timestamp: + format: date-time + type: string + trace_id: + type: string + type: + const: structured_log + default: structured_log + type: string + required: + - trace_id + - span_id + - timestamp + - type + - payload + type: object required: - event type: object - LogSeverity: - enum: - - verbose - - debug - - info - - warn - - error - - critical - type: string - LoraFinetuningConfig: - additionalProperties: false - properties: - alpha: - type: integer - apply_lora_to_mlp: - type: boolean - apply_lora_to_output: - type: boolean - lora_attn_modules: - items: - type: string - type: array - rank: - type: integer - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - type: object - MemoryBankDocument: - additionalProperties: false - properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - - $ref: '#/components/schemas/URL' - document_id: - type: string - metadata: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - mime_type: - type: string - required: - - document_id - - content - - metadata - type: object - MemoryRetrievalStep: - additionalProperties: false - properties: - completed_at: - format: date-time - type: string - inserted_context: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - memory_bank_ids: - items: - type: string - type: array - started_at: - format: date-time - type: string - step_id: - type: string - step_type: - const: memory_retrieval - default: memory_retrieval - type: string - turn_id: - type: string - required: - - turn_id - - step_id - - step_type - - memory_bank_ids - - inserted_context - type: object - MemoryToolDefinition: - additionalProperties: false - properties: - input_shields: - items: - type: string - type: array - max_chunks: - default: 10 - type: integer - max_tokens_in_context: - default: 4096 - type: integer - memory_bank_configs: - items: - oneOf: - - additionalProperties: false - properties: - bank_id: - type: string - type: - const: vector - default: vector - type: string - required: - - bank_id - - type - type: object - - additionalProperties: false - properties: - bank_id: - type: string - keys: - items: - type: string - type: array - type: - const: keyvalue - default: keyvalue - type: string - required: - - bank_id - - type - - keys - type: object - - additionalProperties: false - properties: - bank_id: - type: string - type: - const: keyword - default: keyword - type: string - required: - - bank_id - - type - type: object - - additionalProperties: false - properties: - bank_id: - type: string - entities: - items: - type: string - type: array - type: - const: graph - default: graph - type: string - required: - - bank_id - - type - - entities - type: object - type: array - output_shields: - items: - type: string - type: array - query_generator_config: - oneOf: - - additionalProperties: false - properties: - sep: - default: ' ' - type: string - type: - const: default - default: default - type: string - required: - - type - - sep - type: object - - additionalProperties: false - properties: - model: - type: string - template: - type: string - type: - const: llm - default: llm - type: string - required: - - type - - model - - template - type: object - - additionalProperties: false - properties: - type: - const: custom - default: custom - type: string - required: - - type - type: object - type: - const: memory - default: memory - type: string - required: - - type - - memory_bank_configs - - query_generator_config - - max_tokens_in_context - - max_chunks - type: object - MetricEvent: - additionalProperties: false - properties: - attributes: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - metric: - type: string - span_id: - type: string - timestamp: - format: date-time - type: string - trace_id: - type: string - type: - const: metric - default: metric - type: string - unit: - type: string - value: - oneOf: - - type: integer - - type: number - required: - - trace_id - - span_id - - timestamp - - type - - metric - - value - - unit - type: object Model: additionalProperties: false properties: @@ -1580,45 +4971,6 @@ components: - type - metadata type: object - ModelCandidate: - additionalProperties: false - properties: - model: - type: string - sampling_params: - $ref: '#/components/schemas/SamplingParams' - system_message: - $ref: '#/components/schemas/SystemMessage' - type: - const: model - default: model - type: string - required: - - type - - model - - sampling_params - type: object - OptimizerConfig: - additionalProperties: false - properties: - lr: - type: number - lr_min: - type: number - optimizer_type: - enum: - - adam - - adamw - - sgd - type: string - weight_decay: - type: number - required: - - optimizer_type - - lr - - lr_min - - weight_decay - type: object PaginatedRowsResult: additionalProperties: false properties: @@ -1642,26 +4994,6 @@ components: - rows - total_count type: object - PhotogenToolDefinition: - additionalProperties: false - properties: - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: photogen - default: photogen - type: string - required: - - type - type: object PostTrainingJob: additionalProperties: false properties: @@ -1675,7 +5007,25 @@ components: properties: checkpoints: items: - $ref: '#/components/schemas/Checkpoint' + additionalProperties: false + properties: + epoch: + type: integer + iters: + type: integer + path: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - iters + - path + - epoch + type: object type: array job_uuid: type: string @@ -1698,19 +5048,30 @@ components: - log_lines title: Stream of logs from a finetuning job. type: object - PostTrainingJobStatus: - enum: - - running - - completed - - failed - - scheduled - type: string PostTrainingJobStatusResponse: additionalProperties: false properties: checkpoints: items: - $ref: '#/components/schemas/Checkpoint' + additionalProperties: false + properties: + epoch: + type: integer + iters: + type: integer + path: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - iters + - path + - epoch + type: object type: array completed_at: format: date-time @@ -1734,7 +5095,12 @@ components: format: date-time type: string status: - $ref: '#/components/schemas/PostTrainingJobStatus' + enum: + - running + - completed + - failed + - scheduled + type: string required: - job_uuid - status @@ -1745,13 +5111,36 @@ components: additionalProperties: false properties: algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' + enum: + - dpo + type: string algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' + additionalProperties: false + properties: + epsilon: + type: number + gamma: + type: number + reward_clip: + type: number + reward_scale: + type: number + required: + - reward_scale + - reward_clip + - epsilon + - gamma + type: object dataset_id: type: string finetuned_model: - $ref: '#/components/schemas/URL' + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object hyperparam_search_config: additionalProperties: oneOf: @@ -1775,9 +5164,52 @@ components: - type: object type: object optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' + additionalProperties: false + properties: + lr: + type: number + lr_min: + type: number + optimizer_type: + enum: + - adam + - adamw + - sgd + type: string + weight_decay: + type: number + required: + - optimizer_type + - lr + - lr_min + - weight_decay + type: object training_config: - $ref: '#/components/schemas/TrainingConfig' + additionalProperties: false + properties: + batch_size: + type: integer + enable_activation_checkpointing: + type: boolean + fsdp_cpu_offload: + type: boolean + memory_efficient_fsdp_wrap: + type: boolean + n_epochs: + type: integer + n_iters: + type: integer + shuffle: + type: boolean + required: + - n_epochs + - batch_size + - shuffle + - n_iters + - enable_activation_checkpointing + - memory_efficient_fsdp_wrap + - fsdp_cpu_offload + type: object validation_dataset_id: type: string required: @@ -1792,39 +5224,6 @@ components: - hyperparam_search_config - logger_config type: object - ProviderInfo: - additionalProperties: false - properties: - provider_id: - type: string - provider_type: - type: string - required: - - provider_id - - provider_type - type: object - QLoraFinetuningConfig: - additionalProperties: false - properties: - alpha: - type: integer - apply_lora_to_mlp: - type: boolean - apply_lora_to_output: - type: boolean - lora_attn_modules: - items: - type: string - type: array - rank: - type: integer - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - type: object QueryDocumentsRequest: additionalProperties: false properties: @@ -1843,11 +5242,53 @@ components: query: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object - items: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object type: array required: - bank_id @@ -1863,11 +5304,53 @@ components: content: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object - items: oneOf: - type: string - - $ref: '#/components/schemas/ImageMedia' + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object type: array document_id: type: string @@ -1887,24 +5370,6 @@ components: - chunks - scores type: object - RLHFAlgorithm: - enum: - - dpo - type: string - RegexParserScoringFnParams: - additionalProperties: false - properties: - parsing_regexes: - items: - type: string - type: array - type: - const: regex_parser - default: regex_parser - type: string - required: - - type - type: object RegisterDatasetRequest: additionalProperties: false properties: @@ -2019,7 +5484,13 @@ components: provider_id: type: string url: - $ref: '#/components/schemas/URL' + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object required: - dataset_id - dataset_schema @@ -2062,10 +5533,50 @@ components: type: string params: oneOf: - - $ref: '#/components/schemas/VectorMemoryBankParams' - - $ref: '#/components/schemas/KeyValueMemoryBankParams' - - $ref: '#/components/schemas/KeywordMemoryBankParams' - - $ref: '#/components/schemas/GraphMemoryBankParams' + - additionalProperties: false + properties: + chunk_size_in_tokens: + type: integer + embedding_model: + type: string + memory_bank_type: + const: vector + default: vector + type: string + overlap_size_in_tokens: + type: integer + required: + - memory_bank_type + - embedding_model + - chunk_size_in_tokens + type: object + - additionalProperties: false + properties: + memory_bank_type: + const: keyvalue + default: keyvalue + type: string + required: + - memory_bank_type + type: object + - additionalProperties: false + properties: + memory_bank_type: + const: keyword + default: keyword + type: string + required: + - memory_bank_type + type: object + - additionalProperties: false + properties: + memory_bank_type: + const: graph + default: graph + type: string + required: + - memory_bank_type + type: object provider_id: type: string provider_memory_bank_id: @@ -2103,8 +5614,37 @@ components: type: string params: oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' + - additionalProperties: false + properties: + judge_model: + type: string + judge_score_regexes: + items: + type: string + type: array + prompt_template: + type: string + type: + const: llm_as_judge + default: llm_as_judge + type: string + required: + - type + - judge_model + type: object + - additionalProperties: false + properties: + parsing_regexes: + items: + type: string + type: array + type: + const: regex_parser + default: regex_parser + type: string + required: + - type + type: object provider_id: type: string provider_scoring_fn_id: @@ -2230,77 +5770,1515 @@ components: required: - shield_id type: object - RestAPIExecutionConfig: - additionalProperties: false - properties: - body: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - headers: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - method: - $ref: '#/components/schemas/RestAPIMethod' - params: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - url: - $ref: '#/components/schemas/URL' - required: - - url - - method - type: object - RestAPIMethod: - enum: - - GET - - POST - - PUT - - DELETE - type: string - RouteInfo: - additionalProperties: false - properties: - method: - type: string - provider_types: - items: - type: string - type: array - route: - type: string - required: - - route - - method - - provider_types - type: object RunEvalRequest: additionalProperties: false properties: task_config: oneOf: - - $ref: '#/components/schemas/BenchmarkEvalTaskConfig' - - $ref: '#/components/schemas/AppEvalTaskConfig' + - additionalProperties: false + properties: + eval_candidate: + oneOf: + - additionalProperties: false + properties: + model: + type: string + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + system_message: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: system + default: system + type: string + required: + - role + - content + type: object + type: + const: model + default: model + type: string + required: + - type + - model + - sampling_params + type: object + - additionalProperties: false + properties: + config: + additionalProperties: false + properties: + enable_session_persistence: + type: boolean + input_shields: + items: + type: string + type: array + instructions: + type: string + max_infer_iters: + default: 10 + type: integer + model: + type: string + output_shields: + items: + type: string + type: array + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + tool_choice: + default: auto + enum: + - auto + - required + type: string + tool_prompt_format: + default: json + description: "`json` --\n Refers to the json format for\ + \ calling tools.\n The json format takes the form like\n\ + \ {\n \"type\": \"function\",\n \"function\"\ + \ : {\n \"name\": \"function_name\",\n \ + \ \"description\": \"function_description\",\n\ + \ \"parameters\": {...}\n }\n }\n\ + \n`function_tag` --\n This is an example of how you\ + \ could define\n your own user defined format for making\ + \ tool calls.\n The function_tag format looks like\ + \ this,\n (parameters)\n\ + \nThe detailed prompts for each of these formats are added\ + \ to llama cli" + enum: + - json + - function_tag + - python_list + title: This Enum refers to the prompt format for calling + custom / zero shot tools + type: string + tools: + items: + oneOf: + - additionalProperties: false + properties: + api_key: + type: string + engine: + default: brave + enum: + - bing + - brave + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: brave_search + default: brave_search + type: string + required: + - type + - api_key + - engine + type: object + - additionalProperties: false + properties: + api_key: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: wolfram_alpha + default: wolfram_alpha + type: string + required: + - type + - api_key + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: photogen + default: photogen + type: string + required: + - type + type: object + - additionalProperties: false + properties: + enable_inline_code_execution: + default: true + type: boolean + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: code_interpreter + default: code_interpreter + type: string + required: + - type + - enable_inline_code_execution + type: object + - additionalProperties: false + properties: + description: + type: string + function_name: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + parameters: + additionalProperties: + additionalProperties: false + properties: + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: + type: string + param_type: + type: string + required: + default: true + type: boolean + required: + - param_type + type: object + type: object + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: function_call + default: function_call + type: string + required: + - type + - function_name + - description + - parameters + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + max_chunks: + default: 10 + type: integer + max_tokens_in_context: + default: 4096 + type: integer + memory_bank_configs: + items: + oneOf: + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: vector + default: vector + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + keys: + items: + type: string + type: array + type: + const: keyvalue + default: keyvalue + type: string + required: + - bank_id + - type + - keys + type: object + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: keyword + default: keyword + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + entities: + items: + type: string + type: array + type: + const: graph + default: graph + type: string + required: + - bank_id + - type + - entities + type: object + type: array + output_shields: + items: + type: string + type: array + query_generator_config: + oneOf: + - additionalProperties: false + properties: + sep: + default: ' ' + type: string + type: + const: default + default: default + type: string + required: + - type + - sep + type: object + - additionalProperties: false + properties: + model: + type: string + template: + type: string + type: + const: llm + default: llm + type: string + required: + - type + - model + - template + type: object + - additionalProperties: false + properties: + type: + const: custom + default: custom + type: string + required: + - type + type: object + type: + const: memory + default: memory + type: string + required: + - type + - memory_bank_configs + - query_generator_config + - max_tokens_in_context + - max_chunks + type: object + type: array + required: + - max_infer_iters + - model + - instructions + - enable_session_persistence + type: object + type: + const: agent + default: agent + type: string + required: + - type + - config + type: object + num_examples: + type: integer + type: + const: benchmark + default: benchmark + type: string + required: + - type + - eval_candidate + type: object + - additionalProperties: false + properties: + eval_candidate: + oneOf: + - additionalProperties: false + properties: + model: + type: string + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + system_message: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: system + default: system + type: string + required: + - role + - content + type: object + type: + const: model + default: model + type: string + required: + - type + - model + - sampling_params + type: object + - additionalProperties: false + properties: + config: + additionalProperties: false + properties: + enable_session_persistence: + type: boolean + input_shields: + items: + type: string + type: array + instructions: + type: string + max_infer_iters: + default: 10 + type: integer + model: + type: string + output_shields: + items: + type: string + type: array + sampling_params: + additionalProperties: false + properties: + max_tokens: + default: 0 + type: integer + repetition_penalty: + default: 1.0 + type: number + strategy: + default: greedy + enum: + - greedy + - top_p + - top_k + type: string + temperature: + default: 0.0 + type: number + top_k: + default: 0 + type: integer + top_p: + default: 0.95 + type: number + required: + - strategy + type: object + tool_choice: + default: auto + enum: + - auto + - required + type: string + tool_prompt_format: + default: json + description: "`json` --\n Refers to the json format for\ + \ calling tools.\n The json format takes the form like\n\ + \ {\n \"type\": \"function\",\n \"function\"\ + \ : {\n \"name\": \"function_name\",\n \ + \ \"description\": \"function_description\",\n\ + \ \"parameters\": {...}\n }\n }\n\ + \n`function_tag` --\n This is an example of how you\ + \ could define\n your own user defined format for making\ + \ tool calls.\n The function_tag format looks like\ + \ this,\n (parameters)\n\ + \nThe detailed prompts for each of these formats are added\ + \ to llama cli" + enum: + - json + - function_tag + - python_list + title: This Enum refers to the prompt format for calling + custom / zero shot tools + type: string + tools: + items: + oneOf: + - additionalProperties: false + properties: + api_key: + type: string + engine: + default: brave + enum: + - bing + - brave + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: brave_search + default: brave_search + type: string + required: + - type + - api_key + - engine + type: object + - additionalProperties: false + properties: + api_key: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: wolfram_alpha + default: wolfram_alpha + type: string + required: + - type + - api_key + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: photogen + default: photogen + type: string + required: + - type + type: object + - additionalProperties: false + properties: + enable_inline_code_execution: + default: true + type: boolean + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: code_interpreter + default: code_interpreter + type: string + required: + - type + - enable_inline_code_execution + type: object + - additionalProperties: false + properties: + description: + type: string + function_name: + type: string + input_shields: + items: + type: string + type: array + output_shields: + items: + type: string + type: array + parameters: + additionalProperties: + additionalProperties: false + properties: + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: + type: string + param_type: + type: string + required: + default: true + type: boolean + required: + - param_type + type: object + type: object + remote_execution: + additionalProperties: false + properties: + body: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + headers: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + method: + enum: + - GET + - POST + - PUT + - DELETE + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - url + - method + type: object + type: + const: function_call + default: function_call + type: string + required: + - type + - function_name + - description + - parameters + type: object + - additionalProperties: false + properties: + input_shields: + items: + type: string + type: array + max_chunks: + default: 10 + type: integer + max_tokens_in_context: + default: 4096 + type: integer + memory_bank_configs: + items: + oneOf: + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: vector + default: vector + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + keys: + items: + type: string + type: array + type: + const: keyvalue + default: keyvalue + type: string + required: + - bank_id + - type + - keys + type: object + - additionalProperties: false + properties: + bank_id: + type: string + type: + const: keyword + default: keyword + type: string + required: + - bank_id + - type + type: object + - additionalProperties: false + properties: + bank_id: + type: string + entities: + items: + type: string + type: array + type: + const: graph + default: graph + type: string + required: + - bank_id + - type + - entities + type: object + type: array + output_shields: + items: + type: string + type: array + query_generator_config: + oneOf: + - additionalProperties: false + properties: + sep: + default: ' ' + type: string + type: + const: default + default: default + type: string + required: + - type + - sep + type: object + - additionalProperties: false + properties: + model: + type: string + template: + type: string + type: + const: llm + default: llm + type: string + required: + - type + - model + - template + type: object + - additionalProperties: false + properties: + type: + const: custom + default: custom + type: string + required: + - type + type: object + type: + const: memory + default: memory + type: string + required: + - type + - memory_bank_configs + - query_generator_config + - max_tokens_in_context + - max_chunks + type: object + type: array + required: + - max_infer_iters + - model + - instructions + - enable_session_persistence + type: object + type: + const: agent + default: agent + type: string + required: + - type + - config + type: object + num_examples: + type: integer + scoring_params: + additionalProperties: + oneOf: + - additionalProperties: false + properties: + judge_model: + type: string + judge_score_regexes: + items: + type: string + type: array + prompt_template: + type: string + type: + const: llm_as_judge + default: llm_as_judge + type: string + required: + - type + - judge_model + type: object + - additionalProperties: false + properties: + parsing_regexes: + items: + type: string + type: array + type: + const: regex_parser + default: regex_parser + type: string + required: + - type + type: object + type: object + type: + const: app + default: app + type: string + required: + - type + - eval_candidate + - scoring_params + type: object task_id: type: string required: @@ -2313,10 +7291,368 @@ components: messages: items: oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: system + default: system + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object type: array params: additionalProperties: @@ -2339,59 +7675,31 @@ components: additionalProperties: false properties: violation: - $ref: '#/components/schemas/SafetyViolation' - type: object - SafetyViolation: - additionalProperties: false - properties: - metadata: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + additionalProperties: false + properties: + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + user_message: + type: string + violation_level: + enum: + - info + - warn + - error + type: string + required: + - violation_level + - metadata type: object - user_message: - type: string - violation_level: - $ref: '#/components/schemas/ViolationLevel' - required: - - violation_level - - metadata type: object - SamplingParams: - additionalProperties: false - properties: - max_tokens: - default: 0 - type: integer - repetition_penalty: - default: 1.0 - type: number - strategy: - $ref: '#/components/schemas/SamplingStrategy' - default: greedy - temperature: - default: 0.0 - type: number - top_k: - default: 0 - type: integer - top_p: - default: 0.95 - type: number - required: - - strategy - type: object - SamplingStrategy: - enum: - - greedy - - top_p - - top_k - type: string ScoreBatchRequest: additionalProperties: false properties: @@ -2403,8 +7711,37 @@ components: additionalProperties: oneOf: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' + - additionalProperties: false + properties: + judge_model: + type: string + judge_score_regexes: + items: + type: string + type: array + prompt_template: + type: string + type: + const: llm_as_judge + default: llm_as_judge + type: string + required: + - type + - judge_model + type: object + - additionalProperties: false + properties: + parsing_regexes: + items: + type: string + type: array + type: + const: regex_parser + default: regex_parser + type: string + required: + - type + type: object - type: 'null' type: object required: @@ -2419,7 +7756,34 @@ components: type: string results: additionalProperties: - $ref: '#/components/schemas/ScoringResult' + additionalProperties: false + properties: + aggregated_results: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + score_rows: + items: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + type: array + required: + - score_rows + - aggregated_results + type: object type: object required: - results @@ -2443,8 +7807,37 @@ components: additionalProperties: oneOf: - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' + - additionalProperties: false + properties: + judge_model: + type: string + judge_score_regexes: + items: + type: string + type: array + prompt_template: + type: string + type: + const: llm_as_judge + default: llm_as_judge + type: string + required: + - type + - judge_model + type: object + - additionalProperties: false + properties: + parsing_regexes: + items: + type: string + type: array + type: + const: regex_parser + default: regex_parser + type: string + required: + - type + type: object - type: 'null' type: object required: @@ -2456,7 +7849,34 @@ components: properties: results: additionalProperties: - $ref: '#/components/schemas/ScoringResult' + additionalProperties: false + properties: + aggregated_results: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + score_rows: + items: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + type: array + required: + - score_rows + - aggregated_results + type: object type: object required: - results @@ -2480,8 +7900,37 @@ components: type: object params: oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' + - additionalProperties: false + properties: + judge_model: + type: string + judge_score_regexes: + items: + type: string + type: array + prompt_template: + type: string + type: + const: llm_as_judge + default: llm_as_judge + type: string + required: + - type + - judge_model + type: object + - additionalProperties: false + properties: + parsing_regexes: + items: + type: string + type: array + type: + const: regex_parser + default: regex_parser + type: string + required: + - type + type: object provider_id: type: string provider_resource_id: @@ -2590,74 +8039,111 @@ components: - metadata - return_type type: object - ScoringResult: - additionalProperties: false - properties: - aggregated_results: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - score_rows: - items: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - type: array - required: - - score_rows - - aggregated_results - type: object - SearchToolDefinition: - additionalProperties: false - properties: - api_key: - type: string - engine: - default: brave - enum: - - bing - - brave - type: string - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: brave_search - default: brave_search - type: string - required: - - type - - api_key - - engine - type: object Session: additionalProperties: false properties: memory_bank: oneOf: - - $ref: '#/components/schemas/VectorMemoryBank' - - $ref: '#/components/schemas/KeyValueMemoryBank' - - $ref: '#/components/schemas/KeywordMemoryBank' - - $ref: '#/components/schemas/GraphMemoryBank' + - additionalProperties: false + properties: + chunk_size_in_tokens: + type: integer + embedding_model: + type: string + identifier: + type: string + memory_bank_type: + const: vector + default: vector + type: string + overlap_size_in_tokens: + type: integer + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + - embedding_model + - chunk_size_in_tokens + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: keyvalue + default: keyvalue + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: keyword + default: keyword + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: graph + default: graph + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object session_id: type: string session_name: @@ -2667,7 +8153,824 @@ components: type: string turns: items: - $ref: '#/components/schemas/Turn' + additionalProperties: false + properties: + completed_at: + format: date-time + type: string + input_messages: + items: + oneOf: + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object + type: array + output_attachments: + items: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + mime_type: + type: string + required: + - content + - mime_type + type: object + type: array + output_message: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + session_id: + type: string + started_at: + format: date-time + type: string + steps: + items: + oneOf: + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + model_response: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: inference + default: inference + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - model_response + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: tool_execution + default: tool_execution + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + tool_responses: + items: + additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - content + type: object + type: array + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - tool_calls + - tool_responses + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: shield_call + default: shield_call + type: string + turn_id: + type: string + violation: + additionalProperties: false + properties: + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + user_message: + type: string + violation_level: + enum: + - info + - warn + - error + type: string + required: + - violation_level + - metadata + type: object + required: + - turn_id + - step_id + - step_type + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + inserted_context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + memory_bank_ids: + items: + type: string + type: array + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: memory_retrieval + default: memory_retrieval + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - memory_bank_ids + - inserted_context + type: object + type: array + turn_id: + type: string + required: + - turn_id + - session_id + - input_messages + - steps + - output_message + - output_attachments + - started_at + title: A single turn in an interaction with an Agentic System. + type: object type: array required: - session_id @@ -2706,114 +9009,81 @@ components: - type title: A safety shield resource that can be used to check content type: object - ShieldCallStep: - additionalProperties: false - properties: - completed_at: - format: date-time - type: string - started_at: - format: date-time - type: string - step_id: - type: string - step_type: - const: shield_call - default: shield_call - type: string - turn_id: - type: string - violation: - $ref: '#/components/schemas/SafetyViolation' - required: - - turn_id - - step_id - - step_type - type: object - SpanEndPayload: - additionalProperties: false - properties: - status: - $ref: '#/components/schemas/SpanStatus' - type: - const: span_end - default: span_end - type: string - required: - - type - - status - type: object - SpanStartPayload: - additionalProperties: false - properties: - name: - type: string - parent_span_id: - type: string - type: - const: span_start - default: span_start - type: string - required: - - type - - name - type: object - SpanStatus: - enum: - - ok - - error - type: string - StopReason: - enum: - - end_of_turn - - end_of_message - - out_of_tokens - type: string - StructuredLogEvent: - additionalProperties: false - properties: - attributes: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - payload: - oneOf: - - $ref: '#/components/schemas/SpanStartPayload' - - $ref: '#/components/schemas/SpanEndPayload' - span_id: - type: string - timestamp: - format: date-time - type: string - trace_id: - type: string - type: - const: structured_log - default: structured_log - type: string - required: - - trace_id - - span_id - - timestamp - - type - - payload - type: object SupervisedFineTuneRequest: additionalProperties: false properties: algorithm: - $ref: '#/components/schemas/FinetuningAlgorithm' + enum: + - full + - lora + - qlora + - dora + type: string algorithm_config: oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - - $ref: '#/components/schemas/QLoraFinetuningConfig' - - $ref: '#/components/schemas/DoraFinetuningConfig' + - additionalProperties: false + properties: + alpha: + type: integer + apply_lora_to_mlp: + type: boolean + apply_lora_to_output: + type: boolean + lora_attn_modules: + items: + type: string + type: array + rank: + type: integer + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + type: object + - additionalProperties: false + properties: + alpha: + type: integer + apply_lora_to_mlp: + type: boolean + apply_lora_to_output: + type: boolean + lora_attn_modules: + items: + type: string + type: array + rank: + type: integer + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + type: object + - additionalProperties: false + properties: + alpha: + type: integer + apply_lora_to_mlp: + type: boolean + apply_lora_to_output: + type: boolean + lora_attn_modules: + items: + type: string + type: array + rank: + type: integer + required: + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + type: object dataset_id: type: string hyperparam_search_config: @@ -2841,9 +9111,52 @@ components: model: type: string optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' + additionalProperties: false + properties: + lr: + type: number + lr_min: + type: number + optimizer_type: + enum: + - adam + - adamw + - sgd + type: string + weight_decay: + type: number + required: + - optimizer_type + - lr + - lr_min + - weight_decay + type: object training_config: - $ref: '#/components/schemas/TrainingConfig' + additionalProperties: false + properties: + batch_size: + type: integer + enable_activation_checkpointing: + type: boolean + fsdp_cpu_offload: + type: boolean + memory_efficient_fsdp_wrap: + type: boolean + n_epochs: + type: integer + n_iters: + type: integer + shuffle: + type: boolean + required: + - n_epochs + - batch_size + - shuffle + - n_iters + - enable_activation_checkpointing + - memory_efficient_fsdp_wrap + - fsdp_cpu_offload + type: object validation_dataset_id: type: string required: @@ -2864,10 +9177,368 @@ components: dialogs: items: oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: system + default: system + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object type: array filtering_function: enum: @@ -2915,236 +9586,6 @@ components: title: Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold. type: object - SystemMessage: - additionalProperties: false - properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - role: - const: system - default: system - type: string - required: - - role - - content - type: object - TokenLogProbs: - additionalProperties: false - properties: - logprobs_by_token: - additionalProperties: - type: number - type: object - required: - - logprobs_by_token - type: object - ToolCall: - additionalProperties: false - properties: - arguments: - additionalProperties: - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - - items: - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - type: array - - additionalProperties: - oneOf: - - type: string - - type: integer - - type: number - - type: boolean - - type: 'null' - type: object - type: object - call_id: - type: string - tool_name: - oneOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - required: - - call_id - - tool_name - - arguments - type: object - ToolCallDelta: - additionalProperties: false - properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ToolCall' - parse_status: - $ref: '#/components/schemas/ToolCallParseStatus' - required: - - content - - parse_status - type: object - ToolCallParseStatus: - enum: - - started - - in_progress - - failure - - success - type: string - ToolChoice: - enum: - - auto - - required - type: string - ToolDefinition: - additionalProperties: false - properties: - description: - type: string - parameters: - additionalProperties: - $ref: '#/components/schemas/ToolParamDefinition' - type: object - tool_name: - oneOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - required: - - tool_name - type: object - ToolExecutionStep: - additionalProperties: false - properties: - completed_at: - format: date-time - type: string - started_at: - format: date-time - type: string - step_id: - type: string - step_type: - const: tool_execution - default: tool_execution - type: string - tool_calls: - items: - $ref: '#/components/schemas/ToolCall' - type: array - tool_responses: - items: - $ref: '#/components/schemas/ToolResponse' - type: array - turn_id: - type: string - required: - - turn_id - - step_id - - step_type - - tool_calls - - tool_responses - type: object - ToolParamDefinition: - additionalProperties: false - properties: - default: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: - type: string - param_type: - type: string - required: - default: true - type: boolean - required: - - param_type - type: object - ToolPromptFormat: - description: "`json` --\n Refers to the json format for calling tools.\n\ - \ The json format takes the form like\n {\n \"type\": \"function\"\ - ,\n \"function\" : {\n \"name\": \"function_name\",\n \ - \ \"description\": \"function_description\",\n \"parameters\"\ - : {...}\n }\n }\n\n`function_tag` --\n This is an example of\ - \ how you could define\n your own user defined format for making tool calls.\n\ - \ The function_tag format looks like this,\n (parameters)\n\ - \nThe detailed prompts for each of these formats are added to llama cli" - enum: - - json - - function_tag - - python_list - title: This Enum refers to the prompt format for calling custom / zero shot - tools - type: string - ToolResponse: - additionalProperties: false - properties: - call_id: - type: string - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - tool_name: - oneOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - required: - - call_id - - tool_name - - content - type: object - ToolResponseMessage: - additionalProperties: false - properties: - call_id: - type: string - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - role: - const: ipython - default: ipython - type: string - tool_name: - oneOf: - - $ref: '#/components/schemas/BuiltinTool' - - type: string - required: - - role - - call_id - - tool_name - - content - type: object Trace: additionalProperties: false properties: @@ -3163,32 +9604,6 @@ components: - root_span_id - start_time type: object - TrainingConfig: - additionalProperties: false - properties: - batch_size: - type: integer - enable_activation_checkpointing: - type: boolean - fsdp_cpu_offload: - type: boolean - memory_efficient_fsdp_wrap: - type: boolean - n_epochs: - type: integer - n_iters: - type: integer - shuffle: - type: boolean - required: - - n_epochs - - batch_size - - shuffle - - n_iters - - enable_activation_checkpointing - - memory_efficient_fsdp_wrap - - fsdp_cpu_offload - type: object Turn: additionalProperties: false properties: @@ -3198,15 +9613,378 @@ components: input_messages: items: oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/ToolResponseMessage' + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object type: array output_attachments: items: - $ref: '#/components/schemas/Attachment' + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + mime_type: + type: string + required: + - content + - mime_type + type: object type: array output_message: - $ref: '#/components/schemas/CompletionMessage' + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object session_id: type: string started_at: @@ -3215,10 +9993,412 @@ components: steps: items: oneOf: - - $ref: '#/components/schemas/InferenceStep' - - $ref: '#/components/schemas/ToolExecutionStep' - - $ref: '#/components/schemas/ShieldCallStep' - - $ref: '#/components/schemas/MemoryRetrievalStep' + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + model_response: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: inference + default: inference + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - model_response + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: tool_execution + default: tool_execution + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + tool_responses: + items: + additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - content + type: object + type: array + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - tool_calls + - tool_responses + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: shield_call + default: shield_call + type: string + turn_id: + type: string + violation: + additionalProperties: false + properties: + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + user_message: + type: string + violation_level: + enum: + - info + - warn + - error + type: string + required: + - violation_level + - metadata + type: object + required: + - turn_id + - step_id + - step_type + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + inserted_context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + memory_bank_ids: + items: + type: string + type: array + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: memory_retrieval + default: memory_retrieval + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - memory_bank_ids + - inserted_context + type: object type: array turn_id: type: string @@ -3232,10 +10412,6 @@ components: - started_at title: A single turn in an interaction with an Agentic System. type: object - URL: - format: uri - pattern: ^(https?://|file://|data:) - type: string UnregisterMemoryBankRequest: additionalProperties: false properties: @@ -3252,161 +10428,17 @@ components: required: - model_id type: object - UnstructuredLogEvent: - additionalProperties: false - properties: - attributes: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - message: - type: string - severity: - $ref: '#/components/schemas/LogSeverity' - span_id: - type: string - timestamp: - format: date-time - type: string - trace_id: - type: string - type: - const: unstructured_log - default: unstructured_log - type: string - required: - - trace_id - - span_id - - timestamp - - type - - message - - severity - type: object - UserMessage: - additionalProperties: false - properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - context: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - role: - const: user - default: user - type: string - required: - - role - - content - type: object - VectorMemoryBank: - additionalProperties: false - properties: - chunk_size_in_tokens: - type: integer - embedding_model: - type: string - identifier: - type: string - memory_bank_type: - const: vector - default: vector - type: string - overlap_size_in_tokens: - type: integer - provider_id: - type: string - provider_resource_id: - type: string - type: - const: memory_bank - default: memory_bank - type: string - required: - - identifier - - provider_resource_id - - provider_id - - type - - memory_bank_type - - embedding_model - - chunk_size_in_tokens - type: object - VectorMemoryBankParams: - additionalProperties: false - properties: - chunk_size_in_tokens: - type: integer - embedding_model: - type: string - memory_bank_type: - const: vector - default: vector - type: string - overlap_size_in_tokens: - type: integer - required: - - memory_bank_type - - embedding_model - - chunk_size_in_tokens - type: object - ViolationLevel: - enum: - - info - - warn - - error - type: string - WolframAlphaToolDefinition: - additionalProperties: false - properties: - api_key: - type: string - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: wolfram_alpha - default: wolfram_alpha - type: string - required: - - type - - api_key - type: object info: description: "This is the specification of the llama stack that provides\n \ \ a set of endpoints and their corresponding interfaces that are tailored\ \ to\n best leverage Llama Models. The specification is still in\ - \ draft and subject to change.\n Generated at 2024-11-14 17:04:24.301559" + \ draft and subject to change.\n Generated at 2024-11-18 18:52:41.983165" title: '[DRAFT] Llama Stack Specification' - version: 0.0.1 + version: alpha jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema openapi: 3.1.0 paths: - /agents/create: + /alpha/agents/create: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3431,7 +10463,7 @@ paths: description: OK tags: - Agents - /agents/delete: + /alpha/agents/delete: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3452,7 +10484,7 @@ paths: description: OK tags: - Agents - /agents/session/create: + /alpha/agents/session/create: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3477,7 +10509,7 @@ paths: description: OK tags: - Agents - /agents/session/delete: + /alpha/agents/session/delete: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3498,7 +10530,7 @@ paths: description: OK tags: - Agents - /agents/session/get: + /alpha/agents/session/get: post: parameters: - in: query @@ -3533,7 +10565,7 @@ paths: description: OK tags: - Agents - /agents/step/get: + /alpha/agents/step/get: get: parameters: - in: query @@ -3572,7 +10604,7 @@ paths: description: OK tags: - Agents - /agents/turn/create: + /alpha/agents/turn/create: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3594,13 +10626,2235 @@ paths: text/event-stream: schema: oneOf: - - $ref: '#/components/schemas/Turn' - - $ref: '#/components/schemas/AgentTurnResponseStreamChunk' + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + input_messages: + items: + oneOf: + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object + type: array + output_attachments: + items: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + mime_type: + type: string + required: + - content + - mime_type + type: object + type: array + output_message: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + session_id: + type: string + started_at: + format: date-time + type: string + steps: + items: + oneOf: + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + model_response: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image + object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: inference + default: inference + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - model_response + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: tool_execution + default: tool_execution + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + tool_responses: + items: + additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image + object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image + object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - content + type: object + type: array + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - tool_calls + - tool_responses + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: shield_call + default: shield_call + type: string + turn_id: + type: string + violation: + additionalProperties: false + properties: + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + user_message: + type: string + violation_level: + enum: + - info + - warn + - error + type: string + required: + - violation_level + - metadata + type: object + required: + - turn_id + - step_id + - step_type + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + inserted_context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + memory_bank_ids: + items: + type: string + type: array + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: memory_retrieval + default: memory_retrieval + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - memory_bank_ids + - inserted_context + type: object + type: array + turn_id: + type: string + required: + - turn_id + - session_id + - input_messages + - steps + - output_message + - output_attachments + - started_at + title: A single turn in an interaction with an Agentic System. + type: object + - additionalProperties: false + properties: + event: + additionalProperties: false + properties: + payload: + oneOf: + - additionalProperties: false + properties: + event_type: + const: step_start + default: step_start + type: string + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + step_id: + type: string + step_type: + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + type: string + required: + - event_type + - step_type + - step_id + type: object + - additionalProperties: false + properties: + event_type: + const: step_progress + default: step_progress + type: string + model_response_text_delta: + type: string + step_id: + type: string + step_type: + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + type: string + tool_call_delta: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + parse_status: + enum: + - started + - in_progress + - failure + - success + type: string + required: + - content + - parse_status + type: object + tool_response_text_delta: + type: string + required: + - event_type + - step_type + - step_id + type: object + - additionalProperties: false + properties: + event_type: + const: step_complete + default: step_complete + type: string + step_details: + oneOf: + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + model_response: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: inference + default: inference + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - model_response + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: tool_execution + default: tool_execution + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + tool_responses: + items: + additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - content + type: object + type: array + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - tool_calls + - tool_responses + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: shield_call + default: shield_call + type: string + turn_id: + type: string + violation: + additionalProperties: false + properties: + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + user_message: + type: string + violation_level: + enum: + - info + - warn + - error + type: string + required: + - violation_level + - metadata + type: object + required: + - turn_id + - step_id + - step_type + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + inserted_context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image + object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + memory_bank_ids: + items: + type: string + type: array + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: memory_retrieval + default: memory_retrieval + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - memory_bank_ids + - inserted_context + type: object + step_type: + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + type: string + required: + - event_type + - step_type + - step_details + type: object + - additionalProperties: false + properties: + event_type: + const: turn_start + default: turn_start + type: string + turn_id: + type: string + required: + - event_type + - turn_id + type: object + - additionalProperties: false + properties: + event_type: + const: turn_complete + default: turn_complete + type: string + turn: + additionalProperties: false + properties: + completed_at: + format: date-time + type: string + input_messages: + items: + oneOf: + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: user + default: user + type: string + required: + - role + - content + type: object + - additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: ipython + default: ipython + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - role + - call_id + - tool_name + - content + type: object + type: array + output_attachments: + items: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + mime_type: + type: string + required: + - content + - mime_type + type: object + type: array + output_message: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image + object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + session_id: + type: string + started_at: + format: date-time + type: string + steps: + items: + oneOf: + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + model_response: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: inference + default: inference + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - model_response + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: tool_execution + default: tool_execution + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + tool_responses: + items: + additionalProperties: false + properties: + call_id: + type: string + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - content + type: object + type: array + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - tool_calls + - tool_responses + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: shield_call + default: shield_call + type: string + turn_id: + type: string + violation: + additionalProperties: false + properties: + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + user_message: + type: string + violation_level: + enum: + - info + - warn + - error + type: string + required: + - violation_level + - metadata + type: object + required: + - turn_id + - step_id + - step_type + type: object + - additionalProperties: false + properties: + completed_at: + format: date-time + type: string + inserted_context: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an + image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents + an image object. To create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + memory_bank_ids: + items: + type: string + type: array + started_at: + format: date-time + type: string + step_id: + type: string + step_type: + const: memory_retrieval + default: memory_retrieval + type: string + turn_id: + type: string + required: + - turn_id + - step_id + - step_type + - memory_bank_ids + - inserted_context + type: object + type: array + turn_id: + type: string + required: + - turn_id + - session_id + - input_messages + - steps + - output_message + - output_attachments + - started_at + title: A single turn in an interaction with an Agentic + System. + type: object + required: + - event_type + - turn + type: object + required: + - payload + title: Streamed agent execution response. + type: object + required: + - event + title: streamed agent turn completion response. + type: object description: A single turn in an interaction with an Agentic System. **OR** streamed agent turn completion response. tags: - Agents - /agents/turn/get: + /alpha/agents/turn/get: get: parameters: - in: query @@ -3634,7 +12888,7 @@ paths: description: OK tags: - Agents - /batch_inference/chat_completion: + /alpha/batch-inference/chat-completion: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3659,7 +12913,7 @@ paths: description: OK tags: - BatchInference - /batch_inference/completion: + /alpha/batch-inference/completion: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3684,7 +12938,7 @@ paths: description: OK tags: - BatchInference - /datasetio/get_rows_paginated: + /alpha/datasetio/get-rows-paginated: get: parameters: - in: query @@ -3723,7 +12977,7 @@ paths: description: OK tags: - DatasetIO - /datasets/get: + /alpha/datasets/get: get: parameters: - in: query @@ -3744,12 +12998,144 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/Dataset' + - additionalProperties: false + properties: + dataset_schema: + additionalProperties: + oneOf: + - additionalProperties: false + properties: + type: + const: string + default: string + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: number + default: number + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: boolean + default: boolean + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: array + default: array + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: object + default: object + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: json + default: json + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: union + default: union + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: chat_completion_input + default: chat_completion_input + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: completion_input + default: completion_input + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: agent_turn_input + default: agent_turn_input + type: string + required: + - type + type: object + type: object + identifier: + type: string + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + provider_id: + type: string + provider_resource_id: + type: string + type: + const: dataset + default: dataset + type: string + url: + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - identifier + - provider_resource_id + - provider_id + - type + - dataset_schema + - url + - metadata + type: object - type: 'null' description: OK tags: - Datasets - /datasets/list: + /alpha/datasets/list: get: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3768,7 +13154,7 @@ paths: description: OK tags: - Datasets - /datasets/register: + /alpha/datasets/register: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3789,7 +13175,109 @@ paths: description: OK tags: - Datasets - /eval/evaluate_rows: + /alpha/eval-tasks/get: + get: + parameters: + - in: query + name: name + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + oneOf: + - additionalProperties: false + properties: + dataset_id: + type: string + identifier: + type: string + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + provider_id: + type: string + provider_resource_id: + type: string + scoring_functions: + items: + type: string + type: array + type: + const: eval_task + default: eval_task + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - dataset_id + - scoring_functions + - metadata + type: object + - type: 'null' + description: OK + tags: + - EvalTasks + /alpha/eval-tasks/list: + get: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + responses: + '200': + content: + application/jsonl: + schema: + $ref: '#/components/schemas/EvalTask' + description: OK + tags: + - EvalTasks + /alpha/eval-tasks/register: + post: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterEvalTaskRequest' + required: true + responses: + '200': + description: OK + tags: + - EvalTasks + /alpha/eval/evaluate-rows: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3814,7 +13302,7 @@ paths: description: OK tags: - Eval - /eval/job/cancel: + /alpha/eval/job/cancel: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3835,7 +13323,7 @@ paths: description: OK tags: - Eval - /eval/job/result: + /alpha/eval/job/result: get: parameters: - in: query @@ -3864,7 +13352,7 @@ paths: description: OK tags: - Eval - /eval/job/status: + /alpha/eval/job/status: get: parameters: - in: query @@ -3890,12 +13378,15 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/JobStatus' + - enum: + - completed + - in_progress + type: string - type: 'null' description: OK tags: - Eval - /eval/run_eval: + /alpha/eval/run-eval: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -3920,73 +13411,7 @@ paths: description: OK tags: - Eval - /eval_tasks/get: - get: - parameters: - - in: query - name: name - required: true - schema: - type: string - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - responses: - '200': - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/EvalTask' - - type: 'null' - description: OK - tags: - - EvalTasks - /eval_tasks/list: - get: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - responses: - '200': - content: - application/jsonl: - schema: - $ref: '#/components/schemas/EvalTask' - description: OK - tags: - - EvalTasks - /eval_tasks/register: - post: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterEvalTaskRequest' - required: true - responses: - '200': - description: OK - tags: - - EvalTasks - /health: + /alpha/health: get: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4005,7 +13430,7 @@ paths: description: OK tags: - Inspect - /inference/chat_completion: + /alpha/inference/chat-completion: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4027,12 +13452,246 @@ paths: text/event-stream: schema: oneOf: - - $ref: '#/components/schemas/ChatCompletionResponse' - - $ref: '#/components/schemas/ChatCompletionResponseStreamChunk' + - additionalProperties: false + properties: + completion_message: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + - items: + oneOf: + - type: string + - additionalProperties: false + properties: + image: + oneOf: + - additionalProperties: false + properties: + format: + type: string + format_description: + type: string + title: This class represents an image object. To + create + type: object + - additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object + required: + - image + type: object + type: array + role: + const: assistant + default: assistant + type: string + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + tool_calls: + items: + additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + type: array + required: + - role + - content + - stop_reason + - tool_calls + type: object + logprobs: + items: + additionalProperties: false + properties: + logprobs_by_token: + additionalProperties: + type: number + type: object + required: + - logprobs_by_token + type: object + type: array + required: + - completion_message + title: Chat completion response. + type: object + - additionalProperties: false + properties: + event: + additionalProperties: false + properties: + delta: + oneOf: + - type: string + - additionalProperties: false + properties: + content: + oneOf: + - type: string + - additionalProperties: false + properties: + arguments: + additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + - items: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: array + - additionalProperties: + oneOf: + - type: string + - type: integer + - type: number + - type: boolean + - type: 'null' + type: object + type: object + call_id: + type: string + tool_name: + oneOf: + - enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + type: string + - type: string + required: + - call_id + - tool_name + - arguments + type: object + parse_status: + enum: + - started + - in_progress + - failure + - success + type: string + required: + - content + - parse_status + type: object + event_type: + enum: + - start + - complete + - progress + type: string + logprobs: + items: + additionalProperties: false + properties: + logprobs_by_token: + additionalProperties: + type: number + type: object + required: + - logprobs_by_token + type: object + type: array + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + required: + - event_type + - delta + title: Chat completion response event. + type: object + required: + - event + title: SSE-stream of these events. + type: object description: Chat completion response. **OR** SSE-stream of these events. tags: - Inference - /inference/completion: + /alpha/inference/completion: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4054,12 +13713,63 @@ paths: text/event-stream: schema: oneOf: - - $ref: '#/components/schemas/CompletionResponse' - - $ref: '#/components/schemas/CompletionResponseStreamChunk' + - additionalProperties: false + properties: + content: + type: string + logprobs: + items: + additionalProperties: false + properties: + logprobs_by_token: + additionalProperties: + type: number + type: object + required: + - logprobs_by_token + type: object + type: array + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + required: + - content + - stop_reason + title: Completion response. + type: object + - additionalProperties: false + properties: + delta: + type: string + logprobs: + items: + additionalProperties: false + properties: + logprobs_by_token: + additionalProperties: + type: number + type: object + required: + - logprobs_by_token + type: object + type: array + stop_reason: + enum: + - end_of_turn + - end_of_message + - out_of_tokens + type: string + required: + - delta + title: streamed completion response. + type: object description: Completion response. **OR** streamed completion response. tags: - Inference - /inference/embeddings: + /alpha/inference/embeddings: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4084,7 +13794,292 @@ paths: description: OK tags: - Inference - /memory/insert: + /alpha/memory-banks/get: + get: + parameters: + - in: query + name: memory_bank_id + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + oneOf: + - oneOf: + - additionalProperties: false + properties: + chunk_size_in_tokens: + type: integer + embedding_model: + type: string + identifier: + type: string + memory_bank_type: + const: vector + default: vector + type: string + overlap_size_in_tokens: + type: integer + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + - embedding_model + - chunk_size_in_tokens + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: keyvalue + default: keyvalue + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: keyword + default: keyword + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: graph + default: graph + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object + - type: 'null' + description: OK + tags: + - MemoryBanks + /alpha/memory-banks/list: + get: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + responses: + '200': + content: + application/jsonl: + schema: + oneOf: + - additionalProperties: false + properties: + chunk_size_in_tokens: + type: integer + embedding_model: + type: string + identifier: + type: string + memory_bank_type: + const: vector + default: vector + type: string + overlap_size_in_tokens: + type: integer + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + - embedding_model + - chunk_size_in_tokens + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: keyvalue + default: keyvalue + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: keyword + default: keyword + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object + - additionalProperties: false + properties: + identifier: + type: string + memory_bank_type: + const: graph + default: graph + type: string + provider_id: + type: string + provider_resource_id: + type: string + type: + const: memory_bank + default: memory_bank + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - memory_bank_type + type: object + description: OK + tags: + - MemoryBanks + /alpha/memory-banks/register: + post: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterMemoryBankRequest' + required: true + responses: {} + tags: + - MemoryBanks + /alpha/memory-banks/unregister: + post: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnregisterMemoryBankRequest' + required: true + responses: + '200': + description: OK + tags: + - MemoryBanks + /alpha/memory/insert: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4105,7 +14100,7 @@ paths: description: OK tags: - Memory - /memory/query: + /alpha/memory/query: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4130,100 +14125,7 @@ paths: description: OK tags: - Memory - /memory_banks/get: - get: - parameters: - - in: query - name: memory_bank_id - required: true - schema: - type: string - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - responses: - '200': - content: - application/json: - schema: - oneOf: - - oneOf: - - $ref: '#/components/schemas/VectorMemoryBank' - - $ref: '#/components/schemas/KeyValueMemoryBank' - - $ref: '#/components/schemas/KeywordMemoryBank' - - $ref: '#/components/schemas/GraphMemoryBank' - - type: 'null' - description: OK - tags: - - MemoryBanks - /memory_banks/list: - get: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - responses: - '200': - content: - application/jsonl: - schema: - oneOf: - - $ref: '#/components/schemas/VectorMemoryBank' - - $ref: '#/components/schemas/KeyValueMemoryBank' - - $ref: '#/components/schemas/KeywordMemoryBank' - - $ref: '#/components/schemas/GraphMemoryBank' - description: OK - tags: - - MemoryBanks - /memory_banks/register: - post: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterMemoryBankRequest' - required: true - responses: {} - tags: - - MemoryBanks - /memory_banks/unregister: - post: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UnregisterMemoryBankRequest' - required: true - responses: - '200': - description: OK - tags: - - MemoryBanks - /models/get: + /alpha/models/get: get: parameters: - in: query @@ -4244,12 +14146,40 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/Model' + - additionalProperties: false + properties: + identifier: + type: string + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + provider_id: + type: string + provider_resource_id: + type: string + type: + const: model + default: model + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - metadata + type: object - type: 'null' description: OK tags: - Models - /models/list: + /alpha/models/list: get: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4268,7 +14198,7 @@ paths: description: OK tags: - Models - /models/register: + /alpha/models/register: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4293,7 +14223,7 @@ paths: description: OK tags: - Models - /models/unregister: + /alpha/models/unregister: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4314,7 +14244,7 @@ paths: description: OK tags: - Models - /post_training/job/artifacts: + /alpha/post-training/job/artifacts: get: parameters: - in: query @@ -4338,7 +14268,7 @@ paths: description: OK tags: - PostTraining - /post_training/job/cancel: + /alpha/post-training/job/cancel: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4359,7 +14289,7 @@ paths: description: OK tags: - PostTraining - /post_training/job/logs: + /alpha/post-training/job/logs: get: parameters: - in: query @@ -4383,7 +14313,7 @@ paths: description: OK tags: - PostTraining - /post_training/job/status: + /alpha/post-training/job/status: get: parameters: - in: query @@ -4407,7 +14337,7 @@ paths: description: OK tags: - PostTraining - /post_training/jobs: + /alpha/post-training/jobs: get: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4426,7 +14356,7 @@ paths: description: OK tags: - PostTraining - /post_training/preference_optimize: + /alpha/post-training/preference-optimize: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4451,7 +14381,7 @@ paths: description: OK tags: - PostTraining - /post_training/supervised_fine_tune: + /alpha/post-training/supervised-fine-tune: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4476,7 +14406,7 @@ paths: description: OK tags: - PostTraining - /providers/list: + /alpha/providers/list: get: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4492,12 +14422,21 @@ paths: application/json: schema: additionalProperties: - $ref: '#/components/schemas/ProviderInfo' + additionalProperties: false + properties: + provider_id: + type: string + provider_type: + type: string + required: + - provider_id + - provider_type + type: object type: object description: OK tags: - Inspect - /routes/list: + /alpha/routes/list: get: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4514,13 +14453,27 @@ paths: schema: additionalProperties: items: - $ref: '#/components/schemas/RouteInfo' + additionalProperties: false + properties: + method: + type: string + provider_types: + items: + type: string + type: array + route: + type: string + required: + - route + - method + - provider_types + type: object type: array type: object description: OK tags: - Inspect - /safety/run_shield: + /alpha/safety/run-shield: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4545,7 +14498,229 @@ paths: description: OK tags: - Safety - /scoring/score: + /alpha/scoring-functions/get: + get: + parameters: + - in: query + name: scoring_fn_id + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + oneOf: + - additionalProperties: false + properties: + description: + type: string + identifier: + type: string + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + params: + oneOf: + - additionalProperties: false + properties: + judge_model: + type: string + judge_score_regexes: + items: + type: string + type: array + prompt_template: + type: string + type: + const: llm_as_judge + default: llm_as_judge + type: string + required: + - type + - judge_model + type: object + - additionalProperties: false + properties: + parsing_regexes: + items: + type: string + type: array + type: + const: regex_parser + default: regex_parser + type: string + required: + - type + type: object + provider_id: + type: string + provider_resource_id: + type: string + return_type: + oneOf: + - additionalProperties: false + properties: + type: + const: string + default: string + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: number + default: number + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: boolean + default: boolean + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: array + default: array + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: object + default: object + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: json + default: json + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: union + default: union + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: chat_completion_input + default: chat_completion_input + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: completion_input + default: completion_input + type: string + required: + - type + type: object + - additionalProperties: false + properties: + type: + const: agent_turn_input + default: agent_turn_input + type: string + required: + - type + type: object + type: + const: scoring_function + default: scoring_function + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - metadata + - return_type + type: object + - type: 'null' + description: OK + tags: + - ScoringFunctions + /alpha/scoring-functions/list: + get: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + responses: + '200': + content: + application/jsonl: + schema: + $ref: '#/components/schemas/ScoringFn' + description: OK + tags: + - ScoringFunctions + /alpha/scoring-functions/register: + post: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-ProviderData + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterScoringFunctionRequest' + required: true + responses: + '200': + description: OK + tags: + - ScoringFunctions + /alpha/scoring/score: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4570,7 +14745,7 @@ paths: description: OK tags: - Scoring - /scoring/score_batch: + /alpha/scoring/score-batch: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4595,73 +14770,7 @@ paths: description: OK tags: - Scoring - /scoring_functions/get: - get: - parameters: - - in: query - name: scoring_fn_id - required: true - schema: - type: string - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - responses: - '200': - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ScoringFn' - - type: 'null' - description: OK - tags: - - ScoringFunctions - /scoring_functions/list: - get: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - responses: - '200': - content: - application/jsonl: - schema: - $ref: '#/components/schemas/ScoringFn' - description: OK - tags: - - ScoringFunctions - /scoring_functions/register: - post: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterScoringFunctionRequest' - required: true - responses: - '200': - description: OK - tags: - - ScoringFunctions - /shields/get: + /alpha/shields/get: get: parameters: - in: query @@ -4682,12 +14791,40 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/Shield' + - additionalProperties: false + properties: + identifier: + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + provider_id: + type: string + provider_resource_id: + type: string + type: + const: shield + default: shield + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + title: A safety shield resource that can be used to check content + type: object - type: 'null' description: OK tags: - Shields - /shields/list: + /alpha/shields/list: get: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4706,7 +14843,7 @@ paths: description: OK tags: - Shields - /shields/register: + /alpha/shields/register: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4731,7 +14868,7 @@ paths: description: OK tags: - Shields - /synthetic_data_generation/generate: + /alpha/synthetic-data-generation/generate: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4756,7 +14893,7 @@ paths: description: OK tags: - SyntheticDataGeneration - /telemetry/get_trace: + /alpha/telemetry/get-trace: get: parameters: - in: query @@ -4780,7 +14917,7 @@ paths: description: OK tags: - Telemetry - /telemetry/log_event: + /alpha/telemetry/log-event: post: parameters: - description: JSON-encoded provider data which will be made available to the @@ -4806,10 +14943,6 @@ security: servers: - url: http://any-hosted-llama-stack.com tags: -- description: - name: AgentCandidate -- description: - name: AgentConfig - description: name: AgentCreateResponse @@ -4819,38 +14952,7 @@ tags: - description: name: AgentStepResponse -- description: 'Streamed agent execution response. - - - ' - name: AgentTurnResponseEvent -- description: - name: AgentTurnResponseStepCompletePayload -- description: - name: AgentTurnResponseStepProgressPayload -- description: - name: AgentTurnResponseStepStartPayload -- description: 'streamed agent turn completion response. - - - ' - name: AgentTurnResponseStreamChunk -- description: - name: AgentTurnResponseTurnCompletePayload -- description: - name: AgentTurnResponseTurnStartPayload - name: Agents -- description: - name: AppEvalTaskConfig -- description: - name: Attachment - description: name: BatchChatCompletionRequest @@ -4864,62 +14966,15 @@ tags: /> name: BatchCompletionResponse - name: BatchInference -- description: - name: BenchmarkEvalTaskConfig -- description: - name: BuiltinTool - description: name: CancelTrainingJobRequest - description: name: ChatCompletionRequest -- description: 'Chat completion response. - - - ' - name: ChatCompletionResponse -- description: 'Chat completion response event. - - - ' - name: ChatCompletionResponseEvent -- description: - name: ChatCompletionResponseEventType -- description: 'SSE-stream of these events. - - - ' - name: ChatCompletionResponseStreamChunk -- description: 'Checkpoint created during training runs - - - ' - name: Checkpoint -- description: - name: CodeInterpreterToolDefinition -- description: - name: CompletionMessage - description: name: CompletionRequest -- description: 'Completion response. - - - ' - name: CompletionResponse -- description: 'streamed completion response. - - - ' - name: CompletionResponseStreamChunk - description: name: CreateAgentRequest @@ -4929,9 +14984,6 @@ tags: - description: name: CreateAgentTurnRequest -- description: - name: DPOAlignmentConfig - description: name: Dataset - name: DatasetIO @@ -4942,9 +14994,6 @@ tags: - description: name: DeleteAgentsSessionRequest -- description: - name: DoraFinetuningConfig - description: name: EmbeddingsRequest @@ -4961,28 +15010,12 @@ tags: - description: name: EvaluateRowsRequest -- description: - name: FinetuningAlgorithm -- description: - name: FunctionCallToolDefinition - description: name: GetAgentsSessionRequest -- description: - name: GraphMemoryBank -- description: - name: GraphMemoryBankParams - description: name: HealthInfo -- description: - name: ImageMedia - name: Inference -- description: - name: InferenceStep - description: name: InsertDocumentsRequest @@ -4992,58 +15025,17 @@ tags: - description: name: JobCancelRequest -- description: - name: JobStatus -- description: - name: KeyValueMemoryBank -- description: - name: KeyValueMemoryBankParams -- description: - name: KeywordMemoryBank -- description: - name: KeywordMemoryBankParams -- description: - name: LLMAsJudgeScoringFnParams - description: name: LogEventRequest -- description: - name: LogSeverity -- description: - name: LoraFinetuningConfig - name: Memory -- description: - name: MemoryBankDocument - name: MemoryBanks -- description: - name: MemoryRetrievalStep -- description: - name: MemoryToolDefinition -- description: - name: MetricEvent - description: name: Model -- description: - name: ModelCandidate - name: Models -- description: - name: OptimizerConfig - description: name: PaginatedRowsResult -- description: - name: PhotogenToolDefinition - name: PostTraining - description: @@ -5059,9 +15051,6 @@ tags: ' name: PostTrainingJobLogStream -- description: - name: PostTrainingJobStatus - description: 'Status of a finetuning job. @@ -5071,22 +15060,12 @@ tags: - description: name: PreferenceOptimizeRequest -- description: - name: ProviderInfo -- description: - name: QLoraFinetuningConfig - description: name: QueryDocumentsRequest - description: name: QueryDocumentsResponse -- description: - name: RLHFAlgorithm -- description: - name: RegexParserScoringFnParams - description: name: RegisterDatasetRequest @@ -5105,13 +15084,6 @@ tags: - description: name: RegisterShieldRequest -- description: - name: RestAPIExecutionConfig -- description: - name: RestAPIMethod -- description: - name: RouteInfo - description: name: RunEvalRequest - description: name: RunShieldResponse - name: Safety -- description: - name: SafetyViolation -- description: - name: SamplingParams -- description: - name: SamplingStrategy - description: name: ScoreBatchRequest @@ -5143,11 +15107,6 @@ tags: - description: name: ScoringFn - name: ScoringFunctions -- description: - name: ScoringResult -- description: - name: SearchToolDefinition - description: 'A single session of an interaction with an Agentic System. @@ -5158,21 +15117,7 @@ tags: ' name: Shield -- description: - name: ShieldCallStep - name: Shields -- description: - name: SpanEndPayload -- description: - name: SpanStartPayload -- description: - name: SpanStatus -- description: - name: StopReason -- description: - name: StructuredLogEvent - description: name: SupervisedFineTuneRequest @@ -5187,77 +15132,20 @@ tags: ' name: SyntheticDataGenerationResponse -- description: - name: SystemMessage - name: Telemetry -- description: - name: TokenLogProbs -- description: - name: ToolCall -- description: - name: ToolCallDelta -- description: - name: ToolCallParseStatus -- description: - name: ToolChoice -- description: - name: ToolDefinition -- description: - name: ToolExecutionStep -- description: - name: ToolParamDefinition -- description: "This Enum refers to the prompt format for calling custom / zero shot\ - \ tools\n\n`json` --\n Refers to the json format for calling tools.\n The\ - \ json format takes the form like\n {\n \"type\": \"function\",\n \ - \ \"function\" : {\n \"name\": \"function_name\",\n \ - \ \"description\": \"function_description\",\n \"parameters\": {...}\n\ - \ }\n }\n\n`function_tag` --\n This is an example of how you could\ - \ define\n your own user defined format for making tool calls.\n The function_tag\ - \ format looks like this,\n (parameters)\n\ - \nThe detailed prompts for each of these formats are added to llama cli\n\n" - name: ToolPromptFormat -- description: - name: ToolResponse -- description: - name: ToolResponseMessage - description: name: Trace -- description: - name: TrainingConfig - description: 'A single turn in an interaction with an Agentic System. ' name: Turn -- description: - name: URL - description: name: UnregisterMemoryBankRequest - description: name: UnregisterModelRequest -- description: - name: UnstructuredLogEvent -- description: - name: UserMessage -- description: - name: VectorMemoryBank -- description: - name: VectorMemoryBankParams -- description: - name: ViolationLevel -- description: - name: WolframAlphaToolDefinition x-tagGroups: - name: Operations tags: @@ -5281,146 +15169,62 @@ x-tagGroups: - Telemetry - name: Types tags: - - AgentCandidate - - AgentConfig - AgentCreateResponse - AgentSessionCreateResponse - AgentStepResponse - - AgentTurnResponseEvent - - AgentTurnResponseStepCompletePayload - - AgentTurnResponseStepProgressPayload - - AgentTurnResponseStepStartPayload - - AgentTurnResponseStreamChunk - - AgentTurnResponseTurnCompletePayload - - AgentTurnResponseTurnStartPayload - - AppEvalTaskConfig - - Attachment - BatchChatCompletionRequest - BatchChatCompletionResponse - BatchCompletionRequest - BatchCompletionResponse - - BenchmarkEvalTaskConfig - - BuiltinTool - CancelTrainingJobRequest - ChatCompletionRequest - - ChatCompletionResponse - - ChatCompletionResponseEvent - - ChatCompletionResponseEventType - - ChatCompletionResponseStreamChunk - - Checkpoint - - CodeInterpreterToolDefinition - - CompletionMessage - CompletionRequest - - CompletionResponse - - CompletionResponseStreamChunk - CreateAgentRequest - CreateAgentSessionRequest - CreateAgentTurnRequest - - DPOAlignmentConfig - Dataset - DeleteAgentsRequest - DeleteAgentsSessionRequest - - DoraFinetuningConfig - EmbeddingsRequest - EmbeddingsResponse - EvalTask - EvaluateResponse - EvaluateRowsRequest - - FinetuningAlgorithm - - FunctionCallToolDefinition - GetAgentsSessionRequest - - GraphMemoryBank - - GraphMemoryBankParams - HealthInfo - - ImageMedia - - InferenceStep - InsertDocumentsRequest - Job - JobCancelRequest - - JobStatus - - KeyValueMemoryBank - - KeyValueMemoryBankParams - - KeywordMemoryBank - - KeywordMemoryBankParams - - LLMAsJudgeScoringFnParams - LogEventRequest - - LogSeverity - - LoraFinetuningConfig - - MemoryBankDocument - - MemoryRetrievalStep - - MemoryToolDefinition - - MetricEvent - Model - - ModelCandidate - - OptimizerConfig - PaginatedRowsResult - - PhotogenToolDefinition - PostTrainingJob - PostTrainingJobArtifactsResponse - PostTrainingJobLogStream - - PostTrainingJobStatus - PostTrainingJobStatusResponse - PreferenceOptimizeRequest - - ProviderInfo - - QLoraFinetuningConfig - QueryDocumentsRequest - QueryDocumentsResponse - - RLHFAlgorithm - - RegexParserScoringFnParams - RegisterDatasetRequest - RegisterEvalTaskRequest - RegisterMemoryBankRequest - RegisterModelRequest - RegisterScoringFunctionRequest - RegisterShieldRequest - - RestAPIExecutionConfig - - RestAPIMethod - - RouteInfo - RunEvalRequest - RunShieldRequest - RunShieldResponse - - SafetyViolation - - SamplingParams - - SamplingStrategy - ScoreBatchRequest - ScoreBatchResponse - ScoreRequest - ScoreResponse - ScoringFn - - ScoringResult - - SearchToolDefinition - Session - Shield - - ShieldCallStep - - SpanEndPayload - - SpanStartPayload - - SpanStatus - - StopReason - - StructuredLogEvent - SupervisedFineTuneRequest - SyntheticDataGenerateRequest - SyntheticDataGenerationResponse - - SystemMessage - - TokenLogProbs - - ToolCall - - ToolCallDelta - - ToolCallParseStatus - - ToolChoice - - ToolDefinition - - ToolExecutionStep - - ToolParamDefinition - - ToolPromptFormat - - ToolResponse - - ToolResponseMessage - Trace - - TrainingConfig - Turn - - URL - UnregisterMemoryBankRequest - UnregisterModelRequest - - UnstructuredLogEvent - - UserMessage - - VectorMemoryBank - - VectorMemoryBankParams - - ViolationLevel - - WolframAlphaToolDefinition diff --git a/llama_stack/apis/batch_inference/batch_inference.py b/llama_stack/apis/batch_inference/batch_inference.py index 45a1a1593..4e15b28a6 100644 --- a/llama_stack/apis/batch_inference/batch_inference.py +++ b/llama_stack/apis/batch_inference/batch_inference.py @@ -49,7 +49,7 @@ class BatchChatCompletionResponse(BaseModel): @runtime_checkable class BatchInference(Protocol): - @webmethod(route="/batch_inference/completion") + @webmethod(route="/batch-inference/completion") async def batch_completion( self, model: str, @@ -58,7 +58,7 @@ class BatchInference(Protocol): logprobs: Optional[LogProbConfig] = None, ) -> BatchCompletionResponse: ... - @webmethod(route="/batch_inference/chat_completion") + @webmethod(route="/batch-inference/chat-completion") async def batch_chat_completion( self, model: str, diff --git a/llama_stack/apis/datasetio/datasetio.py b/llama_stack/apis/datasetio/datasetio.py index 49a07c9b1..c5052877a 100644 --- a/llama_stack/apis/datasetio/datasetio.py +++ b/llama_stack/apis/datasetio/datasetio.py @@ -29,7 +29,7 @@ class DatasetIO(Protocol): # keeping for aligning with inference/safety, but this is not used dataset_store: DatasetStore - @webmethod(route="/datasetio/get_rows_paginated", method="GET") + @webmethod(route="/datasetio/get-rows-paginated", method="GET") async def get_rows_paginated( self, dataset_id: str, diff --git a/llama_stack/apis/eval/eval.py b/llama_stack/apis/eval/eval.py index 04a5a55d5..e52d4dab6 100644 --- a/llama_stack/apis/eval/eval.py +++ b/llama_stack/apis/eval/eval.py @@ -74,14 +74,14 @@ class EvaluateResponse(BaseModel): class Eval(Protocol): - @webmethod(route="/eval/run_eval", method="POST") + @webmethod(route="/eval/run-eval", method="POST") async def run_eval( self, task_id: str, task_config: EvalTaskConfig, ) -> Job: ... - @webmethod(route="/eval/evaluate_rows", method="POST") + @webmethod(route="/eval/evaluate-rows", method="POST") async def evaluate_rows( self, task_id: str, diff --git a/llama_stack/apis/eval_tasks/eval_tasks.py b/llama_stack/apis/eval_tasks/eval_tasks.py index 940dafc06..083681289 100644 --- a/llama_stack/apis/eval_tasks/eval_tasks.py +++ b/llama_stack/apis/eval_tasks/eval_tasks.py @@ -42,13 +42,13 @@ class EvalTaskInput(CommonEvalTaskFields, BaseModel): @runtime_checkable class EvalTasks(Protocol): - @webmethod(route="/eval_tasks/list", method="GET") + @webmethod(route="/eval-tasks/list", method="GET") async def list_eval_tasks(self) -> List[EvalTask]: ... - @webmethod(route="/eval_tasks/get", method="GET") + @webmethod(route="/eval-tasks/get", method="GET") async def get_eval_task(self, name: str) -> Optional[EvalTask]: ... - @webmethod(route="/eval_tasks/register", method="POST") + @webmethod(route="/eval-tasks/register", method="POST") async def register_eval_task( self, eval_task_id: str, diff --git a/llama_stack/apis/inference/inference.py b/llama_stack/apis/inference/inference.py index b2681e578..5aadd97c7 100644 --- a/llama_stack/apis/inference/inference.py +++ b/llama_stack/apis/inference/inference.py @@ -234,7 +234,7 @@ class Inference(Protocol): logprobs: Optional[LogProbConfig] = None, ) -> Union[CompletionResponse, AsyncIterator[CompletionResponseStreamChunk]]: ... - @webmethod(route="/inference/chat_completion") + @webmethod(route="/inference/chat-completion") async def chat_completion( self, model_id: str, diff --git a/llama_stack/apis/memory_banks/memory_banks.py b/llama_stack/apis/memory_banks/memory_banks.py index c1abcb789..1b16af330 100644 --- a/llama_stack/apis/memory_banks/memory_banks.py +++ b/llama_stack/apis/memory_banks/memory_banks.py @@ -130,13 +130,13 @@ class MemoryBankInput(BaseModel): @runtime_checkable class MemoryBanks(Protocol): - @webmethod(route="/memory_banks/list", method="GET") + @webmethod(route="/memory-banks/list", method="GET") async def list_memory_banks(self) -> List[MemoryBank]: ... - @webmethod(route="/memory_banks/get", method="GET") + @webmethod(route="/memory-banks/get", method="GET") async def get_memory_bank(self, memory_bank_id: str) -> Optional[MemoryBank]: ... - @webmethod(route="/memory_banks/register", method="POST") + @webmethod(route="/memory-banks/register", method="POST") async def register_memory_bank( self, memory_bank_id: str, @@ -145,5 +145,5 @@ class MemoryBanks(Protocol): provider_memory_bank_id: Optional[str] = None, ) -> MemoryBank: ... - @webmethod(route="/memory_banks/unregister", method="POST") + @webmethod(route="/memory-banks/unregister", method="POST") async def unregister_memory_bank(self, memory_bank_id: str) -> None: ... diff --git a/llama_stack/apis/post_training/post_training.py b/llama_stack/apis/post_training/post_training.py index eb4992cc6..2999d43af 100644 --- a/llama_stack/apis/post_training/post_training.py +++ b/llama_stack/apis/post_training/post_training.py @@ -176,7 +176,7 @@ class PostTrainingJobArtifactsResponse(BaseModel): class PostTraining(Protocol): - @webmethod(route="/post_training/supervised_fine_tune") + @webmethod(route="/post-training/supervised-fine-tune") def supervised_fine_tune( self, job_uuid: str, @@ -193,7 +193,7 @@ class PostTraining(Protocol): logger_config: Dict[str, Any], ) -> PostTrainingJob: ... - @webmethod(route="/post_training/preference_optimize") + @webmethod(route="/post-training/preference-optimize") def preference_optimize( self, job_uuid: str, @@ -208,22 +208,22 @@ class PostTraining(Protocol): logger_config: Dict[str, Any], ) -> PostTrainingJob: ... - @webmethod(route="/post_training/jobs") + @webmethod(route="/post-training/jobs") def get_training_jobs(self) -> List[PostTrainingJob]: ... # sends SSE stream of logs - @webmethod(route="/post_training/job/logs") + @webmethod(route="/post-training/job/logs") def get_training_job_logstream(self, job_uuid: str) -> PostTrainingJobLogStream: ... - @webmethod(route="/post_training/job/status") + @webmethod(route="/post-training/job/status") def get_training_job_status( self, job_uuid: str ) -> PostTrainingJobStatusResponse: ... - @webmethod(route="/post_training/job/cancel") + @webmethod(route="/post-training/job/cancel") def cancel_training_job(self, job_uuid: str) -> None: ... - @webmethod(route="/post_training/job/artifacts") + @webmethod(route="/post-training/job/artifacts") def get_training_job_artifacts( self, job_uuid: str ) -> PostTrainingJobArtifactsResponse: ... diff --git a/llama_stack/apis/safety/safety.py b/llama_stack/apis/safety/safety.py index d4dfd5986..724f8dc96 100644 --- a/llama_stack/apis/safety/safety.py +++ b/llama_stack/apis/safety/safety.py @@ -46,7 +46,7 @@ class ShieldStore(Protocol): class Safety(Protocol): shield_store: ShieldStore - @webmethod(route="/safety/run_shield") + @webmethod(route="/safety/run-shield") async def run_shield( self, shield_id: str, diff --git a/llama_stack/apis/scoring/scoring.py b/llama_stack/apis/scoring/scoring.py index 2c643a28e..a47620a3d 100644 --- a/llama_stack/apis/scoring/scoring.py +++ b/llama_stack/apis/scoring/scoring.py @@ -44,7 +44,7 @@ class ScoringFunctionStore(Protocol): class Scoring(Protocol): scoring_function_store: ScoringFunctionStore - @webmethod(route="/scoring/score_batch") + @webmethod(route="/scoring/score-batch") async def score_batch( self, dataset_id: str, diff --git a/llama_stack/apis/scoring_functions/scoring_functions.py b/llama_stack/apis/scoring_functions/scoring_functions.py index 251a683c1..4dce5a46d 100644 --- a/llama_stack/apis/scoring_functions/scoring_functions.py +++ b/llama_stack/apis/scoring_functions/scoring_functions.py @@ -104,13 +104,13 @@ class ScoringFnInput(CommonScoringFnFields, BaseModel): @runtime_checkable class ScoringFunctions(Protocol): - @webmethod(route="/scoring_functions/list", method="GET") + @webmethod(route="/scoring-functions/list", method="GET") async def list_scoring_functions(self) -> List[ScoringFn]: ... - @webmethod(route="/scoring_functions/get", method="GET") + @webmethod(route="/scoring-functions/get", method="GET") async def get_scoring_function(self, scoring_fn_id: str) -> Optional[ScoringFn]: ... - @webmethod(route="/scoring_functions/register", method="POST") + @webmethod(route="/scoring-functions/register", method="POST") async def register_scoring_function( self, scoring_fn_id: str, diff --git a/llama_stack/apis/synthetic_data_generation/synthetic_data_generation.py b/llama_stack/apis/synthetic_data_generation/synthetic_data_generation.py index 05b49036d..717a0ec2f 100644 --- a/llama_stack/apis/synthetic_data_generation/synthetic_data_generation.py +++ b/llama_stack/apis/synthetic_data_generation/synthetic_data_generation.py @@ -44,7 +44,7 @@ class SyntheticDataGenerationResponse(BaseModel): class SyntheticDataGeneration(Protocol): - @webmethod(route="/synthetic_data_generation/generate") + @webmethod(route="/synthetic-data-generation/generate") def synthetic_data_generate( self, dialogs: List[Message], diff --git a/llama_stack/apis/telemetry/telemetry.py b/llama_stack/apis/telemetry/telemetry.py index 8374192f2..31f64733b 100644 --- a/llama_stack/apis/telemetry/telemetry.py +++ b/llama_stack/apis/telemetry/telemetry.py @@ -125,8 +125,8 @@ Event = Annotated[ @runtime_checkable class Telemetry(Protocol): - @webmethod(route="/telemetry/log_event") + @webmethod(route="/telemetry/log-event") async def log_event(self, event: Event) -> None: ... - @webmethod(route="/telemetry/get_trace", method="GET") + @webmethod(route="/telemetry/get-trace", method="GET") async def get_trace(self, trace_id: str) -> Trace: ... diff --git a/llama_stack/distribution/stack.py b/llama_stack/distribution/stack.py index de196b223..9bd058400 100644 --- a/llama_stack/distribution/stack.py +++ b/llama_stack/distribution/stack.py @@ -40,6 +40,9 @@ from llama_stack.distribution.store.registry import create_dist_registry from llama_stack.providers.datatypes import Api +LLAMA_STACK_API_VERSION = "alpha" + + class LlamaStack( MemoryBanks, Inference,