diff --git a/docs/docs/api-overview.md b/docs/docs/api-overview.md new file mode 100644 index 000000000..bb95f445b --- /dev/null +++ b/docs/docs/api-overview.md @@ -0,0 +1,49 @@ +# API Reference Overview + +The Llama Stack provides a comprehensive set of APIs organized by stability level to help you choose the right endpoints for your use case. + +## ๐ŸŸข Stable APIs + +**Production-ready APIs with backward compatibility guarantees.** + +These APIs are fully tested, documented, and stable. They follow semantic versioning principles and maintain backward compatibility within major versions. Recommended for production applications. + +[**Browse Stable APIs โ†’**](./api/llama-stack-specification) + +**Key Features:** +- โœ… Backward compatibility guaranteed +- โœ… Comprehensive testing and validation +- โœ… Production-ready reliability +- โœ… Long-term support + +--- + +## ๐ŸŸก Experimental APIs + +**Preview APIs that may change before becoming stable.** + +These APIs include v1alpha and v1beta endpoints that are feature-complete but may undergo changes based on feedback. Great for exploring new capabilities and providing feedback. + +[**Browse Experimental APIs โ†’**](./api-experimental/llama-stack-specification-experimental-apis) + +**Key Features:** +- ๐Ÿงช Latest features and capabilities +- ๐Ÿงช May change based on user feedback +- ๐Ÿงช Active development and iteration +- ๐Ÿงช Opportunity to influence final design + +--- + +## ๐Ÿ”ด Deprecated APIs + +**Legacy APIs for migration reference.** + +These APIs are deprecated and will be removed in future versions. They are provided for migration purposes and to help transition to newer, stable alternatives. + +[**Browse Deprecated APIs โ†’**](./api-deprecated/llama-stack-specification-deprecated-apis) + +**Key Features:** +- โš ๏ธ Will be removed in future versions +- โš ๏ธ Migration guidance provided +- โš ๏ธ Use for compatibility during transition +- โš ๏ธ Not recommended for new projects diff --git a/docs/docs/providers/agents/index.mdx b/docs/docs/providers/agents/index.mdx index 5cd37776d..06eb104af 100644 --- a/docs/docs/providers/agents/index.mdx +++ b/docs/docs/providers/agents/index.mdx @@ -1,12 +1,7 @@ --- -description: "Agents API for creating and interacting with agentic systems. +description: "Agents - Main functionalities provided by this API: - - Create agents with specific instructions and ability to use tools. - - Interactions with agents are grouped into sessions (\"threads\"), and each interaction is called a \"turn\". - - Agents can be provided with various tools (see the ToolGroups and ToolRuntime APIs for more details). - - Agents can be provided with various shields (see the Safety API for more details). - - Agents can also use Memory to retrieve information from knowledge bases. See the RAG Tool and Vector IO APIs for more details." + APIs for creating and interacting with agentic systems." sidebar_label: Agents title: Agents --- @@ -15,13 +10,8 @@ title: Agents ## Overview -Agents API for creating and interacting with agentic systems. +Agents - Main functionalities provided by this API: - - Create agents with specific instructions and ability to use tools. - - Interactions with agents are grouped into sessions ("threads"), and each interaction is called a "turn". - - Agents can be provided with various tools (see the ToolGroups and ToolRuntime APIs for more details). - - Agents can be provided with various shields (see the Safety API for more details). - - Agents can also use Memory to retrieve information from knowledge bases. See the RAG Tool and Vector IO APIs for more details. + APIs for creating and interacting with agentic systems. This section contains documentation for all available providers for the **agents** API. diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 937aa4ddf..9aa9c6672 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -55,10 +55,27 @@ const config: Config = { label: 'Docs', }, { - type: 'docSidebar', - sidebarId: 'apiSidebar', - position: 'left', + type: 'dropdown', label: 'API Reference', + position: 'left', + to: '/docs/api-overview', + items: [ + { + type: 'docSidebar', + sidebarId: 'stableApiSidebar', + label: '๐ŸŸข Stable APIs', + }, + { + type: 'docSidebar', + sidebarId: 'experimentalApiSidebar', + label: '๐ŸŸก Experimental APIs', + }, + { + type: 'docSidebar', + sidebarId: 'deprecatedApiSidebar', + label: '๐Ÿ”ด Deprecated APIs', + }, + ], }, { href: 'https://github.com/llamastack/llama-stack', @@ -83,7 +100,7 @@ const config: Config = { }, { label: 'API Reference', - to: '/docs/api/llama-stack-specification', + to: '/docs/api-overview', }, ], }, @@ -170,7 +187,7 @@ const config: Config = { id: "openapi", docsPluginId: "classic", config: { - llamastack: { + stable: { specPath: "static/llama-stack-spec.yaml", outputDir: "docs/api", downloadUrl: "https://raw.githubusercontent.com/meta-llama/llama-stack/main/docs/static/llama-stack-spec.yaml", @@ -179,6 +196,24 @@ const config: Config = { categoryLinkSource: "tag", }, } satisfies OpenApiPlugin.Options, + experimental: { + specPath: "static/experimental-llama-stack-spec.yaml", + outputDir: "docs/api-experimental", + downloadUrl: "https://raw.githubusercontent.com/meta-llama/llama-stack/main/docs/static/experimental-llama-stack-spec.yaml", + sidebarOptions: { + groupPathsBy: "tag", + categoryLinkSource: "tag", + }, + } satisfies OpenApiPlugin.Options, + deprecated: { + specPath: "static/deprecated-llama-stack-spec.yaml", + outputDir: "docs/api-deprecated", + downloadUrl: "https://raw.githubusercontent.com/meta-llama/llama-stack/main/docs/static/deprecated-llama-stack-spec.yaml", + sidebarOptions: { + groupPathsBy: "tag", + categoryLinkSource: "tag", + }, + } satisfies OpenApiPlugin.Options, } satisfies Plugin.PluginOptions, }, ], diff --git a/docs/openapi_generator/generate.py b/docs/openapi_generator/generate.py index 54031d839..ea0f62b00 100644 --- a/docs/openapi_generator/generate.py +++ b/docs/openapi_generator/generate.py @@ -34,40 +34,52 @@ def str_presenter(dumper, data): return dumper.represent_scalar("tag:yaml.org,2002:str", data, style=style) -def main(output_dir: str): - output_dir = Path(output_dir) - if not output_dir.exists(): - raise ValueError(f"Directory {output_dir} does not exist") +def generate_spec(output_dir: Path, stability_filter: str = None, main_spec: bool = False): + """Generate OpenAPI spec with optional stability filtering.""" - # Validate API protocols before generating spec - return_type_errors = validate_api() - if return_type_errors: - print("\nAPI Method Return Type Validation Errors:\n") - for error in return_type_errors: - print(error, file=sys.stderr) - sys.exit(1) - now = str(datetime.now()) - print( - "Converting the spec to YAML (openapi.yaml) and HTML (openapi.html) at " + now - ) - print("") + if stability_filter: + title_suffix = { + "stable": " - Stable APIs" if not main_spec else "", + "experimental": " - Experimental APIs", + "deprecated": " - Deprecated APIs" + }.get(stability_filter, f" - {stability_filter.title()} APIs") + + # Use main spec filename for stable when main_spec=True + if main_spec and stability_filter == "stable": + filename_prefix = "" + else: + filename_prefix = f"{stability_filter}-" + + description_suffix = { + "stable": "\n\n**โœ… STABLE**: Production-ready APIs with backward compatibility guarantees.", + "experimental": "\n\n**๐Ÿงช EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before becoming stable.", + "deprecated": "\n\n**โš ๏ธ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for migration reference only." + }.get(stability_filter, "") + else: + title_suffix = "" + filename_prefix = "" + description_suffix = "" spec = Specification( LlamaStack, Options( server=Server(url="http://any-hosted-llama-stack.com"), info=Info( - title="Llama Stack Specification", + title=f"Llama Stack Specification{title_suffix}", version=LLAMA_STACK_API_V1, - description="""This is the specification of the Llama Stack that provides + description=f"""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.""", + best leverage Llama Models.{description_suffix}""", ), include_standard_error_responses=True, + stability_filter=stability_filter, # Pass the filter to the generator ), ) - with open(output_dir / "llama-stack-spec.yaml", "w", encoding="utf-8") as fp: + yaml_filename = f"{filename_prefix}llama-stack-spec.yaml" + html_filename = f"{filename_prefix}llama-stack-spec.html" + + with open(output_dir / yaml_filename, "w", encoding="utf-8") as fp: y = yaml.YAML() y.default_flow_style = False y.block_seq_indent = 2 @@ -83,9 +95,36 @@ def main(output_dir: str): fp, ) - with open(output_dir / "llama-stack-spec.html", "w") as fp: + with open(output_dir / html_filename, "w") as fp: spec.write_html(fp, pretty_print=True) + print(f"Generated {yaml_filename} and {html_filename}") + +def main(output_dir: str): + output_dir = Path(output_dir) + if not output_dir.exists(): + raise ValueError(f"Directory {output_dir} does not exist") + + # Validate API protocols before generating spec + return_type_errors = validate_api() + if return_type_errors: + print("\nAPI Method Return Type Validation Errors:\n") + for error in return_type_errors: + print(error, file=sys.stderr) + sys.exit(1) + + now = str(datetime.now()) + print(f"Converting the spec to YAML (openapi.yaml) and HTML (openapi.html) at {now}") + print("") + + # Generate main spec as stable APIs (llama-stack-spec.yaml) + print("Generating main specification (stable APIs)...") + generate_spec(output_dir, "stable", main_spec=True) + + print("Generating other stability-filtered specifications...") + generate_spec(output_dir, "experimental") + generate_spec(output_dir, "deprecated") + if __name__ == "__main__": fire.Fire(main) diff --git a/docs/openapi_generator/pyopenapi/generator.py b/docs/openapi_generator/pyopenapi/generator.py index a38e02e7f..2f06b5b41 100644 --- a/docs/openapi_generator/pyopenapi/generator.py +++ b/docs/openapi_generator/pyopenapi/generator.py @@ -7,13 +7,14 @@ import hashlib import inspect import ipaddress +import os import types import typing from dataclasses import make_dataclass +from pathlib import Path from typing import Annotated, Any, Dict, get_args, get_origin, Set, Union from fastapi import UploadFile -from pydantic import BaseModel from llama_stack.apis.datatypes import Error from llama_stack.strong_typing.core import JsonType @@ -35,6 +36,7 @@ from llama_stack.strong_typing.schema import ( SchemaOptions, ) from llama_stack.strong_typing.serialization import json_dump_string, object_to_json +from pydantic import BaseModel from .operations import ( EndpointOperation, @@ -811,16 +813,121 @@ class Generator: requestBody=requestBody, responses=responses, callbacks=callbacks, - deprecated=True if "DEPRECATED" in op.func_name else None, + deprecated=getattr(op.webmethod, "deprecated", False) + or "DEPRECATED" in op.func_name, security=[] if op.public else None, ) + def _get_api_stability_priority(self, api_level: str) -> int: + """ + Return sorting priority for API stability levels. + Lower numbers = higher priority (appear first) + + :param api_level: The API level (e.g., "v1", "v1beta", "v1alpha") + :return: Priority number for sorting + """ + stability_order = { + "v1": 0, # Stable - highest priority + "v1beta": 1, # Beta - medium priority + "v1alpha": 2, # Alpha - lowest priority + } + return stability_order.get(api_level, 999) # Unknown levels go last + def generate(self) -> Document: paths: Dict[str, PathItem] = {} endpoint_classes: Set[type] = set() - for op in get_endpoint_operations( - self.endpoint, use_examples=self.options.use_examples - ): + + # Collect all operations and filter by stability if specified + operations = list( + get_endpoint_operations( + self.endpoint, use_examples=self.options.use_examples + ) + ) + + # Filter operations by stability level if requested + if self.options.stability_filter: + filtered_operations = [] + for op in operations: + deprecated = ( + getattr(op.webmethod, "deprecated", False) + or "DEPRECATED" in op.func_name + ) + stability_level = op.webmethod.level + + if self.options.stability_filter == "stable": + # Include v1 non-deprecated endpoints + if stability_level == "v1" and not deprecated: + filtered_operations.append(op) + elif self.options.stability_filter == "experimental": + # Include v1alpha and v1beta endpoints (deprecated or not) + if stability_level in ["v1alpha", "v1beta"]: + filtered_operations.append(op) + elif self.options.stability_filter == "deprecated": + # Include only deprecated endpoints + if deprecated: + filtered_operations.append(op) + + operations = filtered_operations + print( + f"Filtered to {len(operations)} operations for stability level: {self.options.stability_filter}" + ) + + # Sort operations by multiple criteria for consistent ordering: + # 1. Stability level with deprecation handling (global priority): + # - Active stable (v1) comes first + # - Beta (v1beta) comes next + # - Alpha (v1alpha) comes next + # - Deprecated stable (v1 deprecated) comes last + # 2. Route path (group related endpoints within same stability level) + # 3. HTTP method (GET, POST, PUT, DELETE, PATCH) + # 4. Operation name (alphabetical) + def sort_key(op): + http_method_order = { + HTTPMethod.GET: 0, + HTTPMethod.POST: 1, + HTTPMethod.PUT: 2, + HTTPMethod.DELETE: 3, + HTTPMethod.PATCH: 4, + } + + # Enhanced stability priority for migration pattern support + deprecated = getattr(op.webmethod, "deprecated", False) + stability_priority = self._get_api_stability_priority(op.webmethod.level) + + # Deprecated versions should appear after everything else + # This ensures deprecated stable endpoints come last globally + if deprecated: + stability_priority += 10 # Push deprecated endpoints to the end + + return ( + stability_priority, # Global stability handling comes first + op.get_route( + op.webmethod + ), # Group by route path within stability level + http_method_order.get(op.http_method, 999), + op.func_name, + ) + + operations.sort(key=sort_key) + + # Debug output for migration pattern tracking + migration_routes = {} + for op in operations: + route_key = (op.get_route(op.webmethod), op.http_method) + if route_key not in migration_routes: + migration_routes[route_key] = [] + migration_routes[route_key].append( + (op.webmethod.level, getattr(op.webmethod, "deprecated", False)) + ) + + for route_key, versions in migration_routes.items(): + if len(versions) > 1: + print(f"Migration pattern detected for {route_key[1]} {route_key[0]}:") + for level, deprecated in versions: + status = "DEPRECATED" if deprecated else "ACTIVE" + print(f" - {level} ({status})") + + for op in operations: endpoint_classes.add(op.defining_class) operation = self._build_operation(op) @@ -851,6 +958,7 @@ class Generator: doc_string = parse_type(cls) if hasattr(cls, "API_NAMESPACE") and cls.API_NAMESPACE != cls.__name__: continue + operation_tags.append( Tag( name=cls.__name__, diff --git a/docs/openapi_generator/pyopenapi/options.py b/docs/openapi_generator/pyopenapi/options.py index edc861ad5..53855b5b6 100644 --- a/docs/openapi_generator/pyopenapi/options.py +++ b/docs/openapi_generator/pyopenapi/options.py @@ -54,6 +54,7 @@ class Options: property_description_fun: Optional[Callable[[type, str, str], str]] = None captions: Optional[Dict[str, str]] = None include_standard_error_responses: bool = True + stability_filter: Optional[str] = None default_captions: ClassVar[Dict[str, str]] = { "Operations": "Operations", diff --git a/docs/sidebars.ts b/docs/sidebars.ts index 01c1390c1..2724de05c 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -335,8 +335,10 @@ const sidebars: SidebarsConfig = { }, ], - // API Reference sidebar - use plugin-generated sidebar - apiSidebar: require('./docs/api/sidebar.ts').default, + // API Reference sidebars - use plugin-generated sidebars + stableApiSidebar: require('./docs/api/sidebar.ts').default, + experimentalApiSidebar: require('./docs/api-experimental/sidebar.ts').default, + deprecatedApiSidebar: require('./docs/api-deprecated/sidebar.ts').default, }; export default sidebars; diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 0e4d95b9b..7f642ccb6 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -189,3 +189,29 @@ button[class*="button"]:hover, .pagination-nav__link--prev:hover { background-color: #f3f4f6 !important; } + +/* Deprecated endpoint styling */ +.menu__list-item--deprecated .menu__link { + text-decoration: line-through !important; + opacity: 0.7; + font-style: italic; +} + +.menu__list-item--deprecated .menu__link:hover { + opacity: 0.9; +} + +/* Deprecated endpoint badges - slightly muted */ +.menu__list-item--deprecated.api-method > .menu__link::before { + opacity: 0.7; + border-style: dashed !important; +} + +/* Dark theme adjustments for deprecated endpoints */ +[data-theme='dark'] .menu__list-item--deprecated .menu__link { + opacity: 0.6; +} + +[data-theme='dark'] .menu__list-item--deprecated .menu__link:hover { + opacity: 0.8; +} diff --git a/docs/static/deprecated-llama-stack-spec.html b/docs/static/deprecated-llama-stack-spec.html new file mode 100644 index 000000000..7879cb389 --- /dev/null +++ b/docs/static/deprecated-llama-stack-spec.html @@ -0,0 +1,4869 @@ + + + + + + + OpenAPI specification + + + + + + + + + + + + + diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml new file mode 100644 index 000000000..1143a2c6d --- /dev/null +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -0,0 +1,3555 @@ +openapi: 3.1.0 +info: + title: >- + Llama Stack Specification - Deprecated APIs + version: v1 + 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. + + **โš ๏ธ DEPRECATED**: Legacy APIs that may be removed in future versions. Use for + migration reference only. +servers: + - url: http://any-hosted-llama-stack.com +paths: + /v1/agents: + get: + responses: + '200': + description: A PaginatedResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: List all agents. + description: List all agents. + parameters: + - name: start_index + in: query + description: The index to start the pagination from. + required: false + schema: + type: integer + - name: limit + in: query + description: The number of agents to return. + required: false + schema: + type: integer + deprecated: true + post: + responses: + '200': + description: >- + An AgentCreateResponse with the agent ID. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentCreateResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: >- + Create an agent with the given configuration. + description: >- + Create an agent with the given configuration. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentRequest' + required: true + deprecated: true + /v1/agents/{agent_id}: + get: + responses: + '200': + description: An Agent of the agent. + content: + application/json: + schema: + $ref: '#/components/schemas/Agent' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Describe an agent by its ID. + description: Describe an agent by its ID. + parameters: + - name: agent_id + in: path + description: ID of the agent. + required: true + schema: + type: string + deprecated: true + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: >- + Delete an agent by its ID and its associated sessions and turns. + description: >- + Delete an agent by its ID and its associated sessions and turns. + parameters: + - name: agent_id + in: path + description: The ID of the agent to delete. + required: true + schema: + type: string + deprecated: true + /v1/agents/{agent_id}/session: + post: + responses: + '200': + description: An AgentSessionCreateResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentSessionCreateResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Create a new session for an agent. + description: Create a new session for an agent. + parameters: + - name: agent_id + in: path + description: >- + The ID of the agent to create the session for. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentSessionRequest' + required: true + deprecated: true + /v1/agents/{agent_id}/session/{session_id}: + get: + responses: + '200': + description: A Session. + content: + application/json: + schema: + $ref: '#/components/schemas/Session' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Retrieve an agent session by its ID. + description: Retrieve an agent session by its ID. + parameters: + - name: session_id + in: path + description: The ID of the session to get. + required: true + schema: + type: string + - name: agent_id + in: path + description: >- + The ID of the agent to get the session for. + required: true + schema: + type: string + - name: turn_ids + in: query + description: >- + (Optional) List of turn IDs to filter the session by. + required: false + schema: + type: array + items: + type: string + deprecated: true + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: >- + Delete an agent session by its ID and its associated turns. + description: >- + Delete an agent session by its ID and its associated turns. + parameters: + - name: session_id + in: path + description: The ID of the session to delete. + required: true + schema: + type: string + - name: agent_id + in: path + description: >- + The ID of the agent to delete the session for. + required: true + schema: + type: string + deprecated: true + /v1/agents/{agent_id}/session/{session_id}/turn: + post: + responses: + '200': + description: >- + If stream=False, returns a Turn object. If stream=True, returns an SSE + event stream of AgentTurnResponseStreamChunk. + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + text/event-stream: + schema: + $ref: '#/components/schemas/AgentTurnResponseStreamChunk' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Create a new turn for an agent. + description: Create a new turn for an agent. + parameters: + - name: agent_id + in: path + description: >- + The ID of the agent to create the turn for. + required: true + schema: + type: string + - name: session_id + in: path + description: >- + The ID of the session to create the turn for. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentTurnRequest' + required: true + deprecated: true + /v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}: + get: + responses: + '200': + description: A Turn. + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Retrieve an agent turn by its ID. + description: Retrieve an agent turn by its ID. + parameters: + - name: agent_id + in: path + description: The ID of the agent to get the turn for. + required: true + schema: + type: string + - name: session_id + in: path + description: >- + The ID of the session to get the turn for. + required: true + schema: + type: string + - name: turn_id + in: path + description: The ID of the turn to get. + required: true + schema: + type: string + deprecated: true + /v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume: + post: + responses: + '200': + description: >- + A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk + objects. + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + text/event-stream: + schema: + $ref: '#/components/schemas/AgentTurnResponseStreamChunk' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: >- + Resume an agent turn with executed tool call responses. + description: >- + Resume an agent turn with executed tool call responses. + + When a Turn has the status `awaiting_input` due to pending input from client + side tool calls, this endpoint can be used to submit the outputs from the + tool calls once they are ready. + parameters: + - name: agent_id + in: path + description: The ID of the agent to resume. + required: true + schema: + type: string + - name: session_id + in: path + description: The ID of the session to resume. + required: true + schema: + type: string + - name: turn_id + in: path + description: The ID of the turn to resume. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResumeAgentTurnRequest' + required: true + deprecated: true + /v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: + get: + responses: + '200': + description: An AgentStepResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentStepResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Retrieve an agent step by its ID. + description: Retrieve an agent step by its ID. + parameters: + - name: agent_id + in: path + description: The ID of the agent to get the step for. + required: true + schema: + type: string + - name: session_id + in: path + description: >- + The ID of the session to get the step for. + required: true + schema: + type: string + - name: turn_id + in: path + description: The ID of the turn to get the step for. + required: true + schema: + type: string + - name: step_id + in: path + description: The ID of the step to get. + required: true + schema: + type: string + deprecated: true + /v1/agents/{agent_id}/sessions: + get: + responses: + '200': + description: A PaginatedResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: List all session(s) of a given agent. + description: List all session(s) of a given agent. + parameters: + - name: agent_id + in: path + description: >- + The ID of the agent to list sessions for. + required: true + schema: + type: string + - name: start_index + in: query + description: The index to start the pagination from. + required: false + schema: + type: integer + - name: limit + in: query + description: The number of sessions to return. + required: false + schema: + type: integer + deprecated: true + /v1/eval/benchmarks: + get: + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: List all benchmarks. + description: List all benchmarks. + parameters: [] + deprecated: true + post: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Register a benchmark. + description: Register a benchmark. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterBenchmarkRequest' + required: true + deprecated: true + /v1/eval/benchmarks/{benchmark_id}: + get: + responses: + '200': + description: A Benchmark. + content: + application/json: + schema: + $ref: '#/components/schemas/Benchmark' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Get a benchmark by its ID. + description: Get a benchmark by its ID. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to get. + required: true + schema: + type: string + deprecated: true + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Unregister a benchmark. + description: Unregister a benchmark. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to unregister. + required: true + schema: + type: string + deprecated: true + /v1/eval/benchmarks/{benchmark_id}/evaluations: + post: + responses: + '200': + description: >- + EvaluateResponse object containing generations and scores. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluateResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Evaluate a list of rows on a benchmark. + description: Evaluate a list of rows on a benchmark. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluateRowsRequest' + required: true + deprecated: true + /v1/eval/benchmarks/{benchmark_id}/jobs: + post: + responses: + '200': + description: >- + The job that was created to run the evaluation. + content: + application/json: + schema: + $ref: '#/components/schemas/Job' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Run an evaluation on a benchmark. + description: Run an evaluation on a benchmark. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunEvalRequest' + required: true + deprecated: true + /v1/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + get: + responses: + '200': + description: The status of the evaluation job. + content: + application/json: + schema: + $ref: '#/components/schemas/Job' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Get the status of a job. + description: Get the status of a job. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + - name: job_id + in: path + description: The ID of the job to get the status of. + required: true + schema: + type: string + deprecated: true + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Cancel a job. + description: Cancel a job. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + - name: job_id + in: path + description: The ID of the job to cancel. + required: true + schema: + type: string + deprecated: true + /v1/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + get: + responses: + '200': + description: The result of the job. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluateResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Get the result of a job. + description: Get the result of a job. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + - name: job_id + in: path + description: The ID of the job to get the result of. + required: true + schema: + type: string + deprecated: true + /v1/post-training/job/artifacts: + get: + responses: + '200': + description: A PostTrainingJobArtifactsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Get the artifacts of a training job. + description: Get the artifacts of a training job. + parameters: + - name: job_uuid + in: query + description: >- + The UUID of the job to get the artifacts of. + required: true + schema: + type: string + deprecated: true + /v1/post-training/job/cancel: + post: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Cancel a training job. + description: Cancel a training job. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CancelTrainingJobRequest' + required: true + deprecated: true + /v1/post-training/job/status: + get: + responses: + '200': + description: A PostTrainingJobStatusResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Get the status of a training job. + description: Get the status of a training job. + parameters: + - name: job_uuid + in: query + description: >- + The UUID of the job to get the status of. + required: true + schema: + type: string + deprecated: true + /v1/post-training/jobs: + get: + responses: + '200': + description: A ListPostTrainingJobsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Get all training jobs. + description: Get all training jobs. + parameters: [] + deprecated: true + /v1/post-training/preference-optimize: + post: + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Run preference optimization of a model. + description: Run preference optimization of a model. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreferenceOptimizeRequest' + required: true + deprecated: true + /v1/post-training/supervised-fine-tune: + post: + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Run supervised fine-tuning of a model. + description: Run supervised fine-tuning of a model. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SupervisedFineTuneRequest' + required: true + deprecated: true +jsonSchemaDialect: >- + https://json-schema.org/draft/2020-12/schema +components: + schemas: + Error: + type: object + properties: + status: + type: integer + description: HTTP status code + title: + type: string + description: >- + Error title, a short summary of the error which is invariant for an error + type + detail: + type: string + description: >- + Error detail, a longer human-readable description of the error + instance: + type: string + description: >- + (Optional) A URL which can be used to retrieve more information about + the specific occurrence of the error + additionalProperties: false + required: + - status + - title + - detail + title: Error + description: >- + Error response from the API. Roughly follows RFC 7807. + PaginatedResponse: + type: object + properties: + data: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The list of items for the current page + has_more: + type: boolean + description: >- + Whether there are more items available after this set + url: + type: string + description: The URL for accessing this list + additionalProperties: false + required: + - data + - has_more + title: PaginatedResponse + description: >- + A generic paginated response that follows a simple format. + AgentConfig: + type: object + properties: + sampling_params: + $ref: '#/components/schemas/SamplingParams' + input_shields: + type: array + items: + type: string + output_shields: + type: array + items: + type: string + toolgroups: + type: array + items: + $ref: '#/components/schemas/AgentTool' + client_tools: + type: array + items: + $ref: '#/components/schemas/ToolDef' + tool_choice: + type: string + enum: + - auto + - required + - none + title: ToolChoice + description: >- + Whether tool use is required or automatic. This is a hint to the model + which may not be followed. It depends on the Instruction Following capabilities + of the model. + deprecated: true + tool_prompt_format: + type: string + enum: + - json + - function_tag + - python_list + title: ToolPromptFormat + description: >- + Prompt format for calling custom / zero shot tools. + deprecated: true + tool_config: + $ref: '#/components/schemas/ToolConfig' + max_infer_iters: + type: integer + default: 10 + model: + type: string + description: >- + The model identifier to use for the agent + instructions: + type: string + description: The system instructions for the agent + name: + type: string + description: >- + Optional name for the agent, used in telemetry and identification + enable_session_persistence: + type: boolean + default: false + description: >- + Optional flag indicating whether session data has to be persisted + response_format: + $ref: '#/components/schemas/ResponseFormat' + description: Optional response format configuration + additionalProperties: false + required: + - model + - instructions + title: AgentConfig + description: Configuration for an agent. + AgentTool: + oneOf: + - type: string + - type: object + properties: + name: + type: string + args: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + additionalProperties: false + required: + - name + - args + title: AgentToolGroupWithArgs + GrammarResponseFormat: + type: object + properties: + type: + type: string + enum: + - json_schema + - grammar + description: >- + Must be "grammar" to identify this format type + const: grammar + default: grammar + bnf: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The BNF grammar specification the response should conform to + additionalProperties: false + required: + - type + - bnf + title: GrammarResponseFormat + description: >- + Configuration for grammar-guided response generation. + GreedySamplingStrategy: + type: object + properties: + type: + type: string + const: greedy + default: greedy + description: >- + Must be "greedy" to identify this sampling strategy + additionalProperties: false + required: + - type + title: GreedySamplingStrategy + description: >- + Greedy sampling strategy that selects the highest probability token at each + step. + JsonSchemaResponseFormat: + type: object + properties: + type: + type: string + enum: + - json_schema + - grammar + description: >- + Must be "json_schema" to identify this format type + const: json_schema + default: json_schema + json_schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The JSON schema the response should conform to. In a Python SDK, this + is often a `pydantic` model. + additionalProperties: false + required: + - type + - json_schema + title: JsonSchemaResponseFormat + description: >- + Configuration for JSON schema-guided response generation. + ResponseFormat: + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + discriminator: + propertyName: type + mapping: + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + grammar: '#/components/schemas/GrammarResponseFormat' + SamplingParams: + type: object + properties: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + description: The sampling strategy. + max_tokens: + type: integer + default: 0 + description: >- + The maximum number of tokens that can be generated in the completion. + The token count of your prompt plus max_tokens cannot exceed the model's + context length. + repetition_penalty: + type: number + default: 1.0 + description: >- + Number between -2.0 and 2.0. Positive values penalize new tokens based + on whether they appear in the text so far, increasing the model's likelihood + to talk about new topics. + stop: + type: array + items: + type: string + description: >- + Up to 4 sequences where the API will stop generating further tokens. The + returned text will not contain the stop sequence. + additionalProperties: false + required: + - strategy + title: SamplingParams + description: Sampling parameters. + ToolConfig: + type: object + properties: + tool_choice: + oneOf: + - type: string + enum: + - auto + - required + - none + title: ToolChoice + description: >- + Whether tool use is required or automatic. This is a hint to the model + which may not be followed. It depends on the Instruction Following + capabilities of the model. + - type: string + default: auto + description: >- + (Optional) Whether tool use is automatic, required, or none. Can also + specify a tool name to use a specific tool. Defaults to ToolChoice.auto. + tool_prompt_format: + type: string + enum: + - json + - function_tag + - python_list + description: >- + (Optional) Instructs the model how to format tool calls. By default, Llama + Stack will attempt to use a format that is best adapted to the model. + - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. + - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a + tag. - `ToolPromptFormat.python_list`: The tool calls are output as Python + syntax -- a list of function calls. + system_message_behavior: + type: string + enum: + - append + - replace + description: >- + (Optional) Config for how to override the default system prompt. - `SystemMessageBehavior.append`: + Appends the provided system message to the default system prompt. - `SystemMessageBehavior.replace`: + Replaces the default system prompt with the provided system message. The + system message can include the string '{{function_definitions}}' to indicate + where the function definitions should be inserted. + default: append + additionalProperties: false + title: ToolConfig + description: Configuration for tool use. + ToolDef: + type: object + properties: + name: + type: string + description: Name of the tool + description: + type: string + description: >- + (Optional) Human-readable description of what the tool does + parameters: + type: array + items: + $ref: '#/components/schemas/ToolParameter' + description: >- + (Optional) List of parameters this tool accepts + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool + additionalProperties: false + required: + - name + title: ToolDef + description: >- + Tool definition used in runtime contexts. + ToolParameter: + type: object + properties: + name: + type: string + description: Name of the parameter + parameter_type: + type: string + description: >- + Type of the parameter (e.g., string, integer) + description: + type: string + description: >- + Human-readable description of what the parameter does + required: + type: boolean + default: true + description: >- + Whether this parameter is required for tool invocation + items: + type: object + description: >- + Type of the elements when parameter_type is array + title: + type: string + description: (Optional) Title of the parameter + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Default value for the parameter if not provided + additionalProperties: false + required: + - name + - parameter_type + - description + - required + title: ToolParameter + description: Parameter definition for a tool. + TopKSamplingStrategy: + type: object + properties: + type: + type: string + const: top_k + default: top_k + description: >- + Must be "top_k" to identify this sampling strategy + top_k: + type: integer + description: >- + Number of top tokens to consider for sampling. Must be at least 1 + additionalProperties: false + required: + - type + - top_k + title: TopKSamplingStrategy + description: >- + Top-k sampling strategy that restricts sampling to the k most likely tokens. + TopPSamplingStrategy: + type: object + properties: + type: + type: string + const: top_p + default: top_p + description: >- + Must be "top_p" to identify this sampling strategy + temperature: + type: number + description: >- + Controls randomness in sampling. Higher values increase randomness + top_p: + type: number + default: 0.95 + description: >- + Cumulative probability threshold for nucleus sampling. Defaults to 0.95 + additionalProperties: false + required: + - type + title: TopPSamplingStrategy + description: >- + Top-p (nucleus) sampling strategy that samples from the smallest set of tokens + with cumulative probability >= p. + CreateAgentRequest: + type: object + properties: + agent_config: + $ref: '#/components/schemas/AgentConfig' + description: The configuration for the agent. + additionalProperties: false + required: + - agent_config + title: CreateAgentRequest + AgentCreateResponse: + type: object + properties: + agent_id: + type: string + description: Unique identifier for the created agent + additionalProperties: false + required: + - agent_id + title: AgentCreateResponse + description: >- + Response returned when creating a new agent. + Agent: + type: object + properties: + agent_id: + type: string + description: Unique identifier for the agent + agent_config: + $ref: '#/components/schemas/AgentConfig' + description: Configuration settings for the agent + created_at: + type: string + format: date-time + description: Timestamp when the agent was created + additionalProperties: false + required: + - agent_id + - agent_config + - created_at + title: Agent + description: >- + An agent instance with configuration and metadata. + CreateAgentSessionRequest: + type: object + properties: + session_name: + type: string + description: The name of the session to create. + additionalProperties: false + required: + - session_name + title: CreateAgentSessionRequest + AgentSessionCreateResponse: + type: object + properties: + session_id: + type: string + description: >- + Unique identifier for the created session + additionalProperties: false + required: + - session_id + title: AgentSessionCreateResponse + description: >- + Response returned when creating a new agent session. + CompletionMessage: + type: object + properties: + role: + type: string + const: assistant + default: assistant + description: >- + Must be "assistant" to identify this as the model's response + content: + $ref: '#/components/schemas/InterleavedContent' + description: The content of the model's response + stop_reason: + type: string + enum: + - end_of_turn + - end_of_message + - out_of_tokens + description: >- + Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: + The model finished generating the entire response. - `StopReason.end_of_message`: + The model finished generating but generated a partial response -- usually, + a tool call. The user may call the tool and continue the conversation + with the tool's response. - `StopReason.out_of_tokens`: The model ran + out of token budget. + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + description: >- + List of tool calls. Each tool call is a ToolCall object. + additionalProperties: false + required: + - role + - content + - stop_reason + title: CompletionMessage + description: >- + A message containing the model's (assistant) response in a chat conversation. + ImageContentItem: + type: object + properties: + type: + type: string + const: image + default: image + description: >- + Discriminator type of the content item. Always "image" + image: + type: object + properties: + url: + $ref: '#/components/schemas/URL' + description: >- + A URL of the image or data URL in the format of data:image/{type};base64,{data}. + Note that URL could have length limits. + data: + type: string + contentEncoding: base64 + description: base64 encoded image data as string + additionalProperties: false + description: >- + Image as a base64 encoded string or an URL + additionalProperties: false + required: + - type + - image + title: ImageContentItem + description: A image content item + InferenceStep: + type: object + properties: + turn_id: + type: string + description: The ID of the turn. + step_id: + type: string + description: The ID of the step. + started_at: + type: string + format: date-time + description: The time the step started. + completed_at: + type: string + format: date-time + description: The time the step completed. + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + title: StepType + description: Type of the step in an agent turn. + const: inference + default: inference + model_response: + $ref: '#/components/schemas/CompletionMessage' + description: The response from the LLM. + additionalProperties: false + required: + - turn_id + - step_id + - step_type + - model_response + title: InferenceStep + description: An inference step in an agent turn. + InterleavedContent: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + InterleavedContentItem: + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + MemoryRetrievalStep: + type: object + properties: + turn_id: + type: string + description: The ID of the turn. + step_id: + type: string + description: The ID of the step. + started_at: + type: string + format: date-time + description: The time the step started. + completed_at: + type: string + format: date-time + description: The time the step completed. + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + title: StepType + description: Type of the step in an agent turn. + const: memory_retrieval + default: memory_retrieval + vector_db_ids: + type: string + description: >- + The IDs of the vector databases to retrieve context from. + inserted_context: + $ref: '#/components/schemas/InterleavedContent' + description: >- + The context retrieved from the vector databases. + additionalProperties: false + required: + - turn_id + - step_id + - step_type + - vector_db_ids + - inserted_context + title: MemoryRetrievalStep + description: >- + A memory retrieval step in an agent turn. + SafetyViolation: + type: object + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + description: Severity level of the violation + user_message: + type: string + description: >- + (Optional) Message to convey to the user about the violation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Additional metadata including specific violation codes for debugging and + telemetry + additionalProperties: false + required: + - violation_level + - metadata + title: SafetyViolation + description: >- + Details of a safety violation detected by content moderation. + Session: + type: object + properties: + session_id: + type: string + description: >- + Unique identifier for the conversation session + session_name: + type: string + description: Human-readable name for the session + turns: + type: array + items: + $ref: '#/components/schemas/Turn' + description: >- + List of all turns that have occurred in this session + started_at: + type: string + format: date-time + description: Timestamp when the session was created + additionalProperties: false + required: + - session_id + - session_name + - turns + - started_at + title: Session + description: >- + A single session of an interaction with an Agentic System. + ShieldCallStep: + type: object + properties: + turn_id: + type: string + description: The ID of the turn. + step_id: + type: string + description: The ID of the step. + started_at: + type: string + format: date-time + description: The time the step started. + completed_at: + type: string + format: date-time + description: The time the step completed. + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + title: StepType + description: Type of the step in an agent turn. + const: shield_call + default: shield_call + violation: + $ref: '#/components/schemas/SafetyViolation' + description: The violation from the shield call. + additionalProperties: false + required: + - turn_id + - step_id + - step_type + title: ShieldCallStep + description: A shield call step in an agent turn. + TextContentItem: + type: object + properties: + type: + type: string + const: text + default: text + description: >- + Discriminator type of the content item. Always "text" + text: + type: string + description: Text content + additionalProperties: false + required: + - type + - text + title: TextContentItem + description: A text content item + ToolCall: + type: object + properties: + call_id: + type: string + tool_name: + oneOf: + - type: string + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + - type: string + arguments: + oneOf: + - type: string + - 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' + arguments_json: + type: string + additionalProperties: false + required: + - call_id + - tool_name + - arguments + title: ToolCall + ToolExecutionStep: + type: object + properties: + turn_id: + type: string + description: The ID of the turn. + step_id: + type: string + description: The ID of the step. + started_at: + type: string + format: date-time + description: The time the step started. + completed_at: + type: string + format: date-time + description: The time the step completed. + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + title: StepType + description: Type of the step in an agent turn. + const: tool_execution + default: tool_execution + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + description: The tool calls to execute. + tool_responses: + type: array + items: + $ref: '#/components/schemas/ToolResponse' + description: The tool responses from the tool calls. + additionalProperties: false + required: + - turn_id + - step_id + - step_type + - tool_calls + - tool_responses + title: ToolExecutionStep + description: A tool execution step in an agent turn. + ToolResponse: + type: object + properties: + call_id: + type: string + description: >- + Unique identifier for the tool call this response is for + tool_name: + oneOf: + - type: string + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + - type: string + description: Name of the tool that was invoked + content: + $ref: '#/components/schemas/InterleavedContent' + description: The response content from the tool + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool response + additionalProperties: false + required: + - call_id + - tool_name + - content + title: ToolResponse + description: Response from a tool invocation. + ToolResponseMessage: + type: object + properties: + role: + type: string + const: tool + default: tool + description: >- + Must be "tool" to identify this as a tool response + call_id: + type: string + description: >- + Unique identifier for the tool call this response is for + content: + $ref: '#/components/schemas/InterleavedContent' + description: The response content from the tool + additionalProperties: false + required: + - role + - call_id + - content + title: ToolResponseMessage + description: >- + A message representing the result of a tool invocation. + Turn: + type: object + properties: + turn_id: + type: string + description: >- + Unique identifier for the turn within a session + session_id: + type: string + description: >- + Unique identifier for the conversation session + input_messages: + type: array + items: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + description: >- + List of messages that initiated this turn + steps: + type: array + items: + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep' + tool_execution: '#/components/schemas/ToolExecutionStep' + shield_call: '#/components/schemas/ShieldCallStep' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep' + description: >- + Ordered list of processing steps executed during this turn + output_message: + $ref: '#/components/schemas/CompletionMessage' + description: >- + The model's generated response containing content and metadata + output_attachments: + type: array + items: + type: object + properties: + content: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + - $ref: '#/components/schemas/URL' + description: The content of the attachment. + mime_type: + type: string + description: The MIME type of the attachment. + additionalProperties: false + required: + - content + - mime_type + title: Attachment + description: An attachment to an agent turn. + description: >- + (Optional) Files or media attached to the agent's response + started_at: + type: string + format: date-time + description: Timestamp when the turn began + completed_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the turn finished, if completed + additionalProperties: false + required: + - turn_id + - session_id + - input_messages + - steps + - output_message + - started_at + title: Turn + description: >- + A single turn in an interaction with an Agentic System. + URL: + type: object + properties: + uri: + type: string + description: The URL string pointing to the resource + additionalProperties: false + required: + - uri + title: URL + description: A URL reference to external content. + UserMessage: + type: object + properties: + role: + type: string + const: user + default: user + description: >- + Must be "user" to identify this as a user message + content: + $ref: '#/components/schemas/InterleavedContent' + description: >- + The content of the message, which can include text and other media + context: + $ref: '#/components/schemas/InterleavedContent' + description: >- + (Optional) This field is used internally by Llama Stack to pass RAG context. + This field may be removed in the API in the future. + additionalProperties: false + required: + - role + - content + title: UserMessage + description: >- + A message from the user in a chat conversation. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + CreateAgentTurnRequest: + type: object + properties: + messages: + type: array + items: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + description: List of messages to start the turn with. + stream: + type: boolean + description: >- + (Optional) If True, generate an SSE event stream of the response. Defaults + to False. + documents: + type: array + items: + type: object + properties: + content: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + - $ref: '#/components/schemas/URL' + description: The content of the document. + mime_type: + type: string + description: The MIME type of the document. + additionalProperties: false + required: + - content + - mime_type + title: Document + description: A document to be used by an agent. + description: >- + (Optional) List of documents to create the turn with. + toolgroups: + type: array + items: + $ref: '#/components/schemas/AgentTool' + description: >- + (Optional) List of toolgroups to create the turn with, will be used in + addition to the agent's config toolgroups for the request. + tool_config: + $ref: '#/components/schemas/ToolConfig' + description: >- + (Optional) The tool configuration to create the turn with, will be used + to override the agent's tool_config. + additionalProperties: false + required: + - messages + title: CreateAgentTurnRequest + 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' + - $ref: '#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload' + discriminator: + propertyName: event_type + mapping: + step_start: '#/components/schemas/AgentTurnResponseStepStartPayload' + step_progress: '#/components/schemas/AgentTurnResponseStepProgressPayload' + step_complete: '#/components/schemas/AgentTurnResponseStepCompletePayload' + turn_start: '#/components/schemas/AgentTurnResponseTurnStartPayload' + turn_complete: '#/components/schemas/AgentTurnResponseTurnCompletePayload' + turn_awaiting_input: '#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload' + description: >- + Event-specific payload containing event data + additionalProperties: false + required: + - payload + title: AgentTurnResponseEvent + description: >- + An event in an agent turn response stream. + AgentTurnResponseStepCompletePayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: step_complete + default: step_complete + description: Type of event being reported + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + description: Type of step being executed + step_id: + type: string + description: >- + Unique identifier for the step within a turn + step_details: + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep' + tool_execution: '#/components/schemas/ToolExecutionStep' + shield_call: '#/components/schemas/ShieldCallStep' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep' + description: Complete details of the executed step + additionalProperties: false + required: + - event_type + - step_type + - step_id + - step_details + title: AgentTurnResponseStepCompletePayload + description: >- + Payload for step completion events in agent turn responses. + AgentTurnResponseStepProgressPayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: step_progress + default: step_progress + description: Type of event being reported + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + description: Type of step being executed + step_id: + type: string + description: >- + Unique identifier for the step within a turn + delta: + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/TextDelta' + image: '#/components/schemas/ImageDelta' + tool_call: '#/components/schemas/ToolCallDelta' + description: >- + Incremental content changes during step execution + additionalProperties: false + required: + - event_type + - step_type + - step_id + - delta + title: AgentTurnResponseStepProgressPayload + description: >- + Payload for step progress events in agent turn responses. + AgentTurnResponseStepStartPayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: step_start + default: step_start + description: Type of event being reported + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + description: Type of step being executed + step_id: + type: string + description: >- + Unique identifier for the step within a turn + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata for the step + additionalProperties: false + required: + - event_type + - step_type + - step_id + title: AgentTurnResponseStepStartPayload + description: >- + Payload for step start events in agent turn responses. + AgentTurnResponseStreamChunk: + type: object + properties: + event: + $ref: '#/components/schemas/AgentTurnResponseEvent' + description: >- + Individual event in the agent turn response stream + additionalProperties: false + required: + - event + title: AgentTurnResponseStreamChunk + description: Streamed agent turn completion response. + "AgentTurnResponseTurnAwaitingInputPayload": + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: turn_awaiting_input + default: turn_awaiting_input + description: Type of event being reported + turn: + $ref: '#/components/schemas/Turn' + description: >- + Turn data when waiting for external tool responses + additionalProperties: false + required: + - event_type + - turn + title: >- + AgentTurnResponseTurnAwaitingInputPayload + description: >- + Payload for turn awaiting input events in agent turn responses. + AgentTurnResponseTurnCompletePayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: turn_complete + default: turn_complete + description: Type of event being reported + turn: + $ref: '#/components/schemas/Turn' + description: >- + Complete turn data including all steps and results + additionalProperties: false + required: + - event_type + - turn + title: AgentTurnResponseTurnCompletePayload + description: >- + Payload for turn completion events in agent turn responses. + AgentTurnResponseTurnStartPayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: turn_start + default: turn_start + description: Type of event being reported + turn_id: + type: string + description: >- + Unique identifier for the turn within a session + additionalProperties: false + required: + - event_type + - turn_id + title: AgentTurnResponseTurnStartPayload + description: >- + Payload for turn start events in agent turn responses. + ImageDelta: + type: object + properties: + type: + type: string + const: image + default: image + description: >- + Discriminator type of the delta. Always "image" + image: + type: string + contentEncoding: base64 + description: The incremental image data as bytes + additionalProperties: false + required: + - type + - image + title: ImageDelta + description: >- + An image content delta for streaming responses. + TextDelta: + type: object + properties: + type: + type: string + const: text + default: text + description: >- + Discriminator type of the delta. Always "text" + text: + type: string + description: The incremental text content + additionalProperties: false + required: + - type + - text + title: TextDelta + description: >- + A text content delta for streaming responses. + ToolCallDelta: + type: object + properties: + type: + type: string + const: tool_call + default: tool_call + description: >- + Discriminator type of the delta. Always "tool_call" + tool_call: + oneOf: + - type: string + - $ref: '#/components/schemas/ToolCall' + description: >- + Either an in-progress tool call string or the final parsed tool call + parse_status: + type: string + enum: + - started + - in_progress + - failed + - succeeded + description: Current parsing status of the tool call + additionalProperties: false + required: + - type + - tool_call + - parse_status + title: ToolCallDelta + description: >- + A tool call content delta for streaming responses. + ResumeAgentTurnRequest: + type: object + properties: + tool_responses: + type: array + items: + $ref: '#/components/schemas/ToolResponse' + description: >- + The tool call responses to resume the turn with. + stream: + type: boolean + description: Whether to stream the response. + additionalProperties: false + required: + - tool_responses + title: ResumeAgentTurnRequest + AgentStepResponse: + type: object + properties: + step: + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep' + tool_execution: '#/components/schemas/ToolExecutionStep' + shield_call: '#/components/schemas/ShieldCallStep' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep' + description: >- + The complete step data and execution details + additionalProperties: false + required: + - step + title: AgentStepResponse + description: >- + Response containing details of a specific agent step. + Benchmark: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_db + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: benchmark + default: benchmark + description: The resource type, always benchmark + dataset_id: + type: string + description: >- + Identifier of the dataset to use for the benchmark evaluation + scoring_functions: + type: array + items: + type: string + description: >- + List of scoring function identifiers to apply during evaluation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Metadata for this evaluation task + additionalProperties: false + required: + - identifier + - provider_id + - type + - dataset_id + - scoring_functions + - metadata + title: Benchmark + description: >- + A benchmark resource for evaluating model performance. + ListBenchmarksResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Benchmark' + additionalProperties: false + required: + - data + title: ListBenchmarksResponse + RegisterBenchmarkRequest: + type: object + properties: + benchmark_id: + type: string + description: The ID of the benchmark to register. + dataset_id: + type: string + description: >- + The ID of the dataset to use for the benchmark. + scoring_functions: + type: array + items: + type: string + description: >- + The scoring functions to use for the benchmark. + provider_benchmark_id: + type: string + description: >- + The ID of the provider benchmark to use for the benchmark. + provider_id: + type: string + description: >- + The ID of the provider to use for the benchmark. + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The metadata to use for the benchmark. + additionalProperties: false + required: + - benchmark_id + - dataset_id + - scoring_functions + title: RegisterBenchmarkRequest + AgentCandidate: + type: object + properties: + type: + type: string + const: agent + default: agent + config: + $ref: '#/components/schemas/AgentConfig' + description: >- + The configuration for the agent candidate. + additionalProperties: false + required: + - type + - config + title: AgentCandidate + description: An agent candidate for evaluation. + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: >- + Types of aggregation functions for scoring results. + BasicScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: basic + default: basic + description: >- + The type of scoring function parameters, always basic + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - aggregation_functions + title: BasicScoringFnParams + description: >- + Parameters for basic scoring function configuration. + BenchmarkConfig: + type: object + properties: + eval_candidate: + oneOf: + - $ref: '#/components/schemas/ModelCandidate' + - $ref: '#/components/schemas/AgentCandidate' + discriminator: + propertyName: type + mapping: + model: '#/components/schemas/ModelCandidate' + agent: '#/components/schemas/AgentCandidate' + description: The candidate to evaluate. + scoring_params: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringFnParams' + description: >- + Map between scoring function id and parameters for each scoring function + you want to run + num_examples: + type: integer + description: >- + (Optional) The number of examples to evaluate. If not provided, all examples + in the dataset will be evaluated + additionalProperties: false + required: + - eval_candidate + - scoring_params + title: BenchmarkConfig + description: >- + A benchmark configuration for evaluation. + LLMAsJudgeScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: llm_as_judge + default: llm_as_judge + description: >- + The type of scoring function parameters, always llm_as_judge + judge_model: + type: string + description: >- + Identifier of the LLM model to use as a judge for scoring + prompt_template: + type: string + description: >- + (Optional) Custom prompt template for the judge model + judge_score_regexes: + type: array + items: + type: string + description: >- + Regexes to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - judge_model + - judge_score_regexes + - aggregation_functions + title: LLMAsJudgeScoringFnParams + description: >- + Parameters for LLM-as-judge scoring function configuration. + ModelCandidate: + type: object + properties: + type: + type: string + const: model + default: model + model: + type: string + description: The model ID to evaluate. + sampling_params: + $ref: '#/components/schemas/SamplingParams' + description: The sampling parameters for the model. + system_message: + $ref: '#/components/schemas/SystemMessage' + description: >- + (Optional) The system message providing instructions or context to the + model. + additionalProperties: false + required: + - type + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + RegexParserScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: regex_parser + default: regex_parser + description: >- + The type of scoring function parameters, always regex_parser + parsing_regexes: + type: array + items: + type: string + description: >- + Regex to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - parsing_regexes + - aggregation_functions + title: RegexParserScoringFnParams + description: >- + Parameters for regex parser scoring function configuration. + ScoringFnParams: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + basic: '#/components/schemas/BasicScoringFnParams' + ScoringFnParamsType: + type: string + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + description: >- + Types of scoring function parameter configurations. + SystemMessage: + type: object + properties: + role: + type: string + const: system + default: system + description: >- + Must be "system" to identify this as a system message + content: + $ref: '#/components/schemas/InterleavedContent' + description: >- + The content of the "system prompt". If multiple system messages are provided, + they are concatenated. The underlying Llama Stack code may also add other + system messages (for example, for formatting tool definitions). + additionalProperties: false + required: + - role + - content + title: SystemMessage + description: >- + A system message providing instructions or context to the model. + EvaluateRowsRequest: + type: object + properties: + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to evaluate. + scoring_functions: + type: array + items: + type: string + description: >- + The scoring functions to use for the evaluation. + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. + additionalProperties: false + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest + EvaluateResponse: + type: object + properties: + generations: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The generations from the evaluation. + scores: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + description: The scores from the evaluation. + additionalProperties: false + required: + - generations + - scores + title: EvaluateResponse + description: The response from an evaluation. + 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 + description: >- + The scoring result for each row. Each row is a map of column name to value. + aggregated_results: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Map of metric name to aggregated value + additionalProperties: false + required: + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + RunEvalRequest: + type: object + properties: + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. + additionalProperties: false + required: + - benchmark_config + title: RunEvalRequest + Job: + type: object + properties: + job_id: + type: string + description: Unique identifier for the job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current execution status of the job + additionalProperties: false + required: + - job_id + - status + title: Job + description: >- + A job execution instance with status tracking. + Checkpoint: + type: object + properties: + identifier: + type: string + description: Unique identifier for the checkpoint + created_at: + type: string + format: date-time + description: >- + Timestamp when the checkpoint was created + epoch: + type: integer + description: >- + Training epoch when the checkpoint was saved + post_training_job_id: + type: string + description: >- + Identifier of the training job that created this checkpoint + path: + type: string + description: >- + File system path where the checkpoint is stored + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' + description: >- + (Optional) Training metrics associated with this checkpoint + additionalProperties: false + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: + type: object + properties: + job_uuid: + type: string + description: Unique identifier for the training job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' + description: >- + List of model checkpoints created during training + additionalProperties: false + required: + - job_uuid + - checkpoints + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: + type: object + properties: + epoch: + type: integer + description: Training epoch number + train_loss: + type: number + description: Loss value on the training dataset + validation_loss: + type: number + description: Loss value on the validation dataset + perplexity: + type: number + description: >- + Perplexity metric indicating model confidence + additionalProperties: false + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: >- + Training metrics captured during post-training jobs. + CancelTrainingJobRequest: + type: object + properties: + job_uuid: + type: string + description: The UUID of the job to cancel. + additionalProperties: false + required: + - job_uuid + title: CancelTrainingJobRequest + PostTrainingJobStatusResponse: + type: object + properties: + job_uuid: + type: string + description: Unique identifier for the training job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current status of the training job + scheduled_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job was scheduled + started_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job execution began + completed_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job finished, if completed + resources_allocated: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Information about computational resources allocated to the + job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' + description: >- + List of model checkpoints created during training + additionalProperties: false + required: + - job_uuid + - status + - checkpoints + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: + type: object + properties: + data: + type: array + items: + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob + additionalProperties: false + required: + - data + title: ListPostTrainingJobsResponse + DPOAlignmentConfig: + type: object + properties: + beta: + type: number + description: Temperature parameter for the DPO loss + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + description: The type of loss function to use for DPO + additionalProperties: false + required: + - beta + - loss_type + title: DPOAlignmentConfig + description: >- + Configuration for Direct Preference Optimization (DPO) alignment. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: + type: object + properties: + dataset_id: + type: string + description: >- + Unique identifier for the training dataset + batch_size: + type: integer + description: Number of samples per training batch + shuffle: + type: boolean + description: >- + Whether to shuffle the dataset during training + data_format: + $ref: '#/components/schemas/DatasetFormat' + description: >- + Format of the dataset (instruct or dialog) + validation_dataset_id: + type: string + description: >- + (Optional) Unique identifier for the validation dataset + packed: + type: boolean + default: false + description: >- + (Optional) Whether to pack multiple samples into a single sequence for + efficiency + train_on_input: + type: boolean + default: false + description: >- + (Optional) Whether to compute loss on input tokens as well as output tokens + additionalProperties: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: >- + Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: + type: object + properties: + enable_activation_checkpointing: + type: boolean + default: false + description: >- + (Optional) Whether to use activation checkpointing to reduce memory usage + enable_activation_offloading: + type: boolean + default: false + description: >- + (Optional) Whether to offload activations to CPU to save GPU memory + memory_efficient_fsdp_wrap: + type: boolean + default: false + description: >- + (Optional) Whether to use memory-efficient FSDP wrapping + fsdp_cpu_offload: + type: boolean + default: false + description: >- + (Optional) Whether to offload FSDP parameters to CPU + additionalProperties: false + title: EfficiencyConfig + description: >- + Configuration for memory and compute efficiency optimizations. + OptimizerConfig: + type: object + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + description: >- + Type of optimizer to use (adam, adamw, or sgd) + lr: + type: number + description: Learning rate for the optimizer + weight_decay: + type: number + description: >- + Weight decay coefficient for regularization + num_warmup_steps: + type: integer + description: Number of steps for learning rate warmup + additionalProperties: false + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: >- + Configuration parameters for the optimization algorithm. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: >- + Available optimizer algorithms for training. + TrainingConfig: + type: object + properties: + n_epochs: + type: integer + description: Number of training epochs to run + max_steps_per_epoch: + type: integer + default: 1 + description: Maximum number of steps to run per epoch + gradient_accumulation_steps: + type: integer + default: 1 + description: >- + Number of steps to accumulate gradients before updating + max_validation_steps: + type: integer + default: 1 + description: >- + (Optional) Maximum number of validation steps per epoch + data_config: + $ref: '#/components/schemas/DataConfig' + description: >- + (Optional) Configuration for data loading and formatting + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + description: >- + (Optional) Configuration for the optimization algorithm + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + description: >- + (Optional) Configuration for memory and compute optimizations + dtype: + type: string + default: bf16 + description: >- + (Optional) Data type for model parameters (bf16, fp16, fp32) + additionalProperties: false + required: + - n_epochs + - max_steps_per_epoch + - gradient_accumulation_steps + title: TrainingConfig + description: >- + Comprehensive configuration for the training process. + PreferenceOptimizeRequest: + type: object + properties: + job_uuid: + type: string + description: The UUID of the job to create. + finetuned_model: + type: string + description: The model to fine-tune. + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + description: The algorithm configuration. + training_config: + $ref: '#/components/schemas/TrainingConfig' + description: The training configuration. + hyperparam_search_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The hyperparam search configuration. + logger_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The logger configuration. + additionalProperties: false + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest + PostTrainingJob: + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob + AlgorithmConfig: + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + LoraFinetuningConfig: + type: object + properties: + type: + type: string + const: LoRA + default: LoRA + description: Algorithm type identifier, always "LoRA" + lora_attn_modules: + type: array + items: + type: string + description: >- + List of attention module names to apply LoRA to + apply_lora_to_mlp: + type: boolean + description: Whether to apply LoRA to MLP layers + apply_lora_to_output: + type: boolean + description: >- + Whether to apply LoRA to output projection layers + rank: + type: integer + description: >- + Rank of the LoRA adaptation (lower rank = fewer parameters) + alpha: + type: integer + description: >- + LoRA scaling parameter that controls adaptation strength + use_dora: + type: boolean + default: false + description: >- + (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation) + quantize_base: + type: boolean + default: false + description: >- + (Optional) Whether to quantize the base model weights + additionalProperties: false + required: + - type + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: >- + Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + QATFinetuningConfig: + type: object + properties: + type: + type: string + const: QAT + default: QAT + description: Algorithm type identifier, always "QAT" + quantizer_name: + type: string + description: >- + Name of the quantization algorithm to use + group_size: + type: integer + description: Size of groups for grouped quantization + additionalProperties: false + required: + - type + - quantizer_name + - group_size + title: QATFinetuningConfig + description: >- + Configuration for Quantization-Aware Training (QAT) fine-tuning. + SupervisedFineTuneRequest: + type: object + properties: + job_uuid: + type: string + description: The UUID of the job to create. + training_config: + $ref: '#/components/schemas/TrainingConfig' + description: The training configuration. + hyperparam_search_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The hyperparam search configuration. + logger_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The logger configuration. + model: + type: string + description: The model to fine-tune. + checkpoint_dir: + type: string + description: The directory to save checkpoint(s) to. + algorithm_config: + $ref: '#/components/schemas/AlgorithmConfig' + description: The algorithm configuration. + additionalProperties: false + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: SupervisedFineTuneRequest + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + title: Bad Request + detail: The request was invalid or malformed + TooManyRequests429: + description: >- + The client has sent too many requests in a given amount of time + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: >- + You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: >- + The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: >- + An unexpected error occurred. Our team has been notified. + DefaultError: + description: An unexpected error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 0 + title: Error + detail: An unexpected error occurred +security: + - Default: [] +tags: + - name: Agents + description: >- + APIs for creating and interacting with agentic systems. + x-displayName: Agents + - name: Benchmarks + - name: Eval + x-displayName: >- + Llama Stack Evaluation API for running evaluations on model and agent candidates. + - name: PostTraining (Coming Soon) +x-tagGroups: + - name: Operations + tags: + - Agents + - Benchmarks + - Eval + - PostTraining (Coming Soon) diff --git a/docs/static/experimental-llama-stack-spec.html b/docs/static/experimental-llama-stack-spec.html new file mode 100644 index 000000000..5532b6def --- /dev/null +++ b/docs/static/experimental-llama-stack-spec.html @@ -0,0 +1,5066 @@ + + + + + + + OpenAPI specification + + + + + + + + + + + + + diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml new file mode 100644 index 000000000..5ed24172a --- /dev/null +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -0,0 +1,3717 @@ +openapi: 3.1.0 +info: + title: >- + Llama Stack Specification - Experimental APIs + version: v1 + 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. + + **๐Ÿงช EXPERIMENTAL**: Pre-release APIs (v1alpha, v1beta) that may change before + becoming stable. +servers: + - url: http://any-hosted-llama-stack.com +paths: + /v1alpha/agents: + get: + responses: + '200': + description: A PaginatedResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: List all agents. + description: List all agents. + parameters: + - name: start_index + in: query + description: The index to start the pagination from. + required: false + schema: + type: integer + - name: limit + in: query + description: The number of agents to return. + required: false + schema: + type: integer + deprecated: false + post: + responses: + '200': + description: >- + An AgentCreateResponse with the agent ID. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentCreateResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: >- + Create an agent with the given configuration. + description: >- + Create an agent with the given configuration. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentRequest' + required: true + deprecated: false + /v1alpha/agents/{agent_id}: + get: + responses: + '200': + description: An Agent of the agent. + content: + application/json: + schema: + $ref: '#/components/schemas/Agent' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Describe an agent by its ID. + description: Describe an agent by its ID. + parameters: + - name: agent_id + in: path + description: ID of the agent. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: >- + Delete an agent by its ID and its associated sessions and turns. + description: >- + Delete an agent by its ID and its associated sessions and turns. + parameters: + - name: agent_id + in: path + description: The ID of the agent to delete. + required: true + schema: + type: string + deprecated: false + /v1alpha/agents/{agent_id}/session: + post: + responses: + '200': + description: An AgentSessionCreateResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentSessionCreateResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Create a new session for an agent. + description: Create a new session for an agent. + parameters: + - name: agent_id + in: path + description: >- + The ID of the agent to create the session for. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentSessionRequest' + required: true + deprecated: false + /v1alpha/agents/{agent_id}/session/{session_id}: + get: + responses: + '200': + description: A Session. + content: + application/json: + schema: + $ref: '#/components/schemas/Session' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Retrieve an agent session by its ID. + description: Retrieve an agent session by its ID. + parameters: + - name: session_id + in: path + description: The ID of the session to get. + required: true + schema: + type: string + - name: agent_id + in: path + description: >- + The ID of the agent to get the session for. + required: true + schema: + type: string + - name: turn_ids + in: query + description: >- + (Optional) List of turn IDs to filter the session by. + required: false + schema: + type: array + items: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: >- + Delete an agent session by its ID and its associated turns. + description: >- + Delete an agent session by its ID and its associated turns. + parameters: + - name: session_id + in: path + description: The ID of the session to delete. + required: true + schema: + type: string + - name: agent_id + in: path + description: >- + The ID of the agent to delete the session for. + required: true + schema: + type: string + deprecated: false + /v1alpha/agents/{agent_id}/session/{session_id}/turn: + post: + responses: + '200': + description: >- + If stream=False, returns a Turn object. If stream=True, returns an SSE + event stream of AgentTurnResponseStreamChunk. + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + text/event-stream: + schema: + $ref: '#/components/schemas/AgentTurnResponseStreamChunk' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Create a new turn for an agent. + description: Create a new turn for an agent. + parameters: + - name: agent_id + in: path + description: >- + The ID of the agent to create the turn for. + required: true + schema: + type: string + - name: session_id + in: path + description: >- + The ID of the session to create the turn for. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentTurnRequest' + required: true + deprecated: false + /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}: + get: + responses: + '200': + description: A Turn. + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Retrieve an agent turn by its ID. + description: Retrieve an agent turn by its ID. + parameters: + - name: agent_id + in: path + description: The ID of the agent to get the turn for. + required: true + schema: + type: string + - name: session_id + in: path + description: >- + The ID of the session to get the turn for. + required: true + schema: + type: string + - name: turn_id + in: path + description: The ID of the turn to get. + required: true + schema: + type: string + deprecated: false + /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume: + post: + responses: + '200': + description: >- + A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk + objects. + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + text/event-stream: + schema: + $ref: '#/components/schemas/AgentTurnResponseStreamChunk' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: >- + Resume an agent turn with executed tool call responses. + description: >- + Resume an agent turn with executed tool call responses. + + When a Turn has the status `awaiting_input` due to pending input from client + side tool calls, this endpoint can be used to submit the outputs from the + tool calls once they are ready. + parameters: + - name: agent_id + in: path + description: The ID of the agent to resume. + required: true + schema: + type: string + - name: session_id + in: path + description: The ID of the session to resume. + required: true + schema: + type: string + - name: turn_id + in: path + description: The ID of the turn to resume. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResumeAgentTurnRequest' + required: true + deprecated: false + /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: + get: + responses: + '200': + description: An AgentStepResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/AgentStepResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Retrieve an agent step by its ID. + description: Retrieve an agent step by its ID. + parameters: + - name: agent_id + in: path + description: The ID of the agent to get the step for. + required: true + schema: + type: string + - name: session_id + in: path + description: >- + The ID of the session to get the step for. + required: true + schema: + type: string + - name: turn_id + in: path + description: The ID of the turn to get the step for. + required: true + schema: + type: string + - name: step_id + in: path + description: The ID of the step to get. + required: true + schema: + type: string + deprecated: false + /v1alpha/agents/{agent_id}/sessions: + get: + responses: + '200': + description: A PaginatedResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: List all session(s) of a given agent. + description: List all session(s) of a given agent. + parameters: + - name: agent_id + in: path + description: >- + The ID of the agent to list sessions for. + required: true + schema: + type: string + - name: start_index + in: query + description: The index to start the pagination from. + required: false + schema: + type: integer + - name: limit + in: query + description: The number of sessions to return. + required: false + schema: + type: integer + deprecated: false + /v1alpha/eval/benchmarks: + get: + responses: + '200': + description: A ListBenchmarksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBenchmarksResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: List all benchmarks. + description: List all benchmarks. + parameters: [] + deprecated: false + post: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Register a benchmark. + description: Register a benchmark. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterBenchmarkRequest' + required: true + deprecated: false + /v1alpha/eval/benchmarks/{benchmark_id}: + get: + responses: + '200': + description: A Benchmark. + content: + application/json: + schema: + $ref: '#/components/schemas/Benchmark' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Get a benchmark by its ID. + description: Get a benchmark by its ID. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to get. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Benchmarks + summary: Unregister a benchmark. + description: Unregister a benchmark. + parameters: + - name: benchmark_id + in: path + description: The ID of the benchmark to unregister. + required: true + schema: + type: string + deprecated: false + /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: + post: + responses: + '200': + description: >- + EvaluateResponse object containing generations and scores. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluateResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Evaluate a list of rows on a benchmark. + description: Evaluate a list of rows on a benchmark. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluateRowsRequest' + required: true + deprecated: false + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + post: + responses: + '200': + description: >- + The job that was created to run the evaluation. + content: + application/json: + schema: + $ref: '#/components/schemas/Job' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Run an evaluation on a benchmark. + description: Run an evaluation on a benchmark. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunEvalRequest' + required: true + deprecated: false + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + get: + responses: + '200': + description: The status of the evaluation job. + content: + application/json: + schema: + $ref: '#/components/schemas/Job' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Get the status of a job. + description: Get the status of a job. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + - name: job_id + in: path + description: The ID of the job to get the status of. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Cancel a job. + description: Cancel a job. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + - name: job_id + in: path + description: The ID of the job to cancel. + required: true + schema: + type: string + deprecated: false + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: + get: + responses: + '200': + description: The result of the job. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluateResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Eval + summary: Get the result of a job. + description: Get the result of a job. + parameters: + - name: benchmark_id + in: path + description: >- + The ID of the benchmark to run the evaluation on. + required: true + schema: + type: string + - name: job_id + in: path + description: The ID of the job to get the result of. + required: true + schema: + type: string + deprecated: false + /v1alpha/inference/rerank: + post: + responses: + '200': + description: >- + RerankResponse with indices sorted by relevance score (descending). + content: + application/json: + schema: + $ref: '#/components/schemas/RerankResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: >- + Rerank a list of documents based on their relevance to a query. + description: >- + Rerank a list of documents based on their relevance to a query. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RerankRequest' + required: true + deprecated: false + /v1alpha/post-training/job/artifacts: + get: + responses: + '200': + description: A PostTrainingJobArtifactsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Get the artifacts of a training job. + description: Get the artifacts of a training job. + parameters: + - name: job_uuid + in: query + description: >- + The UUID of the job to get the artifacts of. + required: true + schema: + type: string + deprecated: false + /v1alpha/post-training/job/cancel: + post: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Cancel a training job. + description: Cancel a training job. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CancelTrainingJobRequest' + required: true + deprecated: false + /v1alpha/post-training/job/status: + get: + responses: + '200': + description: A PostTrainingJobStatusResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJobStatusResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Get the status of a training job. + description: Get the status of a training job. + parameters: + - name: job_uuid + in: query + description: >- + The UUID of the job to get the status of. + required: true + schema: + type: string + deprecated: false + /v1alpha/post-training/jobs: + get: + responses: + '200': + description: A ListPostTrainingJobsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPostTrainingJobsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Get all training jobs. + description: Get all training jobs. + parameters: [] + deprecated: false + /v1alpha/post-training/preference-optimize: + post: + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Run preference optimization of a model. + description: Run preference optimization of a model. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreferenceOptimizeRequest' + required: true + deprecated: false + /v1alpha/post-training/supervised-fine-tune: + post: + responses: + '200': + description: A PostTrainingJob. + content: + application/json: + schema: + $ref: '#/components/schemas/PostTrainingJob' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - PostTraining (Coming Soon) + summary: Run supervised fine-tuning of a model. + description: Run supervised fine-tuning of a model. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SupervisedFineTuneRequest' + required: true + deprecated: false +jsonSchemaDialect: >- + https://json-schema.org/draft/2020-12/schema +components: + schemas: + Error: + type: object + properties: + status: + type: integer + description: HTTP status code + title: + type: string + description: >- + Error title, a short summary of the error which is invariant for an error + type + detail: + type: string + description: >- + Error detail, a longer human-readable description of the error + instance: + type: string + description: >- + (Optional) A URL which can be used to retrieve more information about + the specific occurrence of the error + additionalProperties: false + required: + - status + - title + - detail + title: Error + description: >- + Error response from the API. Roughly follows RFC 7807. + PaginatedResponse: + type: object + properties: + data: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The list of items for the current page + has_more: + type: boolean + description: >- + Whether there are more items available after this set + url: + type: string + description: The URL for accessing this list + additionalProperties: false + required: + - data + - has_more + title: PaginatedResponse + description: >- + A generic paginated response that follows a simple format. + AgentConfig: + type: object + properties: + sampling_params: + $ref: '#/components/schemas/SamplingParams' + input_shields: + type: array + items: + type: string + output_shields: + type: array + items: + type: string + toolgroups: + type: array + items: + $ref: '#/components/schemas/AgentTool' + client_tools: + type: array + items: + $ref: '#/components/schemas/ToolDef' + tool_choice: + type: string + enum: + - auto + - required + - none + title: ToolChoice + description: >- + Whether tool use is required or automatic. This is a hint to the model + which may not be followed. It depends on the Instruction Following capabilities + of the model. + deprecated: true + tool_prompt_format: + type: string + enum: + - json + - function_tag + - python_list + title: ToolPromptFormat + description: >- + Prompt format for calling custom / zero shot tools. + deprecated: true + tool_config: + $ref: '#/components/schemas/ToolConfig' + max_infer_iters: + type: integer + default: 10 + model: + type: string + description: >- + The model identifier to use for the agent + instructions: + type: string + description: The system instructions for the agent + name: + type: string + description: >- + Optional name for the agent, used in telemetry and identification + enable_session_persistence: + type: boolean + default: false + description: >- + Optional flag indicating whether session data has to be persisted + response_format: + $ref: '#/components/schemas/ResponseFormat' + description: Optional response format configuration + additionalProperties: false + required: + - model + - instructions + title: AgentConfig + description: Configuration for an agent. + AgentTool: + oneOf: + - type: string + - type: object + properties: + name: + type: string + args: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + additionalProperties: false + required: + - name + - args + title: AgentToolGroupWithArgs + GrammarResponseFormat: + type: object + properties: + type: + type: string + enum: + - json_schema + - grammar + description: >- + Must be "grammar" to identify this format type + const: grammar + default: grammar + bnf: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The BNF grammar specification the response should conform to + additionalProperties: false + required: + - type + - bnf + title: GrammarResponseFormat + description: >- + Configuration for grammar-guided response generation. + GreedySamplingStrategy: + type: object + properties: + type: + type: string + const: greedy + default: greedy + description: >- + Must be "greedy" to identify this sampling strategy + additionalProperties: false + required: + - type + title: GreedySamplingStrategy + description: >- + Greedy sampling strategy that selects the highest probability token at each + step. + JsonSchemaResponseFormat: + type: object + properties: + type: + type: string + enum: + - json_schema + - grammar + description: >- + Must be "json_schema" to identify this format type + const: json_schema + default: json_schema + json_schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The JSON schema the response should conform to. In a Python SDK, this + is often a `pydantic` model. + additionalProperties: false + required: + - type + - json_schema + title: JsonSchemaResponseFormat + description: >- + Configuration for JSON schema-guided response generation. + ResponseFormat: + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + discriminator: + propertyName: type + mapping: + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + grammar: '#/components/schemas/GrammarResponseFormat' + SamplingParams: + type: object + properties: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + description: The sampling strategy. + max_tokens: + type: integer + default: 0 + description: >- + The maximum number of tokens that can be generated in the completion. + The token count of your prompt plus max_tokens cannot exceed the model's + context length. + repetition_penalty: + type: number + default: 1.0 + description: >- + Number between -2.0 and 2.0. Positive values penalize new tokens based + on whether they appear in the text so far, increasing the model's likelihood + to talk about new topics. + stop: + type: array + items: + type: string + description: >- + Up to 4 sequences where the API will stop generating further tokens. The + returned text will not contain the stop sequence. + additionalProperties: false + required: + - strategy + title: SamplingParams + description: Sampling parameters. + ToolConfig: + type: object + properties: + tool_choice: + oneOf: + - type: string + enum: + - auto + - required + - none + title: ToolChoice + description: >- + Whether tool use is required or automatic. This is a hint to the model + which may not be followed. It depends on the Instruction Following + capabilities of the model. + - type: string + default: auto + description: >- + (Optional) Whether tool use is automatic, required, or none. Can also + specify a tool name to use a specific tool. Defaults to ToolChoice.auto. + tool_prompt_format: + type: string + enum: + - json + - function_tag + - python_list + description: >- + (Optional) Instructs the model how to format tool calls. By default, Llama + Stack will attempt to use a format that is best adapted to the model. + - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. + - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a + tag. - `ToolPromptFormat.python_list`: The tool calls are output as Python + syntax -- a list of function calls. + system_message_behavior: + type: string + enum: + - append + - replace + description: >- + (Optional) Config for how to override the default system prompt. - `SystemMessageBehavior.append`: + Appends the provided system message to the default system prompt. - `SystemMessageBehavior.replace`: + Replaces the default system prompt with the provided system message. The + system message can include the string '{{function_definitions}}' to indicate + where the function definitions should be inserted. + default: append + additionalProperties: false + title: ToolConfig + description: Configuration for tool use. + ToolDef: + type: object + properties: + name: + type: string + description: Name of the tool + description: + type: string + description: >- + (Optional) Human-readable description of what the tool does + parameters: + type: array + items: + $ref: '#/components/schemas/ToolParameter' + description: >- + (Optional) List of parameters this tool accepts + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool + additionalProperties: false + required: + - name + title: ToolDef + description: >- + Tool definition used in runtime contexts. + ToolParameter: + type: object + properties: + name: + type: string + description: Name of the parameter + parameter_type: + type: string + description: >- + Type of the parameter (e.g., string, integer) + description: + type: string + description: >- + Human-readable description of what the parameter does + required: + type: boolean + default: true + description: >- + Whether this parameter is required for tool invocation + items: + type: object + description: >- + Type of the elements when parameter_type is array + title: + type: string + description: (Optional) Title of the parameter + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Default value for the parameter if not provided + additionalProperties: false + required: + - name + - parameter_type + - description + - required + title: ToolParameter + description: Parameter definition for a tool. + TopKSamplingStrategy: + type: object + properties: + type: + type: string + const: top_k + default: top_k + description: >- + Must be "top_k" to identify this sampling strategy + top_k: + type: integer + description: >- + Number of top tokens to consider for sampling. Must be at least 1 + additionalProperties: false + required: + - type + - top_k + title: TopKSamplingStrategy + description: >- + Top-k sampling strategy that restricts sampling to the k most likely tokens. + TopPSamplingStrategy: + type: object + properties: + type: + type: string + const: top_p + default: top_p + description: >- + Must be "top_p" to identify this sampling strategy + temperature: + type: number + description: >- + Controls randomness in sampling. Higher values increase randomness + top_p: + type: number + default: 0.95 + description: >- + Cumulative probability threshold for nucleus sampling. Defaults to 0.95 + additionalProperties: false + required: + - type + title: TopPSamplingStrategy + description: >- + Top-p (nucleus) sampling strategy that samples from the smallest set of tokens + with cumulative probability >= p. + CreateAgentRequest: + type: object + properties: + agent_config: + $ref: '#/components/schemas/AgentConfig' + description: The configuration for the agent. + additionalProperties: false + required: + - agent_config + title: CreateAgentRequest + AgentCreateResponse: + type: object + properties: + agent_id: + type: string + description: Unique identifier for the created agent + additionalProperties: false + required: + - agent_id + title: AgentCreateResponse + description: >- + Response returned when creating a new agent. + Agent: + type: object + properties: + agent_id: + type: string + description: Unique identifier for the agent + agent_config: + $ref: '#/components/schemas/AgentConfig' + description: Configuration settings for the agent + created_at: + type: string + format: date-time + description: Timestamp when the agent was created + additionalProperties: false + required: + - agent_id + - agent_config + - created_at + title: Agent + description: >- + An agent instance with configuration and metadata. + CreateAgentSessionRequest: + type: object + properties: + session_name: + type: string + description: The name of the session to create. + additionalProperties: false + required: + - session_name + title: CreateAgentSessionRequest + AgentSessionCreateResponse: + type: object + properties: + session_id: + type: string + description: >- + Unique identifier for the created session + additionalProperties: false + required: + - session_id + title: AgentSessionCreateResponse + description: >- + Response returned when creating a new agent session. + CompletionMessage: + type: object + properties: + role: + type: string + const: assistant + default: assistant + description: >- + Must be "assistant" to identify this as the model's response + content: + $ref: '#/components/schemas/InterleavedContent' + description: The content of the model's response + stop_reason: + type: string + enum: + - end_of_turn + - end_of_message + - out_of_tokens + description: >- + Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: + The model finished generating the entire response. - `StopReason.end_of_message`: + The model finished generating but generated a partial response -- usually, + a tool call. The user may call the tool and continue the conversation + with the tool's response. - `StopReason.out_of_tokens`: The model ran + out of token budget. + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + description: >- + List of tool calls. Each tool call is a ToolCall object. + additionalProperties: false + required: + - role + - content + - stop_reason + title: CompletionMessage + description: >- + A message containing the model's (assistant) response in a chat conversation. + ImageContentItem: + type: object + properties: + type: + type: string + const: image + default: image + description: >- + Discriminator type of the content item. Always "image" + image: + type: object + properties: + url: + $ref: '#/components/schemas/URL' + description: >- + A URL of the image or data URL in the format of data:image/{type};base64,{data}. + Note that URL could have length limits. + data: + type: string + contentEncoding: base64 + description: base64 encoded image data as string + additionalProperties: false + description: >- + Image as a base64 encoded string or an URL + additionalProperties: false + required: + - type + - image + title: ImageContentItem + description: A image content item + InferenceStep: + type: object + properties: + turn_id: + type: string + description: The ID of the turn. + step_id: + type: string + description: The ID of the step. + started_at: + type: string + format: date-time + description: The time the step started. + completed_at: + type: string + format: date-time + description: The time the step completed. + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + title: StepType + description: Type of the step in an agent turn. + const: inference + default: inference + model_response: + $ref: '#/components/schemas/CompletionMessage' + description: The response from the LLM. + additionalProperties: false + required: + - turn_id + - step_id + - step_type + - model_response + title: InferenceStep + description: An inference step in an agent turn. + InterleavedContent: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + InterleavedContentItem: + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + MemoryRetrievalStep: + type: object + properties: + turn_id: + type: string + description: The ID of the turn. + step_id: + type: string + description: The ID of the step. + started_at: + type: string + format: date-time + description: The time the step started. + completed_at: + type: string + format: date-time + description: The time the step completed. + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + title: StepType + description: Type of the step in an agent turn. + const: memory_retrieval + default: memory_retrieval + vector_db_ids: + type: string + description: >- + The IDs of the vector databases to retrieve context from. + inserted_context: + $ref: '#/components/schemas/InterleavedContent' + description: >- + The context retrieved from the vector databases. + additionalProperties: false + required: + - turn_id + - step_id + - step_type + - vector_db_ids + - inserted_context + title: MemoryRetrievalStep + description: >- + A memory retrieval step in an agent turn. + SafetyViolation: + type: object + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + description: Severity level of the violation + user_message: + type: string + description: >- + (Optional) Message to convey to the user about the violation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Additional metadata including specific violation codes for debugging and + telemetry + additionalProperties: false + required: + - violation_level + - metadata + title: SafetyViolation + description: >- + Details of a safety violation detected by content moderation. + Session: + type: object + properties: + session_id: + type: string + description: >- + Unique identifier for the conversation session + session_name: + type: string + description: Human-readable name for the session + turns: + type: array + items: + $ref: '#/components/schemas/Turn' + description: >- + List of all turns that have occurred in this session + started_at: + type: string + format: date-time + description: Timestamp when the session was created + additionalProperties: false + required: + - session_id + - session_name + - turns + - started_at + title: Session + description: >- + A single session of an interaction with an Agentic System. + ShieldCallStep: + type: object + properties: + turn_id: + type: string + description: The ID of the turn. + step_id: + type: string + description: The ID of the step. + started_at: + type: string + format: date-time + description: The time the step started. + completed_at: + type: string + format: date-time + description: The time the step completed. + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + title: StepType + description: Type of the step in an agent turn. + const: shield_call + default: shield_call + violation: + $ref: '#/components/schemas/SafetyViolation' + description: The violation from the shield call. + additionalProperties: false + required: + - turn_id + - step_id + - step_type + title: ShieldCallStep + description: A shield call step in an agent turn. + TextContentItem: + type: object + properties: + type: + type: string + const: text + default: text + description: >- + Discriminator type of the content item. Always "text" + text: + type: string + description: Text content + additionalProperties: false + required: + - type + - text + title: TextContentItem + description: A text content item + ToolCall: + type: object + properties: + call_id: + type: string + tool_name: + oneOf: + - type: string + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + - type: string + arguments: + oneOf: + - type: string + - 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' + arguments_json: + type: string + additionalProperties: false + required: + - call_id + - tool_name + - arguments + title: ToolCall + ToolExecutionStep: + type: object + properties: + turn_id: + type: string + description: The ID of the turn. + step_id: + type: string + description: The ID of the step. + started_at: + type: string + format: date-time + description: The time the step started. + completed_at: + type: string + format: date-time + description: The time the step completed. + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + title: StepType + description: Type of the step in an agent turn. + const: tool_execution + default: tool_execution + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + description: The tool calls to execute. + tool_responses: + type: array + items: + $ref: '#/components/schemas/ToolResponse' + description: The tool responses from the tool calls. + additionalProperties: false + required: + - turn_id + - step_id + - step_type + - tool_calls + - tool_responses + title: ToolExecutionStep + description: A tool execution step in an agent turn. + ToolResponse: + type: object + properties: + call_id: + type: string + description: >- + Unique identifier for the tool call this response is for + tool_name: + oneOf: + - type: string + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + - type: string + description: Name of the tool that was invoked + content: + $ref: '#/components/schemas/InterleavedContent' + description: The response content from the tool + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool response + additionalProperties: false + required: + - call_id + - tool_name + - content + title: ToolResponse + description: Response from a tool invocation. + ToolResponseMessage: + type: object + properties: + role: + type: string + const: tool + default: tool + description: >- + Must be "tool" to identify this as a tool response + call_id: + type: string + description: >- + Unique identifier for the tool call this response is for + content: + $ref: '#/components/schemas/InterleavedContent' + description: The response content from the tool + additionalProperties: false + required: + - role + - call_id + - content + title: ToolResponseMessage + description: >- + A message representing the result of a tool invocation. + Turn: + type: object + properties: + turn_id: + type: string + description: >- + Unique identifier for the turn within a session + session_id: + type: string + description: >- + Unique identifier for the conversation session + input_messages: + type: array + items: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + description: >- + List of messages that initiated this turn + steps: + type: array + items: + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep' + tool_execution: '#/components/schemas/ToolExecutionStep' + shield_call: '#/components/schemas/ShieldCallStep' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep' + description: >- + Ordered list of processing steps executed during this turn + output_message: + $ref: '#/components/schemas/CompletionMessage' + description: >- + The model's generated response containing content and metadata + output_attachments: + type: array + items: + type: object + properties: + content: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + - $ref: '#/components/schemas/URL' + description: The content of the attachment. + mime_type: + type: string + description: The MIME type of the attachment. + additionalProperties: false + required: + - content + - mime_type + title: Attachment + description: An attachment to an agent turn. + description: >- + (Optional) Files or media attached to the agent's response + started_at: + type: string + format: date-time + description: Timestamp when the turn began + completed_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the turn finished, if completed + additionalProperties: false + required: + - turn_id + - session_id + - input_messages + - steps + - output_message + - started_at + title: Turn + description: >- + A single turn in an interaction with an Agentic System. + URL: + type: object + properties: + uri: + type: string + description: The URL string pointing to the resource + additionalProperties: false + required: + - uri + title: URL + description: A URL reference to external content. + UserMessage: + type: object + properties: + role: + type: string + const: user + default: user + description: >- + Must be "user" to identify this as a user message + content: + $ref: '#/components/schemas/InterleavedContent' + description: >- + The content of the message, which can include text and other media + context: + $ref: '#/components/schemas/InterleavedContent' + description: >- + (Optional) This field is used internally by Llama Stack to pass RAG context. + This field may be removed in the API in the future. + additionalProperties: false + required: + - role + - content + title: UserMessage + description: >- + A message from the user in a chat conversation. + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. + CreateAgentTurnRequest: + type: object + properties: + messages: + type: array + items: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + description: List of messages to start the turn with. + stream: + type: boolean + description: >- + (Optional) If True, generate an SSE event stream of the response. Defaults + to False. + documents: + type: array + items: + type: object + properties: + content: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + - $ref: '#/components/schemas/URL' + description: The content of the document. + mime_type: + type: string + description: The MIME type of the document. + additionalProperties: false + required: + - content + - mime_type + title: Document + description: A document to be used by an agent. + description: >- + (Optional) List of documents to create the turn with. + toolgroups: + type: array + items: + $ref: '#/components/schemas/AgentTool' + description: >- + (Optional) List of toolgroups to create the turn with, will be used in + addition to the agent's config toolgroups for the request. + tool_config: + $ref: '#/components/schemas/ToolConfig' + description: >- + (Optional) The tool configuration to create the turn with, will be used + to override the agent's tool_config. + additionalProperties: false + required: + - messages + title: CreateAgentTurnRequest + 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' + - $ref: '#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload' + discriminator: + propertyName: event_type + mapping: + step_start: '#/components/schemas/AgentTurnResponseStepStartPayload' + step_progress: '#/components/schemas/AgentTurnResponseStepProgressPayload' + step_complete: '#/components/schemas/AgentTurnResponseStepCompletePayload' + turn_start: '#/components/schemas/AgentTurnResponseTurnStartPayload' + turn_complete: '#/components/schemas/AgentTurnResponseTurnCompletePayload' + turn_awaiting_input: '#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload' + description: >- + Event-specific payload containing event data + additionalProperties: false + required: + - payload + title: AgentTurnResponseEvent + description: >- + An event in an agent turn response stream. + AgentTurnResponseStepCompletePayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: step_complete + default: step_complete + description: Type of event being reported + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + description: Type of step being executed + step_id: + type: string + description: >- + Unique identifier for the step within a turn + step_details: + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep' + tool_execution: '#/components/schemas/ToolExecutionStep' + shield_call: '#/components/schemas/ShieldCallStep' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep' + description: Complete details of the executed step + additionalProperties: false + required: + - event_type + - step_type + - step_id + - step_details + title: AgentTurnResponseStepCompletePayload + description: >- + Payload for step completion events in agent turn responses. + AgentTurnResponseStepProgressPayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: step_progress + default: step_progress + description: Type of event being reported + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + description: Type of step being executed + step_id: + type: string + description: >- + Unique identifier for the step within a turn + delta: + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/TextDelta' + image: '#/components/schemas/ImageDelta' + tool_call: '#/components/schemas/ToolCallDelta' + description: >- + Incremental content changes during step execution + additionalProperties: false + required: + - event_type + - step_type + - step_id + - delta + title: AgentTurnResponseStepProgressPayload + description: >- + Payload for step progress events in agent turn responses. + AgentTurnResponseStepStartPayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: step_start + default: step_start + description: Type of event being reported + step_type: + type: string + enum: + - inference + - tool_execution + - shield_call + - memory_retrieval + description: Type of step being executed + step_id: + type: string + description: >- + Unique identifier for the step within a turn + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata for the step + additionalProperties: false + required: + - event_type + - step_type + - step_id + title: AgentTurnResponseStepStartPayload + description: >- + Payload for step start events in agent turn responses. + AgentTurnResponseStreamChunk: + type: object + properties: + event: + $ref: '#/components/schemas/AgentTurnResponseEvent' + description: >- + Individual event in the agent turn response stream + additionalProperties: false + required: + - event + title: AgentTurnResponseStreamChunk + description: Streamed agent turn completion response. + "AgentTurnResponseTurnAwaitingInputPayload": + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: turn_awaiting_input + default: turn_awaiting_input + description: Type of event being reported + turn: + $ref: '#/components/schemas/Turn' + description: >- + Turn data when waiting for external tool responses + additionalProperties: false + required: + - event_type + - turn + title: >- + AgentTurnResponseTurnAwaitingInputPayload + description: >- + Payload for turn awaiting input events in agent turn responses. + AgentTurnResponseTurnCompletePayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: turn_complete + default: turn_complete + description: Type of event being reported + turn: + $ref: '#/components/schemas/Turn' + description: >- + Complete turn data including all steps and results + additionalProperties: false + required: + - event_type + - turn + title: AgentTurnResponseTurnCompletePayload + description: >- + Payload for turn completion events in agent turn responses. + AgentTurnResponseTurnStartPayload: + type: object + properties: + event_type: + type: string + enum: + - step_start + - step_complete + - step_progress + - turn_start + - turn_complete + - turn_awaiting_input + const: turn_start + default: turn_start + description: Type of event being reported + turn_id: + type: string + description: >- + Unique identifier for the turn within a session + additionalProperties: false + required: + - event_type + - turn_id + title: AgentTurnResponseTurnStartPayload + description: >- + Payload for turn start events in agent turn responses. + ImageDelta: + type: object + properties: + type: + type: string + const: image + default: image + description: >- + Discriminator type of the delta. Always "image" + image: + type: string + contentEncoding: base64 + description: The incremental image data as bytes + additionalProperties: false + required: + - type + - image + title: ImageDelta + description: >- + An image content delta for streaming responses. + TextDelta: + type: object + properties: + type: + type: string + const: text + default: text + description: >- + Discriminator type of the delta. Always "text" + text: + type: string + description: The incremental text content + additionalProperties: false + required: + - type + - text + title: TextDelta + description: >- + A text content delta for streaming responses. + ToolCallDelta: + type: object + properties: + type: + type: string + const: tool_call + default: tool_call + description: >- + Discriminator type of the delta. Always "tool_call" + tool_call: + oneOf: + - type: string + - $ref: '#/components/schemas/ToolCall' + description: >- + Either an in-progress tool call string or the final parsed tool call + parse_status: + type: string + enum: + - started + - in_progress + - failed + - succeeded + description: Current parsing status of the tool call + additionalProperties: false + required: + - type + - tool_call + - parse_status + title: ToolCallDelta + description: >- + A tool call content delta for streaming responses. + ResumeAgentTurnRequest: + type: object + properties: + tool_responses: + type: array + items: + $ref: '#/components/schemas/ToolResponse' + description: >- + The tool call responses to resume the turn with. + stream: + type: boolean + description: Whether to stream the response. + additionalProperties: false + required: + - tool_responses + title: ResumeAgentTurnRequest + AgentStepResponse: + type: object + properties: + step: + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep' + tool_execution: '#/components/schemas/ToolExecutionStep' + shield_call: '#/components/schemas/ShieldCallStep' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep' + description: >- + The complete step data and execution details + additionalProperties: false + required: + - step + title: AgentStepResponse + description: >- + Response containing details of a specific agent step. + Benchmark: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_db + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: benchmark + default: benchmark + description: The resource type, always benchmark + dataset_id: + type: string + description: >- + Identifier of the dataset to use for the benchmark evaluation + scoring_functions: + type: array + items: + type: string + description: >- + List of scoring function identifiers to apply during evaluation + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Metadata for this evaluation task + additionalProperties: false + required: + - identifier + - provider_id + - type + - dataset_id + - scoring_functions + - metadata + title: Benchmark + description: >- + A benchmark resource for evaluating model performance. + ListBenchmarksResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Benchmark' + additionalProperties: false + required: + - data + title: ListBenchmarksResponse + RegisterBenchmarkRequest: + type: object + properties: + benchmark_id: + type: string + description: The ID of the benchmark to register. + dataset_id: + type: string + description: >- + The ID of the dataset to use for the benchmark. + scoring_functions: + type: array + items: + type: string + description: >- + The scoring functions to use for the benchmark. + provider_benchmark_id: + type: string + description: >- + The ID of the provider benchmark to use for the benchmark. + provider_id: + type: string + description: >- + The ID of the provider to use for the benchmark. + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The metadata to use for the benchmark. + additionalProperties: false + required: + - benchmark_id + - dataset_id + - scoring_functions + title: RegisterBenchmarkRequest + AgentCandidate: + type: object + properties: + type: + type: string + const: agent + default: agent + config: + $ref: '#/components/schemas/AgentConfig' + description: >- + The configuration for the agent candidate. + additionalProperties: false + required: + - type + - config + title: AgentCandidate + description: An agent candidate for evaluation. + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: >- + Types of aggregation functions for scoring results. + BasicScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: basic + default: basic + description: >- + The type of scoring function parameters, always basic + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - aggregation_functions + title: BasicScoringFnParams + description: >- + Parameters for basic scoring function configuration. + BenchmarkConfig: + type: object + properties: + eval_candidate: + oneOf: + - $ref: '#/components/schemas/ModelCandidate' + - $ref: '#/components/schemas/AgentCandidate' + discriminator: + propertyName: type + mapping: + model: '#/components/schemas/ModelCandidate' + agent: '#/components/schemas/AgentCandidate' + description: The candidate to evaluate. + scoring_params: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringFnParams' + description: >- + Map between scoring function id and parameters for each scoring function + you want to run + num_examples: + type: integer + description: >- + (Optional) The number of examples to evaluate. If not provided, all examples + in the dataset will be evaluated + additionalProperties: false + required: + - eval_candidate + - scoring_params + title: BenchmarkConfig + description: >- + A benchmark configuration for evaluation. + LLMAsJudgeScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: llm_as_judge + default: llm_as_judge + description: >- + The type of scoring function parameters, always llm_as_judge + judge_model: + type: string + description: >- + Identifier of the LLM model to use as a judge for scoring + prompt_template: + type: string + description: >- + (Optional) Custom prompt template for the judge model + judge_score_regexes: + type: array + items: + type: string + description: >- + Regexes to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - judge_model + - judge_score_regexes + - aggregation_functions + title: LLMAsJudgeScoringFnParams + description: >- + Parameters for LLM-as-judge scoring function configuration. + ModelCandidate: + type: object + properties: + type: + type: string + const: model + default: model + model: + type: string + description: The model ID to evaluate. + sampling_params: + $ref: '#/components/schemas/SamplingParams' + description: The sampling parameters for the model. + system_message: + $ref: '#/components/schemas/SystemMessage' + description: >- + (Optional) The system message providing instructions or context to the + model. + additionalProperties: false + required: + - type + - model + - sampling_params + title: ModelCandidate + description: A model candidate for evaluation. + RegexParserScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: regex_parser + default: regex_parser + description: >- + The type of scoring function parameters, always regex_parser + parsing_regexes: + type: array + items: + type: string + description: >- + Regex to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - parsing_regexes + - aggregation_functions + title: RegexParserScoringFnParams + description: >- + Parameters for regex parser scoring function configuration. + ScoringFnParams: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + basic: '#/components/schemas/BasicScoringFnParams' + ScoringFnParamsType: + type: string + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + description: >- + Types of scoring function parameter configurations. + SystemMessage: + type: object + properties: + role: + type: string + const: system + default: system + description: >- + Must be "system" to identify this as a system message + content: + $ref: '#/components/schemas/InterleavedContent' + description: >- + The content of the "system prompt". If multiple system messages are provided, + they are concatenated. The underlying Llama Stack code may also add other + system messages (for example, for formatting tool definitions). + additionalProperties: false + required: + - role + - content + title: SystemMessage + description: >- + A system message providing instructions or context to the model. + EvaluateRowsRequest: + type: object + properties: + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to evaluate. + scoring_functions: + type: array + items: + type: string + description: >- + The scoring functions to use for the evaluation. + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. + additionalProperties: false + required: + - input_rows + - scoring_functions + - benchmark_config + title: EvaluateRowsRequest + EvaluateResponse: + type: object + properties: + generations: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The generations from the evaluation. + scores: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + description: The scores from the evaluation. + additionalProperties: false + required: + - generations + - scores + title: EvaluateResponse + description: The response from an evaluation. + 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 + description: >- + The scoring result for each row. Each row is a map of column name to value. + aggregated_results: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Map of metric name to aggregated value + additionalProperties: false + required: + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + RunEvalRequest: + type: object + properties: + benchmark_config: + $ref: '#/components/schemas/BenchmarkConfig' + description: The configuration for the benchmark. + additionalProperties: false + required: + - benchmark_config + title: RunEvalRequest + Job: + type: object + properties: + job_id: + type: string + description: Unique identifier for the job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current execution status of the job + additionalProperties: false + required: + - job_id + - status + title: Job + description: >- + A job execution instance with status tracking. + "OpenAIChatCompletionContentPartImageParam": + type: object + properties: + type: + type: string + const: image_url + default: image_url + description: >- + Must be "image_url" to identify this as image content + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + description: >- + Image URL specification and processing details + additionalProperties: false + required: + - type + - image_url + title: >- + OpenAIChatCompletionContentPartImageParam + description: >- + Image content part for OpenAI-compatible chat completion messages. + OpenAIChatCompletionContentPartTextParam: + type: object + properties: + type: + type: string + const: text + default: text + description: >- + Must be "text" to identify this as text content + text: + type: string + description: The text content of the message + additionalProperties: false + required: + - type + - text + title: OpenAIChatCompletionContentPartTextParam + description: >- + Text content part for OpenAI-compatible chat completion messages. + OpenAIImageURL: + type: object + properties: + url: + type: string + description: >- + URL of the image to include in the message + detail: + type: string + description: >- + (Optional) Level of detail for image processing. Can be "low", "high", + or "auto" + additionalProperties: false + required: + - url + title: OpenAIImageURL + description: >- + Image URL specification for OpenAI-compatible chat completion messages. + RerankRequest: + type: object + properties: + model: + type: string + description: >- + The identifier of the reranking model to use. + query: + oneOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + description: >- + The search query to rank items against. Can be a string, text content + part, or image content part. The input must not exceed the model's max + input token length. + items: + type: array + items: + oneOf: + - type: string + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + description: >- + List of items to rerank. Each item can be a string, text content part, + or image content part. Each input must not exceed the model's max input + token length. + max_num_results: + type: integer + description: >- + (Optional) Maximum number of results to return. Default: returns all. + additionalProperties: false + required: + - model + - query + - items + title: RerankRequest + RerankData: + type: object + properties: + index: + type: integer + description: >- + The original index of the document in the input list + relevance_score: + type: number + description: >- + The relevance score from the model output. Values are inverted when applicable + so that higher scores indicate greater relevance. + additionalProperties: false + required: + - index + - relevance_score + title: RerankData + description: >- + A single rerank result from a reranking response. + RerankResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/RerankData' + description: >- + List of rerank result objects, sorted by relevance score (descending) + additionalProperties: false + required: + - data + title: RerankResponse + description: Response from a reranking request. + Checkpoint: + type: object + properties: + identifier: + type: string + description: Unique identifier for the checkpoint + created_at: + type: string + format: date-time + description: >- + Timestamp when the checkpoint was created + epoch: + type: integer + description: >- + Training epoch when the checkpoint was saved + post_training_job_id: + type: string + description: >- + Identifier of the training job that created this checkpoint + path: + type: string + description: >- + File system path where the checkpoint is stored + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' + description: >- + (Optional) Training metrics associated with this checkpoint + additionalProperties: false + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + description: Checkpoint created during training runs. + PostTrainingJobArtifactsResponse: + type: object + properties: + job_uuid: + type: string + description: Unique identifier for the training job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' + description: >- + List of model checkpoints created during training + additionalProperties: false + required: + - job_uuid + - checkpoints + title: PostTrainingJobArtifactsResponse + description: Artifacts of a finetuning job. + PostTrainingMetric: + type: object + properties: + epoch: + type: integer + description: Training epoch number + train_loss: + type: number + description: Loss value on the training dataset + validation_loss: + type: number + description: Loss value on the validation dataset + perplexity: + type: number + description: >- + Perplexity metric indicating model confidence + additionalProperties: false + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + description: >- + Training metrics captured during post-training jobs. + CancelTrainingJobRequest: + type: object + properties: + job_uuid: + type: string + description: The UUID of the job to cancel. + additionalProperties: false + required: + - job_uuid + title: CancelTrainingJobRequest + PostTrainingJobStatusResponse: + type: object + properties: + job_uuid: + type: string + description: Unique identifier for the training job + status: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + description: Current status of the training job + scheduled_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job was scheduled + started_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job execution began + completed_at: + type: string + format: date-time + description: >- + (Optional) Timestamp when the job finished, if completed + resources_allocated: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Information about computational resources allocated to the + job + checkpoints: + type: array + items: + $ref: '#/components/schemas/Checkpoint' + description: >- + List of model checkpoints created during training + additionalProperties: false + required: + - job_uuid + - status + - checkpoints + title: PostTrainingJobStatusResponse + description: Status of a finetuning job. + ListPostTrainingJobsResponse: + type: object + properties: + data: + type: array + items: + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob + additionalProperties: false + required: + - data + title: ListPostTrainingJobsResponse + DPOAlignmentConfig: + type: object + properties: + beta: + type: number + description: Temperature parameter for the DPO loss + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + description: The type of loss function to use for DPO + additionalProperties: false + required: + - beta + - loss_type + title: DPOAlignmentConfig + description: >- + Configuration for Direct Preference Optimization (DPO) alignment. + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: + type: object + properties: + dataset_id: + type: string + description: >- + Unique identifier for the training dataset + batch_size: + type: integer + description: Number of samples per training batch + shuffle: + type: boolean + description: >- + Whether to shuffle the dataset during training + data_format: + $ref: '#/components/schemas/DatasetFormat' + description: >- + Format of the dataset (instruct or dialog) + validation_dataset_id: + type: string + description: >- + (Optional) Unique identifier for the validation dataset + packed: + type: boolean + default: false + description: >- + (Optional) Whether to pack multiple samples into a single sequence for + efficiency + train_on_input: + type: boolean + default: false + description: >- + (Optional) Whether to compute loss on input tokens as well as output tokens + additionalProperties: false + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: >- + Configuration for training data and data loading. + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: Format of the training dataset. + EfficiencyConfig: + type: object + properties: + enable_activation_checkpointing: + type: boolean + default: false + description: >- + (Optional) Whether to use activation checkpointing to reduce memory usage + enable_activation_offloading: + type: boolean + default: false + description: >- + (Optional) Whether to offload activations to CPU to save GPU memory + memory_efficient_fsdp_wrap: + type: boolean + default: false + description: >- + (Optional) Whether to use memory-efficient FSDP wrapping + fsdp_cpu_offload: + type: boolean + default: false + description: >- + (Optional) Whether to offload FSDP parameters to CPU + additionalProperties: false + title: EfficiencyConfig + description: >- + Configuration for memory and compute efficiency optimizations. + OptimizerConfig: + type: object + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + description: >- + Type of optimizer to use (adam, adamw, or sgd) + lr: + type: number + description: Learning rate for the optimizer + weight_decay: + type: number + description: >- + Weight decay coefficient for regularization + num_warmup_steps: + type: integer + description: Number of steps for learning rate warmup + additionalProperties: false + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: >- + Configuration parameters for the optimization algorithm. + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: >- + Available optimizer algorithms for training. + TrainingConfig: + type: object + properties: + n_epochs: + type: integer + description: Number of training epochs to run + max_steps_per_epoch: + type: integer + default: 1 + description: Maximum number of steps to run per epoch + gradient_accumulation_steps: + type: integer + default: 1 + description: >- + Number of steps to accumulate gradients before updating + max_validation_steps: + type: integer + default: 1 + description: >- + (Optional) Maximum number of validation steps per epoch + data_config: + $ref: '#/components/schemas/DataConfig' + description: >- + (Optional) Configuration for data loading and formatting + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + description: >- + (Optional) Configuration for the optimization algorithm + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + description: >- + (Optional) Configuration for memory and compute optimizations + dtype: + type: string + default: bf16 + description: >- + (Optional) Data type for model parameters (bf16, fp16, fp32) + additionalProperties: false + required: + - n_epochs + - max_steps_per_epoch + - gradient_accumulation_steps + title: TrainingConfig + description: >- + Comprehensive configuration for the training process. + PreferenceOptimizeRequest: + type: object + properties: + job_uuid: + type: string + description: The UUID of the job to create. + finetuned_model: + type: string + description: The model to fine-tune. + algorithm_config: + $ref: '#/components/schemas/DPOAlignmentConfig' + description: The algorithm configuration. + training_config: + $ref: '#/components/schemas/TrainingConfig' + description: The training configuration. + hyperparam_search_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The hyperparam search configuration. + logger_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The logger configuration. + additionalProperties: false + required: + - job_uuid + - finetuned_model + - algorithm_config + - training_config + - hyperparam_search_config + - logger_config + title: PreferenceOptimizeRequest + PostTrainingJob: + type: object + properties: + job_uuid: + type: string + additionalProperties: false + required: + - job_uuid + title: PostTrainingJob + AlgorithmConfig: + oneOf: + - $ref: '#/components/schemas/LoraFinetuningConfig' + - $ref: '#/components/schemas/QATFinetuningConfig' + discriminator: + propertyName: type + mapping: + LoRA: '#/components/schemas/LoraFinetuningConfig' + QAT: '#/components/schemas/QATFinetuningConfig' + LoraFinetuningConfig: + type: object + properties: + type: + type: string + const: LoRA + default: LoRA + description: Algorithm type identifier, always "LoRA" + lora_attn_modules: + type: array + items: + type: string + description: >- + List of attention module names to apply LoRA to + apply_lora_to_mlp: + type: boolean + description: Whether to apply LoRA to MLP layers + apply_lora_to_output: + type: boolean + description: >- + Whether to apply LoRA to output projection layers + rank: + type: integer + description: >- + Rank of the LoRA adaptation (lower rank = fewer parameters) + alpha: + type: integer + description: >- + LoRA scaling parameter that controls adaptation strength + use_dora: + type: boolean + default: false + description: >- + (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation) + quantize_base: + type: boolean + default: false + description: >- + (Optional) Whether to quantize the base model weights + additionalProperties: false + required: + - type + - lora_attn_modules + - apply_lora_to_mlp + - apply_lora_to_output + - rank + - alpha + title: LoraFinetuningConfig + description: >- + Configuration for Low-Rank Adaptation (LoRA) fine-tuning. + QATFinetuningConfig: + type: object + properties: + type: + type: string + const: QAT + default: QAT + description: Algorithm type identifier, always "QAT" + quantizer_name: + type: string + description: >- + Name of the quantization algorithm to use + group_size: + type: integer + description: Size of groups for grouped quantization + additionalProperties: false + required: + - type + - quantizer_name + - group_size + title: QATFinetuningConfig + description: >- + Configuration for Quantization-Aware Training (QAT) fine-tuning. + SupervisedFineTuneRequest: + type: object + properties: + job_uuid: + type: string + description: The UUID of the job to create. + training_config: + $ref: '#/components/schemas/TrainingConfig' + description: The training configuration. + hyperparam_search_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The hyperparam search configuration. + logger_config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The logger configuration. + model: + type: string + description: The model to fine-tune. + checkpoint_dir: + type: string + description: The directory to save checkpoint(s) to. + algorithm_config: + $ref: '#/components/schemas/AlgorithmConfig' + description: The algorithm configuration. + additionalProperties: false + required: + - job_uuid + - training_config + - hyperparam_search_config + - logger_config + title: SupervisedFineTuneRequest + responses: + BadRequest400: + description: The request was invalid or malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 400 + title: Bad Request + detail: The request was invalid or malformed + TooManyRequests429: + description: >- + The client has sent too many requests in a given amount of time + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 429 + title: Too Many Requests + detail: >- + You have exceeded the rate limit. Please try again later. + InternalServerError500: + description: >- + The server encountered an unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 500 + title: Internal Server Error + detail: >- + An unexpected error occurred. Our team has been notified. + DefaultError: + description: An unexpected error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: 0 + title: Error + detail: An unexpected error occurred +security: + - Default: [] +tags: + - name: Agents + description: >- + APIs for creating and interacting with agentic systems. + x-displayName: Agents + - name: Benchmarks + - name: Eval + x-displayName: >- + Llama Stack Evaluation API for running evaluations on model and agent candidates. + - name: PostTraining (Coming Soon) +x-tagGroups: + - name: Operations + tags: + - Agents + - Benchmarks + - Eval + - PostTraining (Coming Soon) diff --git a/docs/static/llama-stack-spec.html b/docs/static/llama-stack-spec.html index 2f64d3511..6c92c3812 100644 --- a/docs/static/llama-stack-spec.html +++ b/docs/static/llama-stack-spec.html @@ -32,7 +32,7 @@ "info": { "title": "Llama Stack Specification", "version": "v1", - "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." + "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.\n\n**โœ… STABLE**: Production-ready APIs with backward compatibility guarantees." }, "servers": [ { @@ -40,11 +40,18 @@ } ], "paths": { - "/v1beta/datasetio/append-rows/{dataset_id}": { - "post": { + "/v1/chat/completions": { + "get": { "responses": { "200": { - "description": "OK" + "description": "A ListOpenAIChatCompletionResponse.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOpenAIChatCompletionResponse" + } + } + } }, "400": { "$ref": "#/components/responses/BadRequest400" @@ -60,31 +67,189 @@ } }, "tags": [ - "DatasetIO" + "Inference" ], - "summary": "Append rows to a dataset.", - "description": "Append rows to a dataset.", + "summary": "List all chat completions.", + "description": "List all chat completions.", "parameters": [ { - "name": "dataset_id", + "name": "after", + "in": "query", + "description": "The ID of the last chat completion to return.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "The maximum number of chat completions to return.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "model", + "in": "query", + "description": "The model to filter by.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "The order to sort the chat completions by: \"asc\" or \"desc\". Defaults to \"desc\".", + "required": false, + "schema": { + "$ref": "#/components/schemas/Order" + } + } + ], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "An OpenAIChatCompletion.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAIChatCompletion" + }, + { + "$ref": "#/components/schemas/OpenAIChatCompletionChunk" + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Inference" + ], + "summary": "Generate an OpenAI-compatible chat completion for the given messages using the specified model.", + "description": "Generate an OpenAI-compatible chat completion for the given messages using the specified model.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenaiChatCompletionRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/chat/completions/{completion_id}": { + "get": { + "responses": { + "200": { + "description": "A OpenAICompletionWithInputMessages.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAICompletionWithInputMessages" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Inference" + ], + "summary": "Describe a chat completion by its ID.", + "description": "Describe a chat completion by its ID.", + "parameters": [ + { + "name": "completion_id", "in": "path", - "description": "The ID of the dataset to append the rows to.", + "description": "ID of the chat completion.", "required": true, "schema": { "type": "string" } } ], + "deprecated": false + } + }, + "/v1/completions": { + "post": { + "responses": { + "200": { + "description": "An OpenAICompletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAICompletion" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Inference" + ], + "summary": "Generate an OpenAI-compatible completion for the given prompt using the specified model.", + "description": "Generate an OpenAI-compatible completion for the given prompt using the specified model.", + "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AppendRowsRequest" + "$ref": "#/components/schemas/OpenaiCompletionRequest" } } }, "required": true - } + }, + "deprecated": false } }, "/v1/datasetio/append-rows/{dataset_id}": { @@ -131,84 +296,11 @@ } }, "required": true - } - } - }, - "/v1alpha/post-training/job/cancel": { - "post": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Cancel a training job.", - "description": "Cancel a training job.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CancelTrainingJobRequest" - } - } - }, - "required": true - } + "deprecated": false } }, - "/v1/post-training/job/cancel": { - "post": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Cancel a training job.", - "description": "Cancel a training job.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CancelTrainingJobRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/agents": { + "/v1/datasetio/iterrows/{dataset_id}": { "get": { "responses": { "200": { @@ -235,15 +327,24 @@ } }, "tags": [ - "Agents" + "DatasetIO" ], - "summary": "List all agents.", - "description": "List all agents.", + "summary": "Get a paginated list of rows from a dataset.", + "description": "Get a paginated list of rows from a dataset.\nUses offset-based pagination where:\n- start_index: The starting index (0-based). If None, starts from beginning.\n- limit: Number of items to return. If None or -1, returns all items.\n\nThe response includes:\n- data: List of items for the current page.\n- has_more: Whether there are more items available after this set.", "parameters": [ + { + "name": "dataset_id", + "in": "path", + "description": "The ID of the dataset to get the rows from.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "start_index", "in": "query", - "description": "The index to start the pagination from.", + "description": "Index into dataset for the first row to get. Get all rows if None.", "required": false, "schema": { "type": "integer" @@ -252,66 +353,25 @@ { "name": "limit", "in": "query", - "description": "The number of agents to return.", + "description": "The number of rows to get.", "required": false, "schema": { "type": "integer" } } - ] - }, - "post": { - "responses": { - "200": { - "description": "An AgentCreateResponse with the agent ID.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentCreateResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" ], - "summary": "Create an agent with the given configuration.", - "description": "Create an agent with the given configuration.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentRequest" - } - } - }, - "required": true - } + "deprecated": false } }, - "/v1/agents": { + "/v1/datasets": { "get": { "responses": { "200": { - "description": "A PaginatedResponse.", + "description": "A ListDatasetsResponse.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedResponse" + "$ref": "#/components/schemas/ListDatasetsResponse" } } } @@ -330,39 +390,21 @@ } }, "tags": [ - "Agents" + "Datasets" ], - "summary": "List all agents.", - "description": "List all agents.", - "parameters": [ - { - "name": "start_index", - "in": "query", - "description": "The index to start the pagination from.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of agents to return.", - "required": false, - "schema": { - "type": "integer" - } - } - ] + "summary": "List all datasets.", + "description": "List all datasets.", + "parameters": [], + "deprecated": false }, "post": { "responses": { "200": { - "description": "An AgentCreateResponse with the agent ID.", + "description": "A Dataset.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentCreateResponse" + "$ref": "#/components/schemas/Dataset" } } } @@ -381,32 +423,33 @@ } }, "tags": [ - "Agents" + "Datasets" ], - "summary": "Create an agent with the given configuration.", - "description": "Create an agent with the given configuration.", + "summary": "Register a new dataset.", + "description": "Register a new dataset.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAgentRequest" + "$ref": "#/components/schemas/RegisterDatasetRequest" } } }, "required": true - } + }, + "deprecated": false } }, - "/v1alpha/agents/{agent_id}/session": { - "post": { + "/v1/datasets/{dataset_id}": { + "get": { "responses": { "200": { - "description": "An AgentSessionCreateResponse.", + "description": "A Dataset.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentSessionCreateResponse" + "$ref": "#/components/schemas/Dataset" } } } @@ -425,42 +468,69 @@ } }, "tags": [ - "Agents" + "Datasets" ], - "summary": "Create a new session for an agent.", - "description": "Create a new session for an agent.", + "summary": "Get a dataset by its ID.", + "description": "Get a dataset by its ID.", "parameters": [ { - "name": "agent_id", + "name": "dataset_id", "in": "path", - "description": "The ID of the agent to create the session for.", + "description": "The ID of the dataset to get.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentSessionRequest" - } - } + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "OK" }, - "required": true - } + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Datasets" + ], + "summary": "Unregister a dataset by its ID.", + "description": "Unregister a dataset by its ID.", + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "description": "The ID of the dataset to unregister.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false } }, - "/v1/agents/{agent_id}/session": { + "/v1/embeddings": { "post": { "responses": { "200": { - "description": "An AgentSessionCreateResponse.", + "description": "An OpenAIEmbeddingsResponse containing the embeddings.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentSessionCreateResponse" + "$ref": "#/components/schemas/OpenAIEmbeddingsResponse" } } } @@ -479,47 +549,33 @@ } }, "tags": [ - "Agents" - ], - "summary": "Create a new session for an agent.", - "description": "Create a new session for an agent.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to create the session for.", - "required": true, - "schema": { - "type": "string" - } - } + "Inference" ], + "summary": "Generate OpenAI-compatible embeddings for the given input using the specified model.", + "description": "Generate OpenAI-compatible embeddings for the given input using the specified model.", + "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAgentSessionRequest" + "$ref": "#/components/schemas/OpenaiEmbeddingsRequest" } } }, "required": true - } + }, + "deprecated": false } }, - "/v1alpha/agents/{agent_id}/session/{session_id}/turn": { - "post": { + "/v1/files": { + "get": { "responses": { "200": { - "description": "If stream=False, returns a Turn object. If stream=True, returns an SSE event stream of AgentTurnResponseStreamChunk.", + "description": "An ListOpenAIFileResponse containing the list of files.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Turn" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/AgentTurnResponseStreamChunk" + "$ref": "#/components/schemas/ListOpenAIFileResponse" } } } @@ -538,56 +594,58 @@ } }, "tags": [ - "Agents" + "Files" ], - "summary": "Create a new turn for an agent.", - "description": "Create a new turn for an agent.", + "summary": "Returns a list of files that belong to the user's organization.", + "description": "Returns a list of files that belong to the user's organization.", "parameters": [ { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to create the turn for.", - "required": true, + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.", + "required": false, "schema": { "type": "string" } }, { - "name": "session_id", - "in": "path", - "description": "The ID of the session to create the turn for.", - "required": true, + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.", + "required": false, "schema": { - "type": "string" + "type": "integer" + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + { + "name": "purpose", + "in": "query", + "description": "Only return files with the given purpose.", + "required": false, + "schema": { + "$ref": "#/components/schemas/OpenAIFilePurpose" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentTurnRequest" - } - } - }, - "required": true - } - } - }, - "/v1/agents/{agent_id}/session/{session_id}/turn": { + "deprecated": false + }, "post": { "responses": { "200": { - "description": "If stream=False, returns a Turn object. If stream=True, returns an SSE event stream of AgentTurnResponseStreamChunk.", + "description": "An OpenAIFileObject representing the uploaded file.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Turn" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/AgentTurnResponseStreamChunk" + "$ref": "#/components/schemas/OpenAIFileObject" } } } @@ -606,24 +664,613 @@ } }, "tags": [ - "Agents" + "Files" ], - "summary": "Create a new turn for an agent.", - "description": "Create a new turn for an agent.", + "summary": "Upload a file that can be used across various endpoints.", + "description": "Upload a file that can be used across various endpoints.\nThe file upload should be a multipart form request with:\n- file: The File object (not file name) to be uploaded.\n- purpose: The intended purpose of the uploaded file.\n- expires_after: Optional form values describing expiration for the file.", + "parameters": [], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "purpose": { + "$ref": "#/components/schemas/OpenAIFilePurpose" + }, + "expires_after": { + "$ref": "#/components/schemas/ExpiresAfter" + } + }, + "required": [ + "file", + "purpose" + ] + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/files/{file_id}": { + "get": { + "responses": { + "200": { + "description": "An OpenAIFileObject containing file information.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAIFileObject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Files" + ], + "summary": "Returns information about a specific file.", + "description": "Returns information about a specific file.", "parameters": [ { - "name": "agent_id", + "name": "file_id", "in": "path", - "description": "The ID of the agent to create the turn for.", + "description": "The ID of the file to use for this request.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "An OpenAIFileDeleteResponse indicating successful deletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAIFileDeleteResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Files" + ], + "summary": "Delete a file.", + "description": "Delete a file.", + "parameters": [ + { + "name": "file_id", + "in": "path", + "description": "The ID of the file to use for this request.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/files/{file_id}/content": { + "get": { + "responses": { + "200": { + "description": "The raw file content as a binary response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Response" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Files" + ], + "summary": "Returns the contents of the specified file.", + "description": "Returns the contents of the specified file.", + "parameters": [ + { + "name": "file_id", + "in": "path", + "description": "The ID of the file to use for this request.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/health": { + "get": { + "responses": { + "200": { + "description": "Health information indicating if the service is operational.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HealthInfo" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Inspect" + ], + "summary": "Get the current health status of the service.", + "description": "Get the current health status of the service.", + "parameters": [], + "deprecated": false + } + }, + "/v1/inspect/routes": { + "get": { + "responses": { + "200": { + "description": "Response containing information about all available routes.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListRoutesResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Inspect" + ], + "summary": "List all available API routes with their methods and implementing providers.", + "description": "List all available API routes with their methods and implementing providers.", + "parameters": [], + "deprecated": false + } + }, + "/v1/models": { + "get": { + "responses": { + "200": { + "description": "A ListModelsResponse.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListModelsResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Models" + ], + "summary": "List all models.", + "description": "List all models.", + "parameters": [], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "A Model.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Model" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Models" + ], + "summary": "Register a model.", + "description": "Register a model.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterModelRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/models/{model_id}": { + "get": { + "responses": { + "200": { + "description": "A Model.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Model" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Models" + ], + "summary": "Get a model by its identifier.", + "description": "Get a model by its identifier.", + "parameters": [ + { + "name": "model_id", + "in": "path", + "description": "The identifier of the model to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Models" + ], + "summary": "Unregister a model.", + "description": "Unregister a model.", + "parameters": [ + { + "name": "model_id", + "in": "path", + "description": "The identifier of the model to unregister.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/moderations": { + "post": { + "responses": { + "200": { + "description": "A moderation object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModerationObject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Safety" + ], + "summary": "Classifies if text and/or image inputs are potentially harmful.", + "description": "Classifies if text and/or image inputs are potentially harmful.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunModerationRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/prompts": { + "get": { + "responses": { + "200": { + "description": "A ListPromptsResponse containing all prompts.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListPromptsResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Prompts" + ], + "summary": "List all prompts.", + "description": "List all prompts.", + "parameters": [], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "The created Prompt resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Prompt" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Prompts" + ], + "summary": "Create a new prompt.", + "description": "Create a new prompt.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePromptRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/prompts/{prompt_id}": { + "get": { + "responses": { + "200": { + "description": "A Prompt resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Prompt" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Prompts" + ], + "summary": "Get a prompt by its identifier and optional version.", + "description": "Get a prompt by its identifier and optional version.", + "parameters": [ + { + "name": "prompt_id", + "in": "path", + "description": "The identifier of the prompt to get.", "required": true, "schema": { "type": "string" } }, { - "name": "session_id", + "name": "version", + "in": "query", + "description": "The version of the prompt to get (defaults to latest).", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "The updated Prompt resource with incremented version.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Prompt" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Prompts" + ], + "summary": "Update an existing prompt (increments version).", + "description": "Update an existing prompt (increments version).", + "parameters": [ + { + "name": "prompt_id", "in": "path", - "description": "The ID of the session to create the turn for.", + "description": "The identifier of the prompt to update.", "required": true, "schema": { "type": "string" @@ -634,12 +1281,229 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAgentTurnRequest" + "$ref": "#/components/schemas/UpdatePromptRequest" } } }, "required": true - } + }, + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Prompts" + ], + "summary": "Delete a prompt.", + "description": "Delete a prompt.", + "parameters": [ + { + "name": "prompt_id", + "in": "path", + "description": "The identifier of the prompt to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/prompts/{prompt_id}/set-default-version": { + "post": { + "responses": { + "200": { + "description": "The prompt with the specified version now set as default.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Prompt" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Prompts" + ], + "summary": "Set which version of a prompt should be the default in get_prompt (latest).", + "description": "Set which version of a prompt should be the default in get_prompt (latest).", + "parameters": [ + { + "name": "prompt_id", + "in": "path", + "description": "The identifier of the prompt.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetDefaultVersionRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/prompts/{prompt_id}/versions": { + "get": { + "responses": { + "200": { + "description": "A ListPromptsResponse containing all versions of the prompt.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListPromptsResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Prompts" + ], + "summary": "List all versions of a specific prompt.", + "description": "List all versions of a specific prompt.", + "parameters": [ + { + "name": "prompt_id", + "in": "path", + "description": "The identifier of the prompt to list versions for.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/providers": { + "get": { + "responses": { + "200": { + "description": "A ListProvidersResponse containing information about all providers.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListProvidersResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Providers" + ], + "summary": "List all available providers.", + "description": "List all available providers.", + "parameters": [], + "deprecated": false + } + }, + "/v1/providers/{provider_id}": { + "get": { + "responses": { + "200": { + "description": "A ProviderInfo object containing the provider's details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderInfo" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Providers" + ], + "summary": "Get detailed information about a specific provider.", + "description": "Get detailed information about a specific provider.", + "parameters": [ + { + "name": "provider_id", + "in": "path", + "description": "The ID of the provider to inspect.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false } }, "/v1/responses": { @@ -710,7 +1574,8 @@ "$ref": "#/components/schemas/Order" } } - ] + ], + "deprecated": false }, "post": { "responses": { @@ -757,459 +1622,8 @@ } }, "required": true - } - } - }, - "/v1/prompts": { - "get": { - "responses": { - "200": { - "description": "A ListPromptsResponse containing all prompts.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListPromptsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } }, - "tags": [ - "Prompts" - ], - "summary": "List all prompts.", - "description": "List all prompts.", - "parameters": [] - }, - "post": { - "responses": { - "200": { - "description": "The created Prompt resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Prompt" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Prompts" - ], - "summary": "Create a new prompt.", - "description": "Create a new prompt.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatePromptRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/agents/{agent_id}": { - "get": { - "responses": { - "200": { - "description": "An Agent of the agent.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Agent" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Describe an agent by its ID.", - "description": "Describe an agent by its ID.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "ID of the agent.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Delete an agent by its ID and its associated sessions and turns.", - "description": "Delete an agent by its ID and its associated sessions and turns.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to delete.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/agents/{agent_id}": { - "get": { - "responses": { - "200": { - "description": "An Agent of the agent.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Agent" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Describe an agent by its ID.", - "description": "Describe an agent by its ID.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "ID of the agent.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Delete an agent by its ID and its associated sessions and turns.", - "description": "Delete an agent by its ID and its associated sessions and turns.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to delete.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/agents/{agent_id}/session/{session_id}": { - "get": { - "responses": { - "200": { - "description": "A Session.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Retrieve an agent session by its ID.", - "description": "Retrieve an agent session by its ID.", - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to get.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to get the session for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "turn_ids", - "in": "query", - "description": "(Optional) List of turn IDs to filter the session by.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Delete an agent session by its ID and its associated turns.", - "description": "Delete an agent session by its ID and its associated turns.", - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to delete.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to delete the session for.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/agents/{agent_id}/session/{session_id}": { - "get": { - "responses": { - "200": { - "description": "A Session.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Retrieve an agent session by its ID.", - "description": "Retrieve an agent session by its ID.", - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to get.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to get the session for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "turn_ids", - "in": "query", - "description": "(Optional) List of turn IDs to filter the session by.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Delete an agent session by its ID and its associated turns.", - "description": "Delete an agent session by its ID and its associated turns.", - "parameters": [ - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to delete.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to delete the session for.", - "required": true, - "schema": { - "type": "string" - } - } - ] + "deprecated": false } }, "/v1/responses/{response_id}": { @@ -1253,7 +1667,8 @@ "type": "string" } } - ] + ], + "deprecated": false }, "delete": { "responses": { @@ -1295,3096 +1710,8 @@ "type": "string" } } - ] - } - }, - "/v1/prompts/{prompt_id}": { - "get": { - "responses": { - "200": { - "description": "A Prompt resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Prompt" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Prompts" ], - "summary": "Get a prompt by its identifier and optional version.", - "description": "Get a prompt by its identifier and optional version.", - "parameters": [ - { - "name": "prompt_id", - "in": "path", - "description": "The identifier of the prompt to get.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "query", - "description": "The version of the prompt to get (defaults to latest).", - "required": false, - "schema": { - "type": "integer" - } - } - ] - }, - "post": { - "responses": { - "200": { - "description": "The updated Prompt resource with incremented version.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Prompt" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Prompts" - ], - "summary": "Update an existing prompt (increments version).", - "description": "Update an existing prompt (increments version).", - "parameters": [ - { - "name": "prompt_id", - "in": "path", - "description": "The identifier of the prompt to update.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdatePromptRequest" - } - } - }, - "required": true - } - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Prompts" - ], - "summary": "Delete a prompt.", - "description": "Delete a prompt.", - "parameters": [ - { - "name": "prompt_id", - "in": "path", - "description": "The identifier of the prompt to delete.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/eval/benchmarks/{benchmark_id}/evaluations": { - "post": { - "responses": { - "200": { - "description": "EvaluateResponse object containing generations and scores.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluateResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Evaluate a list of rows on a benchmark.", - "description": "Evaluate a list of rows on a benchmark.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluateRowsRequest" - } - } - }, - "required": true - } - } - }, - "/v1/eval/benchmarks/{benchmark_id}/evaluations": { - "post": { - "responses": { - "200": { - "description": "EvaluateResponse object containing generations and scores.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluateResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Evaluate a list of rows on a benchmark.", - "description": "Evaluate a list of rows on a benchmark.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluateRowsRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}": { - "get": { - "responses": { - "200": { - "description": "An AgentStepResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentStepResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Retrieve an agent step by its ID.", - "description": "Retrieve an agent step by its ID.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to get the step for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to get the step for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "turn_id", - "in": "path", - "description": "The ID of the turn to get the step for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "step_id", - "in": "path", - "description": "The ID of the step to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}": { - "get": { - "responses": { - "200": { - "description": "An AgentStepResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentStepResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Retrieve an agent step by its ID.", - "description": "Retrieve an agent step by its ID.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to get the step for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to get the step for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "turn_id", - "in": "path", - "description": "The ID of the turn to get the step for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "step_id", - "in": "path", - "description": "The ID of the step to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}": { - "get": { - "responses": { - "200": { - "description": "A Turn.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Turn" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Retrieve an agent turn by its ID.", - "description": "Retrieve an agent turn by its ID.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to get the turn for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to get the turn for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "turn_id", - "in": "path", - "description": "The ID of the turn to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}": { - "get": { - "responses": { - "200": { - "description": "A Turn.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Turn" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Retrieve an agent turn by its ID.", - "description": "Retrieve an agent turn by its ID.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to get the turn for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to get the turn for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "turn_id", - "in": "path", - "description": "The ID of the turn to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/eval/benchmarks/{benchmark_id}": { - "get": { - "responses": { - "200": { - "description": "A Benchmark.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benchmark" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Benchmarks" - ], - "summary": "Get a benchmark by its ID.", - "description": "Get a benchmark by its ID.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Benchmarks" - ], - "summary": "Unregister a benchmark.", - "description": "Unregister a benchmark.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/eval/benchmarks/{benchmark_id}": { - "get": { - "responses": { - "200": { - "description": "A Benchmark.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benchmark" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Benchmarks" - ], - "summary": "Get a benchmark by its ID.", - "description": "Get a benchmark by its ID.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Benchmarks" - ], - "summary": "Unregister a benchmark.", - "description": "Unregister a benchmark.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/chat/completions/{completion_id}": { - "get": { - "responses": { - "200": { - "description": "A OpenAICompletionWithInputMessages.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAICompletionWithInputMessages" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Inference" - ], - "summary": "Describe a chat completion by its ID.", - "description": "Describe a chat completion by its ID.", - "parameters": [ - { - "name": "completion_id", - "in": "path", - "description": "ID of the chat completion.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1beta/datasets/{dataset_id}": { - "get": { - "responses": { - "200": { - "description": "A Dataset.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dataset" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Datasets" - ], - "summary": "Get a dataset by its ID.", - "description": "Get a dataset by its ID.", - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "description": "The ID of the dataset to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Datasets" - ], - "summary": "Unregister a dataset by its ID.", - "description": "Unregister a dataset by its ID.", - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "description": "The ID of the dataset to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/datasets/{dataset_id}": { - "get": { - "responses": { - "200": { - "description": "A Dataset.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dataset" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Datasets" - ], - "summary": "Get a dataset by its ID.", - "description": "Get a dataset by its ID.", - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "description": "The ID of the dataset to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Datasets" - ], - "summary": "Unregister a dataset by its ID.", - "description": "Unregister a dataset by its ID.", - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "description": "The ID of the dataset to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/models/{model_id}": { - "get": { - "responses": { - "200": { - "description": "A Model.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Model" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Models" - ], - "summary": "Get a model by its identifier.", - "description": "Get a model by its identifier.", - "parameters": [ - { - "name": "model_id", - "in": "path", - "description": "The identifier of the model to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Models" - ], - "summary": "Unregister a model.", - "description": "Unregister a model.", - "parameters": [ - { - "name": "model_id", - "in": "path", - "description": "The identifier of the model to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/scoring-functions/{scoring_fn_id}": { - "get": { - "responses": { - "200": { - "description": "A ScoringFn.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScoringFn" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ScoringFunctions" - ], - "summary": "Get a scoring function by its ID.", - "description": "Get a scoring function by its ID.", - "parameters": [ - { - "name": "scoring_fn_id", - "in": "path", - "description": "The ID of the scoring function to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ScoringFunctions" - ], - "summary": "Unregister a scoring function.", - "description": "Unregister a scoring function.", - "parameters": [ - { - "name": "scoring_fn_id", - "in": "path", - "description": "The ID of the scoring function to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/shields/{identifier}": { - "get": { - "responses": { - "200": { - "description": "A Shield.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Shield" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Shields" - ], - "summary": "Get a shield by its identifier.", - "description": "Get a shield by its identifier.", - "parameters": [ - { - "name": "identifier", - "in": "path", - "description": "The identifier of the shield to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Shields" - ], - "summary": "Unregister a shield.", - "description": "Unregister a shield.", - "parameters": [ - { - "name": "identifier", - "in": "path", - "description": "The identifier of the shield to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/telemetry/traces/{trace_id}/spans/{span_id}": { - "get": { - "responses": { - "200": { - "description": "A Span.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Span" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Get a span by its ID.", - "description": "Get a span by its ID.", - "parameters": [ - { - "name": "trace_id", - "in": "path", - "description": "The ID of the trace to get the span from.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "span_id", - "in": "path", - "description": "The ID of the span to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/telemetry/traces/{trace_id}/spans/{span_id}": { - "get": { - "responses": { - "200": { - "description": "A Span.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Span" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Get a span by its ID.", - "description": "Get a span by its ID.", - "parameters": [ - { - "name": "trace_id", - "in": "path", - "description": "The ID of the trace to get the span from.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "span_id", - "in": "path", - "description": "The ID of the span to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/telemetry/spans/{span_id}/tree": { - "post": { - "responses": { - "200": { - "description": "A QuerySpanTreeResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuerySpanTreeResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Get a span tree by its ID.", - "description": "Get a span tree by its ID.", - "parameters": [ - { - "name": "span_id", - "in": "path", - "description": "The ID of the span to get the tree from.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSpanTreeRequest" - } - } - }, - "required": true - } - } - }, - "/v1/telemetry/spans/{span_id}/tree": { - "post": { - "responses": { - "200": { - "description": "A QuerySpanTreeResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuerySpanTreeResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Get a span tree by its ID.", - "description": "Get a span tree by its ID.", - "parameters": [ - { - "name": "span_id", - "in": "path", - "description": "The ID of the span to get the tree from.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSpanTreeRequest" - } - } - }, - "required": true - } - } - }, - "/v1/tools/{tool_name}": { - "get": { - "responses": { - "200": { - "description": "A Tool.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Tool" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ToolGroups" - ], - "summary": "Get a tool by its name.", - "description": "Get a tool by its name.", - "parameters": [ - { - "name": "tool_name", - "in": "path", - "description": "The name of the tool to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/toolgroups/{toolgroup_id}": { - "get": { - "responses": { - "200": { - "description": "A ToolGroup.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolGroup" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ToolGroups" - ], - "summary": "Get a tool group by its ID.", - "description": "Get a tool group by its ID.", - "parameters": [ - { - "name": "toolgroup_id", - "in": "path", - "description": "The ID of the tool group to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ToolGroups" - ], - "summary": "Unregister a tool group.", - "description": "Unregister a tool group.", - "parameters": [ - { - "name": "toolgroup_id", - "in": "path", - "description": "The ID of the tool group to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/telemetry/traces/{trace_id}": { - "get": { - "responses": { - "200": { - "description": "A Trace.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Trace" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Get a trace by its ID.", - "description": "Get a trace by its ID.", - "parameters": [ - { - "name": "trace_id", - "in": "path", - "description": "The ID of the trace to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/telemetry/traces/{trace_id}": { - "get": { - "responses": { - "200": { - "description": "A Trace.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Trace" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Get a trace by its ID.", - "description": "Get a trace by its ID.", - "parameters": [ - { - "name": "trace_id", - "in": "path", - "description": "The ID of the trace to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/post-training/job/artifacts": { - "get": { - "responses": { - "200": { - "description": "A PostTrainingJobArtifactsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTrainingJobArtifactsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Get the artifacts of a training job.", - "description": "Get the artifacts of a training job.", - "parameters": [ - { - "name": "job_uuid", - "in": "query", - "description": "The UUID of the job to get the artifacts of.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/post-training/job/artifacts": { - "get": { - "responses": { - "200": { - "description": "A PostTrainingJobArtifactsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTrainingJobArtifactsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Get the artifacts of a training job.", - "description": "Get the artifacts of a training job.", - "parameters": [ - { - "name": "job_uuid", - "in": "query", - "description": "The UUID of the job to get the artifacts of.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/post-training/job/status": { - "get": { - "responses": { - "200": { - "description": "A PostTrainingJobStatusResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTrainingJobStatusResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Get the status of a training job.", - "description": "Get the status of a training job.", - "parameters": [ - { - "name": "job_uuid", - "in": "query", - "description": "The UUID of the job to get the status of.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/post-training/job/status": { - "get": { - "responses": { - "200": { - "description": "A PostTrainingJobStatusResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTrainingJobStatusResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Get the status of a training job.", - "description": "Get the status of a training job.", - "parameters": [ - { - "name": "job_uuid", - "in": "query", - "description": "The UUID of the job to get the status of.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/post-training/jobs": { - "get": { - "responses": { - "200": { - "description": "A ListPostTrainingJobsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListPostTrainingJobsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Get all training jobs.", - "description": "Get all training jobs.", - "parameters": [] - } - }, - "/v1/post-training/jobs": { - "get": { - "responses": { - "200": { - "description": "A ListPostTrainingJobsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListPostTrainingJobsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Get all training jobs.", - "description": "Get all training jobs.", - "parameters": [] - } - }, - "/v1/vector-dbs/{vector_db_id}": { - "get": { - "responses": { - "200": { - "description": "A VectorDB.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorDB" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorDBs" - ], - "summary": "Get a vector database by its identifier.", - "description": "Get a vector database by its identifier.", - "parameters": [ - { - "name": "vector_db_id", - "in": "path", - "description": "The identifier of the vector database to get.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorDBs" - ], - "summary": "Unregister a vector database.", - "description": "Unregister a vector database.", - "parameters": [ - { - "name": "vector_db_id", - "in": "path", - "description": "The identifier of the vector database to unregister.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/health": { - "get": { - "responses": { - "200": { - "description": "Health information indicating if the service is operational.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Inspect" - ], - "summary": "Get the current health status of the service.", - "description": "Get the current health status of the service.", - "parameters": [] - } - }, - "/v1/tool-runtime/rag-tool/insert": { - "post": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ToolRuntime" - ], - "summary": "Index documents so they can be used by the RAG system.", - "description": "Index documents so they can be used by the RAG system.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertRequest" - } - } - }, - "required": true - } - } - }, - "/v1/vector-io/insert": { - "post": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorIO" - ], - "summary": "Insert chunks into a vector database.", - "description": "Insert chunks into a vector database.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertChunksRequest" - } - } - }, - "required": true - } - } - }, - "/v1/providers/{provider_id}": { - "get": { - "responses": { - "200": { - "description": "A ProviderInfo object containing the provider's details.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Providers" - ], - "summary": "Get detailed information about a specific provider.", - "description": "Get detailed information about a specific provider.", - "parameters": [ - { - "name": "provider_id", - "in": "path", - "description": "The ID of the provider to inspect.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/tool-runtime/invoke": { - "post": { - "responses": { - "200": { - "description": "A ToolInvocationResult.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolInvocationResult" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ToolRuntime" - ], - "summary": "Run a tool with the given arguments.", - "description": "Run a tool with the given arguments.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeToolRequest" - } - } - }, - "required": true - } - } - }, - "/v1beta/datasetio/iterrows/{dataset_id}": { - "get": { - "responses": { - "200": { - "description": "A PaginatedResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "DatasetIO" - ], - "summary": "Get a paginated list of rows from a dataset.", - "description": "Get a paginated list of rows from a dataset.\nUses offset-based pagination where:\n- start_index: The starting index (0-based). If None, starts from beginning.\n- limit: Number of items to return. If None or -1, returns all items.\n\nThe response includes:\n- data: List of items for the current page.\n- has_more: Whether there are more items available after this set.", - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "description": "The ID of the dataset to get the rows from.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start_index", - "in": "query", - "description": "Index into dataset for the first row to get. Get all rows if None.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of rows to get.", - "required": false, - "schema": { - "type": "integer" - } - } - ] - } - }, - "/v1/datasetio/iterrows/{dataset_id}": { - "get": { - "responses": { - "200": { - "description": "A PaginatedResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "DatasetIO" - ], - "summary": "Get a paginated list of rows from a dataset.", - "description": "Get a paginated list of rows from a dataset.\nUses offset-based pagination where:\n- start_index: The starting index (0-based). If None, starts from beginning.\n- limit: Number of items to return. If None or -1, returns all items.\n\nThe response includes:\n- data: List of items for the current page.\n- has_more: Whether there are more items available after this set.", - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "description": "The ID of the dataset to get the rows from.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start_index", - "in": "query", - "description": "Index into dataset for the first row to get. Get all rows if None.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of rows to get.", - "required": false, - "schema": { - "type": "integer" - } - } - ] - } - }, - "/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}": { - "get": { - "responses": { - "200": { - "description": "The status of the evaluation job.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Job" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Get the status of a job.", - "description": "Get the status of a job.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "job_id", - "in": "path", - "description": "The ID of the job to get the status of.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Cancel a job.", - "description": "Cancel a job.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "job_id", - "in": "path", - "description": "The ID of the job to cancel.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/eval/benchmarks/{benchmark_id}/jobs/{job_id}": { - "get": { - "responses": { - "200": { - "description": "The status of the evaluation job.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Job" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Get the status of a job.", - "description": "Get the status of a job.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "job_id", - "in": "path", - "description": "The ID of the job to get the status of.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Cancel a job.", - "description": "Cancel a job.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "job_id", - "in": "path", - "description": "The ID of the job to cancel.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result": { - "get": { - "responses": { - "200": { - "description": "The result of the job.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluateResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Get the result of a job.", - "description": "Get the result of a job.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "job_id", - "in": "path", - "description": "The ID of the job to get the result of.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result": { - "get": { - "responses": { - "200": { - "description": "The result of the job.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluateResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Get the result of a job.", - "description": "Get the result of a job.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "job_id", - "in": "path", - "description": "The ID of the job to get the result of.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1alpha/agents/{agent_id}/sessions": { - "get": { - "responses": { - "200": { - "description": "A PaginatedResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "List all session(s) of a given agent.", - "description": "List all session(s) of a given agent.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to list sessions for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start_index", - "in": "query", - "description": "The index to start the pagination from.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of sessions to return.", - "required": false, - "schema": { - "type": "integer" - } - } - ] - } - }, - "/v1/agents/{agent_id}/sessions": { - "get": { - "responses": { - "200": { - "description": "A PaginatedResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "List all session(s) of a given agent.", - "description": "List all session(s) of a given agent.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to list sessions for.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start_index", - "in": "query", - "description": "The index to start the pagination from.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of sessions to return.", - "required": false, - "schema": { - "type": "integer" - } - } - ] - } - }, - "/v1alpha/eval/benchmarks": { - "get": { - "responses": { - "200": { - "description": "A ListBenchmarksResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListBenchmarksResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Benchmarks" - ], - "summary": "List all benchmarks.", - "description": "List all benchmarks.", - "parameters": [] - }, - "post": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Benchmarks" - ], - "summary": "Register a benchmark.", - "description": "Register a benchmark.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterBenchmarkRequest" - } - } - }, - "required": true - } - } - }, - "/v1/eval/benchmarks": { - "get": { - "responses": { - "200": { - "description": "A ListBenchmarksResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListBenchmarksResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Benchmarks" - ], - "summary": "List all benchmarks.", - "description": "List all benchmarks.", - "parameters": [] - }, - "post": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Benchmarks" - ], - "summary": "Register a benchmark.", - "description": "Register a benchmark.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterBenchmarkRequest" - } - } - }, - "required": true - } - } - }, - "/v1/chat/completions": { - "get": { - "responses": { - "200": { - "description": "A ListOpenAIChatCompletionResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListOpenAIChatCompletionResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Inference" - ], - "summary": "List all chat completions.", - "description": "List all chat completions.", - "parameters": [ - { - "name": "after", - "in": "query", - "description": "The ID of the last chat completion to return.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "The maximum number of chat completions to return.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "model", - "in": "query", - "description": "The model to filter by.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "order", - "in": "query", - "description": "The order to sort the chat completions by: \"asc\" or \"desc\". Defaults to \"desc\".", - "required": false, - "schema": { - "$ref": "#/components/schemas/Order" - } - } - ] - }, - "post": { - "responses": { - "200": { - "description": "An OpenAIChatCompletion.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAIChatCompletion" - }, - { - "$ref": "#/components/schemas/OpenAIChatCompletionChunk" - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Inference" - ], - "summary": "Generate an OpenAI-compatible chat completion for the given messages using the specified model.", - "description": "Generate an OpenAI-compatible chat completion for the given messages using the specified model.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenaiChatCompletionRequest" - } - } - }, - "required": true - } - } - }, - "/v1beta/datasets": { - "get": { - "responses": { - "200": { - "description": "A ListDatasetsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListDatasetsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Datasets" - ], - "summary": "List all datasets.", - "description": "List all datasets.", - "parameters": [] - }, - "post": { - "responses": { - "200": { - "description": "A Dataset.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dataset" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Datasets" - ], - "summary": "Register a new dataset.", - "description": "Register a new dataset.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterDatasetRequest" - } - } - }, - "required": true - } - } - }, - "/v1/datasets": { - "get": { - "responses": { - "200": { - "description": "A ListDatasetsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListDatasetsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Datasets" - ], - "summary": "List all datasets.", - "description": "List all datasets.", - "parameters": [] - }, - "post": { - "responses": { - "200": { - "description": "A Dataset.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dataset" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Datasets" - ], - "summary": "Register a new dataset.", - "description": "Register a new dataset.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterDatasetRequest" - } - } - }, - "required": true - } - } - }, - "/v1/models": { - "get": { - "responses": { - "200": { - "description": "A ListModelsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListModelsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Models" - ], - "summary": "List all models.", - "description": "List all models.", - "parameters": [] - }, - "post": { - "responses": { - "200": { - "description": "A Model.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Model" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Models" - ], - "summary": "Register a model.", - "description": "Register a model.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterModelRequest" - } - } - }, - "required": true - } + "deprecated": false } }, "/v1/responses/{response_id}/input_items": { @@ -4476,18 +1803,19 @@ "$ref": "#/components/schemas/Order" } } - ] + ], + "deprecated": false } }, - "/v1/prompts/{prompt_id}/versions": { - "get": { + "/v1/safety/run-shield": { + "post": { "responses": { "200": { - "description": "A ListPromptsResponse containing all versions of the prompt.", + "description": "A RunShieldResponse.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListPromptsResponse" + "$ref": "#/components/schemas/RunShieldResponse" } } } @@ -4506,32 +1834,185 @@ } }, "tags": [ - "Prompts" + "Safety" ], - "summary": "List all versions of a specific prompt.", - "description": "List all versions of a specific prompt.", + "summary": "Run a shield.", + "description": "Run a shield.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunShieldRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/scoring-functions": { + "get": { + "responses": { + "200": { + "description": "A ListScoringFunctionsResponse.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListScoringFunctionsResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "ScoringFunctions" + ], + "summary": "List all scoring functions.", + "description": "List all scoring functions.", + "parameters": [], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "ScoringFunctions" + ], + "summary": "Register a scoring function.", + "description": "Register a scoring function.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterScoringFunctionRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/scoring-functions/{scoring_fn_id}": { + "get": { + "responses": { + "200": { + "description": "A ScoringFn.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScoringFn" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "ScoringFunctions" + ], + "summary": "Get a scoring function by its ID.", + "description": "Get a scoring function by its ID.", "parameters": [ { - "name": "prompt_id", + "name": "scoring_fn_id", "in": "path", - "description": "The identifier of the prompt to list versions for.", + "description": "The ID of the scoring function to get.", "required": true, "schema": { "type": "string" } } - ] - } - }, - "/v1/providers": { - "get": { + ], + "deprecated": false + }, + "delete": { "responses": { "200": { - "description": "A ListProvidersResponse containing information about all providers.", + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "ScoringFunctions" + ], + "summary": "Unregister a scoring function.", + "description": "Unregister a scoring function.", + "parameters": [ + { + "name": "scoring_fn_id", + "in": "path", + "description": "The ID of the scoring function to unregister.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/scoring/score": { + "post": { + "responses": { + "200": { + "description": "A ScoreResponse object containing rows and aggregated results.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListProvidersResponse" + "$ref": "#/components/schemas/ScoreResponse" } } } @@ -4550,22 +2031,33 @@ } }, "tags": [ - "Providers" + "Scoring" ], - "summary": "List all available providers.", - "description": "List all available providers.", - "parameters": [] + "summary": "Score a list of rows.", + "description": "Score a list of rows.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScoreRequest" + } + } + }, + "required": true + }, + "deprecated": false } }, - "/v1/inspect/routes": { - "get": { + "/v1/scoring/score-batch": { + "post": { "responses": { "200": { - "description": "Response containing information about all available routes.", + "description": "A ScoreBatchResponse.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListRoutesResponse" + "$ref": "#/components/schemas/ScoreBatchResponse" } } } @@ -4584,11 +2076,646 @@ } }, "tags": [ - "Inspect" + "Scoring" ], - "summary": "List all available API routes with their methods and implementing providers.", - "description": "List all available API routes with their methods and implementing providers.", - "parameters": [] + "summary": "Score a batch of rows.", + "description": "Score a batch of rows.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScoreBatchRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/shields": { + "get": { + "responses": { + "200": { + "description": "A ListShieldsResponse.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListShieldsResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Shields" + ], + "summary": "List all shields.", + "description": "List all shields.", + "parameters": [], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "A Shield.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Shield" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Shields" + ], + "summary": "Register a shield.", + "description": "Register a shield.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterShieldRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/shields/{identifier}": { + "get": { + "responses": { + "200": { + "description": "A Shield.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Shield" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Shields" + ], + "summary": "Get a shield by its identifier.", + "description": "Get a shield by its identifier.", + "parameters": [ + { + "name": "identifier", + "in": "path", + "description": "The identifier of the shield to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Shields" + ], + "summary": "Unregister a shield.", + "description": "Unregister a shield.", + "parameters": [ + { + "name": "identifier", + "in": "path", + "description": "The identifier of the shield to unregister.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/synthetic-data-generation/generate": { + "post": { + "responses": { + "200": { + "description": "Response containing filtered synthetic data samples and optional statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyntheticDataGenerationResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "SyntheticDataGeneration (Coming Soon)" + ], + "summary": "Generate synthetic data based on input dialogs and apply filtering.", + "description": "Generate synthetic data based on input dialogs and apply filtering.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyntheticDataGenerateRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/telemetry/events": { + "post": { + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Telemetry" + ], + "summary": "Log an event.", + "description": "Log an event.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LogEventRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/telemetry/metrics/{metric_name}": { + "post": { + "responses": { + "200": { + "description": "A QueryMetricsResponse.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryMetricsResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Telemetry" + ], + "summary": "Query metrics.", + "description": "Query metrics.", + "parameters": [ + { + "name": "metric_name", + "in": "path", + "description": "The name of the metric to query.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryMetricsRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/telemetry/spans": { + "post": { + "responses": { + "200": { + "description": "A QuerySpansResponse.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuerySpansResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Telemetry" + ], + "summary": "Query spans.", + "description": "Query spans.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuerySpansRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/telemetry/spans/export": { + "post": { + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Telemetry" + ], + "summary": "Save spans to a dataset.", + "description": "Save spans to a dataset.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveSpansToDatasetRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/telemetry/spans/{span_id}/tree": { + "post": { + "responses": { + "200": { + "description": "A QuerySpanTreeResponse.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuerySpanTreeResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Telemetry" + ], + "summary": "Get a span tree by its ID.", + "description": "Get a span tree by its ID.", + "parameters": [ + { + "name": "span_id", + "in": "path", + "description": "The ID of the span to get the tree from.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSpanTreeRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/telemetry/traces": { + "post": { + "responses": { + "200": { + "description": "A QueryTracesResponse.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryTracesResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Telemetry" + ], + "summary": "Query traces.", + "description": "Query traces.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryTracesRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/telemetry/traces/{trace_id}": { + "get": { + "responses": { + "200": { + "description": "A Trace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trace" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Telemetry" + ], + "summary": "Get a trace by its ID.", + "description": "Get a trace by its ID.", + "parameters": [ + { + "name": "trace_id", + "in": "path", + "description": "The ID of the trace to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/telemetry/traces/{trace_id}/spans/{span_id}": { + "get": { + "responses": { + "200": { + "description": "A Span.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Span" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "Telemetry" + ], + "summary": "Get a span by its ID.", + "description": "Get a span by its ID.", + "parameters": [ + { + "name": "trace_id", + "in": "path", + "description": "The ID of the trace to get the span from.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "span_id", + "in": "path", + "description": "The ID of the span to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/tool-runtime/invoke": { + "post": { + "responses": { + "200": { + "description": "A ToolInvocationResult.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolInvocationResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "ToolRuntime" + ], + "summary": "Run a tool with the given arguments.", + "description": "Run a tool with the given arguments.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvokeToolRequest" + } + } + }, + "required": true + }, + "deprecated": false } }, "/v1/tool-runtime/list-tools": { @@ -4641,42 +2768,11 @@ "$ref": "#/components/schemas/URL" } } - ] + ], + "deprecated": false } }, - "/v1/scoring-functions": { - "get": { - "responses": { - "200": { - "description": "A ListScoringFunctionsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListScoringFunctionsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ScoringFunctions" - ], - "summary": "List all scoring functions.", - "description": "List all scoring functions.", - "parameters": [] - }, + "/v1/tool-runtime/rag-tool/insert": { "post": { "responses": { "200": { @@ -4696,64 +2792,33 @@ } }, "tags": [ - "ScoringFunctions" + "ToolRuntime" ], - "summary": "Register a scoring function.", - "description": "Register a scoring function.", + "summary": "Index documents so they can be used by the RAG system.", + "description": "Index documents so they can be used by the RAG system.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisterScoringFunctionRequest" + "$ref": "#/components/schemas/InsertRequest" } } }, "required": true - } + }, + "deprecated": false } }, - "/v1/shields": { - "get": { - "responses": { - "200": { - "description": "A ListShieldsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListShieldsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Shields" - ], - "summary": "List all shields.", - "description": "List all shields.", - "parameters": [] - }, + "/v1/tool-runtime/rag-tool/query": { "post": { "responses": { "200": { - "description": "A Shield.", + "description": "RAGQueryResult containing the retrieved content and metadata", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Shield" + "$ref": "#/components/schemas/RAGQueryResult" } } } @@ -4772,21 +2837,22 @@ } }, "tags": [ - "Shields" + "ToolRuntime" ], - "summary": "Register a shield.", - "description": "Register a shield.", + "summary": "Query the RAG system for context; typically invoked by the agent.", + "description": "Query the RAG system for context; typically invoked by the agent.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisterShieldRequest" + "$ref": "#/components/schemas/QueryRequest" } } }, "required": true - } + }, + "deprecated": false } }, "/v1/toolgroups": { @@ -4820,7 +2886,8 @@ ], "summary": "List tool groups with optional provider.", "description": "List tool groups with optional provider.", - "parameters": [] + "parameters": [], + "deprecated": false }, "post": { "responses": { @@ -4855,7 +2922,89 @@ } }, "required": true - } + }, + "deprecated": false + } + }, + "/v1/toolgroups/{toolgroup_id}": { + "get": { + "responses": { + "200": { + "description": "A ToolGroup.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolGroup" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "ToolGroups" + ], + "summary": "Get a tool group by its ID.", + "description": "Get a tool group by its ID.", + "parameters": [ + { + "name": "toolgroup_id", + "in": "path", + "description": "The ID of the tool group to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "ToolGroups" + ], + "summary": "Unregister a tool group.", + "description": "Unregister a tool group.", + "parameters": [ + { + "name": "toolgroup_id", + "in": "path", + "description": "The ID of the tool group to unregister.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false } }, "/v1/tools": { @@ -4899,7 +3048,53 @@ "type": "string" } } - ] + ], + "deprecated": false + } + }, + "/v1/tools/{tool_name}": { + "get": { + "responses": { + "200": { + "description": "A Tool.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tool" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "ToolGroups" + ], + "summary": "Get a tool by its name.", + "description": "Get a tool by its name.", + "parameters": [ + { + "name": "tool_name", + "in": "path", + "description": "The name of the tool to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false } }, "/v1/vector-dbs": { @@ -4933,7 +3128,8 @@ ], "summary": "List all vector databases.", "description": "List all vector databases.", - "parameters": [] + "parameters": [], + "deprecated": false }, "post": { "responses": { @@ -4975,10 +3171,92 @@ } }, "required": true - } + }, + "deprecated": false } }, - "/v1/telemetry/events": { + "/v1/vector-dbs/{vector_db_id}": { + "get": { + "responses": { + "200": { + "description": "A VectorDB.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorDB" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorDBs" + ], + "summary": "Get a vector database by its identifier.", + "description": "Get a vector database by its identifier.", + "parameters": [ + { + "name": "vector_db_id", + "in": "path", + "description": "The identifier of the vector database to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorDBs" + ], + "summary": "Unregister a vector database.", + "description": "Unregister a vector database.", + "parameters": [ + { + "name": "vector_db_id", + "in": "path", + "description": "The identifier of the vector database to unregister.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + } + }, + "/v1/vector-io/insert": { "post": { "responses": { "200": { @@ -4998,32 +3276,33 @@ } }, "tags": [ - "Telemetry" + "VectorIO" ], - "summary": "Log an event.", - "description": "Log an event.", + "summary": "Insert chunks into a vector database.", + "description": "Insert chunks into a vector database.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LogEventRequest" + "$ref": "#/components/schemas/InsertChunksRequest" } } }, "required": true - } + }, + "deprecated": false } }, - "/v1/vector_stores/{vector_store_id}/files": { - "get": { + "/v1/vector-io/query": { + "post": { "responses": { "200": { - "description": "A VectorStoreListFilesResponse containing the list of files.", + "description": "A QueryChunksResponse.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VectorStoreListFilesResponse" + "$ref": "#/components/schemas/QueryChunksResponse" } } } @@ -5044,213 +3323,20 @@ "tags": [ "VectorIO" ], - "summary": "List files in a vector store.", - "description": "List files in a vector store.", - "parameters": [ - { - "name": "vector_store_id", - "in": "path", - "description": "The ID of the vector store to list files from.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "(Optional) A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "order", - "in": "query", - "description": "(Optional) Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "after", - "in": "query", - "description": "(Optional) A cursor for use in pagination. `after` is an object ID that defines your place in the list.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "(Optional) A cursor for use in pagination. `before` is an object ID that defines your place in the list.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "filter", - "in": "query", - "description": "(Optional) Filter by file status to only return files with the specified status.", - "required": false, - "schema": { - "$ref": "#/components/schemas/VectorStoreFileStatus" - } - } - ] - }, - "post": { - "responses": { - "200": { - "description": "A VectorStoreFileObject representing the attached file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreFileObject" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorIO" - ], - "summary": "Attach a file to a vector store.", - "description": "Attach a file to a vector store.", - "parameters": [ - { - "name": "vector_store_id", - "in": "path", - "description": "The ID of the vector store to attach the file to.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenaiAttachFileToVectorStoreRequest" - } - } - }, - "required": true - } - } - }, - "/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel": { - "post": { - "responses": { - "200": { - "description": "A VectorStoreFileBatchObject representing the cancelled file batch.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreFileBatchObject" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorIO" - ], - "summary": "Cancels a vector store file batch.", - "description": "Cancels a vector store file batch.", - "parameters": [ - { - "name": "batch_id", - "in": "path", - "description": "The ID of the file batch to cancel.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "vector_store_id", - "in": "path", - "description": "The ID of the vector store containing the file batch.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/completions": { - "post": { - "responses": { - "200": { - "description": "An OpenAICompletion.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAICompletion" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Inference" - ], - "summary": "Generate an OpenAI-compatible completion for the given prompt using the specified model.", - "description": "Generate an OpenAI-compatible completion for the given prompt using the specified model.", + "summary": "Query chunks from a vector database.", + "description": "Query chunks from a vector database.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenaiCompletionRequest" + "$ref": "#/components/schemas/QueryChunksRequest" } } }, "required": true - } + }, + "deprecated": false } }, "/v1/vector_stores": { @@ -5321,7 +3407,8 @@ "type": "string" } } - ] + ], + "deprecated": false }, "post": { "responses": { @@ -5363,7 +3450,149 @@ } }, "required": true - } + }, + "deprecated": false + } + }, + "/v1/vector_stores/{vector_store_id}": { + "get": { + "responses": { + "200": { + "description": "A VectorStoreObject representing the vector store.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreObject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorIO" + ], + "summary": "Retrieves a vector store.", + "description": "Retrieves a vector store.", + "parameters": [ + { + "name": "vector_store_id", + "in": "path", + "description": "The ID of the vector store to retrieve.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "A VectorStoreObject representing the updated vector store.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreObject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorIO" + ], + "summary": "Updates a vector store.", + "description": "Updates a vector store.", + "parameters": [ + { + "name": "vector_store_id", + "in": "path", + "description": "The ID of the vector store to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenaiUpdateVectorStoreRequest" + } + } + }, + "required": true + }, + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "A VectorStoreDeleteResponse indicating the deletion status.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreDeleteResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorIO" + ], + "summary": "Delete a vector store.", + "description": "Delete a vector store.", + "parameters": [ + { + "name": "vector_store_id", + "in": "path", + "description": "The ID of the vector store to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false } }, "/v1/vector_stores/{vector_store_id}/file_batches": { @@ -5417,104 +3646,19 @@ } }, "required": true - } + }, + "deprecated": false } }, - "/v1/files/{file_id}": { + "/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}": { "get": { "responses": { "200": { - "description": "An OpenAIFileObject containing file information.", + "description": "A VectorStoreFileBatchObject representing the file batch.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAIFileObject" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Files" - ], - "summary": "Returns information about a specific file.", - "description": "Returns information about a specific file.", - "parameters": [ - { - "name": "file_id", - "in": "path", - "description": "The ID of the file to use for this request.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "responses": { - "200": { - "description": "An OpenAIFileDeleteResponse indicating successful deletion.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAIFileDeleteResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Files" - ], - "summary": "Delete a file.", - "description": "Delete a file.", - "parameters": [ - { - "name": "file_id", - "in": "path", - "description": "The ID of the file to use for this request.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/vector_stores/{vector_store_id}": { - "get": { - "responses": { - "200": { - "description": "A VectorStoreObject representing the vector store.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreObject" + "$ref": "#/components/schemas/VectorStoreFileBatchObject" } } } @@ -5535,28 +3679,40 @@ "tags": [ "VectorIO" ], - "summary": "Retrieves a vector store.", - "description": "Retrieves a vector store.", + "summary": "Retrieve a vector store file batch.", + "description": "Retrieve a vector store file batch.", "parameters": [ + { + "name": "batch_id", + "in": "path", + "description": "The ID of the file batch to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "vector_store_id", "in": "path", - "description": "The ID of the vector store to retrieve.", + "description": "The ID of the vector store containing the file batch.", "required": true, "schema": { "type": "string" } } - ] - }, + ], + "deprecated": false + } + }, + "/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel": { "post": { "responses": { "200": { - "description": "A VectorStoreObject representing the updated vector store.", + "description": "A VectorStoreFileBatchObject representing the cancelled file batch.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VectorStoreObject" + "$ref": "#/components/schemas/VectorStoreFileBatchObject" } } } @@ -5577,409 +3733,29 @@ "tags": [ "VectorIO" ], - "summary": "Updates a vector store.", - "description": "Updates a vector store.", + "summary": "Cancels a vector store file batch.", + "description": "Cancels a vector store file batch.", "parameters": [ + { + "name": "batch_id", + "in": "path", + "description": "The ID of the file batch to cancel.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "vector_store_id", "in": "path", - "description": "The ID of the vector store to update.", + "description": "The ID of the vector store containing the file batch.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenaiUpdateVectorStoreRequest" - } - } - }, - "required": true - } - }, - "delete": { - "responses": { - "200": { - "description": "A VectorStoreDeleteResponse indicating the deletion status.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreDeleteResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorIO" - ], - "summary": "Delete a vector store.", - "description": "Delete a vector store.", - "parameters": [ - { - "name": "vector_store_id", - "in": "path", - "description": "The ID of the vector store to delete.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/vector_stores/{vector_store_id}/files/{file_id}": { - "get": { - "responses": { - "200": { - "description": "A VectorStoreFileObject representing the file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreFileObject" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorIO" - ], - "summary": "Retrieves a vector store file.", - "description": "Retrieves a vector store file.", - "parameters": [ - { - "name": "vector_store_id", - "in": "path", - "description": "The ID of the vector store containing the file to retrieve.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "file_id", - "in": "path", - "description": "The ID of the file to retrieve.", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "post": { - "responses": { - "200": { - "description": "A VectorStoreFileObject representing the updated file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreFileObject" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorIO" - ], - "summary": "Updates a vector store file.", - "description": "Updates a vector store file.", - "parameters": [ - { - "name": "vector_store_id", - "in": "path", - "description": "The ID of the vector store containing the file to update.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "file_id", - "in": "path", - "description": "The ID of the file to update.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenaiUpdateVectorStoreFileRequest" - } - } - }, - "required": true - } - }, - "delete": { - "responses": { - "200": { - "description": "A VectorStoreFileDeleteResponse indicating the deletion status.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VectorStoreFileDeleteResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorIO" - ], - "summary": "Delete a vector store file.", - "description": "Delete a vector store file.", - "parameters": [ - { - "name": "vector_store_id", - "in": "path", - "description": "The ID of the vector store containing the file to delete.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "file_id", - "in": "path", - "description": "The ID of the file to delete.", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/embeddings": { - "post": { - "responses": { - "200": { - "description": "An OpenAIEmbeddingsResponse containing the embeddings.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAIEmbeddingsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Inference" - ], - "summary": "Generate OpenAI-compatible embeddings for the given input using the specified model.", - "description": "Generate OpenAI-compatible embeddings for the given input using the specified model.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenaiEmbeddingsRequest" - } - } - }, - "required": true - } - } - }, - "/v1/files": { - "get": { - "responses": { - "200": { - "description": "An ListOpenAIFileResponse containing the list of files.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListOpenAIFileResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Files" - ], - "summary": "Returns a list of files that belong to the user's organization.", - "description": "Returns a list of files that belong to the user's organization.", - "parameters": [ - { - "name": "after", - "in": "query", - "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "order", - "in": "query", - "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.", - "required": false, - "schema": { - "$ref": "#/components/schemas/Order" - } - }, - { - "name": "purpose", - "in": "query", - "description": "Only return files with the given purpose.", - "required": false, - "schema": { - "$ref": "#/components/schemas/OpenAIFilePurpose" - } - } - ] - }, - "post": { - "responses": { - "200": { - "description": "An OpenAIFileObject representing the uploaded file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAIFileObject" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Files" - ], - "summary": "Upload a file that can be used across various endpoints.", - "description": "Upload a file that can be used across various endpoints.\nThe file upload should be a multipart form request with:\n- file: The File object (not file name) to be uploaded.\n- purpose: The intended purpose of the uploaded file.\n- expires_after: Optional form values describing expiration for the file.", - "parameters": [], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "purpose": { - "$ref": "#/components/schemas/OpenAIFilePurpose" - }, - "expires_after": { - "$ref": "#/components/schemas/ExpiresAfter" - } - }, - "required": [ - "file", - "purpose" - ] - } - } - }, - "required": true - } + "deprecated": false } }, "/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files": { @@ -6077,62 +3853,19 @@ "type": "string" } } - ] - } - }, - "/v1/files/{file_id}/content": { - "get": { - "responses": { - "200": { - "description": "The raw file content as a binary response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Response" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Files" ], - "summary": "Returns the contents of the specified file.", - "description": "Returns the contents of the specified file.", - "parameters": [ - { - "name": "file_id", - "in": "path", - "description": "The ID of the file to use for this request.", - "required": true, - "schema": { - "type": "string" - } - } - ] + "deprecated": false } }, - "/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}": { + "/v1/vector_stores/{vector_store_id}/files": { "get": { "responses": { "200": { - "description": "A VectorStoreFileBatchObject representing the file batch.", + "description": "A VectorStoreListFilesResponse containing the list of files.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VectorStoreFileBatchObject" + "$ref": "#/components/schemas/VectorStoreListFilesResponse" } } } @@ -6153,28 +3886,286 @@ "tags": [ "VectorIO" ], - "summary": "Retrieve a vector store file batch.", - "description": "Retrieve a vector store file batch.", + "summary": "List files in a vector store.", + "description": "List files in a vector store.", "parameters": [ { - "name": "batch_id", + "name": "vector_store_id", "in": "path", - "description": "The ID of the file batch to retrieve.", + "description": "The ID of the vector store to list files from.", "required": true, "schema": { "type": "string" } }, + { + "name": "limit", + "in": "query", + "description": "(Optional) A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "order", + "in": "query", + "description": "(Optional) Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "in": "query", + "description": "(Optional) A cursor for use in pagination. `after` is an object ID that defines your place in the list.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "(Optional) A cursor for use in pagination. `before` is an object ID that defines your place in the list.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "description": "(Optional) Filter by file status to only return files with the specified status.", + "required": false, + "schema": { + "$ref": "#/components/schemas/VectorStoreFileStatus" + } + } + ], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "A VectorStoreFileObject representing the attached file.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreFileObject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorIO" + ], + "summary": "Attach a file to a vector store.", + "description": "Attach a file to a vector store.", + "parameters": [ { "name": "vector_store_id", "in": "path", - "description": "The ID of the vector store containing the file batch.", + "description": "The ID of the vector store to attach the file to.", "required": true, "schema": { "type": "string" } } - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenaiAttachFileToVectorStoreRequest" + } + } + }, + "required": true + }, + "deprecated": false + } + }, + "/v1/vector_stores/{vector_store_id}/files/{file_id}": { + "get": { + "responses": { + "200": { + "description": "A VectorStoreFileObject representing the file.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreFileObject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorIO" + ], + "summary": "Retrieves a vector store file.", + "description": "Retrieves a vector store file.", + "parameters": [ + { + "name": "vector_store_id", + "in": "path", + "description": "The ID of the vector store containing the file to retrieve.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_id", + "in": "path", + "description": "The ID of the file to retrieve.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false + }, + "post": { + "responses": { + "200": { + "description": "A VectorStoreFileObject representing the updated file.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreFileObject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorIO" + ], + "summary": "Updates a vector store file.", + "description": "Updates a vector store file.", + "parameters": [ + { + "name": "vector_store_id", + "in": "path", + "description": "The ID of the vector store containing the file to update.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_id", + "in": "path", + "description": "The ID of the file to update.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenaiUpdateVectorStoreFileRequest" + } + } + }, + "required": true + }, + "deprecated": false + }, + "delete": { + "responses": { + "200": { + "description": "A VectorStoreFileDeleteResponse indicating the deletion status.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VectorStoreFileDeleteResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest400" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests429" + }, + "500": { + "$ref": "#/components/responses/InternalServerError500" + }, + "default": { + "$ref": "#/components/responses/DefaultError" + } + }, + "tags": [ + "VectorIO" + ], + "summary": "Delete a vector store file.", + "description": "Delete a vector store file.", + "parameters": [ + { + "name": "vector_store_id", + "in": "path", + "description": "The ID of the vector store containing the file to delete.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_id", + "in": "path", + "description": "The ID of the file to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false } }, "/v1/vector_stores/{vector_store_id}/files/{file_id}/content": { @@ -6227,7 +4218,8 @@ "type": "string" } } - ] + ], + "deprecated": false } }, "/v1/vector_stores/{vector_store_id}/search": { @@ -6281,1209 +4273,8 @@ } }, "required": true - } - } - }, - "/v1alpha/post-training/preference-optimize": { - "post": { - "responses": { - "200": { - "description": "A PostTrainingJob.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTrainingJob" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Run preference optimization of a model.", - "description": "Run preference optimization of a model.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreferenceOptimizeRequest" - } - } - }, - "required": true - } - } - }, - "/v1/post-training/preference-optimize": { - "post": { - "responses": { - "200": { - "description": "A PostTrainingJob.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTrainingJob" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Run preference optimization of a model.", - "description": "Run preference optimization of a model.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PreferenceOptimizeRequest" - } - } - }, - "required": true - } - } - }, - "/v1/tool-runtime/rag-tool/query": { - "post": { - "responses": { - "200": { - "description": "RAGQueryResult containing the retrieved content and metadata", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RAGQueryResult" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "ToolRuntime" - ], - "summary": "Query the RAG system for context; typically invoked by the agent.", - "description": "Query the RAG system for context; typically invoked by the agent.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryRequest" - } - } - }, - "required": true - } - } - }, - "/v1/vector-io/query": { - "post": { - "responses": { - "200": { - "description": "A QueryChunksResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryChunksResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "VectorIO" - ], - "summary": "Query chunks from a vector database.", - "description": "Query chunks from a vector database.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryChunksRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/telemetry/metrics/{metric_name}": { - "post": { - "responses": { - "200": { - "description": "A QueryMetricsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryMetricsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Query metrics.", - "description": "Query metrics.", - "parameters": [ - { - "name": "metric_name", - "in": "path", - "description": "The name of the metric to query.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryMetricsRequest" - } - } - }, - "required": true - } - } - }, - "/v1/telemetry/metrics/{metric_name}": { - "post": { - "responses": { - "200": { - "description": "A QueryMetricsResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryMetricsResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Query metrics.", - "description": "Query metrics.", - "parameters": [ - { - "name": "metric_name", - "in": "path", - "description": "The name of the metric to query.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryMetricsRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/telemetry/spans": { - "post": { - "responses": { - "200": { - "description": "A QuerySpansResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuerySpansResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Query spans.", - "description": "Query spans.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuerySpansRequest" - } - } - }, - "required": true - } - } - }, - "/v1/telemetry/spans": { - "post": { - "responses": { - "200": { - "description": "A QuerySpansResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuerySpansResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Query spans.", - "description": "Query spans.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuerySpansRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/telemetry/traces": { - "post": { - "responses": { - "200": { - "description": "A QueryTracesResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryTracesResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Query traces.", - "description": "Query traces.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryTracesRequest" - } - } - }, - "required": true - } - } - }, - "/v1/telemetry/traces": { - "post": { - "responses": { - "200": { - "description": "A QueryTracesResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryTracesResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Query traces.", - "description": "Query traces.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryTracesRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/inference/rerank": { - "post": { - "responses": { - "200": { - "description": "RerankResponse with indices sorted by relevance score (descending).", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RerankResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Inference" - ], - "summary": "Rerank a list of documents based on their relevance to a query.", - "description": "Rerank a list of documents based on their relevance to a query.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RerankRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume": { - "post": { - "responses": { - "200": { - "description": "A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk objects.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Turn" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/AgentTurnResponseStreamChunk" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Resume an agent turn with executed tool call responses.", - "description": "Resume an agent turn with executed tool call responses.\nWhen a Turn has the status `awaiting_input` due to pending input from client side tool calls, this endpoint can be used to submit the outputs from the tool calls once they are ready.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to resume.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to resume.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "turn_id", - "in": "path", - "description": "The ID of the turn to resume.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResumeAgentTurnRequest" - } - } - }, - "required": true - } - } - }, - "/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume": { - "post": { - "responses": { - "200": { - "description": "A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk objects.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Turn" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/AgentTurnResponseStreamChunk" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Agents" - ], - "summary": "Resume an agent turn with executed tool call responses.", - "description": "Resume an agent turn with executed tool call responses.\nWhen a Turn has the status `awaiting_input` due to pending input from client side tool calls, this endpoint can be used to submit the outputs from the tool calls once they are ready.", - "parameters": [ - { - "name": "agent_id", - "in": "path", - "description": "The ID of the agent to resume.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "description": "The ID of the session to resume.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "turn_id", - "in": "path", - "description": "The ID of the turn to resume.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResumeAgentTurnRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/eval/benchmarks/{benchmark_id}/jobs": { - "post": { - "responses": { - "200": { - "description": "The job that was created to run the evaluation.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Job" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Run an evaluation on a benchmark.", - "description": "Run an evaluation on a benchmark.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunEvalRequest" - } - } - }, - "required": true - } - } - }, - "/v1/eval/benchmarks/{benchmark_id}/jobs": { - "post": { - "responses": { - "200": { - "description": "The job that was created to run the evaluation.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Job" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Eval" - ], - "summary": "Run an evaluation on a benchmark.", - "description": "Run an evaluation on a benchmark.", - "parameters": [ - { - "name": "benchmark_id", - "in": "path", - "description": "The ID of the benchmark to run the evaluation on.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunEvalRequest" - } - } - }, - "required": true - } - } - }, - "/v1/moderations": { - "post": { - "responses": { - "200": { - "description": "A moderation object.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModerationObject" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Safety" - ], - "summary": "Classifies if text and/or image inputs are potentially harmful.", - "description": "Classifies if text and/or image inputs are potentially harmful.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunModerationRequest" - } - } - }, - "required": true - } - } - }, - "/v1/safety/run-shield": { - "post": { - "responses": { - "200": { - "description": "A RunShieldResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunShieldResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Safety" - ], - "summary": "Run a shield.", - "description": "Run a shield.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunShieldRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/telemetry/spans/export": { - "post": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Save spans to a dataset.", - "description": "Save spans to a dataset.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveSpansToDatasetRequest" - } - } - }, - "required": true - } - } - }, - "/v1/telemetry/spans/export": { - "post": { - "responses": { - "200": { - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Telemetry" - ], - "summary": "Save spans to a dataset.", - "description": "Save spans to a dataset.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveSpansToDatasetRequest" - } - } - }, - "required": true - } - } - }, - "/v1/scoring/score": { - "post": { - "responses": { - "200": { - "description": "A ScoreResponse object containing rows and aggregated results.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScoreResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Scoring" - ], - "summary": "Score a list of rows.", - "description": "Score a list of rows.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScoreRequest" - } - } - }, - "required": true - } - } - }, - "/v1/scoring/score-batch": { - "post": { - "responses": { - "200": { - "description": "A ScoreBatchResponse.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScoreBatchResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Scoring" - ], - "summary": "Score a batch of rows.", - "description": "Score a batch of rows.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScoreBatchRequest" - } - } - }, - "required": true - } - } - }, - "/v1/prompts/{prompt_id}/set-default-version": { - "post": { - "responses": { - "200": { - "description": "The prompt with the specified version now set as default.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Prompt" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "Prompts" - ], - "summary": "Set which version of a prompt should be the default in get_prompt (latest).", - "description": "Set which version of a prompt should be the default in get_prompt (latest).", - "parameters": [ - { - "name": "prompt_id", - "in": "path", - "description": "The identifier of the prompt.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetDefaultVersionRequest" - } - } - }, - "required": true - } - } - }, - "/v1alpha/post-training/supervised-fine-tune": { - "post": { - "responses": { - "200": { - "description": "A PostTrainingJob.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTrainingJob" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Run supervised fine-tuning of a model.", - "description": "Run supervised fine-tuning of a model.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SupervisedFineTuneRequest" - } - } - }, - "required": true - } - } - }, - "/v1/post-training/supervised-fine-tune": { - "post": { - "responses": { - "200": { - "description": "A PostTrainingJob.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTrainingJob" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "PostTraining (Coming Soon)" - ], - "summary": "Run supervised fine-tuning of a model.", - "description": "Run supervised fine-tuning of a model.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SupervisedFineTuneRequest" - } - } - }, - "required": true - } - } - }, - "/v1/synthetic-data-generation/generate": { - "post": { - "responses": { - "200": { - "description": "Response containing filtered synthetic data samples and optional statistics", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyntheticDataGenerationResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest400" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests429" - }, - "500": { - "$ref": "#/components/responses/InternalServerError500" - }, - "default": { - "$ref": "#/components/responses/DefaultError" - } - }, - "tags": [ - "SyntheticDataGeneration (Coming Soon)" - ], - "summary": "Generate synthetic data based on input dialogs and apply filtering.", - "description": "Generate synthetic data based on input dialogs and apply filtering.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyntheticDataGenerateRequest" - } - } - }, - "required": true - } + "deprecated": false } }, "/v1/version": { @@ -7517,7 +4308,8 @@ ], "summary": "Get the version of the service.", "description": "Get the version of the service.", - "parameters": [] + "parameters": [], + "deprecated": false } } }, @@ -7553,6 +4345,1379 @@ "title": "Error", "description": "Error response from the API. Roughly follows RFC 7807." }, + "Order": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Order", + "description": "Sort order for paginated responses." + }, + "ListOpenAIChatCompletionResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the chat completion" + }, + "choices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChoice" + }, + "description": "List of choices" + }, + "object": { + "type": "string", + "const": "chat.completion", + "default": "chat.completion", + "description": "The object type, which will be \"chat.completion\"" + }, + "created": { + "type": "integer", + "description": "The Unix timestamp in seconds when the chat completion was created" + }, + "model": { + "type": "string", + "description": "The model that was used to generate the chat completion" + }, + "input_messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessageParam" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "choices", + "object", + "created", + "model", + "input_messages" + ], + "title": "OpenAICompletionWithInputMessages" + }, + "description": "List of chat completion objects with their input messages" + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more completions available beyond this list" + }, + "first_id": { + "type": "string", + "description": "ID of the first completion in this list" + }, + "last_id": { + "type": "string", + "description": "ID of the last completion in this list" + }, + "object": { + "type": "string", + "const": "list", + "default": "list", + "description": "Must be \"list\" to identify this as a list response" + } + }, + "additionalProperties": false, + "required": [ + "data", + "has_more", + "first_id", + "last_id", + "object" + ], + "title": "ListOpenAIChatCompletionResponse", + "description": "Response from listing OpenAI-compatible chat completions." + }, + "OpenAIAssistantMessageParam": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant", + "description": "Must be \"assistant\" to identify this as the model's response" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" + } + } + ], + "description": "The content of the model's response" + }, + "name": { + "type": "string", + "description": "(Optional) The name of the assistant message participant." + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChatCompletionToolCall" + }, + "description": "List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object." + } + }, + "additionalProperties": false, + "required": [ + "role" + ], + "title": "OpenAIAssistantMessageParam", + "description": "A message containing the model's (assistant) response in an OpenAI-compatible chat completion request." + }, + "OpenAIChatCompletionContentPartImageParam": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image_url", + "default": "image_url", + "description": "Must be \"image_url\" to identify this as image content" + }, + "image_url": { + "$ref": "#/components/schemas/OpenAIImageURL", + "description": "Image URL specification and processing details" + } + }, + "additionalProperties": false, + "required": [ + "type", + "image_url" + ], + "title": "OpenAIChatCompletionContentPartImageParam", + "description": "Image content part for OpenAI-compatible chat completion messages." + }, + "OpenAIChatCompletionContentPartParam": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" + }, + { + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartImageParam" + }, + { + "$ref": "#/components/schemas/OpenAIFile" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "text": "#/components/schemas/OpenAIChatCompletionContentPartTextParam", + "image_url": "#/components/schemas/OpenAIChatCompletionContentPartImageParam", + "file": "#/components/schemas/OpenAIFile" + } + } + }, + "OpenAIChatCompletionContentPartTextParam": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text", + "default": "text", + "description": "Must be \"text\" to identify this as text content" + }, + "text": { + "type": "string", + "description": "The text content of the message" + } + }, + "additionalProperties": false, + "required": [ + "type", + "text" + ], + "title": "OpenAIChatCompletionContentPartTextParam", + "description": "Text content part for OpenAI-compatible chat completion messages." + }, + "OpenAIChatCompletionToolCall": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "description": "(Optional) Index of the tool call in the list" + }, + "id": { + "type": "string", + "description": "(Optional) Unique identifier for the tool call" + }, + "type": { + "type": "string", + "const": "function", + "default": "function", + "description": "Must be \"function\" to identify this as a function call" + }, + "function": { + "$ref": "#/components/schemas/OpenAIChatCompletionToolCallFunction", + "description": "(Optional) Function call details" + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "title": "OpenAIChatCompletionToolCall", + "description": "Tool call specification for OpenAI-compatible chat completion responses." + }, + "OpenAIChatCompletionToolCallFunction": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "(Optional) Name of the function to call" + }, + "arguments": { + "type": "string", + "description": "(Optional) Arguments to pass to the function as a JSON string" + } + }, + "additionalProperties": false, + "title": "OpenAIChatCompletionToolCallFunction", + "description": "Function call details for OpenAI-compatible tool calls." + }, + "OpenAIChoice": { + "type": "object", + "properties": { + "message": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAIUserMessageParam" + }, + { + "$ref": "#/components/schemas/OpenAISystemMessageParam" + }, + { + "$ref": "#/components/schemas/OpenAIAssistantMessageParam" + }, + { + "$ref": "#/components/schemas/OpenAIToolMessageParam" + }, + { + "$ref": "#/components/schemas/OpenAIDeveloperMessageParam" + } + ], + "discriminator": { + "propertyName": "role", + "mapping": { + "user": "#/components/schemas/OpenAIUserMessageParam", + "system": "#/components/schemas/OpenAISystemMessageParam", + "assistant": "#/components/schemas/OpenAIAssistantMessageParam", + "tool": "#/components/schemas/OpenAIToolMessageParam", + "developer": "#/components/schemas/OpenAIDeveloperMessageParam" + } + }, + "description": "The message from the model" + }, + "finish_reason": { + "type": "string", + "description": "The reason the model stopped generating" + }, + "index": { + "type": "integer", + "description": "The index of the choice" + }, + "logprobs": { + "$ref": "#/components/schemas/OpenAIChoiceLogprobs", + "description": "(Optional) The log probabilities for the tokens in the message" + } + }, + "additionalProperties": false, + "required": [ + "message", + "finish_reason", + "index" + ], + "title": "OpenAIChoice", + "description": "A choice from an OpenAI-compatible chat completion response." + }, + "OpenAIChoiceLogprobs": { + "type": "object", + "properties": { + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAITokenLogProb" + }, + "description": "(Optional) The log probabilities for the tokens in the message" + }, + "refusal": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAITokenLogProb" + }, + "description": "(Optional) The log probabilities for the tokens in the message" + } + }, + "additionalProperties": false, + "title": "OpenAIChoiceLogprobs", + "description": "The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response." + }, + "OpenAIDeveloperMessageParam": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "developer", + "default": "developer", + "description": "Must be \"developer\" to identify this as a developer message" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" + } + } + ], + "description": "The content of the developer message" + }, + "name": { + "type": "string", + "description": "(Optional) The name of the developer message participant." + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ], + "title": "OpenAIDeveloperMessageParam", + "description": "A message from the developer in an OpenAI-compatible chat completion request." + }, + "OpenAIFile": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "file", + "default": "file" + }, + "file": { + "$ref": "#/components/schemas/OpenAIFileFile" + } + }, + "additionalProperties": false, + "required": [ + "type", + "file" + ], + "title": "OpenAIFile" + }, + "OpenAIFileFile": { + "type": "object", + "properties": { + "file_data": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "filename": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "OpenAIFileFile" + }, + "OpenAIImageURL": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL of the image to include in the message" + }, + "detail": { + "type": "string", + "description": "(Optional) Level of detail for image processing. Can be \"low\", \"high\", or \"auto\"" + } + }, + "additionalProperties": false, + "required": [ + "url" + ], + "title": "OpenAIImageURL", + "description": "Image URL specification for OpenAI-compatible chat completion messages." + }, + "OpenAIMessageParam": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAIUserMessageParam" + }, + { + "$ref": "#/components/schemas/OpenAISystemMessageParam" + }, + { + "$ref": "#/components/schemas/OpenAIAssistantMessageParam" + }, + { + "$ref": "#/components/schemas/OpenAIToolMessageParam" + }, + { + "$ref": "#/components/schemas/OpenAIDeveloperMessageParam" + } + ], + "discriminator": { + "propertyName": "role", + "mapping": { + "user": "#/components/schemas/OpenAIUserMessageParam", + "system": "#/components/schemas/OpenAISystemMessageParam", + "assistant": "#/components/schemas/OpenAIAssistantMessageParam", + "tool": "#/components/schemas/OpenAIToolMessageParam", + "developer": "#/components/schemas/OpenAIDeveloperMessageParam" + } + } + }, + "OpenAISystemMessageParam": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system", + "description": "Must be \"system\" to identify this as a system message" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" + } + } + ], + "description": "The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions)." + }, + "name": { + "type": "string", + "description": "(Optional) The name of the system message participant." + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ], + "title": "OpenAISystemMessageParam", + "description": "A system message providing instructions or context to the model." + }, + "OpenAITokenLogProb": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "bytes": { + "type": "array", + "items": { + "type": "integer" + } + }, + "logprob": { + "type": "number" + }, + "top_logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAITopLogProb" + } + } + }, + "additionalProperties": false, + "required": [ + "token", + "logprob", + "top_logprobs" + ], + "title": "OpenAITokenLogProb", + "description": "The log probability for a token from an OpenAI-compatible chat completion response." + }, + "OpenAIToolMessageParam": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "tool", + "default": "tool", + "description": "Must be \"tool\" to identify this as a tool response" + }, + "tool_call_id": { + "type": "string", + "description": "Unique identifier for the tool call this response is for" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" + } + } + ], + "description": "The response content from the tool" + } + }, + "additionalProperties": false, + "required": [ + "role", + "tool_call_id", + "content" + ], + "title": "OpenAIToolMessageParam", + "description": "A message representing the result of a tool invocation in an OpenAI-compatible chat completion request." + }, + "OpenAITopLogProb": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "bytes": { + "type": "array", + "items": { + "type": "integer" + } + }, + "logprob": { + "type": "number" + } + }, + "additionalProperties": false, + "required": [ + "token", + "logprob" + ], + "title": "OpenAITopLogProb", + "description": "The top log probability for a token from an OpenAI-compatible chat completion response." + }, + "OpenAIUserMessageParam": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user", + "description": "Must be \"user\" to identify this as a user message" + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartParam" + } + } + ], + "description": "The content of the message, which can include text and other media" + }, + "name": { + "type": "string", + "description": "(Optional) The name of the user message participant." + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ], + "title": "OpenAIUserMessageParam", + "description": "A message from the user in an OpenAI-compatible chat completion request." + }, + "OpenAIJSONSchema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the schema" + }, + "description": { + "type": "string", + "description": "(Optional) Description of the schema" + }, + "strict": { + "type": "boolean", + "description": "(Optional) Whether to enforce strict adherence to the schema" + }, + "schema": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) The JSON schema definition" + } + }, + "additionalProperties": false, + "required": [ + "name" + ], + "title": "OpenAIJSONSchema", + "description": "JSON schema specification for OpenAI-compatible structured response format." + }, + "OpenAIResponseFormatJSONObject": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "json_object", + "default": "json_object", + "description": "Must be \"json_object\" to indicate generic JSON object response format" + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "title": "OpenAIResponseFormatJSONObject", + "description": "JSON object response format for OpenAI-compatible chat completion requests." + }, + "OpenAIResponseFormatJSONSchema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "json_schema", + "default": "json_schema", + "description": "Must be \"json_schema\" to indicate structured JSON response format" + }, + "json_schema": { + "$ref": "#/components/schemas/OpenAIJSONSchema", + "description": "The JSON schema specification for the response" + } + }, + "additionalProperties": false, + "required": [ + "type", + "json_schema" + ], + "title": "OpenAIResponseFormatJSONSchema", + "description": "JSON schema response format for OpenAI-compatible chat completion requests." + }, + "OpenAIResponseFormatParam": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAIResponseFormatText" + }, + { + "$ref": "#/components/schemas/OpenAIResponseFormatJSONSchema" + }, + { + "$ref": "#/components/schemas/OpenAIResponseFormatJSONObject" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "text": "#/components/schemas/OpenAIResponseFormatText", + "json_schema": "#/components/schemas/OpenAIResponseFormatJSONSchema", + "json_object": "#/components/schemas/OpenAIResponseFormatJSONObject" + } + } + }, + "OpenAIResponseFormatText": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text", + "default": "text", + "description": "Must be \"text\" to indicate plain text response format" + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "title": "OpenAIResponseFormatText", + "description": "Text response format for OpenAI-compatible chat completion requests." + }, + "OpenaiChatCompletionRequest": { + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint." + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessageParam" + }, + "description": "List of messages in the conversation." + }, + "frequency_penalty": { + "type": "number", + "description": "(Optional) The penalty for repeated tokens." + }, + "function_call": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + ], + "description": "(Optional) The function call to use." + }, + "functions": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "description": "(Optional) List of functions to use." + }, + "logit_bias": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "description": "(Optional) The logit bias to use." + }, + "logprobs": { + "type": "boolean", + "description": "(Optional) The log probabilities to use." + }, + "max_completion_tokens": { + "type": "integer", + "description": "(Optional) The maximum number of tokens to generate." + }, + "max_tokens": { + "type": "integer", + "description": "(Optional) The maximum number of tokens to generate." + }, + "n": { + "type": "integer", + "description": "(Optional) The number of completions to generate." + }, + "parallel_tool_calls": { + "type": "boolean", + "description": "(Optional) Whether to parallelize tool calls." + }, + "presence_penalty": { + "type": "number", + "description": "(Optional) The penalty for repeated tokens." + }, + "response_format": { + "$ref": "#/components/schemas/OpenAIResponseFormatParam", + "description": "(Optional) The response format to use." + }, + "seed": { + "type": "integer", + "description": "(Optional) The seed to use." + }, + "stop": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "(Optional) The stop tokens to use." + }, + "stream": { + "type": "boolean", + "description": "(Optional) Whether to stream the response." + }, + "stream_options": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) The stream options to use." + }, + "temperature": { + "type": "number", + "description": "(Optional) The temperature to use." + }, + "tool_choice": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + ], + "description": "(Optional) The tool choice to use." + }, + "tools": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "description": "(Optional) The tools to use." + }, + "top_logprobs": { + "type": "integer", + "description": "(Optional) The top log probabilities to use." + }, + "top_p": { + "type": "number", + "description": "(Optional) The top p to use." + }, + "user": { + "type": "string", + "description": "(Optional) The user to use." + } + }, + "additionalProperties": false, + "required": [ + "model", + "messages" + ], + "title": "OpenaiChatCompletionRequest" + }, + "OpenAIChatCompletion": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the chat completion" + }, + "choices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChoice" + }, + "description": "List of choices" + }, + "object": { + "type": "string", + "const": "chat.completion", + "default": "chat.completion", + "description": "The object type, which will be \"chat.completion\"" + }, + "created": { + "type": "integer", + "description": "The Unix timestamp in seconds when the chat completion was created" + }, + "model": { + "type": "string", + "description": "The model that was used to generate the chat completion" + } + }, + "additionalProperties": false, + "required": [ + "id", + "choices", + "object", + "created", + "model" + ], + "title": "OpenAIChatCompletion", + "description": "Response from an OpenAI-compatible chat completion request." + }, + "OpenAIChatCompletionChunk": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the chat completion" + }, + "choices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChunkChoice" + }, + "description": "List of choices" + }, + "object": { + "type": "string", + "const": "chat.completion.chunk", + "default": "chat.completion.chunk", + "description": "The object type, which will be \"chat.completion.chunk\"" + }, + "created": { + "type": "integer", + "description": "The Unix timestamp in seconds when the chat completion was created" + }, + "model": { + "type": "string", + "description": "The model that was used to generate the chat completion" + } + }, + "additionalProperties": false, + "required": [ + "id", + "choices", + "object", + "created", + "model" + ], + "title": "OpenAIChatCompletionChunk", + "description": "Chunk from a streaming response to an OpenAI-compatible chat completion request." + }, + "OpenAIChoiceDelta": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "(Optional) The content of the delta" + }, + "refusal": { + "type": "string", + "description": "(Optional) The refusal of the delta" + }, + "role": { + "type": "string", + "description": "(Optional) The role of the delta" + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChatCompletionToolCall" + }, + "description": "(Optional) The tool calls of the delta" + } + }, + "additionalProperties": false, + "title": "OpenAIChoiceDelta", + "description": "A delta from an OpenAI-compatible chat completion streaming response." + }, + "OpenAIChunkChoice": { + "type": "object", + "properties": { + "delta": { + "$ref": "#/components/schemas/OpenAIChoiceDelta", + "description": "The delta from the chunk" + }, + "finish_reason": { + "type": "string", + "description": "The reason the model stopped generating" + }, + "index": { + "type": "integer", + "description": "The index of the choice" + }, + "logprobs": { + "$ref": "#/components/schemas/OpenAIChoiceLogprobs", + "description": "(Optional) The log probabilities for the tokens in the message" + } + }, + "additionalProperties": false, + "required": [ + "delta", + "finish_reason", + "index" + ], + "title": "OpenAIChunkChoice", + "description": "A chunk choice from an OpenAI-compatible chat completion streaming response." + }, + "OpenAICompletionWithInputMessages": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the chat completion" + }, + "choices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIChoice" + }, + "description": "List of choices" + }, + "object": { + "type": "string", + "const": "chat.completion", + "default": "chat.completion", + "description": "The object type, which will be \"chat.completion\"" + }, + "created": { + "type": "integer", + "description": "The Unix timestamp in seconds when the chat completion was created" + }, + "model": { + "type": "string", + "description": "The model that was used to generate the chat completion" + }, + "input_messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessageParam" + } + } + }, + "additionalProperties": false, + "required": [ + "id", + "choices", + "object", + "created", + "model", + "input_messages" + ], + "title": "OpenAICompletionWithInputMessages" + }, + "OpenaiCompletionRequest": { + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint." + }, + "prompt": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer" + } + } + } + ], + "description": "The prompt to generate a completion for." + }, + "best_of": { + "type": "integer", + "description": "(Optional) The number of completions to generate." + }, + "echo": { + "type": "boolean", + "description": "(Optional) Whether to echo the prompt." + }, + "frequency_penalty": { + "type": "number", + "description": "(Optional) The penalty for repeated tokens." + }, + "logit_bias": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "description": "(Optional) The logit bias to use." + }, + "logprobs": { + "type": "boolean", + "description": "(Optional) The log probabilities to use." + }, + "max_tokens": { + "type": "integer", + "description": "(Optional) The maximum number of tokens to generate." + }, + "n": { + "type": "integer", + "description": "(Optional) The number of completions to generate." + }, + "presence_penalty": { + "type": "number", + "description": "(Optional) The penalty for repeated tokens." + }, + "seed": { + "type": "integer", + "description": "(Optional) The seed to use." + }, + "stop": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "(Optional) The stop tokens to use." + }, + "stream": { + "type": "boolean", + "description": "(Optional) Whether to stream the response." + }, + "stream_options": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) The stream options to use." + }, + "temperature": { + "type": "number", + "description": "(Optional) The temperature to use." + }, + "top_p": { + "type": "number", + "description": "(Optional) The top p to use." + }, + "user": { + "type": "string", + "description": "(Optional) The user to use." + }, + "guided_choice": { + "type": "array", + "items": { + "type": "string" + } + }, + "prompt_logprobs": { + "type": "integer" + }, + "suffix": { + "type": "string", + "description": "(Optional) The suffix that should be appended to the completion." + } + }, + "additionalProperties": false, + "required": [ + "model", + "prompt" + ], + "title": "OpenaiCompletionRequest" + }, + "OpenAICompletion": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "choices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAICompletionChoice" + } + }, + "created": { + "type": "integer" + }, + "model": { + "type": "string" + }, + "object": { + "type": "string", + "const": "text_completion", + "default": "text_completion" + } + }, + "additionalProperties": false, + "required": [ + "id", + "choices", + "created", + "model", + "object" + ], + "title": "OpenAICompletion", + "description": "Response from an OpenAI-compatible completion request." + }, + "OpenAICompletionChoice": { + "type": "object", + "properties": { + "finish_reason": { + "type": "string" + }, + "text": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "logprobs": { + "$ref": "#/components/schemas/OpenAIChoiceLogprobs" + } + }, + "additionalProperties": false, + "required": [ + "finish_reason", + "text", + "index" + ], + "title": "OpenAICompletionChoice", + "description": "A choice from an OpenAI-compatible completion response." + }, "AppendRowsRequest": { "type": "object", "properties": { @@ -7592,397 +5757,686 @@ ], "title": "AppendRowsRequest" }, - "CancelTrainingJobRequest": { + "PaginatedResponse": { "type": "object", "properties": { - "job_uuid": { + "data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "description": "The list of items for the current page" + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more items available after this set" + }, + "url": { "type": "string", - "description": "The UUID of the job to cancel." + "description": "The URL for accessing this list" } }, "additionalProperties": false, "required": [ - "job_uuid" + "data", + "has_more" ], - "title": "CancelTrainingJobRequest" + "title": "PaginatedResponse", + "description": "A generic paginated response that follows a simple format." }, - "AgentConfig": { + "Dataset": { "type": "object", "properties": { - "sampling_params": { - "$ref": "#/components/schemas/SamplingParams" + "identifier": { + "type": "string" }, - "input_shields": { - "type": "array", - "items": { - "type": "string" - } + "provider_resource_id": { + "type": "string" }, - "output_shields": { - "type": "array", - "items": { - "type": "string" - } + "provider_id": { + "type": "string" }, - "toolgroups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentTool" - } - }, - "client_tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolDef" - } - }, - "tool_choice": { + "type": { "type": "string", "enum": [ - "auto", - "required", - "none" + "model", + "shield", + "vector_db", + "dataset", + "scoring_function", + "benchmark", + "tool", + "tool_group", + "prompt" ], - "title": "ToolChoice", - "description": "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model.", - "deprecated": true + "const": "dataset", + "default": "dataset", + "description": "Type of resource, always 'dataset' for datasets" }, - "tool_prompt_format": { + "purpose": { "type": "string", "enum": [ - "json", - "function_tag", - "python_list" + "post-training/messages", + "eval/question-answer", + "eval/messages-answer" ], - "title": "ToolPromptFormat", - "description": "Prompt format for calling custom / zero shot tools.", - "deprecated": true + "description": "Purpose of the dataset indicating its intended use" }, - "tool_config": { - "$ref": "#/components/schemas/ToolConfig" + "source": { + "oneOf": [ + { + "$ref": "#/components/schemas/URIDataSource" + }, + { + "$ref": "#/components/schemas/RowsDataSource" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "uri": "#/components/schemas/URIDataSource", + "rows": "#/components/schemas/RowsDataSource" + } + }, + "description": "Data source configuration for the dataset" }, - "max_infer_iters": { - "type": "integer", - "default": 10 + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Additional metadata for the dataset" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_id", + "type", + "purpose", + "source", + "metadata" + ], + "title": "Dataset", + "description": "Dataset resource for storing and accessing training or evaluation data." + }, + "RowsDataSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "rows", + "default": "rows" }, + "rows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "description": "The dataset is stored in rows. E.g. - [ {\"messages\": [{\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}]} ]" + } + }, + "additionalProperties": false, + "required": [ + "type", + "rows" + ], + "title": "RowsDataSource", + "description": "A dataset stored in rows." + }, + "URIDataSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "uri", + "default": "uri" + }, + "uri": { + "type": "string", + "description": "The dataset can be obtained from a URI. E.g. - \"https://mywebsite.com/mydata.jsonl\" - \"lsfs://mydata.jsonl\" - \"data:csv;base64,{base64_content}\"" + } + }, + "additionalProperties": false, + "required": [ + "type", + "uri" + ], + "title": "URIDataSource", + "description": "A dataset that can be obtained from a URI." + }, + "ListDatasetsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dataset" + }, + "description": "List of datasets" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "ListDatasetsResponse", + "description": "Response from listing datasets." + }, + "DataSource": { + "oneOf": [ + { + "$ref": "#/components/schemas/URIDataSource" + }, + { + "$ref": "#/components/schemas/RowsDataSource" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "uri": "#/components/schemas/URIDataSource", + "rows": "#/components/schemas/RowsDataSource" + } + } + }, + "RegisterDatasetRequest": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "enum": [ + "post-training/messages", + "eval/question-answer", + "eval/messages-answer" + ], + "description": "The purpose of the dataset. One of: - \"post-training/messages\": The dataset contains a messages column with list of messages for post-training. { \"messages\": [ {\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}, ] } - \"eval/question-answer\": The dataset contains a question column and an answer column for evaluation. { \"question\": \"What is the capital of France?\", \"answer\": \"Paris\" } - \"eval/messages-answer\": The dataset contains a messages column with list of messages and an answer column for evaluation. { \"messages\": [ {\"role\": \"user\", \"content\": \"Hello, my name is John Doe.\"}, {\"role\": \"assistant\", \"content\": \"Hello, John Doe. How can I help you today?\"}, {\"role\": \"user\", \"content\": \"What's my name?\"}, ], \"answer\": \"John Doe\" }" + }, + "source": { + "$ref": "#/components/schemas/DataSource", + "description": "The data source of the dataset. Ensure that the data source schema is compatible with the purpose of the dataset. Examples: - { \"type\": \"uri\", \"uri\": \"https://mywebsite.com/mydata.jsonl\" } - { \"type\": \"uri\", \"uri\": \"lsfs://mydata.jsonl\" } - { \"type\": \"uri\", \"uri\": \"data:csv;base64,{base64_content}\" } - { \"type\": \"uri\", \"uri\": \"huggingface://llamastack/simpleqa?split=train\" } - { \"type\": \"rows\", \"rows\": [ { \"messages\": [ {\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}, ] } ] }" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "The metadata for the dataset. - E.g. {\"description\": \"My dataset\"}." + }, + "dataset_id": { + "type": "string", + "description": "The ID of the dataset. If not provided, an ID will be generated." + } + }, + "additionalProperties": false, + "required": [ + "purpose", + "source" + ], + "title": "RegisterDatasetRequest" + }, + "OpenaiEmbeddingsRequest": { + "type": "object", + "properties": { "model": { "type": "string", - "description": "The model identifier to use for the agent" + "description": "The identifier of the model to use. The model must be an embedding model registered with Llama Stack and available via the /models endpoint." }, - "instructions": { + "input": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Input text to embed, encoded as a string or array of strings. To embed multiple inputs in a single request, pass an array of strings." + }, + "encoding_format": { "type": "string", - "description": "The system instructions for the agent" + "description": "(Optional) The format to return the embeddings in. Can be either \"float\" or \"base64\". Defaults to \"float\"." }, - "name": { + "dimensions": { + "type": "integer", + "description": "(Optional) The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models." + }, + "user": { "type": "string", - "description": "Optional name for the agent, used in telemetry and identification" - }, - "enable_session_persistence": { - "type": "boolean", - "default": false, - "description": "Optional flag indicating whether session data has to be persisted" - }, - "response_format": { - "$ref": "#/components/schemas/ResponseFormat", - "description": "Optional response format configuration" + "description": "(Optional) A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse." } }, "additionalProperties": false, "required": [ "model", - "instructions" + "input" ], - "title": "AgentConfig", - "description": "Configuration for an agent." + "title": "OpenaiEmbeddingsRequest" }, - "AgentTool": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "args": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "args" - ], - "title": "AgentToolGroupWithArgs" - } - ] - }, - "GrammarResponseFormat": { + "OpenAIEmbeddingData": { "type": "object", "properties": { - "type": { + "object": { "type": "string", - "enum": [ - "json_schema", - "grammar" - ], - "description": "Must be \"grammar\" to identify this format type", - "const": "grammar", - "default": "grammar" + "const": "embedding", + "default": "embedding", + "description": "The object type, which will be \"embedding\"" }, - "bnf": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The BNF grammar specification the response should conform to" - } - }, - "additionalProperties": false, - "required": [ - "type", - "bnf" - ], - "title": "GrammarResponseFormat", - "description": "Configuration for grammar-guided response generation." - }, - "GreedySamplingStrategy": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "greedy", - "default": "greedy", - "description": "Must be \"greedy\" to identify this sampling strategy" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "title": "GreedySamplingStrategy", - "description": "Greedy sampling strategy that selects the highest probability token at each step." - }, - "JsonSchemaResponseFormat": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "json_schema", - "grammar" - ], - "description": "Must be \"json_schema\" to identify this format type", - "const": "json_schema", - "default": "json_schema" - }, - "json_schema": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model." - } - }, - "additionalProperties": false, - "required": [ - "type", - "json_schema" - ], - "title": "JsonSchemaResponseFormat", - "description": "Configuration for JSON schema-guided response generation." - }, - "ResponseFormat": { - "oneOf": [ - { - "$ref": "#/components/schemas/JsonSchemaResponseFormat" - }, - { - "$ref": "#/components/schemas/GrammarResponseFormat" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "json_schema": "#/components/schemas/JsonSchemaResponseFormat", - "grammar": "#/components/schemas/GrammarResponseFormat" - } - } - }, - "SamplingParams": { - "type": "object", - "properties": { - "strategy": { + "embedding": { "oneOf": [ { - "$ref": "#/components/schemas/GreedySamplingStrategy" + "type": "array", + "items": { + "type": "number" + } }, { - "$ref": "#/components/schemas/TopPSamplingStrategy" - }, - { - "$ref": "#/components/schemas/TopKSamplingStrategy" + "type": "string" } ], - "discriminator": { - "propertyName": "type", - "mapping": { - "greedy": "#/components/schemas/GreedySamplingStrategy", - "top_p": "#/components/schemas/TopPSamplingStrategy", - "top_k": "#/components/schemas/TopKSamplingStrategy" - } - }, - "description": "The sampling strategy." + "description": "The embedding vector as a list of floats (when encoding_format=\"float\") or as a base64-encoded string (when encoding_format=\"base64\")" }, - "max_tokens": { + "index": { "type": "integer", - "default": 0, - "description": "The maximum number of tokens that can be generated in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length." + "description": "The index of the embedding in the input list" + } + }, + "additionalProperties": false, + "required": [ + "object", + "embedding", + "index" + ], + "title": "OpenAIEmbeddingData", + "description": "A single embedding data object from an OpenAI-compatible embeddings response." + }, + "OpenAIEmbeddingUsage": { + "type": "object", + "properties": { + "prompt_tokens": { + "type": "integer", + "description": "The number of tokens in the input" }, - "repetition_penalty": { - "type": "number", - "default": 1.0, - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics." + "total_tokens": { + "type": "integer", + "description": "The total number of tokens used" + } + }, + "additionalProperties": false, + "required": [ + "prompt_tokens", + "total_tokens" + ], + "title": "OpenAIEmbeddingUsage", + "description": "Usage information for an OpenAI-compatible embeddings response." + }, + "OpenAIEmbeddingsResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "const": "list", + "default": "list", + "description": "The object type, which will be \"list\"" }, - "stop": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIEmbeddingData" + }, + "description": "List of embedding data objects" + }, + "model": { + "type": "string", + "description": "The model that was used to generate the embeddings" + }, + "usage": { + "$ref": "#/components/schemas/OpenAIEmbeddingUsage", + "description": "Usage information" + } + }, + "additionalProperties": false, + "required": [ + "object", + "data", + "model", + "usage" + ], + "title": "OpenAIEmbeddingsResponse", + "description": "Response from an OpenAI-compatible embeddings request." + }, + "OpenAIFilePurpose": { + "type": "string", + "enum": [ + "assistants", + "batch" + ], + "title": "OpenAIFilePurpose", + "description": "Valid purpose values for OpenAI Files API." + }, + "ListOpenAIFileResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIFileObject" + }, + "description": "List of file objects" + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more files available beyond this page" + }, + "first_id": { + "type": "string", + "description": "ID of the first file in the list for pagination" + }, + "last_id": { + "type": "string", + "description": "ID of the last file in the list for pagination" + }, + "object": { + "type": "string", + "const": "list", + "default": "list", + "description": "The object type, which is always \"list\"" + } + }, + "additionalProperties": false, + "required": [ + "data", + "has_more", + "first_id", + "last_id", + "object" + ], + "title": "ListOpenAIFileResponse", + "description": "Response for listing files in OpenAI Files API." + }, + "OpenAIFileObject": { + "type": "object", + "properties": { + "object": { + "type": "string", + "const": "file", + "default": "file", + "description": "The object type, which is always \"file\"" + }, + "id": { + "type": "string", + "description": "The file identifier, which can be referenced in the API endpoints" + }, + "bytes": { + "type": "integer", + "description": "The size of the file, in bytes" + }, + "created_at": { + "type": "integer", + "description": "The Unix timestamp (in seconds) for when the file was created" + }, + "expires_at": { + "type": "integer", + "description": "The Unix timestamp (in seconds) for when the file expires" + }, + "filename": { + "type": "string", + "description": "The name of the file" + }, + "purpose": { + "type": "string", + "enum": [ + "assistants", + "batch" + ], + "description": "The intended purpose of the file" + } + }, + "additionalProperties": false, + "required": [ + "object", + "id", + "bytes", + "created_at", + "expires_at", + "filename", + "purpose" + ], + "title": "OpenAIFileObject", + "description": "OpenAI File object as defined in the OpenAI Files API." + }, + "ExpiresAfter": { + "type": "object", + "properties": { + "anchor": { + "type": "string", + "const": "created_at" + }, + "seconds": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "anchor", + "seconds" + ], + "title": "ExpiresAfter", + "description": "Control expiration of uploaded files.\nParams:\n - anchor, must be \"created_at\"\n - seconds, must be int between 3600 and 2592000 (1 hour to 30 days)" + }, + "OpenAIFileDeleteResponse": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The file identifier that was deleted" + }, + "object": { + "type": "string", + "const": "file", + "default": "file", + "description": "The object type, which is always \"file\"" + }, + "deleted": { + "type": "boolean", + "description": "Whether the file was successfully deleted" + } + }, + "additionalProperties": false, + "required": [ + "id", + "object", + "deleted" + ], + "title": "OpenAIFileDeleteResponse", + "description": "Response for deleting a file in OpenAI Files API." + }, + "Response": { + "type": "object", + "title": "Response" + }, + "HealthInfo": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "OK", + "Error", + "Not Implemented" + ], + "description": "Current health status of the service" + } + }, + "additionalProperties": false, + "required": [ + "status" + ], + "title": "HealthInfo", + "description": "Health status information for the service." + }, + "RouteInfo": { + "type": "object", + "properties": { + "route": { + "type": "string", + "description": "The API endpoint path" + }, + "method": { + "type": "string", + "description": "HTTP method for the route" + }, + "provider_types": { "type": "array", "items": { "type": "string" }, - "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence." + "description": "List of provider types that implement this route" } }, "additionalProperties": false, "required": [ - "strategy" + "route", + "method", + "provider_types" ], - "title": "SamplingParams", - "description": "Sampling parameters." + "title": "RouteInfo", + "description": "Information about an API route including its path, method, and implementing providers." }, - "ToolConfig": { + "ListRoutesResponse": { "type": "object", "properties": { - "tool_choice": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto", - "required", - "none" - ], - "title": "ToolChoice", - "description": "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model." - }, - { - "type": "string" - } - ], - "default": "auto", - "description": "(Optional) Whether tool use is automatic, required, or none. Can also specify a tool name to use a specific tool. Defaults to ToolChoice.auto." - }, - "tool_prompt_format": { - "type": "string", - "enum": [ - "json", - "function_tag", - "python_list" - ], - "description": "(Optional) Instructs the model how to format tool calls. By default, Llama Stack will attempt to use a format that is best adapted to the model. - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a tag. - `ToolPromptFormat.python_list`: The tool calls are output as Python syntax -- a list of function calls." - }, - "system_message_behavior": { - "type": "string", - "enum": [ - "append", - "replace" - ], - "description": "(Optional) Config for how to override the default system prompt. - `SystemMessageBehavior.append`: Appends the provided system message to the default system prompt. - `SystemMessageBehavior.replace`: Replaces the default system prompt with the provided system message. The system message can include the string '{{function_definitions}}' to indicate where the function definitions should be inserted.", - "default": "append" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteInfo" + }, + "description": "List of available route information objects" } }, "additionalProperties": false, - "title": "ToolConfig", - "description": "Configuration for tool use." + "required": [ + "data" + ], + "title": "ListRoutesResponse", + "description": "Response containing a list of all available API routes." }, - "ToolDef": { + "Model": { "type": "object", "properties": { - "name": { + "identifier": { "type": "string", - "description": "Name of the tool" + "description": "Unique identifier for this resource in llama stack" }, - "description": { + "provider_resource_id": { "type": "string", - "description": "(Optional) Human-readable description of what the tool does" + "description": "Unique identifier for this resource in the provider" }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolParameter" - }, - "description": "(Optional) List of parameters this tool accepts" + "provider_id": { + "type": "string", + "description": "ID of the provider that owns this resource" + }, + "type": { + "type": "string", + "enum": [ + "model", + "shield", + "vector_db", + "dataset", + "scoring_function", + "benchmark", + "tool", + "tool_group", + "prompt" + ], + "const": "model", + "default": "model", + "description": "The resource type, always 'model' for model resources" }, "metadata": { "type": "object", @@ -8008,1227 +6462,64 @@ } ] }, - "description": "(Optional) Additional metadata about the tool" - } - }, - "additionalProperties": false, - "required": [ - "name" - ], - "title": "ToolDef", - "description": "Tool definition used in runtime contexts." - }, - "ToolParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the parameter" - }, - "parameter_type": { - "type": "string", - "description": "Type of the parameter (e.g., string, integer)" - }, - "description": { - "type": "string", - "description": "Human-readable description of what the parameter does" - }, - "required": { - "type": "boolean", - "default": true, - "description": "Whether this parameter is required for tool invocation" - }, - "items": { - "type": "object", - "description": "Type of the elements when parameter_type is array" - }, - "title": { - "type": "string", - "description": "(Optional) Title of the parameter" - }, - "default": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ], - "description": "(Optional) Default value for the parameter if not provided" - } - }, - "additionalProperties": false, - "required": [ - "name", - "parameter_type", - "description", - "required" - ], - "title": "ToolParameter", - "description": "Parameter definition for a tool." - }, - "TopKSamplingStrategy": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "top_k", - "default": "top_k", - "description": "Must be \"top_k\" to identify this sampling strategy" - }, - "top_k": { - "type": "integer", - "description": "Number of top tokens to consider for sampling. Must be at least 1" + "description": "Any additional metadata for this model" + }, + "model_type": { + "$ref": "#/components/schemas/ModelType", + "default": "llm", + "description": "The type of model (LLM or embedding model)" } }, "additionalProperties": false, "required": [ + "identifier", + "provider_id", "type", - "top_k" + "metadata", + "model_type" ], - "title": "TopKSamplingStrategy", - "description": "Top-k sampling strategy that restricts sampling to the k most likely tokens." + "title": "Model", + "description": "A model resource representing an AI model registered in Llama Stack." }, - "TopPSamplingStrategy": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "top_p", - "default": "top_p", - "description": "Must be \"top_p\" to identify this sampling strategy" - }, - "temperature": { - "type": "number", - "description": "Controls randomness in sampling. Higher values increase randomness" - }, - "top_p": { - "type": "number", - "default": 0.95, - "description": "Cumulative probability threshold for nucleus sampling. Defaults to 0.95" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "title": "TopPSamplingStrategy", - "description": "Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p." - }, - "CreateAgentRequest": { - "type": "object", - "properties": { - "agent_config": { - "$ref": "#/components/schemas/AgentConfig", - "description": "The configuration for the agent." - } - }, - "additionalProperties": false, - "required": [ - "agent_config" - ], - "title": "CreateAgentRequest" - }, - "AgentCreateResponse": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique identifier for the created agent" - } - }, - "additionalProperties": false, - "required": [ - "agent_id" - ], - "title": "AgentCreateResponse", - "description": "Response returned when creating a new agent." - }, - "CreateAgentSessionRequest": { - "type": "object", - "properties": { - "session_name": { - "type": "string", - "description": "The name of the session to create." - } - }, - "additionalProperties": false, - "required": [ - "session_name" - ], - "title": "CreateAgentSessionRequest" - }, - "AgentSessionCreateResponse": { - "type": "object", - "properties": { - "session_id": { - "type": "string", - "description": "Unique identifier for the created session" - } - }, - "additionalProperties": false, - "required": [ - "session_id" - ], - "title": "AgentSessionCreateResponse", - "description": "Response returned when creating a new agent session." - }, - "ImageContentItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "image", - "default": "image", - "description": "Discriminator type of the content item. Always \"image\"" - }, - "image": { - "type": "object", - "properties": { - "url": { - "$ref": "#/components/schemas/URL", - "description": "A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits." - }, - "data": { - "type": "string", - "contentEncoding": "base64", - "description": "base64 encoded image data as string" - } - }, - "additionalProperties": false, - "description": "Image as a base64 encoded string or an URL" - } - }, - "additionalProperties": false, - "required": [ - "type", - "image" - ], - "title": "ImageContentItem", - "description": "A image content item" - }, - "InterleavedContent": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/InterleavedContentItem" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/InterleavedContentItem" - } - } - ] - }, - "InterleavedContentItem": { - "oneOf": [ - { - "$ref": "#/components/schemas/ImageContentItem" - }, - { - "$ref": "#/components/schemas/TextContentItem" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "image": "#/components/schemas/ImageContentItem", - "text": "#/components/schemas/TextContentItem" - } - } - }, - "TextContentItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "text", - "default": "text", - "description": "Discriminator type of the content item. Always \"text\"" - }, - "text": { - "type": "string", - "description": "Text content" - } - }, - "additionalProperties": false, - "required": [ - "type", - "text" - ], - "title": "TextContentItem", - "description": "A text content item" - }, - "ToolResponseMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "tool", - "default": "tool", - "description": "Must be \"tool\" to identify this as a tool response" - }, - "call_id": { - "type": "string", - "description": "Unique identifier for the tool call this response is for" - }, - "content": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "The response content from the tool" - } - }, - "additionalProperties": false, - "required": [ - "role", - "call_id", - "content" - ], - "title": "ToolResponseMessage", - "description": "A message representing the result of a tool invocation." - }, - "URL": { - "type": "object", - "properties": { - "uri": { - "type": "string", - "description": "The URL string pointing to the resource" - } - }, - "additionalProperties": false, - "required": [ - "uri" - ], - "title": "URL", - "description": "A URL reference to external content." - }, - "UserMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "user", - "default": "user", - "description": "Must be \"user\" to identify this as a user message" - }, - "content": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "The content of the message, which can include text and other media" - }, - "context": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "(Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future." - } - }, - "additionalProperties": false, - "required": [ - "role", - "content" - ], - "title": "UserMessage", - "description": "A message from the user in a chat conversation." - }, - "CreateAgentTurnRequest": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/UserMessage" - }, - { - "$ref": "#/components/schemas/ToolResponseMessage" - } - ] - }, - "description": "List of messages to start the turn with." - }, - "stream": { - "type": "boolean", - "description": "(Optional) If True, generate an SSE event stream of the response. Defaults to False." - }, - "documents": { - "type": "array", - "items": { - "type": "object", - "properties": { - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/InterleavedContentItem" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/InterleavedContentItem" - } - }, - { - "$ref": "#/components/schemas/URL" - } - ], - "description": "The content of the document." - }, - "mime_type": { - "type": "string", - "description": "The MIME type of the document." - } - }, - "additionalProperties": false, - "required": [ - "content", - "mime_type" - ], - "title": "Document", - "description": "A document to be used by an agent." - }, - "description": "(Optional) List of documents to create the turn with." - }, - "toolgroups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentTool" - }, - "description": "(Optional) List of toolgroups to create the turn with, will be used in addition to the agent's config toolgroups for the request." - }, - "tool_config": { - "$ref": "#/components/schemas/ToolConfig", - "description": "(Optional) The tool configuration to create the turn with, will be used to override the agent's tool_config." - } - }, - "additionalProperties": false, - "required": [ - "messages" - ], - "title": "CreateAgentTurnRequest" - }, - "CompletionMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "assistant", - "default": "assistant", - "description": "Must be \"assistant\" to identify this as the model's response" - }, - "content": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "The content of the model's response" - }, - "stop_reason": { - "type": "string", - "enum": [ - "end_of_turn", - "end_of_message", - "out_of_tokens" - ], - "description": "Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: The model finished generating the entire response. - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response. - `StopReason.out_of_tokens`: The model ran out of token budget." - }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolCall" - }, - "description": "List of tool calls. Each tool call is a ToolCall object." - } - }, - "additionalProperties": false, - "required": [ - "role", - "content", - "stop_reason" - ], - "title": "CompletionMessage", - "description": "A message containing the model's (assistant) response in a chat conversation." - }, - "InferenceStep": { - "type": "object", - "properties": { - "turn_id": { - "type": "string", - "description": "The ID of the turn." - }, - "step_id": { - "type": "string", - "description": "The ID of the step." - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "The time the step started." - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "The time the step completed." - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ], - "title": "StepType", - "description": "Type of the step in an agent turn.", - "const": "inference", - "default": "inference" - }, - "model_response": { - "$ref": "#/components/schemas/CompletionMessage", - "description": "The response from the LLM." - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "step_id", - "step_type", - "model_response" - ], - "title": "InferenceStep", - "description": "An inference step in an agent turn." - }, - "MemoryRetrievalStep": { - "type": "object", - "properties": { - "turn_id": { - "type": "string", - "description": "The ID of the turn." - }, - "step_id": { - "type": "string", - "description": "The ID of the step." - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "The time the step started." - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "The time the step completed." - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ], - "title": "StepType", - "description": "Type of the step in an agent turn.", - "const": "memory_retrieval", - "default": "memory_retrieval" - }, - "vector_db_ids": { - "type": "string", - "description": "The IDs of the vector databases to retrieve context from." - }, - "inserted_context": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "The context retrieved from the vector databases." - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "step_id", - "step_type", - "vector_db_ids", - "inserted_context" - ], - "title": "MemoryRetrievalStep", - "description": "A memory retrieval step in an agent turn." - }, - "SafetyViolation": { - "type": "object", - "properties": { - "violation_level": { - "$ref": "#/components/schemas/ViolationLevel", - "description": "Severity level of the violation" - }, - "user_message": { - "type": "string", - "description": "(Optional) Message to convey to the user about the violation" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Additional metadata including specific violation codes for debugging and telemetry" - } - }, - "additionalProperties": false, - "required": [ - "violation_level", - "metadata" - ], - "title": "SafetyViolation", - "description": "Details of a safety violation detected by content moderation." - }, - "ShieldCallStep": { - "type": "object", - "properties": { - "turn_id": { - "type": "string", - "description": "The ID of the turn." - }, - "step_id": { - "type": "string", - "description": "The ID of the step." - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "The time the step started." - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "The time the step completed." - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ], - "title": "StepType", - "description": "Type of the step in an agent turn.", - "const": "shield_call", - "default": "shield_call" - }, - "violation": { - "$ref": "#/components/schemas/SafetyViolation", - "description": "The violation from the shield call." - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "step_id", - "step_type" - ], - "title": "ShieldCallStep", - "description": "A shield call step in an agent turn." - }, - "ToolCall": { - "type": "object", - "properties": { - "call_id": { - "type": "string" - }, - "tool_name": { - "oneOf": [ - { - "type": "string", - "enum": [ - "brave_search", - "wolfram_alpha", - "photogen", - "code_interpreter" - ], - "title": "BuiltinTool" - }, - { - "type": "string" - } - ] - }, - "arguments": { - "oneOf": [ - { - "type": "string" - }, - { - "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" - } - ] - } - } - ] - } - } - ] - }, - "arguments_json": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "call_id", - "tool_name", - "arguments" - ], - "title": "ToolCall" - }, - "ToolExecutionStep": { - "type": "object", - "properties": { - "turn_id": { - "type": "string", - "description": "The ID of the turn." - }, - "step_id": { - "type": "string", - "description": "The ID of the step." - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "The time the step started." - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "The time the step completed." - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ], - "title": "StepType", - "description": "Type of the step in an agent turn.", - "const": "tool_execution", - "default": "tool_execution" - }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolCall" - }, - "description": "The tool calls to execute." - }, - "tool_responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolResponse" - }, - "description": "The tool responses from the tool calls." - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "step_id", - "step_type", - "tool_calls", - "tool_responses" - ], - "title": "ToolExecutionStep", - "description": "A tool execution step in an agent turn." - }, - "ToolResponse": { - "type": "object", - "properties": { - "call_id": { - "type": "string", - "description": "Unique identifier for the tool call this response is for" - }, - "tool_name": { - "oneOf": [ - { - "type": "string", - "enum": [ - "brave_search", - "wolfram_alpha", - "photogen", - "code_interpreter" - ], - "title": "BuiltinTool" - }, - { - "type": "string" - } - ], - "description": "Name of the tool that was invoked" - }, - "content": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "The response content from the tool" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Additional metadata about the tool response" - } - }, - "additionalProperties": false, - "required": [ - "call_id", - "tool_name", - "content" - ], - "title": "ToolResponse", - "description": "Response from a tool invocation." - }, - "Turn": { - "type": "object", - "properties": { - "turn_id": { - "type": "string", - "description": "Unique identifier for the turn within a session" - }, - "session_id": { - "type": "string", - "description": "Unique identifier for the conversation session" - }, - "input_messages": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/UserMessage" - }, - { - "$ref": "#/components/schemas/ToolResponseMessage" - } - ] - }, - "description": "List of messages that initiated this turn" - }, - "steps": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/InferenceStep" - }, - { - "$ref": "#/components/schemas/ToolExecutionStep" - }, - { - "$ref": "#/components/schemas/ShieldCallStep" - }, - { - "$ref": "#/components/schemas/MemoryRetrievalStep" - } - ], - "discriminator": { - "propertyName": "step_type", - "mapping": { - "inference": "#/components/schemas/InferenceStep", - "tool_execution": "#/components/schemas/ToolExecutionStep", - "shield_call": "#/components/schemas/ShieldCallStep", - "memory_retrieval": "#/components/schemas/MemoryRetrievalStep" - } - } - }, - "description": "Ordered list of processing steps executed during this turn" - }, - "output_message": { - "$ref": "#/components/schemas/CompletionMessage", - "description": "The model's generated response containing content and metadata" - }, - "output_attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/InterleavedContentItem" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/InterleavedContentItem" - } - }, - { - "$ref": "#/components/schemas/URL" - } - ], - "description": "The content of the attachment." - }, - "mime_type": { - "type": "string", - "description": "The MIME type of the attachment." - } - }, - "additionalProperties": false, - "required": [ - "content", - "mime_type" - ], - "title": "Attachment", - "description": "An attachment to an agent turn." - }, - "description": "(Optional) Files or media attached to the agent's response" - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the turn began" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "(Optional) Timestamp when the turn finished, if completed" - } - }, - "additionalProperties": false, - "required": [ - "turn_id", - "session_id", - "input_messages", - "steps", - "output_message", - "started_at" - ], - "title": "Turn", - "description": "A single turn in an interaction with an Agentic System." - }, - "ViolationLevel": { + "ModelType": { "type": "string", "enum": [ - "info", - "warn", - "error" + "llm", + "embedding" ], - "title": "ViolationLevel", - "description": "Severity level of a safety violation." + "title": "ModelType", + "description": "Enumeration of supported model types in Llama Stack." }, - "AgentTurnResponseEvent": { + "ListModelsResponse": { "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" - }, - { - "$ref": "#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload" - } - ], - "discriminator": { - "propertyName": "event_type", - "mapping": { - "step_start": "#/components/schemas/AgentTurnResponseStepStartPayload", - "step_progress": "#/components/schemas/AgentTurnResponseStepProgressPayload", - "step_complete": "#/components/schemas/AgentTurnResponseStepCompletePayload", - "turn_start": "#/components/schemas/AgentTurnResponseTurnStartPayload", - "turn_complete": "#/components/schemas/AgentTurnResponseTurnCompletePayload", - "turn_awaiting_input": "#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload" - } - }, - "description": "Event-specific payload containing event data" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model" + } } }, "additionalProperties": false, "required": [ - "payload" + "data" ], - "title": "AgentTurnResponseEvent", - "description": "An event in an agent turn response stream." + "title": "ListModelsResponse" }, - "AgentTurnResponseStepCompletePayload": { + "RegisterModelRequest": { "type": "object", "properties": { - "event_type": { + "model_id": { "type": "string", - "enum": [ - "step_start", - "step_complete", - "step_progress", - "turn_start", - "turn_complete", - "turn_awaiting_input" - ], - "const": "step_complete", - "default": "step_complete", - "description": "Type of event being reported" + "description": "The identifier of the model to register." }, - "step_type": { + "provider_model_id": { "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ], - "description": "Type of step being executed" + "description": "The identifier of the model in the provider." }, - "step_id": { + "provider_id": { "type": "string", - "description": "Unique identifier for the step within a turn" - }, - "step_details": { - "oneOf": [ - { - "$ref": "#/components/schemas/InferenceStep" - }, - { - "$ref": "#/components/schemas/ToolExecutionStep" - }, - { - "$ref": "#/components/schemas/ShieldCallStep" - }, - { - "$ref": "#/components/schemas/MemoryRetrievalStep" - } - ], - "discriminator": { - "propertyName": "step_type", - "mapping": { - "inference": "#/components/schemas/InferenceStep", - "tool_execution": "#/components/schemas/ToolExecutionStep", - "shield_call": "#/components/schemas/ShieldCallStep", - "memory_retrieval": "#/components/schemas/MemoryRetrievalStep" - } - }, - "description": "Complete details of the executed step" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "step_type", - "step_id", - "step_details" - ], - "title": "AgentTurnResponseStepCompletePayload", - "description": "Payload for step completion events in agent turn responses." - }, - "AgentTurnResponseStepProgressPayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "enum": [ - "step_start", - "step_complete", - "step_progress", - "turn_start", - "turn_complete", - "turn_awaiting_input" - ], - "const": "step_progress", - "default": "step_progress", - "description": "Type of event being reported" - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ], - "description": "Type of step being executed" - }, - "step_id": { - "type": "string", - "description": "Unique identifier for the step within a turn" - }, - "delta": { - "oneOf": [ - { - "$ref": "#/components/schemas/TextDelta" - }, - { - "$ref": "#/components/schemas/ImageDelta" - }, - { - "$ref": "#/components/schemas/ToolCallDelta" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "text": "#/components/schemas/TextDelta", - "image": "#/components/schemas/ImageDelta", - "tool_call": "#/components/schemas/ToolCallDelta" - } - }, - "description": "Incremental content changes during step execution" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "step_type", - "step_id", - "delta" - ], - "title": "AgentTurnResponseStepProgressPayload", - "description": "Payload for step progress events in agent turn responses." - }, - "AgentTurnResponseStepStartPayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "enum": [ - "step_start", - "step_complete", - "step_progress", - "turn_start", - "turn_complete", - "turn_awaiting_input" - ], - "const": "step_start", - "default": "step_start", - "description": "Type of event being reported" - }, - "step_type": { - "type": "string", - "enum": [ - "inference", - "tool_execution", - "shield_call", - "memory_retrieval" - ], - "description": "Type of step being executed" - }, - "step_id": { - "type": "string", - "description": "Unique identifier for the step within a turn" + "description": "The identifier of the provider." }, "metadata": { "type": "object", @@ -9254,207 +6545,401 @@ } ] }, - "description": "(Optional) Additional metadata for the step" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "step_type", - "step_id" - ], - "title": "AgentTurnResponseStepStartPayload", - "description": "Payload for step start events in agent turn responses." - }, - "AgentTurnResponseStreamChunk": { - "type": "object", - "properties": { - "event": { - "$ref": "#/components/schemas/AgentTurnResponseEvent", - "description": "Individual event in the agent turn response stream" - } - }, - "additionalProperties": false, - "required": [ - "event" - ], - "title": "AgentTurnResponseStreamChunk", - "description": "Streamed agent turn completion response." - }, - "AgentTurnResponseTurnAwaitingInputPayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "enum": [ - "step_start", - "step_complete", - "step_progress", - "turn_start", - "turn_complete", - "turn_awaiting_input" - ], - "const": "turn_awaiting_input", - "default": "turn_awaiting_input", - "description": "Type of event being reported" + "description": "Any additional metadata for this model." }, - "turn": { - "$ref": "#/components/schemas/Turn", - "description": "Turn data when waiting for external tool responses" + "model_type": { + "$ref": "#/components/schemas/ModelType", + "description": "The type of model to register." } }, "additionalProperties": false, "required": [ - "event_type", - "turn" + "model_id" ], - "title": "AgentTurnResponseTurnAwaitingInputPayload", - "description": "Payload for turn awaiting input events in agent turn responses." + "title": "RegisterModelRequest" }, - "AgentTurnResponseTurnCompletePayload": { + "RunModerationRequest": { "type": "object", "properties": { - "event_type": { - "type": "string", - "enum": [ - "step_start", - "step_complete", - "step_progress", - "turn_start", - "turn_complete", - "turn_awaiting_input" - ], - "const": "turn_complete", - "default": "turn_complete", - "description": "Type of event being reported" - }, - "turn": { - "$ref": "#/components/schemas/Turn", - "description": "Complete turn data including all steps and results" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "turn" - ], - "title": "AgentTurnResponseTurnCompletePayload", - "description": "Payload for turn completion events in agent turn responses." - }, - "AgentTurnResponseTurnStartPayload": { - "type": "object", - "properties": { - "event_type": { - "type": "string", - "enum": [ - "step_start", - "step_complete", - "step_progress", - "turn_start", - "turn_complete", - "turn_awaiting_input" - ], - "const": "turn_start", - "default": "turn_start", - "description": "Type of event being reported" - }, - "turn_id": { - "type": "string", - "description": "Unique identifier for the turn within a session" - } - }, - "additionalProperties": false, - "required": [ - "event_type", - "turn_id" - ], - "title": "AgentTurnResponseTurnStartPayload", - "description": "Payload for turn start events in agent turn responses." - }, - "ImageDelta": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "image", - "default": "image", - "description": "Discriminator type of the delta. Always \"image\"" - }, - "image": { - "type": "string", - "contentEncoding": "base64", - "description": "The incremental image data as bytes" - } - }, - "additionalProperties": false, - "required": [ - "type", - "image" - ], - "title": "ImageDelta", - "description": "An image content delta for streaming responses." - }, - "TextDelta": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "text", - "default": "text", - "description": "Discriminator type of the delta. Always \"text\"" - }, - "text": { - "type": "string", - "description": "The incremental text content" - } - }, - "additionalProperties": false, - "required": [ - "type", - "text" - ], - "title": "TextDelta", - "description": "A text content delta for streaming responses." - }, - "ToolCallDelta": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "tool_call", - "default": "tool_call", - "description": "Discriminator type of the delta. Always \"tool_call\"" - }, - "tool_call": { + "input": { "oneOf": [ { "type": "string" }, { - "$ref": "#/components/schemas/ToolCall" + "type": "array", + "items": { + "type": "string" + } } ], - "description": "Either an in-progress tool call string or the final parsed tool call" + "description": "Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models." }, - "parse_status": { + "model": { "type": "string", - "enum": [ - "started", - "in_progress", - "failed", - "succeeded" - ], - "description": "Current parsing status of the tool call" + "description": "The content moderation model you would like to use." } }, "additionalProperties": false, "required": [ - "type", - "tool_call", - "parse_status" + "input", + "model" ], - "title": "ToolCallDelta", - "description": "A tool call content delta for streaming responses." + "title": "RunModerationRequest" + }, + "ModerationObject": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the moderation request." + }, + "model": { + "type": "string", + "description": "The model used to generate the moderation results." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ModerationObjectResults" + }, + "description": "A list of moderation objects" + } + }, + "additionalProperties": false, + "required": [ + "id", + "model", + "results" + ], + "title": "ModerationObject", + "description": "A moderation object." + }, + "ModerationObjectResults": { + "type": "object", + "properties": { + "flagged": { + "type": "boolean", + "description": "Whether any of the below categories are flagged." + }, + "categories": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "description": "A list of the categories, and whether they are flagged or not." + }, + "category_applied_input_types": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "A list of the categories along with the input type(s) that the score applies to." + }, + "category_scores": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "description": "A list of the categories along with their scores as predicted by model." + }, + "user_message": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "flagged", + "metadata" + ], + "title": "ModerationObjectResults", + "description": "A moderation object." + }, + "Prompt": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "The system prompt text with variable placeholders. Variables are only supported when using the Responses API." + }, + "version": { + "type": "integer", + "description": "Version (integer starting at 1, incremented on save)" + }, + "prompt_id": { + "type": "string", + "description": "Unique identifier formatted as 'pmpt_<48-digit-hash>'" + }, + "variables": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of prompt variable names that can be used in the prompt template" + }, + "is_default": { + "type": "boolean", + "default": false, + "description": "Boolean indicating whether this version is the default version for this prompt" + } + }, + "additionalProperties": false, + "required": [ + "version", + "prompt_id", + "variables", + "is_default" + ], + "title": "Prompt", + "description": "A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack." + }, + "ListPromptsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt" + } + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "ListPromptsResponse", + "description": "Response model to list prompts." + }, + "CreatePromptRequest": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "The prompt text content with variable placeholders." + }, + "variables": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of variable names that can be used in the prompt template." + } + }, + "additionalProperties": false, + "required": [ + "prompt" + ], + "title": "CreatePromptRequest" + }, + "UpdatePromptRequest": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "The updated prompt text content." + }, + "version": { + "type": "integer", + "description": "The current version of the prompt being updated." + }, + "variables": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Updated list of variable names that can be used in the prompt template." + }, + "set_as_default": { + "type": "boolean", + "description": "Set the new version as the default (default=True)." + } + }, + "additionalProperties": false, + "required": [ + "prompt", + "version", + "set_as_default" + ], + "title": "UpdatePromptRequest" + }, + "SetDefaultVersionRequest": { + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version to set as default." + } + }, + "additionalProperties": false, + "required": [ + "version" + ], + "title": "SetDefaultVersionRequest" + }, + "ProviderInfo": { + "type": "object", + "properties": { + "api": { + "type": "string", + "description": "The API name this provider implements" + }, + "provider_id": { + "type": "string", + "description": "Unique identifier for the provider" + }, + "provider_type": { + "type": "string", + "description": "The type of provider implementation" + }, + "config": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Configuration parameters for the provider" + }, + "health": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Current health status of the provider" + } + }, + "additionalProperties": false, + "required": [ + "api", + "provider_id", + "provider_type", + "config", + "health" + ], + "title": "ProviderInfo", + "description": "Information about a registered provider including its configuration and health status." + }, + "ListProvidersResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProviderInfo" + }, + "description": "List of provider information objects" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "ListProvidersResponse", + "description": "Response containing a list of all available providers." + }, + "ListOpenAIResponseObject": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIResponseObjectWithInput" + }, + "description": "List of response objects with their input context" + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more results available beyond this page" + }, + "first_id": { + "type": "string", + "description": "Identifier of the first item in this page" + }, + "last_id": { + "type": "string", + "description": "Identifier of the last item in this page" + }, + "object": { + "type": "string", + "const": "list", + "default": "list", + "description": "Object type identifier, always \"list\"" + } + }, + "additionalProperties": false, + "required": [ + "data", + "has_more", + "first_id", + "last_id", + "object" + ], + "title": "ListOpenAIResponseObject", + "description": "Paginated list of OpenAI response objects with navigation metadata." }, "OpenAIResponseAnnotationCitation": { "type": "object", @@ -9608,6 +7093,26 @@ } } }, + "OpenAIResponseError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error code identifying the type of failure" + }, + "message": { + "type": "string", + "description": "Human-readable error message describing the failure" + } + }, + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "title": "OpenAIResponseError", + "description": "Error details for failed OpenAI response requests." + }, "OpenAIResponseInput": { "oneOf": [ { @@ -9742,6 +7247,637 @@ "title": "OpenAIResponseInputMessageContentText", "description": "Text content for input messages in OpenAI response format." }, + "OpenAIResponseMCPApprovalRequest": { + "type": "object", + "properties": { + "arguments": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "server_label": { + "type": "string" + }, + "type": { + "type": "string", + "const": "mcp_approval_request", + "default": "mcp_approval_request" + } + }, + "additionalProperties": false, + "required": [ + "arguments", + "id", + "name", + "server_label", + "type" + ], + "title": "OpenAIResponseMCPApprovalRequest", + "description": "A request for human approval of a tool invocation." + }, + "OpenAIResponseMCPApprovalResponse": { + "type": "object", + "properties": { + "approval_request_id": { + "type": "string" + }, + "approve": { + "type": "boolean" + }, + "type": { + "type": "string", + "const": "mcp_approval_response", + "default": "mcp_approval_response" + }, + "id": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "approval_request_id", + "approve", + "type" + ], + "title": "OpenAIResponseMCPApprovalResponse", + "description": "A response to an MCP approval request." + }, + "OpenAIResponseMessage": { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIResponseInputMessageContent" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIResponseOutputMessageContent" + } + } + ] + }, + "role": { + "oneOf": [ + { + "type": "string", + "const": "system" + }, + { + "type": "string", + "const": "developer" + }, + { + "type": "string", + "const": "user" + }, + { + "type": "string", + "const": "assistant" + } + ] + }, + "type": { + "type": "string", + "const": "message", + "default": "message" + }, + "id": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "content", + "role", + "type" + ], + "title": "OpenAIResponseMessage", + "description": "Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same \"type\" value, and there is no way to tell them apart in certain scenarios." + }, + "OpenAIResponseObjectWithInput": { + "type": "object", + "properties": { + "created_at": { + "type": "integer", + "description": "Unix timestamp when the response was created" + }, + "error": { + "$ref": "#/components/schemas/OpenAIResponseError", + "description": "(Optional) Error details if the response generation failed" + }, + "id": { + "type": "string", + "description": "Unique identifier for this response" + }, + "model": { + "type": "string", + "description": "Model identifier used for generation" + }, + "object": { + "type": "string", + "const": "response", + "default": "response", + "description": "Object type identifier, always \"response\"" + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIResponseOutput" + }, + "description": "List of generated output items (messages, tool calls, etc.)" + }, + "parallel_tool_calls": { + "type": "boolean", + "default": false, + "description": "Whether tool calls can be executed in parallel" + }, + "previous_response_id": { + "type": "string", + "description": "(Optional) ID of the previous response in a conversation" + }, + "status": { + "type": "string", + "description": "Current status of the response generation" + }, + "temperature": { + "type": "number", + "description": "(Optional) Sampling temperature used for generation" + }, + "text": { + "$ref": "#/components/schemas/OpenAIResponseText", + "description": "Text formatting configuration for the response" + }, + "top_p": { + "type": "number", + "description": "(Optional) Nucleus sampling parameter used for generation" + }, + "truncation": { + "type": "string", + "description": "(Optional) Truncation strategy applied to the response" + }, + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIResponseInput" + }, + "description": "List of input items that led to this response" + } + }, + "additionalProperties": false, + "required": [ + "created_at", + "id", + "model", + "object", + "output", + "parallel_tool_calls", + "status", + "text", + "input" + ], + "title": "OpenAIResponseObjectWithInput", + "description": "OpenAI response object extended with input context information." + }, + "OpenAIResponseOutput": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAIResponseMessage" + }, + { + "$ref": "#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall" + }, + { + "$ref": "#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall" + }, + { + "$ref": "#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall" + }, + { + "$ref": "#/components/schemas/OpenAIResponseOutputMessageMCPCall" + }, + { + "$ref": "#/components/schemas/OpenAIResponseOutputMessageMCPListTools" + }, + { + "$ref": "#/components/schemas/OpenAIResponseMCPApprovalRequest" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "message": "#/components/schemas/OpenAIResponseMessage", + "web_search_call": "#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall", + "file_search_call": "#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall", + "function_call": "#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall", + "mcp_call": "#/components/schemas/OpenAIResponseOutputMessageMCPCall", + "mcp_list_tools": "#/components/schemas/OpenAIResponseOutputMessageMCPListTools", + "mcp_approval_request": "#/components/schemas/OpenAIResponseMCPApprovalRequest" + } + } + }, + "OpenAIResponseOutputMessageContent": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "type": { + "type": "string", + "const": "output_text", + "default": "output_text" + }, + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIResponseAnnotations" + } + } + }, + "additionalProperties": false, + "required": [ + "text", + "type", + "annotations" + ], + "title": "OpenAIResponseOutputMessageContentOutputText" + }, + "OpenAIResponseOutputMessageFileSearchToolCall": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this tool call" + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of search queries executed" + }, + "status": { + "type": "string", + "description": "Current status of the file search operation" + }, + "type": { + "type": "string", + "const": "file_search_call", + "default": "file_search_call", + "description": "Tool call type identifier, always \"file_search_call\"" + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) Key-value attributes associated with the file" + }, + "file_id": { + "type": "string", + "description": "Unique identifier of the file containing the result" + }, + "filename": { + "type": "string", + "description": "Name of the file containing the result" + }, + "score": { + "type": "number", + "description": "Relevance score for this search result (between 0 and 1)" + }, + "text": { + "type": "string", + "description": "Text content of the search result" + } + }, + "additionalProperties": false, + "required": [ + "attributes", + "file_id", + "filename", + "score", + "text" + ], + "title": "OpenAIResponseOutputMessageFileSearchToolCallResults", + "description": "Search results returned by the file search operation." + }, + "description": "(Optional) Search results returned by the file search operation" + } + }, + "additionalProperties": false, + "required": [ + "id", + "queries", + "status", + "type" + ], + "title": "OpenAIResponseOutputMessageFileSearchToolCall", + "description": "File search tool call output message for OpenAI responses." + }, + "OpenAIResponseOutputMessageFunctionToolCall": { + "type": "object", + "properties": { + "call_id": { + "type": "string", + "description": "Unique identifier for the function call" + }, + "name": { + "type": "string", + "description": "Name of the function being called" + }, + "arguments": { + "type": "string", + "description": "JSON string containing the function arguments" + }, + "type": { + "type": "string", + "const": "function_call", + "default": "function_call", + "description": "Tool call type identifier, always \"function_call\"" + }, + "id": { + "type": "string", + "description": "(Optional) Additional identifier for the tool call" + }, + "status": { + "type": "string", + "description": "(Optional) Current status of the function call execution" + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "name", + "arguments", + "type" + ], + "title": "OpenAIResponseOutputMessageFunctionToolCall", + "description": "Function tool call output message for OpenAI responses." + }, + "OpenAIResponseOutputMessageMCPCall": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this MCP call" + }, + "type": { + "type": "string", + "const": "mcp_call", + "default": "mcp_call", + "description": "Tool call type identifier, always \"mcp_call\"" + }, + "arguments": { + "type": "string", + "description": "JSON string containing the MCP call arguments" + }, + "name": { + "type": "string", + "description": "Name of the MCP method being called" + }, + "server_label": { + "type": "string", + "description": "Label identifying the MCP server handling the call" + }, + "error": { + "type": "string", + "description": "(Optional) Error message if the MCP call failed" + }, + "output": { + "type": "string", + "description": "(Optional) Output result from the successful MCP call" + } + }, + "additionalProperties": false, + "required": [ + "id", + "type", + "arguments", + "name", + "server_label" + ], + "title": "OpenAIResponseOutputMessageMCPCall", + "description": "Model Context Protocol (MCP) call output message for OpenAI responses." + }, + "OpenAIResponseOutputMessageMCPListTools": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this MCP list tools operation" + }, + "type": { + "type": "string", + "const": "mcp_list_tools", + "default": "mcp_list_tools", + "description": "Tool call type identifier, always \"mcp_list_tools\"" + }, + "server_label": { + "type": "string", + "description": "Label identifying the MCP server providing the tools" + }, + "tools": { + "type": "array", + "items": { + "type": "object", + "properties": { + "input_schema": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "JSON schema defining the tool's input parameters" + }, + "name": { + "type": "string", + "description": "Name of the tool" + }, + "description": { + "type": "string", + "description": "(Optional) Description of what the tool does" + } + }, + "additionalProperties": false, + "required": [ + "input_schema", + "name" + ], + "title": "MCPListToolsTool", + "description": "Tool definition returned by MCP list tools operation." + }, + "description": "List of available tools provided by the MCP server" + } + }, + "additionalProperties": false, + "required": [ + "id", + "type", + "server_label", + "tools" + ], + "title": "OpenAIResponseOutputMessageMCPListTools", + "description": "MCP list tools output message containing available tools from an MCP server." + }, + "OpenAIResponseOutputMessageWebSearchToolCall": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this tool call" + }, + "status": { + "type": "string", + "description": "Current status of the web search operation" + }, + "type": { + "type": "string", + "const": "web_search_call", + "default": "web_search_call", + "description": "Tool call type identifier, always \"web_search_call\"" + } + }, + "additionalProperties": false, + "required": [ + "id", + "status", + "type" + ], + "title": "OpenAIResponseOutputMessageWebSearchToolCall", + "description": "Web search tool call output message for OpenAI responses." + }, + "OpenAIResponseText": { + "type": "object", + "properties": { + "format": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "type": "string", + "const": "text" + }, + { + "type": "string", + "const": "json_schema" + }, + { + "type": "string", + "const": "json_object" + } + ], + "description": "Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type" + }, + "name": { + "type": "string", + "description": "The name of the response format. Only used for json_schema." + }, + "schema": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema." + }, + "description": { + "type": "string", + "description": "(Optional) A description of the response format. Only used for json_schema." + }, + "strict": { + "type": "boolean", + "description": "(Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema." + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "description": "(Optional) Text format configuration specifying output format requirements" + } + }, + "additionalProperties": false, + "title": "OpenAIResponseText", + "description": "Text response configuration for OpenAI responses." + }, "OpenAIResponseInputTool": { "oneOf": [ { @@ -10045,393 +8181,6 @@ "title": "OpenAIResponseInputToolWebSearch", "description": "Web search tool configuration for OpenAI response inputs." }, - "OpenAIResponseMCPApprovalRequest": { - "type": "object", - "properties": { - "arguments": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "server_label": { - "type": "string" - }, - "type": { - "type": "string", - "const": "mcp_approval_request", - "default": "mcp_approval_request" - } - }, - "additionalProperties": false, - "required": [ - "arguments", - "id", - "name", - "server_label", - "type" - ], - "title": "OpenAIResponseMCPApprovalRequest", - "description": "A request for human approval of a tool invocation." - }, - "OpenAIResponseMCPApprovalResponse": { - "type": "object", - "properties": { - "approval_request_id": { - "type": "string" - }, - "approve": { - "type": "boolean" - }, - "type": { - "type": "string", - "const": "mcp_approval_response", - "default": "mcp_approval_response" - }, - "id": { - "type": "string" - }, - "reason": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "approval_request_id", - "approve", - "type" - ], - "title": "OpenAIResponseMCPApprovalResponse", - "description": "A response to an MCP approval request." - }, - "OpenAIResponseMessage": { - "type": "object", - "properties": { - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIResponseInputMessageContent" - } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageContent" - } - } - ] - }, - "role": { - "oneOf": [ - { - "type": "string", - "const": "system" - }, - { - "type": "string", - "const": "developer" - }, - { - "type": "string", - "const": "user" - }, - { - "type": "string", - "const": "assistant" - } - ] - }, - "type": { - "type": "string", - "const": "message", - "default": "message" - }, - "id": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "content", - "role", - "type" - ], - "title": "OpenAIResponseMessage", - "description": "Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same \"type\" value, and there is no way to tell them apart in certain scenarios." - }, - "OpenAIResponseOutputMessageContent": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "type": { - "type": "string", - "const": "output_text", - "default": "output_text" - }, - "annotations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIResponseAnnotations" - } - } - }, - "additionalProperties": false, - "required": [ - "text", - "type", - "annotations" - ], - "title": "OpenAIResponseOutputMessageContentOutputText" - }, - "OpenAIResponseOutputMessageFileSearchToolCall": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this tool call" - }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of search queries executed" - }, - "status": { - "type": "string", - "description": "Current status of the file search operation" - }, - "type": { - "type": "string", - "const": "file_search_call", - "default": "file_search_call", - "description": "Tool call type identifier, always \"file_search_call\"" - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Key-value attributes associated with the file" - }, - "file_id": { - "type": "string", - "description": "Unique identifier of the file containing the result" - }, - "filename": { - "type": "string", - "description": "Name of the file containing the result" - }, - "score": { - "type": "number", - "description": "Relevance score for this search result (between 0 and 1)" - }, - "text": { - "type": "string", - "description": "Text content of the search result" - } - }, - "additionalProperties": false, - "required": [ - "attributes", - "file_id", - "filename", - "score", - "text" - ], - "title": "OpenAIResponseOutputMessageFileSearchToolCallResults", - "description": "Search results returned by the file search operation." - }, - "description": "(Optional) Search results returned by the file search operation" - } - }, - "additionalProperties": false, - "required": [ - "id", - "queries", - "status", - "type" - ], - "title": "OpenAIResponseOutputMessageFileSearchToolCall", - "description": "File search tool call output message for OpenAI responses." - }, - "OpenAIResponseOutputMessageFunctionToolCall": { - "type": "object", - "properties": { - "call_id": { - "type": "string", - "description": "Unique identifier for the function call" - }, - "name": { - "type": "string", - "description": "Name of the function being called" - }, - "arguments": { - "type": "string", - "description": "JSON string containing the function arguments" - }, - "type": { - "type": "string", - "const": "function_call", - "default": "function_call", - "description": "Tool call type identifier, always \"function_call\"" - }, - "id": { - "type": "string", - "description": "(Optional) Additional identifier for the tool call" - }, - "status": { - "type": "string", - "description": "(Optional) Current status of the function call execution" - } - }, - "additionalProperties": false, - "required": [ - "call_id", - "name", - "arguments", - "type" - ], - "title": "OpenAIResponseOutputMessageFunctionToolCall", - "description": "Function tool call output message for OpenAI responses." - }, - "OpenAIResponseOutputMessageWebSearchToolCall": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this tool call" - }, - "status": { - "type": "string", - "description": "Current status of the web search operation" - }, - "type": { - "type": "string", - "const": "web_search_call", - "default": "web_search_call", - "description": "Tool call type identifier, always \"web_search_call\"" - } - }, - "additionalProperties": false, - "required": [ - "id", - "status", - "type" - ], - "title": "OpenAIResponseOutputMessageWebSearchToolCall", - "description": "Web search tool call output message for OpenAI responses." - }, - "OpenAIResponseText": { - "type": "object", - "properties": { - "format": { - "type": "object", - "properties": { - "type": { - "oneOf": [ - { - "type": "string", - "const": "text" - }, - { - "type": "string", - "const": "json_schema" - }, - { - "type": "string", - "const": "json_object" - } - ], - "description": "Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type" - }, - "name": { - "type": "string", - "description": "The name of the response format. Only used for json_schema." - }, - "schema": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema." - }, - "description": { - "type": "string", - "description": "(Optional) A description of the response format. Only used for json_schema." - }, - "strict": { - "type": "boolean", - "description": "(Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema." - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "description": "(Optional) Text format configuration specifying output format requirements" - } - }, - "additionalProperties": false, - "title": "OpenAIResponseText", - "description": "Text response configuration for OpenAI responses." - }, "CreateOpenaiResponseRequest": { "type": "object", "properties": { @@ -10496,26 +8245,6 @@ ], "title": "CreateOpenaiResponseRequest" }, - "OpenAIResponseError": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Error code identifying the type of failure" - }, - "message": { - "type": "string", - "description": "Human-readable error message describing the failure" - } - }, - "additionalProperties": false, - "required": [ - "code", - "message" - ], - "title": "OpenAIResponseError", - "description": "Error details for failed OpenAI response requests." - }, "OpenAIResponseObject": { "type": "object", "properties": { @@ -10592,166 +8321,6 @@ "title": "OpenAIResponseObject", "description": "Complete OpenAI response object containing generation results and metadata." }, - "OpenAIResponseOutput": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAIResponseMessage" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageMCPCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageMCPListTools" - }, - { - "$ref": "#/components/schemas/OpenAIResponseMCPApprovalRequest" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "message": "#/components/schemas/OpenAIResponseMessage", - "web_search_call": "#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall", - "file_search_call": "#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall", - "function_call": "#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall", - "mcp_call": "#/components/schemas/OpenAIResponseOutputMessageMCPCall", - "mcp_list_tools": "#/components/schemas/OpenAIResponseOutputMessageMCPListTools", - "mcp_approval_request": "#/components/schemas/OpenAIResponseMCPApprovalRequest" - } - } - }, - "OpenAIResponseOutputMessageMCPCall": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this MCP call" - }, - "type": { - "type": "string", - "const": "mcp_call", - "default": "mcp_call", - "description": "Tool call type identifier, always \"mcp_call\"" - }, - "arguments": { - "type": "string", - "description": "JSON string containing the MCP call arguments" - }, - "name": { - "type": "string", - "description": "Name of the MCP method being called" - }, - "server_label": { - "type": "string", - "description": "Label identifying the MCP server handling the call" - }, - "error": { - "type": "string", - "description": "(Optional) Error message if the MCP call failed" - }, - "output": { - "type": "string", - "description": "(Optional) Output result from the successful MCP call" - } - }, - "additionalProperties": false, - "required": [ - "id", - "type", - "arguments", - "name", - "server_label" - ], - "title": "OpenAIResponseOutputMessageMCPCall", - "description": "Model Context Protocol (MCP) call output message for OpenAI responses." - }, - "OpenAIResponseOutputMessageMCPListTools": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this MCP list tools operation" - }, - "type": { - "type": "string", - "const": "mcp_list_tools", - "default": "mcp_list_tools", - "description": "Tool call type identifier, always \"mcp_list_tools\"" - }, - "server_label": { - "type": "string", - "description": "Label identifying the MCP server providing the tools" - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "properties": { - "input_schema": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "JSON schema defining the tool's input parameters" - }, - "name": { - "type": "string", - "description": "Name of the tool" - }, - "description": { - "type": "string", - "description": "(Optional) Description of what the tool does" - } - }, - "additionalProperties": false, - "required": [ - "input_schema", - "name" - ], - "title": "MCPListToolsTool", - "description": "Tool definition returned by MCP list tools operation." - }, - "description": "List of available tools provided by the MCP server" - } - }, - "additionalProperties": false, - "required": [ - "id", - "type", - "server_label", - "tools" - ], - "title": "OpenAIResponseOutputMessageMCPListTools", - "description": "MCP list tools output message containing available tools from an MCP server." - }, "OpenAIResponseContentPartOutputText": { "type": "object", "properties": { @@ -11615,65 +9184,6 @@ ], "title": "OpenAIResponseObjectStreamResponseWebSearchCallSearching" }, - "CreatePromptRequest": { - "type": "object", - "properties": { - "prompt": { - "type": "string", - "description": "The prompt text content with variable placeholders." - }, - "variables": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of variable names that can be used in the prompt template." - } - }, - "additionalProperties": false, - "required": [ - "prompt" - ], - "title": "CreatePromptRequest" - }, - "Prompt": { - "type": "object", - "properties": { - "prompt": { - "type": "string", - "description": "The system prompt text with variable placeholders. Variables are only supported when using the Responses API." - }, - "version": { - "type": "integer", - "description": "Version (integer starting at 1, incremented on save)" - }, - "prompt_id": { - "type": "string", - "description": "Unique identifier formatted as 'pmpt_<48-digit-hash>'" - }, - "variables": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of prompt variable names that can be used in the prompt template" - }, - "is_default": { - "type": "boolean", - "default": false, - "description": "Boolean indicating whether this version is the default version for this prompt" - } - }, - "additionalProperties": false, - "required": [ - "version", - "prompt_id", - "variables", - "is_default" - ], - "title": "Prompt", - "description": "A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack." - }, "OpenAIDeleteResponseObject": { "type": "object", "properties": { @@ -11702,26 +9212,515 @@ "title": "OpenAIDeleteResponseObject", "description": "Response object confirming deletion of an OpenAI response." }, - "AgentCandidate": { + "ListOpenAIResponseInputItem": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIResponseInput" + }, + "description": "List of input items" + }, + "object": { + "type": "string", + "const": "list", + "default": "list", + "description": "Object type identifier, always \"list\"" + } + }, + "additionalProperties": false, + "required": [ + "data", + "object" + ], + "title": "ListOpenAIResponseInputItem", + "description": "List container for OpenAI response input items." + }, + "CompletionMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "assistant", + "default": "assistant", + "description": "Must be \"assistant\" to identify this as the model's response" + }, + "content": { + "$ref": "#/components/schemas/InterleavedContent", + "description": "The content of the model's response" + }, + "stop_reason": { + "type": "string", + "enum": [ + "end_of_turn", + "end_of_message", + "out_of_tokens" + ], + "description": "Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: The model finished generating the entire response. - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response. - `StopReason.out_of_tokens`: The model ran out of token budget." + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolCall" + }, + "description": "List of tool calls. Each tool call is a ToolCall object." + } + }, + "additionalProperties": false, + "required": [ + "role", + "content", + "stop_reason" + ], + "title": "CompletionMessage", + "description": "A message containing the model's (assistant) response in a chat conversation." + }, + "ImageContentItem": { "type": "object", "properties": { "type": { "type": "string", - "const": "agent", - "default": "agent" + "const": "image", + "default": "image", + "description": "Discriminator type of the content item. Always \"image\"" }, - "config": { - "$ref": "#/components/schemas/AgentConfig", - "description": "The configuration for the agent candidate." + "image": { + "type": "object", + "properties": { + "url": { + "$ref": "#/components/schemas/URL", + "description": "A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits." + }, + "data": { + "type": "string", + "contentEncoding": "base64", + "description": "base64 encoded image data as string" + } + }, + "additionalProperties": false, + "description": "Image as a base64 encoded string or an URL" } }, "additionalProperties": false, "required": [ "type", - "config" + "image" ], - "title": "AgentCandidate", - "description": "An agent candidate for evaluation." + "title": "ImageContentItem", + "description": "A image content item" + }, + "InterleavedContent": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/InterleavedContentItem" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/InterleavedContentItem" + } + } + ] + }, + "InterleavedContentItem": { + "oneOf": [ + { + "$ref": "#/components/schemas/ImageContentItem" + }, + { + "$ref": "#/components/schemas/TextContentItem" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "image": "#/components/schemas/ImageContentItem", + "text": "#/components/schemas/TextContentItem" + } + } + }, + "Message": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserMessage" + }, + { + "$ref": "#/components/schemas/SystemMessage" + }, + { + "$ref": "#/components/schemas/ToolResponseMessage" + }, + { + "$ref": "#/components/schemas/CompletionMessage" + } + ], + "discriminator": { + "propertyName": "role", + "mapping": { + "user": "#/components/schemas/UserMessage", + "system": "#/components/schemas/SystemMessage", + "tool": "#/components/schemas/ToolResponseMessage", + "assistant": "#/components/schemas/CompletionMessage" + } + } + }, + "SystemMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "system", + "default": "system", + "description": "Must be \"system\" to identify this as a system message" + }, + "content": { + "$ref": "#/components/schemas/InterleavedContent", + "description": "The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions)." + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ], + "title": "SystemMessage", + "description": "A system message providing instructions or context to the model." + }, + "TextContentItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text", + "default": "text", + "description": "Discriminator type of the content item. Always \"text\"" + }, + "text": { + "type": "string", + "description": "Text content" + } + }, + "additionalProperties": false, + "required": [ + "type", + "text" + ], + "title": "TextContentItem", + "description": "A text content item" + }, + "ToolCall": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "tool_name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "brave_search", + "wolfram_alpha", + "photogen", + "code_interpreter" + ], + "title": "BuiltinTool" + }, + { + "type": "string" + } + ] + }, + "arguments": { + "oneOf": [ + { + "type": "string" + }, + { + "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" + } + ] + } + } + ] + } + } + ] + }, + "arguments_json": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "call_id", + "tool_name", + "arguments" + ], + "title": "ToolCall" + }, + "ToolResponseMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "tool", + "default": "tool", + "description": "Must be \"tool\" to identify this as a tool response" + }, + "call_id": { + "type": "string", + "description": "Unique identifier for the tool call this response is for" + }, + "content": { + "$ref": "#/components/schemas/InterleavedContent", + "description": "The response content from the tool" + } + }, + "additionalProperties": false, + "required": [ + "role", + "call_id", + "content" + ], + "title": "ToolResponseMessage", + "description": "A message representing the result of a tool invocation." + }, + "URL": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "The URL string pointing to the resource" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ], + "title": "URL", + "description": "A URL reference to external content." + }, + "UserMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "const": "user", + "default": "user", + "description": "Must be \"user\" to identify this as a user message" + }, + "content": { + "$ref": "#/components/schemas/InterleavedContent", + "description": "The content of the message, which can include text and other media" + }, + "context": { + "$ref": "#/components/schemas/InterleavedContent", + "description": "(Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future." + } + }, + "additionalProperties": false, + "required": [ + "role", + "content" + ], + "title": "UserMessage", + "description": "A message from the user in a chat conversation." + }, + "RunShieldRequest": { + "type": "object", + "properties": { + "shield_id": { + "type": "string", + "description": "The identifier of the shield to run." + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + }, + "description": "The messages to run the shield on." + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "The parameters of the shield." + } + }, + "additionalProperties": false, + "required": [ + "shield_id", + "messages", + "params" + ], + "title": "RunShieldRequest" + }, + "RunShieldResponse": { + "type": "object", + "properties": { + "violation": { + "$ref": "#/components/schemas/SafetyViolation", + "description": "(Optional) Safety violation detected by the shield, if any" + } + }, + "additionalProperties": false, + "title": "RunShieldResponse", + "description": "Response from running a safety shield." + }, + "SafetyViolation": { + "type": "object", + "properties": { + "violation_level": { + "$ref": "#/components/schemas/ViolationLevel", + "description": "Severity level of the violation" + }, + "user_message": { + "type": "string", + "description": "(Optional) Message to convey to the user about the violation" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Additional metadata including specific violation codes for debugging and telemetry" + } + }, + "additionalProperties": false, + "required": [ + "violation_level", + "metadata" + ], + "title": "SafetyViolation", + "description": "Details of a safety violation detected by content moderation." + }, + "ViolationLevel": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ], + "title": "ViolationLevel", + "description": "Severity level of a safety violation." + }, + "AgentTurnInputType": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "agent_turn_input", + "default": "agent_turn_input", + "description": "Discriminator type. Always \"agent_turn_input\"" + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "title": "AgentTurnInputType", + "description": "Parameter type for agent turn input." }, "AggregationFunctionType": { "type": "string", @@ -11735,6 +9734,23 @@ "title": "AggregationFunctionType", "description": "Types of aggregation functions for scoring results." }, + "ArrayType": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "array", + "default": "array", + "description": "Discriminator type. Always \"array\"" + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "title": "ArrayType", + "description": "Parameter type for array values." + }, "BasicScoringFnParams": { "type": "object", "properties": { @@ -11760,1386 +9776,6 @@ "title": "BasicScoringFnParams", "description": "Parameters for basic scoring function configuration." }, - "BenchmarkConfig": { - "type": "object", - "properties": { - "eval_candidate": { - "oneOf": [ - { - "$ref": "#/components/schemas/ModelCandidate" - }, - { - "$ref": "#/components/schemas/AgentCandidate" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "model": "#/components/schemas/ModelCandidate", - "agent": "#/components/schemas/AgentCandidate" - } - }, - "description": "The candidate to evaluate." - }, - "scoring_params": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ScoringFnParams" - }, - "description": "Map between scoring function id and parameters for each scoring function you want to run" - }, - "num_examples": { - "type": "integer", - "description": "(Optional) The number of examples to evaluate. If not provided, all examples in the dataset will be evaluated" - } - }, - "additionalProperties": false, - "required": [ - "eval_candidate", - "scoring_params" - ], - "title": "BenchmarkConfig", - "description": "A benchmark configuration for evaluation." - }, - "LLMAsJudgeScoringFnParams": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/ScoringFnParamsType", - "const": "llm_as_judge", - "default": "llm_as_judge", - "description": "The type of scoring function parameters, always llm_as_judge" - }, - "judge_model": { - "type": "string", - "description": "Identifier of the LLM model to use as a judge for scoring" - }, - "prompt_template": { - "type": "string", - "description": "(Optional) Custom prompt template for the judge model" - }, - "judge_score_regexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Regexes to extract the answer from generated response" - }, - "aggregation_functions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AggregationFunctionType" - }, - "description": "Aggregation functions to apply to the scores of each row" - } - }, - "additionalProperties": false, - "required": [ - "type", - "judge_model", - "judge_score_regexes", - "aggregation_functions" - ], - "title": "LLMAsJudgeScoringFnParams", - "description": "Parameters for LLM-as-judge scoring function configuration." - }, - "ModelCandidate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "model", - "default": "model" - }, - "model": { - "type": "string", - "description": "The model ID to evaluate." - }, - "sampling_params": { - "$ref": "#/components/schemas/SamplingParams", - "description": "The sampling parameters for the model." - }, - "system_message": { - "$ref": "#/components/schemas/SystemMessage", - "description": "(Optional) The system message providing instructions or context to the model." - } - }, - "additionalProperties": false, - "required": [ - "type", - "model", - "sampling_params" - ], - "title": "ModelCandidate", - "description": "A model candidate for evaluation." - }, - "RegexParserScoringFnParams": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/ScoringFnParamsType", - "const": "regex_parser", - "default": "regex_parser", - "description": "The type of scoring function parameters, always regex_parser" - }, - "parsing_regexes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Regex to extract the answer from generated response" - }, - "aggregation_functions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AggregationFunctionType" - }, - "description": "Aggregation functions to apply to the scores of each row" - } - }, - "additionalProperties": false, - "required": [ - "type", - "parsing_regexes", - "aggregation_functions" - ], - "title": "RegexParserScoringFnParams", - "description": "Parameters for regex parser scoring function configuration." - }, - "ScoringFnParams": { - "oneOf": [ - { - "$ref": "#/components/schemas/LLMAsJudgeScoringFnParams" - }, - { - "$ref": "#/components/schemas/RegexParserScoringFnParams" - }, - { - "$ref": "#/components/schemas/BasicScoringFnParams" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "llm_as_judge": "#/components/schemas/LLMAsJudgeScoringFnParams", - "regex_parser": "#/components/schemas/RegexParserScoringFnParams", - "basic": "#/components/schemas/BasicScoringFnParams" - } - } - }, - "ScoringFnParamsType": { - "type": "string", - "enum": [ - "llm_as_judge", - "regex_parser", - "basic" - ], - "title": "ScoringFnParamsType", - "description": "Types of scoring function parameter configurations." - }, - "SystemMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "system", - "default": "system", - "description": "Must be \"system\" to identify this as a system message" - }, - "content": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions)." - } - }, - "additionalProperties": false, - "required": [ - "role", - "content" - ], - "title": "SystemMessage", - "description": "A system message providing instructions or context to the model." - }, - "EvaluateRowsRequest": { - "type": "object", - "properties": { - "input_rows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "description": "The rows to evaluate." - }, - "scoring_functions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The scoring functions to use for the evaluation." - }, - "benchmark_config": { - "$ref": "#/components/schemas/BenchmarkConfig", - "description": "The configuration for the benchmark." - } - }, - "additionalProperties": false, - "required": [ - "input_rows", - "scoring_functions", - "benchmark_config" - ], - "title": "EvaluateRowsRequest" - }, - "EvaluateResponse": { - "type": "object", - "properties": { - "generations": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "description": "The generations from the evaluation." - }, - "scores": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ScoringResult" - }, - "description": "The scores from the evaluation." - } - }, - "additionalProperties": false, - "required": [ - "generations", - "scores" - ], - "title": "EvaluateResponse", - "description": "The response from an evaluation." - }, - "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" - } - ] - } - }, - "description": "The scoring result for each row. Each row is a map of column name to value." - }, - "aggregated_results": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Map of metric name to aggregated value" - } - }, - "additionalProperties": false, - "required": [ - "score_rows", - "aggregated_results" - ], - "title": "ScoringResult", - "description": "A scoring result for a single row." - }, - "Agent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique identifier for the agent" - }, - "agent_config": { - "$ref": "#/components/schemas/AgentConfig", - "description": "Configuration settings for the agent" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the agent was created" - } - }, - "additionalProperties": false, - "required": [ - "agent_id", - "agent_config", - "created_at" - ], - "title": "Agent", - "description": "An agent instance with configuration and metadata." - }, - "Session": { - "type": "object", - "properties": { - "session_id": { - "type": "string", - "description": "Unique identifier for the conversation session" - }, - "session_name": { - "type": "string", - "description": "Human-readable name for the session" - }, - "turns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Turn" - }, - "description": "List of all turns that have occurred in this session" - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the session was created" - } - }, - "additionalProperties": false, - "required": [ - "session_id", - "session_name", - "turns", - "started_at" - ], - "title": "Session", - "description": "A single session of an interaction with an Agentic System." - }, - "AgentStepResponse": { - "type": "object", - "properties": { - "step": { - "oneOf": [ - { - "$ref": "#/components/schemas/InferenceStep" - }, - { - "$ref": "#/components/schemas/ToolExecutionStep" - }, - { - "$ref": "#/components/schemas/ShieldCallStep" - }, - { - "$ref": "#/components/schemas/MemoryRetrievalStep" - } - ], - "discriminator": { - "propertyName": "step_type", - "mapping": { - "inference": "#/components/schemas/InferenceStep", - "tool_execution": "#/components/schemas/ToolExecutionStep", - "shield_call": "#/components/schemas/ShieldCallStep", - "memory_retrieval": "#/components/schemas/MemoryRetrievalStep" - } - }, - "description": "The complete step data and execution details" - } - }, - "additionalProperties": false, - "required": [ - "step" - ], - "title": "AgentStepResponse", - "description": "Response containing details of a specific agent step." - }, - "Benchmark": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "model", - "shield", - "vector_db", - "dataset", - "scoring_function", - "benchmark", - "tool", - "tool_group", - "prompt" - ], - "const": "benchmark", - "default": "benchmark", - "description": "The resource type, always benchmark" - }, - "dataset_id": { - "type": "string", - "description": "Identifier of the dataset to use for the benchmark evaluation" - }, - "scoring_functions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of scoring function identifiers to apply during evaluation" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Metadata for this evaluation task" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "provider_id", - "type", - "dataset_id", - "scoring_functions", - "metadata" - ], - "title": "Benchmark", - "description": "A benchmark resource for evaluating model performance." - }, - "OpenAIAssistantMessageParam": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "assistant", - "default": "assistant", - "description": "Must be \"assistant\" to identify this as the model's response" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" - } - } - ], - "description": "The content of the model's response" - }, - "name": { - "type": "string", - "description": "(Optional) The name of the assistant message participant." - }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChatCompletionToolCall" - }, - "description": "List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object." - } - }, - "additionalProperties": false, - "required": [ - "role" - ], - "title": "OpenAIAssistantMessageParam", - "description": "A message containing the model's (assistant) response in an OpenAI-compatible chat completion request." - }, - "OpenAIChatCompletionContentPartImageParam": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "image_url", - "default": "image_url", - "description": "Must be \"image_url\" to identify this as image content" - }, - "image_url": { - "$ref": "#/components/schemas/OpenAIImageURL", - "description": "Image URL specification and processing details" - } - }, - "additionalProperties": false, - "required": [ - "type", - "image_url" - ], - "title": "OpenAIChatCompletionContentPartImageParam", - "description": "Image content part for OpenAI-compatible chat completion messages." - }, - "OpenAIChatCompletionContentPartParam": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" - }, - { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartImageParam" - }, - { - "$ref": "#/components/schemas/OpenAIFile" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "text": "#/components/schemas/OpenAIChatCompletionContentPartTextParam", - "image_url": "#/components/schemas/OpenAIChatCompletionContentPartImageParam", - "file": "#/components/schemas/OpenAIFile" - } - } - }, - "OpenAIChatCompletionContentPartTextParam": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "text", - "default": "text", - "description": "Must be \"text\" to identify this as text content" - }, - "text": { - "type": "string", - "description": "The text content of the message" - } - }, - "additionalProperties": false, - "required": [ - "type", - "text" - ], - "title": "OpenAIChatCompletionContentPartTextParam", - "description": "Text content part for OpenAI-compatible chat completion messages." - }, - "OpenAIChatCompletionToolCall": { - "type": "object", - "properties": { - "index": { - "type": "integer", - "description": "(Optional) Index of the tool call in the list" - }, - "id": { - "type": "string", - "description": "(Optional) Unique identifier for the tool call" - }, - "type": { - "type": "string", - "const": "function", - "default": "function", - "description": "Must be \"function\" to identify this as a function call" - }, - "function": { - "$ref": "#/components/schemas/OpenAIChatCompletionToolCallFunction", - "description": "(Optional) Function call details" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "title": "OpenAIChatCompletionToolCall", - "description": "Tool call specification for OpenAI-compatible chat completion responses." - }, - "OpenAIChatCompletionToolCallFunction": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "(Optional) Name of the function to call" - }, - "arguments": { - "type": "string", - "description": "(Optional) Arguments to pass to the function as a JSON string" - } - }, - "additionalProperties": false, - "title": "OpenAIChatCompletionToolCallFunction", - "description": "Function call details for OpenAI-compatible tool calls." - }, - "OpenAIChoice": { - "type": "object", - "properties": { - "message": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAIUserMessageParam" - }, - { - "$ref": "#/components/schemas/OpenAISystemMessageParam" - }, - { - "$ref": "#/components/schemas/OpenAIAssistantMessageParam" - }, - { - "$ref": "#/components/schemas/OpenAIToolMessageParam" - }, - { - "$ref": "#/components/schemas/OpenAIDeveloperMessageParam" - } - ], - "discriminator": { - "propertyName": "role", - "mapping": { - "user": "#/components/schemas/OpenAIUserMessageParam", - "system": "#/components/schemas/OpenAISystemMessageParam", - "assistant": "#/components/schemas/OpenAIAssistantMessageParam", - "tool": "#/components/schemas/OpenAIToolMessageParam", - "developer": "#/components/schemas/OpenAIDeveloperMessageParam" - } - }, - "description": "The message from the model" - }, - "finish_reason": { - "type": "string", - "description": "The reason the model stopped generating" - }, - "index": { - "type": "integer", - "description": "The index of the choice" - }, - "logprobs": { - "$ref": "#/components/schemas/OpenAIChoiceLogprobs", - "description": "(Optional) The log probabilities for the tokens in the message" - } - }, - "additionalProperties": false, - "required": [ - "message", - "finish_reason", - "index" - ], - "title": "OpenAIChoice", - "description": "A choice from an OpenAI-compatible chat completion response." - }, - "OpenAIChoiceLogprobs": { - "type": "object", - "properties": { - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAITokenLogProb" - }, - "description": "(Optional) The log probabilities for the tokens in the message" - }, - "refusal": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAITokenLogProb" - }, - "description": "(Optional) The log probabilities for the tokens in the message" - } - }, - "additionalProperties": false, - "title": "OpenAIChoiceLogprobs", - "description": "The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response." - }, - "OpenAIDeveloperMessageParam": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "developer", - "default": "developer", - "description": "Must be \"developer\" to identify this as a developer message" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" - } - } - ], - "description": "The content of the developer message" - }, - "name": { - "type": "string", - "description": "(Optional) The name of the developer message participant." - } - }, - "additionalProperties": false, - "required": [ - "role", - "content" - ], - "title": "OpenAIDeveloperMessageParam", - "description": "A message from the developer in an OpenAI-compatible chat completion request." - }, - "OpenAIFile": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "file", - "default": "file" - }, - "file": { - "$ref": "#/components/schemas/OpenAIFileFile" - } - }, - "additionalProperties": false, - "required": [ - "type", - "file" - ], - "title": "OpenAIFile" - }, - "OpenAIFileFile": { - "type": "object", - "properties": { - "file_data": { - "type": "string" - }, - "file_id": { - "type": "string" - }, - "filename": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "OpenAIFileFile" - }, - "OpenAIImageURL": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL of the image to include in the message" - }, - "detail": { - "type": "string", - "description": "(Optional) Level of detail for image processing. Can be \"low\", \"high\", or \"auto\"" - } - }, - "additionalProperties": false, - "required": [ - "url" - ], - "title": "OpenAIImageURL", - "description": "Image URL specification for OpenAI-compatible chat completion messages." - }, - "OpenAIMessageParam": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAIUserMessageParam" - }, - { - "$ref": "#/components/schemas/OpenAISystemMessageParam" - }, - { - "$ref": "#/components/schemas/OpenAIAssistantMessageParam" - }, - { - "$ref": "#/components/schemas/OpenAIToolMessageParam" - }, - { - "$ref": "#/components/schemas/OpenAIDeveloperMessageParam" - } - ], - "discriminator": { - "propertyName": "role", - "mapping": { - "user": "#/components/schemas/OpenAIUserMessageParam", - "system": "#/components/schemas/OpenAISystemMessageParam", - "assistant": "#/components/schemas/OpenAIAssistantMessageParam", - "tool": "#/components/schemas/OpenAIToolMessageParam", - "developer": "#/components/schemas/OpenAIDeveloperMessageParam" - } - } - }, - "OpenAISystemMessageParam": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "system", - "default": "system", - "description": "Must be \"system\" to identify this as a system message" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" - } - } - ], - "description": "The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions)." - }, - "name": { - "type": "string", - "description": "(Optional) The name of the system message participant." - } - }, - "additionalProperties": false, - "required": [ - "role", - "content" - ], - "title": "OpenAISystemMessageParam", - "description": "A system message providing instructions or context to the model." - }, - "OpenAITokenLogProb": { - "type": "object", - "properties": { - "token": { - "type": "string" - }, - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "logprob": { - "type": "number" - }, - "top_logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAITopLogProb" - } - } - }, - "additionalProperties": false, - "required": [ - "token", - "logprob", - "top_logprobs" - ], - "title": "OpenAITokenLogProb", - "description": "The log probability for a token from an OpenAI-compatible chat completion response." - }, - "OpenAIToolMessageParam": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "tool", - "default": "tool", - "description": "Must be \"tool\" to identify this as a tool response" - }, - "tool_call_id": { - "type": "string", - "description": "Unique identifier for the tool call this response is for" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" - } - } - ], - "description": "The response content from the tool" - } - }, - "additionalProperties": false, - "required": [ - "role", - "tool_call_id", - "content" - ], - "title": "OpenAIToolMessageParam", - "description": "A message representing the result of a tool invocation in an OpenAI-compatible chat completion request." - }, - "OpenAITopLogProb": { - "type": "object", - "properties": { - "token": { - "type": "string" - }, - "bytes": { - "type": "array", - "items": { - "type": "integer" - } - }, - "logprob": { - "type": "number" - } - }, - "additionalProperties": false, - "required": [ - "token", - "logprob" - ], - "title": "OpenAITopLogProb", - "description": "The top log probability for a token from an OpenAI-compatible chat completion response." - }, - "OpenAIUserMessageParam": { - "type": "object", - "properties": { - "role": { - "type": "string", - "const": "user", - "default": "user", - "description": "Must be \"user\" to identify this as a user message" - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartParam" - } - } - ], - "description": "The content of the message, which can include text and other media" - }, - "name": { - "type": "string", - "description": "(Optional) The name of the user message participant." - } - }, - "additionalProperties": false, - "required": [ - "role", - "content" - ], - "title": "OpenAIUserMessageParam", - "description": "A message from the user in an OpenAI-compatible chat completion request." - }, - "OpenAICompletionWithInputMessages": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the chat completion" - }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChoice" - }, - "description": "List of choices" - }, - "object": { - "type": "string", - "const": "chat.completion", - "default": "chat.completion", - "description": "The object type, which will be \"chat.completion\"" - }, - "created": { - "type": "integer", - "description": "The Unix timestamp in seconds when the chat completion was created" - }, - "model": { - "type": "string", - "description": "The model that was used to generate the chat completion" - }, - "input_messages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessageParam" - } - } - }, - "additionalProperties": false, - "required": [ - "id", - "choices", - "object", - "created", - "model", - "input_messages" - ], - "title": "OpenAICompletionWithInputMessages" - }, - "Dataset": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "model", - "shield", - "vector_db", - "dataset", - "scoring_function", - "benchmark", - "tool", - "tool_group", - "prompt" - ], - "const": "dataset", - "default": "dataset", - "description": "Type of resource, always 'dataset' for datasets" - }, - "purpose": { - "type": "string", - "enum": [ - "post-training/messages", - "eval/question-answer", - "eval/messages-answer" - ], - "description": "Purpose of the dataset indicating its intended use" - }, - "source": { - "oneOf": [ - { - "$ref": "#/components/schemas/URIDataSource" - }, - { - "$ref": "#/components/schemas/RowsDataSource" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "uri": "#/components/schemas/URIDataSource", - "rows": "#/components/schemas/RowsDataSource" - } - }, - "description": "Data source configuration for the dataset" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Additional metadata for the dataset" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "provider_id", - "type", - "purpose", - "source", - "metadata" - ], - "title": "Dataset", - "description": "Dataset resource for storing and accessing training or evaluation data." - }, - "RowsDataSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "rows", - "default": "rows" - }, - "rows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "description": "The dataset is stored in rows. E.g. - [ {\"messages\": [{\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}]} ]" - } - }, - "additionalProperties": false, - "required": [ - "type", - "rows" - ], - "title": "RowsDataSource", - "description": "A dataset stored in rows." - }, - "URIDataSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "uri", - "default": "uri" - }, - "uri": { - "type": "string", - "description": "The dataset can be obtained from a URI. E.g. - \"https://mywebsite.com/mydata.jsonl\" - \"lsfs://mydata.jsonl\" - \"data:csv;base64,{base64_content}\"" - } - }, - "additionalProperties": false, - "required": [ - "type", - "uri" - ], - "title": "URIDataSource", - "description": "A dataset that can be obtained from a URI." - }, - "Model": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "Unique identifier for this resource in llama stack" - }, - "provider_resource_id": { - "type": "string", - "description": "Unique identifier for this resource in the provider" - }, - "provider_id": { - "type": "string", - "description": "ID of the provider that owns this resource" - }, - "type": { - "type": "string", - "enum": [ - "model", - "shield", - "vector_db", - "dataset", - "scoring_function", - "benchmark", - "tool", - "tool_group", - "prompt" - ], - "const": "model", - "default": "model", - "description": "The resource type, always 'model' for model resources" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Any additional metadata for this model" - }, - "model_type": { - "$ref": "#/components/schemas/ModelType", - "default": "llm", - "description": "The type of model (LLM or embedding model)" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "provider_id", - "type", - "metadata", - "model_type" - ], - "title": "Model", - "description": "A model resource representing an AI model registered in Llama Stack." - }, - "ModelType": { - "type": "string", - "enum": [ - "llm", - "embedding" - ], - "title": "ModelType", - "description": "Enumeration of supported model types in Llama Stack." - }, - "AgentTurnInputType": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "agent_turn_input", - "default": "agent_turn_input", - "description": "Discriminator type. Always \"agent_turn_input\"" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "title": "AgentTurnInputType", - "description": "Parameter type for agent turn input." - }, - "ArrayType": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "array", - "default": "array", - "description": "Discriminator type. Always \"array\"" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "title": "ArrayType", - "description": "Parameter type for array values." - }, "BooleanType": { "type": "object", "properties": { @@ -13208,6 +9844,48 @@ "title": "JsonType", "description": "Parameter type for JSON values." }, + "LLMAsJudgeScoringFnParams": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ScoringFnParamsType", + "const": "llm_as_judge", + "default": "llm_as_judge", + "description": "The type of scoring function parameters, always llm_as_judge" + }, + "judge_model": { + "type": "string", + "description": "Identifier of the LLM model to use as a judge for scoring" + }, + "prompt_template": { + "type": "string", + "description": "(Optional) Custom prompt template for the judge model" + }, + "judge_score_regexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Regexes to extract the answer from generated response" + }, + "aggregation_functions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AggregationFunctionType" + }, + "description": "Aggregation functions to apply to the scores of each row" + } + }, + "additionalProperties": false, + "required": [ + "type", + "judge_model", + "judge_score_regexes", + "aggregation_functions" + ], + "title": "LLMAsJudgeScoringFnParams", + "description": "Parameters for LLM-as-judge scoring function configuration." + }, "NumberType": { "type": "object", "properties": { @@ -13242,6 +9920,39 @@ "title": "ObjectType", "description": "Parameter type for object values." }, + "RegexParserScoringFnParams": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ScoringFnParamsType", + "const": "regex_parser", + "default": "regex_parser", + "description": "The type of scoring function parameters, always regex_parser" + }, + "parsing_regexes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Regex to extract the answer from generated response" + }, + "aggregation_functions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AggregationFunctionType" + }, + "description": "Aggregation functions to apply to the scores of each row" + } + }, + "additionalProperties": false, + "required": [ + "type", + "parsing_regexes", + "aggregation_functions" + ], + "title": "RegexParserScoringFnParams", + "description": "Parameters for regex parser scoring function configuration." + }, "ScoringFn": { "type": "object", "properties": { @@ -13363,6 +10074,37 @@ "title": "ScoringFn", "description": "A scoring function resource for evaluating model outputs." }, + "ScoringFnParams": { + "oneOf": [ + { + "$ref": "#/components/schemas/LLMAsJudgeScoringFnParams" + }, + { + "$ref": "#/components/schemas/RegexParserScoringFnParams" + }, + { + "$ref": "#/components/schemas/BasicScoringFnParams" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "llm_as_judge": "#/components/schemas/LLMAsJudgeScoringFnParams", + "regex_parser": "#/components/schemas/RegexParserScoringFnParams", + "basic": "#/components/schemas/BasicScoringFnParams" + } + } + }, + "ScoringFnParamsType": { + "type": "string", + "enum": [ + "llm_as_judge", + "regex_parser", + "basic" + ], + "title": "ScoringFnParamsType", + "description": "Types of scoring function parameter configurations." + }, "StringType": { "type": "object", "properties": { @@ -13397,6 +10139,302 @@ "title": "UnionType", "description": "Parameter type for union values." }, + "ListScoringFunctionsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoringFn" + } + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "ListScoringFunctionsResponse" + }, + "ParamType": { + "oneOf": [ + { + "$ref": "#/components/schemas/StringType" + }, + { + "$ref": "#/components/schemas/NumberType" + }, + { + "$ref": "#/components/schemas/BooleanType" + }, + { + "$ref": "#/components/schemas/ArrayType" + }, + { + "$ref": "#/components/schemas/ObjectType" + }, + { + "$ref": "#/components/schemas/JsonType" + }, + { + "$ref": "#/components/schemas/UnionType" + }, + { + "$ref": "#/components/schemas/ChatCompletionInputType" + }, + { + "$ref": "#/components/schemas/CompletionInputType" + }, + { + "$ref": "#/components/schemas/AgentTurnInputType" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "string": "#/components/schemas/StringType", + "number": "#/components/schemas/NumberType", + "boolean": "#/components/schemas/BooleanType", + "array": "#/components/schemas/ArrayType", + "object": "#/components/schemas/ObjectType", + "json": "#/components/schemas/JsonType", + "union": "#/components/schemas/UnionType", + "chat_completion_input": "#/components/schemas/ChatCompletionInputType", + "completion_input": "#/components/schemas/CompletionInputType", + "agent_turn_input": "#/components/schemas/AgentTurnInputType" + } + } + }, + "RegisterScoringFunctionRequest": { + "type": "object", + "properties": { + "scoring_fn_id": { + "type": "string", + "description": "The ID of the scoring function to register." + }, + "description": { + "type": "string", + "description": "The description of the scoring function." + }, + "return_type": { + "$ref": "#/components/schemas/ParamType", + "description": "The return type of the scoring function." + }, + "provider_scoring_fn_id": { + "type": "string", + "description": "The ID of the provider scoring function to use for the scoring function." + }, + "provider_id": { + "type": "string", + "description": "The ID of the provider to use for the scoring function." + }, + "params": { + "$ref": "#/components/schemas/ScoringFnParams", + "description": "The parameters for the scoring function for benchmark eval, these can be overridden for app eval." + } + }, + "additionalProperties": false, + "required": [ + "scoring_fn_id", + "description", + "return_type" + ], + "title": "RegisterScoringFunctionRequest" + }, + "ScoreRequest": { + "type": "object", + "properties": { + "input_rows": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + }, + "description": "The rows to score." + }, + "scoring_functions": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ScoringFnParams" + }, + { + "type": "null" + } + ] + }, + "description": "The scoring functions to use for the scoring." + } + }, + "additionalProperties": false, + "required": [ + "input_rows", + "scoring_functions" + ], + "title": "ScoreRequest" + }, + "ScoreResponse": { + "type": "object", + "properties": { + "results": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ScoringResult" + }, + "description": "A map of scoring function name to ScoringResult." + } + }, + "additionalProperties": false, + "required": [ + "results" + ], + "title": "ScoreResponse", + "description": "The response from scoring." + }, + "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" + } + ] + } + }, + "description": "The scoring result for each row. Each row is a map of column name to value." + }, + "aggregated_results": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Map of metric name to aggregated value" + } + }, + "additionalProperties": false, + "required": [ + "score_rows", + "aggregated_results" + ], + "title": "ScoringResult", + "description": "A scoring result for a single row." + }, + "ScoreBatchRequest": { + "type": "object", + "properties": { + "dataset_id": { + "type": "string", + "description": "The ID of the dataset to score." + }, + "scoring_functions": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ScoringFnParams" + }, + { + "type": "null" + } + ] + }, + "description": "The scoring functions to use for the scoring." + }, + "save_results_dataset": { + "type": "boolean", + "description": "Whether to save the results to a dataset." + } + }, + "additionalProperties": false, + "required": [ + "dataset_id", + "scoring_functions", + "save_results_dataset" + ], + "title": "ScoreBatchRequest" + }, + "ScoreBatchResponse": { + "type": "object", + "properties": { + "dataset_id": { + "type": "string", + "description": "(Optional) The identifier of the dataset that was scored" + }, + "results": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ScoringResult" + }, + "description": "A map of scoring function name to ScoringResult" + } + }, + "additionalProperties": false, + "required": [ + "results" + ], + "title": "ScoreBatchResponse", + "description": "Response from batch scoring operations on datasets." + }, "Shield": { "type": "object", "properties": { @@ -13462,556 +10500,13 @@ "title": "Shield", "description": "A safety shield resource that can be used to check content." }, - "Span": { - "type": "object", - "properties": { - "span_id": { - "type": "string", - "description": "Unique identifier for the span" - }, - "trace_id": { - "type": "string", - "description": "Unique identifier for the trace this span belongs to" - }, - "parent_span_id": { - "type": "string", - "description": "(Optional) Unique identifier for the parent span, if this is a child span" - }, - "name": { - "type": "string", - "description": "Human-readable name describing the operation this span represents" - }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the operation began" - }, - "end_time": { - "type": "string", - "format": "date-time", - "description": "(Optional) Timestamp when the operation finished, if completed" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Key-value pairs containing additional metadata about the span" - } - }, - "additionalProperties": false, - "required": [ - "span_id", - "trace_id", - "name", - "start_time" - ], - "title": "Span", - "description": "A span representing a single operation within a trace." - }, - "GetSpanTreeRequest": { - "type": "object", - "properties": { - "attributes_to_return": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The attributes to return in the tree." - }, - "max_depth": { - "type": "integer", - "description": "The maximum depth of the tree." - } - }, - "additionalProperties": false, - "title": "GetSpanTreeRequest" - }, - "SpanStatus": { - "type": "string", - "enum": [ - "ok", - "error" - ], - "title": "SpanStatus", - "description": "The status of a span indicating whether it completed successfully or with an error." - }, - "SpanWithStatus": { - "type": "object", - "properties": { - "span_id": { - "type": "string", - "description": "Unique identifier for the span" - }, - "trace_id": { - "type": "string", - "description": "Unique identifier for the trace this span belongs to" - }, - "parent_span_id": { - "type": "string", - "description": "(Optional) Unique identifier for the parent span, if this is a child span" - }, - "name": { - "type": "string", - "description": "Human-readable name describing the operation this span represents" - }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the operation began" - }, - "end_time": { - "type": "string", - "format": "date-time", - "description": "(Optional) Timestamp when the operation finished, if completed" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Key-value pairs containing additional metadata about the span" - }, - "status": { - "$ref": "#/components/schemas/SpanStatus", - "description": "(Optional) The current status of the span" - } - }, - "additionalProperties": false, - "required": [ - "span_id", - "trace_id", - "name", - "start_time" - ], - "title": "SpanWithStatus", - "description": "A span that includes status information." - }, - "QuerySpanTreeResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SpanWithStatus" - }, - "description": "Dictionary mapping span IDs to spans with status information" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "QuerySpanTreeResponse", - "description": "Response containing a tree structure of spans." - }, - "Tool": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "model", - "shield", - "vector_db", - "dataset", - "scoring_function", - "benchmark", - "tool", - "tool_group", - "prompt" - ], - "const": "tool", - "default": "tool", - "description": "Type of resource, always 'tool'" - }, - "toolgroup_id": { - "type": "string", - "description": "ID of the tool group this tool belongs to" - }, - "description": { - "type": "string", - "description": "Human-readable description of what the tool does" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolParameter" - }, - "description": "List of parameters this tool accepts" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Additional metadata about the tool" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "provider_id", - "type", - "toolgroup_id", - "description", - "parameters" - ], - "title": "Tool", - "description": "A tool that can be invoked by agents." - }, - "ToolGroup": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "model", - "shield", - "vector_db", - "dataset", - "scoring_function", - "benchmark", - "tool", - "tool_group", - "prompt" - ], - "const": "tool_group", - "default": "tool_group", - "description": "Type of resource, always 'tool_group'" - }, - "mcp_endpoint": { - "$ref": "#/components/schemas/URL", - "description": "(Optional) Model Context Protocol endpoint for remote tools" - }, - "args": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Additional arguments for the tool group" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "provider_id", - "type" - ], - "title": "ToolGroup", - "description": "A group of related tools managed together." - }, - "Trace": { - "type": "object", - "properties": { - "trace_id": { - "type": "string", - "description": "Unique identifier for the trace" - }, - "root_span_id": { - "type": "string", - "description": "Unique identifier for the root span that started this trace" - }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the trace began" - }, - "end_time": { - "type": "string", - "format": "date-time", - "description": "(Optional) Timestamp when the trace finished, if completed" - } - }, - "additionalProperties": false, - "required": [ - "trace_id", - "root_span_id", - "start_time" - ], - "title": "Trace", - "description": "A trace representing the complete execution path of a request across multiple operations." - }, - "Checkpoint": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "Unique identifier for the checkpoint" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when the checkpoint was created" - }, - "epoch": { - "type": "integer", - "description": "Training epoch when the checkpoint was saved" - }, - "post_training_job_id": { - "type": "string", - "description": "Identifier of the training job that created this checkpoint" - }, - "path": { - "type": "string", - "description": "File system path where the checkpoint is stored" - }, - "training_metrics": { - "$ref": "#/components/schemas/PostTrainingMetric", - "description": "(Optional) Training metrics associated with this checkpoint" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "created_at", - "epoch", - "post_training_job_id", - "path" - ], - "title": "Checkpoint", - "description": "Checkpoint created during training runs." - }, - "PostTrainingJobArtifactsResponse": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string", - "description": "Unique identifier for the training job" - }, - "checkpoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Checkpoint" - }, - "description": "List of model checkpoints created during training" - } - }, - "additionalProperties": false, - "required": [ - "job_uuid", - "checkpoints" - ], - "title": "PostTrainingJobArtifactsResponse", - "description": "Artifacts of a finetuning job." - }, - "PostTrainingMetric": { - "type": "object", - "properties": { - "epoch": { - "type": "integer", - "description": "Training epoch number" - }, - "train_loss": { - "type": "number", - "description": "Loss value on the training dataset" - }, - "validation_loss": { - "type": "number", - "description": "Loss value on the validation dataset" - }, - "perplexity": { - "type": "number", - "description": "Perplexity metric indicating model confidence" - } - }, - "additionalProperties": false, - "required": [ - "epoch", - "train_loss", - "validation_loss", - "perplexity" - ], - "title": "PostTrainingMetric", - "description": "Training metrics captured during post-training jobs." - }, - "PostTrainingJobStatusResponse": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string", - "description": "Unique identifier for the training job" - }, - "status": { - "type": "string", - "enum": [ - "completed", - "in_progress", - "failed", - "scheduled", - "cancelled" - ], - "description": "Current status of the training job" - }, - "scheduled_at": { - "type": "string", - "format": "date-time", - "description": "(Optional) Timestamp when the job was scheduled" - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "(Optional) Timestamp when the job execution began" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "description": "(Optional) Timestamp when the job finished, if completed" - }, - "resources_allocated": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Information about computational resources allocated to the job" - }, - "checkpoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Checkpoint" - }, - "description": "List of model checkpoints created during training" - } - }, - "additionalProperties": false, - "required": [ - "job_uuid", - "status", - "checkpoints" - ], - "title": "PostTrainingJobStatusResponse", - "description": "Status of a finetuning job." - }, - "ListPostTrainingJobsResponse": { + "ListShieldsResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "job_uuid" - ], - "title": "PostTrainingJob" + "$ref": "#/components/schemas/Shield" } } }, @@ -14019,325 +10514,24 @@ "required": [ "data" ], - "title": "ListPostTrainingJobsResponse" + "title": "ListShieldsResponse" }, - "VectorDB": { + "RegisterShieldRequest": { "type": "object", "properties": { - "identifier": { - "type": "string" - }, - "provider_resource_id": { - "type": "string" - }, - "provider_id": { - "type": "string" - }, - "type": { + "shield_id": { "type": "string", - "enum": [ - "model", - "shield", - "vector_db", - "dataset", - "scoring_function", - "benchmark", - "tool", - "tool_group", - "prompt" - ], - "const": "vector_db", - "default": "vector_db", - "description": "Type of resource, always 'vector_db' for vector databases" + "description": "The identifier of the shield to register." }, - "embedding_model": { + "provider_shield_id": { "type": "string", - "description": "Name of the embedding model to use for vector generation" - }, - "embedding_dimension": { - "type": "integer", - "description": "Dimension of the embedding vectors" - }, - "vector_db_name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "identifier", - "provider_id", - "type", - "embedding_model", - "embedding_dimension" - ], - "title": "VectorDB", - "description": "Vector database resource for storing and querying vector embeddings." - }, - "HealthInfo": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "OK", - "Error", - "Not Implemented" - ], - "description": "Current health status of the service" - } - }, - "additionalProperties": false, - "required": [ - "status" - ], - "title": "HealthInfo", - "description": "Health status information for the service." - }, - "RAGDocument": { - "type": "object", - "properties": { - "document_id": { - "type": "string", - "description": "The unique identifier for the document." - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/InterleavedContentItem" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/InterleavedContentItem" - } - }, - { - "$ref": "#/components/schemas/URL" - } - ], - "description": "The content of the document." - }, - "mime_type": { - "type": "string", - "description": "The MIME type of the document." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Additional metadata for the document." - } - }, - "additionalProperties": false, - "required": [ - "document_id", - "content", - "metadata" - ], - "title": "RAGDocument", - "description": "A document to be used for document ingestion in the RAG Tool." - }, - "InsertRequest": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RAGDocument" - }, - "description": "List of documents to index in the RAG system" - }, - "vector_db_id": { - "type": "string", - "description": "ID of the vector database to store the document embeddings" - }, - "chunk_size_in_tokens": { - "type": "integer", - "description": "(Optional) Size in tokens for document chunking during indexing" - } - }, - "additionalProperties": false, - "required": [ - "documents", - "vector_db_id", - "chunk_size_in_tokens" - ], - "title": "InsertRequest" - }, - "Chunk": { - "type": "object", - "properties": { - "content": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "The content of the chunk, which can be interleaved text, images, or other types." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Metadata associated with the chunk that will be used in the model context during inference." - }, - "embedding": { - "type": "array", - "items": { - "type": "number" - }, - "description": "Optional embedding for the chunk. If not provided, it will be computed later." - }, - "stored_chunk_id": { - "type": "string", - "description": "The chunk ID that is stored in the vector database. Used for backend functionality." - }, - "chunk_metadata": { - "$ref": "#/components/schemas/ChunkMetadata", - "description": "Metadata for the chunk that will NOT be used in the context during inference. The `chunk_metadata` is required backend functionality." - } - }, - "additionalProperties": false, - "required": [ - "content", - "metadata" - ], - "title": "Chunk", - "description": "A chunk of content that can be inserted into a vector database." - }, - "ChunkMetadata": { - "type": "object", - "properties": { - "chunk_id": { - "type": "string", - "description": "The ID of the chunk. If not set, it will be generated based on the document ID and content." - }, - "document_id": { - "type": "string", - "description": "The ID of the document this chunk belongs to." - }, - "source": { - "type": "string", - "description": "The source of the content, such as a URL, file path, or other identifier." - }, - "created_timestamp": { - "type": "integer", - "description": "An optional timestamp indicating when the chunk was created." - }, - "updated_timestamp": { - "type": "integer", - "description": "An optional timestamp indicating when the chunk was last updated." - }, - "chunk_window": { - "type": "string", - "description": "The window of the chunk, which can be used to group related chunks together." - }, - "chunk_tokenizer": { - "type": "string", - "description": "The tokenizer used to create the chunk. Default is Tiktoken." - }, - "chunk_embedding_model": { - "type": "string", - "description": "The embedding model used to create the chunk's embedding." - }, - "chunk_embedding_dimension": { - "type": "integer", - "description": "The dimension of the embedding vector for the chunk." - }, - "content_token_count": { - "type": "integer", - "description": "The number of tokens in the content of the chunk." - }, - "metadata_token_count": { - "type": "integer", - "description": "The number of tokens in the metadata of the chunk." - } - }, - "additionalProperties": false, - "title": "ChunkMetadata", - "description": "`ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata` is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not expected to change after. Use `Chunk.metadata` for metadata that will be used in the context during inference." - }, - "InsertChunksRequest": { - "type": "object", - "properties": { - "vector_db_id": { - "type": "string", - "description": "The identifier of the vector database to insert the chunks into." - }, - "chunks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Chunk" - }, - "description": "The chunks to insert. Each `Chunk` should contain content which can be interleaved text, images, or other types. `metadata`: `dict[str, Any]` and `embedding`: `List[float]` are optional. If `metadata` is provided, you configure how Llama Stack formats the chunk during generation. If `embedding` is not provided, it will be computed later." - }, - "ttl_seconds": { - "type": "integer", - "description": "The time to live of the chunks." - } - }, - "additionalProperties": false, - "required": [ - "vector_db_id", - "chunks" - ], - "title": "InsertChunksRequest" - }, - "ProviderInfo": { - "type": "object", - "properties": { - "api": { - "type": "string", - "description": "The API name this provider implements" + "description": "The identifier of the shield in the provider." }, "provider_id": { "type": "string", - "description": "Unique identifier for the provider" + "description": "The identifier of the provider." }, - "provider_type": { - "type": "string", - "description": "The type of provider implementation" - }, - "config": { + "params": { "type": "object", "additionalProperties": { "oneOf": [ @@ -14361,137 +10555,53 @@ } ] }, - "description": "Configuration parameters for the provider" - }, - "health": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Current health status of the provider" + "description": "The parameters of the shield." } }, "additionalProperties": false, "required": [ - "api", - "provider_id", - "provider_type", - "config", - "health" + "shield_id" ], - "title": "ProviderInfo", - "description": "Information about a registered provider including its configuration and health status." + "title": "RegisterShieldRequest" }, - "InvokeToolRequest": { + "SyntheticDataGenerateRequest": { "type": "object", "properties": { - "tool_name": { - "type": "string", - "description": "The name of the tool to invoke." - }, - "kwargs": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] + "dialogs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" }, - "description": "A dictionary of arguments to pass to the tool." + "description": "List of conversation messages to use as input for synthetic data generation" + }, + "filtering_function": { + "type": "string", + "enum": [ + "none", + "random", + "top_k", + "top_p", + "top_k_top_p", + "sigmoid" + ], + "description": "Type of filtering to apply to generated synthetic data samples" + }, + "model": { + "type": "string", + "description": "(Optional) The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint" } }, "additionalProperties": false, "required": [ - "tool_name", - "kwargs" + "dialogs", + "filtering_function" ], - "title": "InvokeToolRequest" + "title": "SyntheticDataGenerateRequest" }, - "ToolInvocationResult": { + "SyntheticDataGenerationResponse": { "type": "object", "properties": { - "content": { - "$ref": "#/components/schemas/InterleavedContent", - "description": "(Optional) The output content from the tool execution" - }, - "error_message": { - "type": "string", - "description": "(Optional) Error message if the tool execution failed" - }, - "error_code": { - "type": "integer", - "description": "(Optional) Numeric error code if the tool execution failed" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Additional metadata about the tool execution" - } - }, - "additionalProperties": false, - "title": "ToolInvocationResult", - "description": "Result of a tool invocation." - }, - "PaginatedResponse": { - "type": "object", - "properties": { - "data": { + "synthetic_data": { "type": "array", "items": { "type": "object", @@ -14518,527 +10628,41 @@ ] } }, - "description": "The list of items for the current page" + "description": "List of generated synthetic data samples that passed the filtering criteria" }, - "has_more": { - "type": "boolean", - "description": "Whether there are more items available after this set" - }, - "url": { - "type": "string", - "description": "The URL for accessing this list" - } - }, - "additionalProperties": false, - "required": [ - "data", - "has_more" - ], - "title": "PaginatedResponse", - "description": "A generic paginated response that follows a simple format." - }, - "Job": { - "type": "object", - "properties": { - "job_id": { - "type": "string", - "description": "Unique identifier for the job" - }, - "status": { - "type": "string", - "enum": [ - "completed", - "in_progress", - "failed", - "scheduled", - "cancelled" - ], - "description": "Current execution status of the job" - } - }, - "additionalProperties": false, - "required": [ - "job_id", - "status" - ], - "title": "Job", - "description": "A job execution instance with status tracking." - }, - "ListBenchmarksResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Benchmark" - } - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListBenchmarksResponse" - }, - "Order": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "title": "Order", - "description": "Sort order for paginated responses." - }, - "ListOpenAIChatCompletionResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the chat completion" + "statistics": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChoice" - }, - "description": "List of choices" + { + "type": "boolean" }, - "object": { - "type": "string", - "const": "chat.completion", - "default": "chat.completion", - "description": "The object type, which will be \"chat.completion\"" + { + "type": "number" }, - "created": { - "type": "integer", - "description": "The Unix timestamp in seconds when the chat completion was created" + { + "type": "string" }, - "model": { - "type": "string", - "description": "The model that was used to generate the chat completion" + { + "type": "array" }, - "input_messages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessageParam" - } + { + "type": "object" } - }, - "additionalProperties": false, - "required": [ - "id", - "choices", - "object", - "created", - "model", - "input_messages" - ], - "title": "OpenAICompletionWithInputMessages" + ] }, - "description": "List of chat completion objects with their input messages" - }, - "has_more": { - "type": "boolean", - "description": "Whether there are more completions available beyond this list" - }, - "first_id": { - "type": "string", - "description": "ID of the first completion in this list" - }, - "last_id": { - "type": "string", - "description": "ID of the last completion in this list" - }, - "object": { - "type": "string", - "const": "list", - "default": "list", - "description": "Must be \"list\" to identify this as a list response" + "description": "(Optional) Statistical information about the generation process and filtering results" } }, "additionalProperties": false, "required": [ - "data", - "has_more", - "first_id", - "last_id", - "object" + "synthetic_data" ], - "title": "ListOpenAIChatCompletionResponse", - "description": "Response from listing OpenAI-compatible chat completions." - }, - "ListDatasetsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Dataset" - }, - "description": "List of datasets" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListDatasetsResponse", - "description": "Response from listing datasets." - }, - "ListModelsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model" - } - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListModelsResponse" - }, - "ListOpenAIResponseInputItem": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIResponseInput" - }, - "description": "List of input items" - }, - "object": { - "type": "string", - "const": "list", - "default": "list", - "description": "Object type identifier, always \"list\"" - } - }, - "additionalProperties": false, - "required": [ - "data", - "object" - ], - "title": "ListOpenAIResponseInputItem", - "description": "List container for OpenAI response input items." - }, - "ListOpenAIResponseObject": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIResponseObjectWithInput" - }, - "description": "List of response objects with their input context" - }, - "has_more": { - "type": "boolean", - "description": "Whether there are more results available beyond this page" - }, - "first_id": { - "type": "string", - "description": "Identifier of the first item in this page" - }, - "last_id": { - "type": "string", - "description": "Identifier of the last item in this page" - }, - "object": { - "type": "string", - "const": "list", - "default": "list", - "description": "Object type identifier, always \"list\"" - } - }, - "additionalProperties": false, - "required": [ - "data", - "has_more", - "first_id", - "last_id", - "object" - ], - "title": "ListOpenAIResponseObject", - "description": "Paginated list of OpenAI response objects with navigation metadata." - }, - "OpenAIResponseObjectWithInput": { - "type": "object", - "properties": { - "created_at": { - "type": "integer", - "description": "Unix timestamp when the response was created" - }, - "error": { - "$ref": "#/components/schemas/OpenAIResponseError", - "description": "(Optional) Error details if the response generation failed" - }, - "id": { - "type": "string", - "description": "Unique identifier for this response" - }, - "model": { - "type": "string", - "description": "Model identifier used for generation" - }, - "object": { - "type": "string", - "const": "response", - "default": "response", - "description": "Object type identifier, always \"response\"" - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIResponseOutput" - }, - "description": "List of generated output items (messages, tool calls, etc.)" - }, - "parallel_tool_calls": { - "type": "boolean", - "default": false, - "description": "Whether tool calls can be executed in parallel" - }, - "previous_response_id": { - "type": "string", - "description": "(Optional) ID of the previous response in a conversation" - }, - "status": { - "type": "string", - "description": "Current status of the response generation" - }, - "temperature": { - "type": "number", - "description": "(Optional) Sampling temperature used for generation" - }, - "text": { - "$ref": "#/components/schemas/OpenAIResponseText", - "description": "Text formatting configuration for the response" - }, - "top_p": { - "type": "number", - "description": "(Optional) Nucleus sampling parameter used for generation" - }, - "truncation": { - "type": "string", - "description": "(Optional) Truncation strategy applied to the response" - }, - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIResponseInput" - }, - "description": "List of input items that led to this response" - } - }, - "additionalProperties": false, - "required": [ - "created_at", - "id", - "model", - "object", - "output", - "parallel_tool_calls", - "status", - "text", - "input" - ], - "title": "OpenAIResponseObjectWithInput", - "description": "OpenAI response object extended with input context information." - }, - "ListPromptsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt" - } - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListPromptsResponse", - "description": "Response model to list prompts." - }, - "ListProvidersResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProviderInfo" - }, - "description": "List of provider information objects" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListProvidersResponse", - "description": "Response containing a list of all available providers." - }, - "RouteInfo": { - "type": "object", - "properties": { - "route": { - "type": "string", - "description": "The API endpoint path" - }, - "method": { - "type": "string", - "description": "HTTP method for the route" - }, - "provider_types": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of provider types that implement this route" - } - }, - "additionalProperties": false, - "required": [ - "route", - "method", - "provider_types" - ], - "title": "RouteInfo", - "description": "Information about an API route including its path, method, and implementing providers." - }, - "ListRoutesResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RouteInfo" - }, - "description": "List of available route information objects" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListRoutesResponse", - "description": "Response containing a list of all available API routes." - }, - "ListToolDefsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolDef" - }, - "description": "List of tool definitions" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListToolDefsResponse", - "description": "Response containing a list of tool definitions." - }, - "ListScoringFunctionsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScoringFn" - } - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListScoringFunctionsResponse" - }, - "ListShieldsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Shield" - } - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListShieldsResponse" - }, - "ListToolGroupsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolGroup" - }, - "description": "List of tool groups" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListToolGroupsResponse", - "description": "Response containing a list of tool groups." - }, - "ListToolsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tool" - }, - "description": "List of tools" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListToolsResponse", - "description": "Response containing a list of tools." - }, - "ListVectorDBsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VectorDB" - }, - "description": "List of vector databases" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "ListVectorDBsResponse", - "description": "Response from listing vector databases." + "title": "SyntheticDataGenerationResponse", + "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold." }, "Event": { "oneOf": [ @@ -15210,6 +10834,15 @@ "title": "SpanStartPayload", "description": "Payload for a span start event." }, + "SpanStatus": { + "type": "string", + "enum": [ + "ok", + "error" + ], + "title": "SpanStatus", + "description": "The status of a span indicating whether it completed successfully or with an error." + }, "StructuredLogEvent": { "type": "object", "properties": { @@ -15379,361 +11012,280 @@ ], "title": "LogEventRequest" }, - "VectorStoreChunkingStrategy": { - "oneOf": [ - { - "$ref": "#/components/schemas/VectorStoreChunkingStrategyAuto" - }, - { - "$ref": "#/components/schemas/VectorStoreChunkingStrategyStatic" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "auto": "#/components/schemas/VectorStoreChunkingStrategyAuto", - "static": "#/components/schemas/VectorStoreChunkingStrategyStatic" - } - } - }, - "VectorStoreChunkingStrategyAuto": { + "QueryMetricsRequest": { "type": "object", "properties": { - "type": { - "type": "string", - "const": "auto", - "default": "auto", - "description": "Strategy type, always \"auto\" for automatic chunking" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "title": "VectorStoreChunkingStrategyAuto", - "description": "Automatic chunking strategy for vector store files." - }, - "VectorStoreChunkingStrategyStatic": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "static", - "default": "static", - "description": "Strategy type, always \"static\" for static chunking" - }, - "static": { - "$ref": "#/components/schemas/VectorStoreChunkingStrategyStaticConfig", - "description": "Configuration parameters for the static chunking strategy" - } - }, - "additionalProperties": false, - "required": [ - "type", - "static" - ], - "title": "VectorStoreChunkingStrategyStatic", - "description": "Static chunking strategy with configurable parameters." - }, - "VectorStoreChunkingStrategyStaticConfig": { - "type": "object", - "properties": { - "chunk_overlap_tokens": { + "start_time": { "type": "integer", - "default": 400, - "description": "Number of tokens to overlap between adjacent chunks" + "description": "The start time of the metric to query." }, - "max_chunk_size_tokens": { + "end_time": { "type": "integer", - "default": 800, - "description": "Maximum number of tokens per chunk, must be between 100 and 4096" - } - }, - "additionalProperties": false, - "required": [ - "chunk_overlap_tokens", - "max_chunk_size_tokens" - ], - "title": "VectorStoreChunkingStrategyStaticConfig", - "description": "Configuration for static chunking strategy." - }, - "OpenaiAttachFileToVectorStoreRequest": { - "type": "object", - "properties": { - "file_id": { + "description": "The end time of the metric to query." + }, + "granularity": { "type": "string", - "description": "The ID of the file to attach to the vector store." + "description": "The granularity of the metric to query." }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The key-value attributes stored with the file, which can be used for filtering." - }, - "chunking_strategy": { - "$ref": "#/components/schemas/VectorStoreChunkingStrategy", - "description": "The chunking strategy to use for the file." - } - }, - "additionalProperties": false, - "required": [ - "file_id" - ], - "title": "OpenaiAttachFileToVectorStoreRequest" - }, - "VectorStoreFileLastError": { - "type": "object", - "properties": { - "code": { - "oneOf": [ - { - "type": "string", - "const": "server_error" - }, - { - "type": "string", - "const": "rate_limit_exceeded" - } + "query_type": { + "type": "string", + "enum": [ + "range", + "instant" ], - "description": "Error code indicating the type of failure" + "description": "The type of query to perform." }, - "message": { - "type": "string", - "description": "Human-readable error message describing the failure" - } - }, - "additionalProperties": false, - "required": [ - "code", - "message" - ], - "title": "VectorStoreFileLastError", - "description": "Error information for failed vector store file processing." - }, - "VectorStoreFileObject": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the file" - }, - "object": { - "type": "string", - "default": "vector_store.file", - "description": "Object type identifier, always \"vector_store.file\"" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" + "label_matchers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the label to match" }, - { - "type": "boolean" + "value": { + "type": "string", + "description": "The value to match against" }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" + "operator": { + "type": "string", + "enum": [ + "=", + "!=", + "=~", + "!~" + ], + "description": "The comparison operator to use for matching", + "default": "=" } - ] - }, - "description": "Key-value attributes associated with the file" - }, - "chunking_strategy": { - "oneOf": [ - { - "$ref": "#/components/schemas/VectorStoreChunkingStrategyAuto" }, - { - "$ref": "#/components/schemas/VectorStoreChunkingStrategyStatic" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "auto": "#/components/schemas/VectorStoreChunkingStrategyAuto", - "static": "#/components/schemas/VectorStoreChunkingStrategyStatic" - } + "additionalProperties": false, + "required": [ + "name", + "value", + "operator" + ], + "title": "MetricLabelMatcher", + "description": "A matcher for filtering metrics by label values." }, - "description": "Strategy used for splitting the file into chunks" - }, - "created_at": { - "type": "integer", - "description": "Timestamp when the file was added to the vector store" - }, - "last_error": { - "$ref": "#/components/schemas/VectorStoreFileLastError", - "description": "(Optional) Error information if file processing failed" - }, - "status": { - "$ref": "#/components/schemas/VectorStoreFileStatus", - "description": "Current processing status of the file" - }, - "usage_bytes": { - "type": "integer", - "default": 0, - "description": "Storage space used by this file in bytes" - }, - "vector_store_id": { - "type": "string", - "description": "ID of the vector store containing this file" + "description": "The label matchers to apply to the metric." } }, "additionalProperties": false, "required": [ - "id", - "object", - "attributes", - "chunking_strategy", - "created_at", - "status", - "usage_bytes", - "vector_store_id" + "start_time", + "query_type" ], - "title": "VectorStoreFileObject", - "description": "OpenAI Vector Store File object." + "title": "QueryMetricsRequest" }, - "VectorStoreFileStatus": { - "oneOf": [ - { - "type": "string", - "const": "completed" - }, - { - "type": "string", - "const": "in_progress" - }, - { - "type": "string", - "const": "cancelled" - }, - { - "type": "string", - "const": "failed" - } - ] - }, - "VectorStoreFileBatchObject": { + "MetricDataPoint": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the file batch" - }, - "object": { - "type": "string", - "default": "vector_store.file_batch", - "description": "Object type identifier, always \"vector_store.file_batch\"" - }, - "created_at": { + "timestamp": { "type": "integer", - "description": "Timestamp when the file batch was created" + "description": "Unix timestamp when the metric value was recorded" }, - "vector_store_id": { - "type": "string", - "description": "ID of the vector store containing the file batch" + "value": { + "type": "number", + "description": "The numeric value of the metric at this timestamp" }, - "status": { - "$ref": "#/components/schemas/VectorStoreFileStatus", - "description": "Current processing status of the file batch" - }, - "file_counts": { - "$ref": "#/components/schemas/VectorStoreFileCounts", - "description": "File processing status counts for the batch" + "unit": { + "type": "string" } }, "additionalProperties": false, "required": [ - "id", - "object", - "created_at", - "vector_store_id", - "status", - "file_counts" + "timestamp", + "value", + "unit" ], - "title": "VectorStoreFileBatchObject", - "description": "OpenAI Vector Store File Batch object." + "title": "MetricDataPoint", + "description": "A single data point in a metric time series." }, - "VectorStoreFileCounts": { - "type": "object", - "properties": { - "completed": { - "type": "integer", - "description": "Number of files that have been successfully processed" - }, - "cancelled": { - "type": "integer", - "description": "Number of files that had their processing cancelled" - }, - "failed": { - "type": "integer", - "description": "Number of files that failed to process" - }, - "in_progress": { - "type": "integer", - "description": "Number of files currently being processed" - }, - "total": { - "type": "integer", - "description": "Total number of files in the vector store" - } - }, - "additionalProperties": false, - "required": [ - "completed", - "cancelled", - "failed", - "in_progress", - "total" - ], - "title": "VectorStoreFileCounts", - "description": "File processing status counts for a vector store." - }, - "OpenAIJSONSchema": { + "MetricLabel": { "type": "object", "properties": { "name": { "type": "string", - "description": "Name of the schema" + "description": "The name of the label" }, - "description": { + "value": { "type": "string", - "description": "(Optional) Description of the schema" + "description": "The value of the label" + } + }, + "additionalProperties": false, + "required": [ + "name", + "value" + ], + "title": "MetricLabel", + "description": "A label associated with a metric." + }, + "MetricSeries": { + "type": "object", + "properties": { + "metric": { + "type": "string", + "description": "The name of the metric" }, - "strict": { - "type": "boolean", - "description": "(Optional) Whether to enforce strict adherence to the schema" + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricLabel" + }, + "description": "List of labels associated with this metric series" }, - "schema": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricDataPoint" + }, + "description": "List of data points in chronological order" + } + }, + "additionalProperties": false, + "required": [ + "metric", + "labels", + "values" + ], + "title": "MetricSeries", + "description": "A time series of metric data points." + }, + "QueryMetricsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricSeries" + }, + "description": "List of metric series matching the query criteria" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "QueryMetricsResponse", + "description": "Response containing metric time series data." + }, + "QueryCondition": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The attribute key to filter on" + }, + "op": { + "$ref": "#/components/schemas/QueryConditionOp", + "description": "The comparison operator to apply" + }, + "value": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ], + "description": "The value to compare against" + } + }, + "additionalProperties": false, + "required": [ + "key", + "op", + "value" + ], + "title": "QueryCondition", + "description": "A condition for filtering query results." + }, + "QueryConditionOp": { + "type": "string", + "enum": [ + "eq", + "ne", + "gt", + "lt" + ], + "title": "QueryConditionOp", + "description": "Comparison operators for query conditions." + }, + "QuerySpansRequest": { + "type": "object", + "properties": { + "attribute_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryCondition" + }, + "description": "The attribute filters to apply to the spans." + }, + "attributes_to_return": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes to return in the spans." + }, + "max_depth": { + "type": "integer", + "description": "The maximum depth of the tree." + } + }, + "additionalProperties": false, + "required": [ + "attribute_filters", + "attributes_to_return" + ], + "title": "QuerySpansRequest" + }, + "Span": { + "type": "object", + "properties": { + "span_id": { + "type": "string", + "description": "Unique identifier for the span" + }, + "trace_id": { + "type": "string", + "description": "Unique identifier for the trace this span belongs to" + }, + "parent_span_id": { + "type": "string", + "description": "(Optional) Unique identifier for the parent span, if this is a child span" + }, + "name": { + "type": "string", + "description": "Human-readable name describing the operation this span represents" + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the operation began" + }, + "end_time": { + "type": "string", + "format": "date-time", + "description": "(Optional) Timestamp when the operation finished, if completed" + }, + "attributes": { "type": "object", "additionalProperties": { "oneOf": [ @@ -15757,755 +11309,504 @@ } ] }, - "description": "(Optional) The JSON schema definition" + "description": "(Optional) Key-value pairs containing additional metadata about the span" + } + }, + "additionalProperties": false, + "required": [ + "span_id", + "trace_id", + "name", + "start_time" + ], + "title": "Span", + "description": "A span representing a single operation within a trace." + }, + "QuerySpansResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Span" + }, + "description": "List of spans matching the query criteria" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "QuerySpansResponse", + "description": "Response containing a list of spans." + }, + "SaveSpansToDatasetRequest": { + "type": "object", + "properties": { + "attribute_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryCondition" + }, + "description": "The attribute filters to apply to the spans." + }, + "attributes_to_save": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes to save to the dataset." + }, + "dataset_id": { + "type": "string", + "description": "The ID of the dataset to save the spans to." + }, + "max_depth": { + "type": "integer", + "description": "The maximum depth of the tree." + } + }, + "additionalProperties": false, + "required": [ + "attribute_filters", + "attributes_to_save", + "dataset_id" + ], + "title": "SaveSpansToDatasetRequest" + }, + "GetSpanTreeRequest": { + "type": "object", + "properties": { + "attributes_to_return": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes to return in the tree." + }, + "max_depth": { + "type": "integer", + "description": "The maximum depth of the tree." + } + }, + "additionalProperties": false, + "title": "GetSpanTreeRequest" + }, + "SpanWithStatus": { + "type": "object", + "properties": { + "span_id": { + "type": "string", + "description": "Unique identifier for the span" + }, + "trace_id": { + "type": "string", + "description": "Unique identifier for the trace this span belongs to" + }, + "parent_span_id": { + "type": "string", + "description": "(Optional) Unique identifier for the parent span, if this is a child span" + }, + "name": { + "type": "string", + "description": "Human-readable name describing the operation this span represents" + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the operation began" + }, + "end_time": { + "type": "string", + "format": "date-time", + "description": "(Optional) Timestamp when the operation finished, if completed" + }, + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) Key-value pairs containing additional metadata about the span" + }, + "status": { + "$ref": "#/components/schemas/SpanStatus", + "description": "(Optional) The current status of the span" + } + }, + "additionalProperties": false, + "required": [ + "span_id", + "trace_id", + "name", + "start_time" + ], + "title": "SpanWithStatus", + "description": "A span that includes status information." + }, + "QuerySpanTreeResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SpanWithStatus" + }, + "description": "Dictionary mapping span IDs to spans with status information" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "QuerySpanTreeResponse", + "description": "Response containing a tree structure of spans." + }, + "QueryTracesRequest": { + "type": "object", + "properties": { + "attribute_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryCondition" + }, + "description": "The attribute filters to apply to the traces." + }, + "limit": { + "type": "integer", + "description": "The limit of traces to return." + }, + "offset": { + "type": "integer", + "description": "The offset of the traces to return." + }, + "order_by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The order by of the traces to return." + } + }, + "additionalProperties": false, + "title": "QueryTracesRequest" + }, + "Trace": { + "type": "object", + "properties": { + "trace_id": { + "type": "string", + "description": "Unique identifier for the trace" + }, + "root_span_id": { + "type": "string", + "description": "Unique identifier for the root span that started this trace" + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the trace began" + }, + "end_time": { + "type": "string", + "format": "date-time", + "description": "(Optional) Timestamp when the trace finished, if completed" + } + }, + "additionalProperties": false, + "required": [ + "trace_id", + "root_span_id", + "start_time" + ], + "title": "Trace", + "description": "A trace representing the complete execution path of a request across multiple operations." + }, + "QueryTracesResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Trace" + }, + "description": "List of traces matching the query criteria" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "QueryTracesResponse", + "description": "Response containing a list of traces." + }, + "InvokeToolRequest": { + "type": "object", + "properties": { + "tool_name": { + "type": "string", + "description": "The name of the tool to invoke." + }, + "kwargs": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "A dictionary of arguments to pass to the tool." + } + }, + "additionalProperties": false, + "required": [ + "tool_name", + "kwargs" + ], + "title": "InvokeToolRequest" + }, + "ToolInvocationResult": { + "type": "object", + "properties": { + "content": { + "$ref": "#/components/schemas/InterleavedContent", + "description": "(Optional) The output content from the tool execution" + }, + "error_message": { + "type": "string", + "description": "(Optional) Error message if the tool execution failed" + }, + "error_code": { + "type": "integer", + "description": "(Optional) Numeric error code if the tool execution failed" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) Additional metadata about the tool execution" + } + }, + "additionalProperties": false, + "title": "ToolInvocationResult", + "description": "Result of a tool invocation." + }, + "ToolDef": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the tool" + }, + "description": { + "type": "string", + "description": "(Optional) Human-readable description of what the tool does" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolParameter" + }, + "description": "(Optional) List of parameters this tool accepts" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) Additional metadata about the tool" } }, "additionalProperties": false, "required": [ "name" ], - "title": "OpenAIJSONSchema", - "description": "JSON schema specification for OpenAI-compatible structured response format." + "title": "ToolDef", + "description": "Tool definition used in runtime contexts." }, - "OpenAIResponseFormatJSONObject": { + "ToolParameter": { "type": "object", "properties": { - "type": { + "name": { "type": "string", - "const": "json_object", - "default": "json_object", - "description": "Must be \"json_object\" to indicate generic JSON object response format" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "title": "OpenAIResponseFormatJSONObject", - "description": "JSON object response format for OpenAI-compatible chat completion requests." - }, - "OpenAIResponseFormatJSONSchema": { - "type": "object", - "properties": { - "type": { + "description": "Name of the parameter" + }, + "parameter_type": { "type": "string", - "const": "json_schema", - "default": "json_schema", - "description": "Must be \"json_schema\" to indicate structured JSON response format" + "description": "Type of the parameter (e.g., string, integer)" }, - "json_schema": { - "$ref": "#/components/schemas/OpenAIJSONSchema", - "description": "The JSON schema specification for the response" - } - }, - "additionalProperties": false, - "required": [ - "type", - "json_schema" - ], - "title": "OpenAIResponseFormatJSONSchema", - "description": "JSON schema response format for OpenAI-compatible chat completion requests." - }, - "OpenAIResponseFormatParam": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAIResponseFormatText" - }, - { - "$ref": "#/components/schemas/OpenAIResponseFormatJSONSchema" - }, - { - "$ref": "#/components/schemas/OpenAIResponseFormatJSONObject" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "text": "#/components/schemas/OpenAIResponseFormatText", - "json_schema": "#/components/schemas/OpenAIResponseFormatJSONSchema", - "json_object": "#/components/schemas/OpenAIResponseFormatJSONObject" - } - } - }, - "OpenAIResponseFormatText": { - "type": "object", - "properties": { - "type": { + "description": { "type": "string", - "const": "text", - "default": "text", - "description": "Must be \"text\" to indicate plain text response format" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "title": "OpenAIResponseFormatText", - "description": "Text response format for OpenAI-compatible chat completion requests." - }, - "OpenaiChatCompletionRequest": { - "type": "object", - "properties": { - "model": { - "type": "string", - "description": "The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint." + "description": "Human-readable description of what the parameter does" }, - "messages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessageParam" - }, - "description": "List of messages in the conversation." + "required": { + "type": "boolean", + "default": true, + "description": "Whether this parameter is required for tool invocation" }, - "frequency_penalty": { - "type": "number", - "description": "(Optional) The penalty for repeated tokens." - }, - "function_call": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - ], - "description": "(Optional) The function call to use." - }, - "functions": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "description": "(Optional) List of functions to use." - }, - "logit_bias": { + "items": { "type": "object", - "additionalProperties": { - "type": "number" - }, - "description": "(Optional) The logit bias to use." + "description": "Type of the elements when parameter_type is array" }, - "logprobs": { - "type": "boolean", - "description": "(Optional) The log probabilities to use." + "title": { + "type": "string", + "description": "(Optional) Title of the parameter" }, - "max_completion_tokens": { - "type": "integer", - "description": "(Optional) The maximum number of tokens to generate." - }, - "max_tokens": { - "type": "integer", - "description": "(Optional) The maximum number of tokens to generate." - }, - "n": { - "type": "integer", - "description": "(Optional) The number of completions to generate." - }, - "parallel_tool_calls": { - "type": "boolean", - "description": "(Optional) Whether to parallelize tool calls." - }, - "presence_penalty": { - "type": "number", - "description": "(Optional) The penalty for repeated tokens." - }, - "response_format": { - "$ref": "#/components/schemas/OpenAIResponseFormatParam", - "description": "(Optional) The response format to use." - }, - "seed": { - "type": "integer", - "description": "(Optional) The seed to use." - }, - "stop": { + "default": { "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, { "type": "string" }, { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "(Optional) The stop tokens to use." - }, - "stream": { - "type": "boolean", - "description": "(Optional) Whether to stream the response." - }, - "stream_options": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) The stream options to use." - }, - "temperature": { - "type": "number", - "description": "(Optional) The temperature to use." - }, - "tool_choice": { - "oneOf": [ - { - "type": "string" + "type": "array" }, { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } + "type": "object" } ], - "description": "(Optional) The tool choice to use." - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "description": "(Optional) The tools to use." - }, - "top_logprobs": { - "type": "integer", - "description": "(Optional) The top log probabilities to use." - }, - "top_p": { - "type": "number", - "description": "(Optional) The top p to use." - }, - "user": { - "type": "string", - "description": "(Optional) The user to use." + "description": "(Optional) Default value for the parameter if not provided" } }, "additionalProperties": false, "required": [ - "model", - "messages" + "name", + "parameter_type", + "description", + "required" ], - "title": "OpenaiChatCompletionRequest" + "title": "ToolParameter", + "description": "Parameter definition for a tool." }, - "OpenAIChatCompletion": { + "ListToolDefsResponse": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "The ID of the chat completion" - }, - "choices": { + "data": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAIChoice" + "$ref": "#/components/schemas/ToolDef" }, - "description": "List of choices" - }, - "object": { - "type": "string", - "const": "chat.completion", - "default": "chat.completion", - "description": "The object type, which will be \"chat.completion\"" - }, - "created": { - "type": "integer", - "description": "The Unix timestamp in seconds when the chat completion was created" - }, - "model": { - "type": "string", - "description": "The model that was used to generate the chat completion" + "description": "List of tool definitions" } }, "additionalProperties": false, "required": [ - "id", - "choices", - "object", - "created", - "model" + "data" ], - "title": "OpenAIChatCompletion", - "description": "Response from an OpenAI-compatible chat completion request." + "title": "ListToolDefsResponse", + "description": "Response containing a list of tool definitions." }, - "OpenAIChatCompletionChunk": { + "RAGDocument": { "type": "object", "properties": { - "id": { + "document_id": { "type": "string", - "description": "The ID of the chat completion" + "description": "The unique identifier for the document." }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChunkChoice" - }, - "description": "List of choices" - }, - "object": { - "type": "string", - "const": "chat.completion.chunk", - "default": "chat.completion.chunk", - "description": "The object type, which will be \"chat.completion.chunk\"" - }, - "created": { - "type": "integer", - "description": "The Unix timestamp in seconds when the chat completion was created" - }, - "model": { - "type": "string", - "description": "The model that was used to generate the chat completion" - } - }, - "additionalProperties": false, - "required": [ - "id", - "choices", - "object", - "created", - "model" - ], - "title": "OpenAIChatCompletionChunk", - "description": "Chunk from a streaming response to an OpenAI-compatible chat completion request." - }, - "OpenAIChoiceDelta": { - "type": "object", - "properties": { "content": { - "type": "string", - "description": "(Optional) The content of the delta" - }, - "refusal": { - "type": "string", - "description": "(Optional) The refusal of the delta" - }, - "role": { - "type": "string", - "description": "(Optional) The role of the delta" - }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIChatCompletionToolCall" - }, - "description": "(Optional) The tool calls of the delta" - } - }, - "additionalProperties": false, - "title": "OpenAIChoiceDelta", - "description": "A delta from an OpenAI-compatible chat completion streaming response." - }, - "OpenAIChunkChoice": { - "type": "object", - "properties": { - "delta": { - "$ref": "#/components/schemas/OpenAIChoiceDelta", - "description": "The delta from the chunk" - }, - "finish_reason": { - "type": "string", - "description": "The reason the model stopped generating" - }, - "index": { - "type": "integer", - "description": "The index of the choice" - }, - "logprobs": { - "$ref": "#/components/schemas/OpenAIChoiceLogprobs", - "description": "(Optional) The log probabilities for the tokens in the message" - } - }, - "additionalProperties": false, - "required": [ - "delta", - "finish_reason", - "index" - ], - "title": "OpenAIChunkChoice", - "description": "A chunk choice from an OpenAI-compatible chat completion streaming response." - }, - "OpenaiCompletionRequest": { - "type": "object", - "properties": { - "model": { - "type": "string", - "description": "The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint." - }, - "prompt": { "oneOf": [ { "type": "string" }, { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/InterleavedContentItem" }, { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/InterleavedContentItem" } }, { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer" - } - } + "$ref": "#/components/schemas/URL" } ], - "description": "The prompt to generate a completion for." + "description": "The content of the document." }, - "best_of": { - "type": "integer", - "description": "(Optional) The number of completions to generate." - }, - "echo": { - "type": "boolean", - "description": "(Optional) Whether to echo the prompt." - }, - "frequency_penalty": { - "type": "number", - "description": "(Optional) The penalty for repeated tokens." - }, - "logit_bias": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "description": "(Optional) The logit bias to use." - }, - "logprobs": { - "type": "boolean", - "description": "(Optional) The log probabilities to use." - }, - "max_tokens": { - "type": "integer", - "description": "(Optional) The maximum number of tokens to generate." - }, - "n": { - "type": "integer", - "description": "(Optional) The number of completions to generate." - }, - "presence_penalty": { - "type": "number", - "description": "(Optional) The penalty for repeated tokens." - }, - "seed": { - "type": "integer", - "description": "(Optional) The seed to use." - }, - "stop": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "(Optional) The stop tokens to use." - }, - "stream": { - "type": "boolean", - "description": "(Optional) Whether to stream the response." - }, - "stream_options": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) The stream options to use." - }, - "temperature": { - "type": "number", - "description": "(Optional) The temperature to use." - }, - "top_p": { - "type": "number", - "description": "(Optional) The top p to use." - }, - "user": { + "mime_type": { "type": "string", - "description": "(Optional) The user to use." - }, - "guided_choice": { - "type": "array", - "items": { - "type": "string" - } - }, - "prompt_logprobs": { - "type": "integer" - }, - "suffix": { - "type": "string", - "description": "(Optional) The suffix that should be appended to the completion." - } - }, - "additionalProperties": false, - "required": [ - "model", - "prompt" - ], - "title": "OpenaiCompletionRequest" - }, - "OpenAICompletion": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAICompletionChoice" - } - }, - "created": { - "type": "integer" - }, - "model": { - "type": "string" - }, - "object": { - "type": "string", - "const": "text_completion", - "default": "text_completion" - } - }, - "additionalProperties": false, - "required": [ - "id", - "choices", - "created", - "model", - "object" - ], - "title": "OpenAICompletion", - "description": "Response from an OpenAI-compatible completion request." - }, - "OpenAICompletionChoice": { - "type": "object", - "properties": { - "finish_reason": { - "type": "string" - }, - "text": { - "type": "string" - }, - "index": { - "type": "integer" - }, - "logprobs": { - "$ref": "#/components/schemas/OpenAIChoiceLogprobs" - } - }, - "additionalProperties": false, - "required": [ - "finish_reason", - "text", - "index" - ], - "title": "OpenAICompletionChoice", - "description": "A choice from an OpenAI-compatible completion response." - }, - "OpenaiCreateVectorStoreRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A name for the vector store." - }, - "file_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of File IDs that the vector store should use. Useful for tools like `file_search` that can access files." - }, - "expires_after": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The expiration policy for a vector store." - }, - "chunking_strategy": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy." + "description": "The MIME type of the document." }, "metadata": { "type": "object", @@ -16531,1268 +11832,44 @@ } ] }, - "description": "Set of 16 key-value pairs that can be attached to an object." - }, - "embedding_model": { - "type": "string", - "description": "The embedding model to use for this vector store." - }, - "embedding_dimension": { - "type": "integer", - "description": "The dimension of the embedding vectors (default: 384)." - }, - "provider_id": { - "type": "string", - "description": "The ID of the provider to use for this vector store." - } - }, - "additionalProperties": false, - "title": "OpenaiCreateVectorStoreRequest" - }, - "VectorStoreObject": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the vector store" - }, - "object": { - "type": "string", - "default": "vector_store", - "description": "Object type identifier, always \"vector_store\"" - }, - "created_at": { - "type": "integer", - "description": "Timestamp when the vector store was created" - }, - "name": { - "type": "string", - "description": "(Optional) Name of the vector store" - }, - "usage_bytes": { - "type": "integer", - "default": 0, - "description": "Storage space used by the vector store in bytes" - }, - "file_counts": { - "$ref": "#/components/schemas/VectorStoreFileCounts", - "description": "File processing status counts for the vector store" - }, - "status": { - "type": "string", - "default": "completed", - "description": "Current status of the vector store" - }, - "expires_after": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Expiration policy for the vector store" - }, - "expires_at": { - "type": "integer", - "description": "(Optional) Timestamp when the vector store will expire" - }, - "last_active_at": { - "type": "integer", - "description": "(Optional) Timestamp of last activity on the vector store" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Set of key-value pairs that can be attached to the vector store" + "description": "Additional metadata for the document." } }, "additionalProperties": false, "required": [ - "id", - "object", - "created_at", - "usage_bytes", - "file_counts", - "status", + "document_id", + "content", "metadata" ], - "title": "VectorStoreObject", - "description": "OpenAI Vector Store object." + "title": "RAGDocument", + "description": "A document to be used for document ingestion in the RAG Tool." }, - "OpenaiCreateVectorStoreFileBatchRequest": { + "InsertRequest": { "type": "object", "properties": { - "file_ids": { + "documents": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/RAGDocument" }, - "description": "A list of File IDs that the vector store should use." + "description": "List of documents to index in the RAG system" }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Key-value attributes to store with the files." - }, - "chunking_strategy": { - "$ref": "#/components/schemas/VectorStoreChunkingStrategy", - "description": "(Optional) The chunking strategy used to chunk the file(s). Defaults to auto." - } - }, - "additionalProperties": false, - "required": [ - "file_ids" - ], - "title": "OpenaiCreateVectorStoreFileBatchRequest" - }, - "OpenAIFileDeleteResponse": { - "type": "object", - "properties": { - "id": { + "vector_db_id": { "type": "string", - "description": "The file identifier that was deleted" + "description": "ID of the vector database to store the document embeddings" }, - "object": { - "type": "string", - "const": "file", - "default": "file", - "description": "The object type, which is always \"file\"" - }, - "deleted": { - "type": "boolean", - "description": "Whether the file was successfully deleted" - } - }, - "additionalProperties": false, - "required": [ - "id", - "object", - "deleted" - ], - "title": "OpenAIFileDeleteResponse", - "description": "Response for deleting a file in OpenAI Files API." - }, - "VectorStoreDeleteResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the deleted vector store" - }, - "object": { - "type": "string", - "default": "vector_store.deleted", - "description": "Object type identifier for the deletion response" - }, - "deleted": { - "type": "boolean", - "default": true, - "description": "Whether the deletion operation was successful" - } - }, - "additionalProperties": false, - "required": [ - "id", - "object", - "deleted" - ], - "title": "VectorStoreDeleteResponse", - "description": "Response from deleting a vector store." - }, - "VectorStoreFileDeleteResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the deleted file" - }, - "object": { - "type": "string", - "default": "vector_store.file.deleted", - "description": "Object type identifier for the deletion response" - }, - "deleted": { - "type": "boolean", - "default": true, - "description": "Whether the deletion operation was successful" - } - }, - "additionalProperties": false, - "required": [ - "id", - "object", - "deleted" - ], - "title": "VectorStoreFileDeleteResponse", - "description": "Response from deleting a vector store file." - }, - "OpenaiEmbeddingsRequest": { - "type": "object", - "properties": { - "model": { - "type": "string", - "description": "The identifier of the model to use. The model must be an embedding model registered with Llama Stack and available via the /models endpoint." - }, - "input": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "Input text to embed, encoded as a string or array of strings. To embed multiple inputs in a single request, pass an array of strings." - }, - "encoding_format": { - "type": "string", - "description": "(Optional) The format to return the embeddings in. Can be either \"float\" or \"base64\". Defaults to \"float\"." - }, - "dimensions": { + "chunk_size_in_tokens": { "type": "integer", - "description": "(Optional) The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models." - }, - "user": { - "type": "string", - "description": "(Optional) A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse." + "description": "(Optional) Size in tokens for document chunking during indexing" } }, "additionalProperties": false, "required": [ - "model", - "input" + "documents", + "vector_db_id", + "chunk_size_in_tokens" ], - "title": "OpenaiEmbeddingsRequest" - }, - "OpenAIEmbeddingData": { - "type": "object", - "properties": { - "object": { - "type": "string", - "const": "embedding", - "default": "embedding", - "description": "The object type, which will be \"embedding\"" - }, - "embedding": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "string" - } - ], - "description": "The embedding vector as a list of floats (when encoding_format=\"float\") or as a base64-encoded string (when encoding_format=\"base64\")" - }, - "index": { - "type": "integer", - "description": "The index of the embedding in the input list" - } - }, - "additionalProperties": false, - "required": [ - "object", - "embedding", - "index" - ], - "title": "OpenAIEmbeddingData", - "description": "A single embedding data object from an OpenAI-compatible embeddings response." - }, - "OpenAIEmbeddingUsage": { - "type": "object", - "properties": { - "prompt_tokens": { - "type": "integer", - "description": "The number of tokens in the input" - }, - "total_tokens": { - "type": "integer", - "description": "The total number of tokens used" - } - }, - "additionalProperties": false, - "required": [ - "prompt_tokens", - "total_tokens" - ], - "title": "OpenAIEmbeddingUsage", - "description": "Usage information for an OpenAI-compatible embeddings response." - }, - "OpenAIEmbeddingsResponse": { - "type": "object", - "properties": { - "object": { - "type": "string", - "const": "list", - "default": "list", - "description": "The object type, which will be \"list\"" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIEmbeddingData" - }, - "description": "List of embedding data objects" - }, - "model": { - "type": "string", - "description": "The model that was used to generate the embeddings" - }, - "usage": { - "$ref": "#/components/schemas/OpenAIEmbeddingUsage", - "description": "Usage information" - } - }, - "additionalProperties": false, - "required": [ - "object", - "data", - "model", - "usage" - ], - "title": "OpenAIEmbeddingsResponse", - "description": "Response from an OpenAI-compatible embeddings request." - }, - "OpenAIFilePurpose": { - "type": "string", - "enum": [ - "assistants", - "batch" - ], - "title": "OpenAIFilePurpose", - "description": "Valid purpose values for OpenAI Files API." - }, - "ListOpenAIFileResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIFileObject" - }, - "description": "List of file objects" - }, - "has_more": { - "type": "boolean", - "description": "Whether there are more files available beyond this page" - }, - "first_id": { - "type": "string", - "description": "ID of the first file in the list for pagination" - }, - "last_id": { - "type": "string", - "description": "ID of the last file in the list for pagination" - }, - "object": { - "type": "string", - "const": "list", - "default": "list", - "description": "The object type, which is always \"list\"" - } - }, - "additionalProperties": false, - "required": [ - "data", - "has_more", - "first_id", - "last_id", - "object" - ], - "title": "ListOpenAIFileResponse", - "description": "Response for listing files in OpenAI Files API." - }, - "OpenAIFileObject": { - "type": "object", - "properties": { - "object": { - "type": "string", - "const": "file", - "default": "file", - "description": "The object type, which is always \"file\"" - }, - "id": { - "type": "string", - "description": "The file identifier, which can be referenced in the API endpoints" - }, - "bytes": { - "type": "integer", - "description": "The size of the file, in bytes" - }, - "created_at": { - "type": "integer", - "description": "The Unix timestamp (in seconds) for when the file was created" - }, - "expires_at": { - "type": "integer", - "description": "The Unix timestamp (in seconds) for when the file expires" - }, - "filename": { - "type": "string", - "description": "The name of the file" - }, - "purpose": { - "type": "string", - "enum": [ - "assistants", - "batch" - ], - "description": "The intended purpose of the file" - } - }, - "additionalProperties": false, - "required": [ - "object", - "id", - "bytes", - "created_at", - "expires_at", - "filename", - "purpose" - ], - "title": "OpenAIFileObject", - "description": "OpenAI File object as defined in the OpenAI Files API." - }, - "VectorStoreListFilesResponse": { - "type": "object", - "properties": { - "object": { - "type": "string", - "default": "list", - "description": "Object type identifier, always \"list\"" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VectorStoreFileObject" - }, - "description": "List of vector store file objects" - }, - "first_id": { - "type": "string", - "description": "(Optional) ID of the first file in the list for pagination" - }, - "last_id": { - "type": "string", - "description": "(Optional) ID of the last file in the list for pagination" - }, - "has_more": { - "type": "boolean", - "default": false, - "description": "Whether there are more files available beyond this page" - } - }, - "additionalProperties": false, - "required": [ - "object", - "data", - "has_more" - ], - "title": "VectorStoreListFilesResponse", - "description": "Response from listing files in a vector store." - }, - "VectorStoreFilesListInBatchResponse": { - "type": "object", - "properties": { - "object": { - "type": "string", - "default": "list", - "description": "Object type identifier, always \"list\"" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VectorStoreFileObject" - }, - "description": "List of vector store file objects in the batch" - }, - "first_id": { - "type": "string", - "description": "(Optional) ID of the first file in the list for pagination" - }, - "last_id": { - "type": "string", - "description": "(Optional) ID of the last file in the list for pagination" - }, - "has_more": { - "type": "boolean", - "default": false, - "description": "Whether there are more files available beyond this page" - } - }, - "additionalProperties": false, - "required": [ - "object", - "data", - "has_more" - ], - "title": "VectorStoreFilesListInBatchResponse", - "description": "Response from listing files in a vector store file batch." - }, - "VectorStoreListResponse": { - "type": "object", - "properties": { - "object": { - "type": "string", - "default": "list", - "description": "Object type identifier, always \"list\"" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VectorStoreObject" - }, - "description": "List of vector store objects" - }, - "first_id": { - "type": "string", - "description": "(Optional) ID of the first vector store in the list for pagination" - }, - "last_id": { - "type": "string", - "description": "(Optional) ID of the last vector store in the list for pagination" - }, - "has_more": { - "type": "boolean", - "default": false, - "description": "Whether there are more vector stores available beyond this page" - } - }, - "additionalProperties": false, - "required": [ - "object", - "data", - "has_more" - ], - "title": "VectorStoreListResponse", - "description": "Response from listing vector stores." - }, - "Response": { - "type": "object", - "title": "Response" - }, - "VectorStoreContent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "text", - "description": "Content type, currently only \"text\" is supported" - }, - "text": { - "type": "string", - "description": "The actual text content" - } - }, - "additionalProperties": false, - "required": [ - "type", - "text" - ], - "title": "VectorStoreContent", - "description": "Content item from a vector store file or search result." - }, - "VectorStoreFileContentsResponse": { - "type": "object", - "properties": { - "file_id": { - "type": "string", - "description": "Unique identifier for the file" - }, - "filename": { - "type": "string", - "description": "Name of the file" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Key-value attributes associated with the file" - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VectorStoreContent" - }, - "description": "List of content items from the file" - } - }, - "additionalProperties": false, - "required": [ - "file_id", - "filename", - "attributes", - "content" - ], - "title": "VectorStoreFileContentsResponse", - "description": "Response from retrieving the contents of a vector store file." - }, - "OpenaiSearchVectorStoreRequest": { - "type": "object", - "properties": { - "query": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "The query string or array for performing the search." - }, - "filters": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Filters based on file attributes to narrow the search results." - }, - "max_num_results": { - "type": "integer", - "description": "Maximum number of results to return (1 to 50 inclusive, default 10)." - }, - "ranking_options": { - "type": "object", - "properties": { - "ranker": { - "type": "string", - "description": "(Optional) Name of the ranking algorithm to use" - }, - "score_threshold": { - "type": "number", - "default": 0.0, - "description": "(Optional) Minimum relevance score threshold for results" - } - }, - "additionalProperties": false, - "description": "Ranking options for fine-tuning the search results." - }, - "rewrite_query": { - "type": "boolean", - "description": "Whether to rewrite the natural language query for vector search (default false)" - }, - "search_mode": { - "type": "string", - "description": "The search mode to use - \"keyword\", \"vector\", or \"hybrid\" (default \"vector\")" - } - }, - "additionalProperties": false, - "required": [ - "query" - ], - "title": "OpenaiSearchVectorStoreRequest" - }, - "VectorStoreSearchResponse": { - "type": "object", - "properties": { - "file_id": { - "type": "string", - "description": "Unique identifier of the file containing the result" - }, - "filename": { - "type": "string", - "description": "Name of the file containing the result" - }, - "score": { - "type": "number", - "description": "Relevance score for this search result" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "description": "(Optional) Key-value attributes associated with the file" - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VectorStoreContent" - }, - "description": "List of content items matching the search query" - } - }, - "additionalProperties": false, - "required": [ - "file_id", - "filename", - "score", - "content" - ], - "title": "VectorStoreSearchResponse", - "description": "Response from searching a vector store." - }, - "VectorStoreSearchResponsePage": { - "type": "object", - "properties": { - "object": { - "type": "string", - "default": "vector_store.search_results.page", - "description": "Object type identifier for the search results page" - }, - "search_query": { - "type": "string", - "description": "The original search query that was executed" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VectorStoreSearchResponse" - }, - "description": "List of search result objects" - }, - "has_more": { - "type": "boolean", - "default": false, - "description": "Whether there are more results available beyond this page" - }, - "next_page": { - "type": "string", - "description": "(Optional) Token for retrieving the next page of results" - } - }, - "additionalProperties": false, - "required": [ - "object", - "search_query", - "data", - "has_more" - ], - "title": "VectorStoreSearchResponsePage", - "description": "Paginated response from searching a vector store." - }, - "OpenaiUpdateVectorStoreRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the vector store." - }, - "expires_after": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The expiration policy for a vector store." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Set of 16 key-value pairs that can be attached to an object." - } - }, - "additionalProperties": false, - "title": "OpenaiUpdateVectorStoreRequest" - }, - "OpenaiUpdateVectorStoreFileRequest": { - "type": "object", - "properties": { - "attributes": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The updated key-value attributes to store with the file." - } - }, - "additionalProperties": false, - "required": [ - "attributes" - ], - "title": "OpenaiUpdateVectorStoreFileRequest" - }, - "ExpiresAfter": { - "type": "object", - "properties": { - "anchor": { - "type": "string", - "const": "created_at" - }, - "seconds": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "anchor", - "seconds" - ], - "title": "ExpiresAfter", - "description": "Control expiration of uploaded files.\nParams:\n - anchor, must be \"created_at\"\n - seconds, must be int between 3600 and 2592000 (1 hour to 30 days)" - }, - "DPOAlignmentConfig": { - "type": "object", - "properties": { - "beta": { - "type": "number", - "description": "Temperature parameter for the DPO loss" - }, - "loss_type": { - "$ref": "#/components/schemas/DPOLossType", - "default": "sigmoid", - "description": "The type of loss function to use for DPO" - } - }, - "additionalProperties": false, - "required": [ - "beta", - "loss_type" - ], - "title": "DPOAlignmentConfig", - "description": "Configuration for Direct Preference Optimization (DPO) alignment." - }, - "DPOLossType": { - "type": "string", - "enum": [ - "sigmoid", - "hinge", - "ipo", - "kto_pair" - ], - "title": "DPOLossType" - }, - "DataConfig": { - "type": "object", - "properties": { - "dataset_id": { - "type": "string", - "description": "Unique identifier for the training dataset" - }, - "batch_size": { - "type": "integer", - "description": "Number of samples per training batch" - }, - "shuffle": { - "type": "boolean", - "description": "Whether to shuffle the dataset during training" - }, - "data_format": { - "$ref": "#/components/schemas/DatasetFormat", - "description": "Format of the dataset (instruct or dialog)" - }, - "validation_dataset_id": { - "type": "string", - "description": "(Optional) Unique identifier for the validation dataset" - }, - "packed": { - "type": "boolean", - "default": false, - "description": "(Optional) Whether to pack multiple samples into a single sequence for efficiency" - }, - "train_on_input": { - "type": "boolean", - "default": false, - "description": "(Optional) Whether to compute loss on input tokens as well as output tokens" - } - }, - "additionalProperties": false, - "required": [ - "dataset_id", - "batch_size", - "shuffle", - "data_format" - ], - "title": "DataConfig", - "description": "Configuration for training data and data loading." - }, - "DatasetFormat": { - "type": "string", - "enum": [ - "instruct", - "dialog" - ], - "title": "DatasetFormat", - "description": "Format of the training dataset." - }, - "EfficiencyConfig": { - "type": "object", - "properties": { - "enable_activation_checkpointing": { - "type": "boolean", - "default": false, - "description": "(Optional) Whether to use activation checkpointing to reduce memory usage" - }, - "enable_activation_offloading": { - "type": "boolean", - "default": false, - "description": "(Optional) Whether to offload activations to CPU to save GPU memory" - }, - "memory_efficient_fsdp_wrap": { - "type": "boolean", - "default": false, - "description": "(Optional) Whether to use memory-efficient FSDP wrapping" - }, - "fsdp_cpu_offload": { - "type": "boolean", - "default": false, - "description": "(Optional) Whether to offload FSDP parameters to CPU" - } - }, - "additionalProperties": false, - "title": "EfficiencyConfig", - "description": "Configuration for memory and compute efficiency optimizations." - }, - "OptimizerConfig": { - "type": "object", - "properties": { - "optimizer_type": { - "$ref": "#/components/schemas/OptimizerType", - "description": "Type of optimizer to use (adam, adamw, or sgd)" - }, - "lr": { - "type": "number", - "description": "Learning rate for the optimizer" - }, - "weight_decay": { - "type": "number", - "description": "Weight decay coefficient for regularization" - }, - "num_warmup_steps": { - "type": "integer", - "description": "Number of steps for learning rate warmup" - } - }, - "additionalProperties": false, - "required": [ - "optimizer_type", - "lr", - "weight_decay", - "num_warmup_steps" - ], - "title": "OptimizerConfig", - "description": "Configuration parameters for the optimization algorithm." - }, - "OptimizerType": { - "type": "string", - "enum": [ - "adam", - "adamw", - "sgd" - ], - "title": "OptimizerType", - "description": "Available optimizer algorithms for training." - }, - "TrainingConfig": { - "type": "object", - "properties": { - "n_epochs": { - "type": "integer", - "description": "Number of training epochs to run" - }, - "max_steps_per_epoch": { - "type": "integer", - "default": 1, - "description": "Maximum number of steps to run per epoch" - }, - "gradient_accumulation_steps": { - "type": "integer", - "default": 1, - "description": "Number of steps to accumulate gradients before updating" - }, - "max_validation_steps": { - "type": "integer", - "default": 1, - "description": "(Optional) Maximum number of validation steps per epoch" - }, - "data_config": { - "$ref": "#/components/schemas/DataConfig", - "description": "(Optional) Configuration for data loading and formatting" - }, - "optimizer_config": { - "$ref": "#/components/schemas/OptimizerConfig", - "description": "(Optional) Configuration for the optimization algorithm" - }, - "efficiency_config": { - "$ref": "#/components/schemas/EfficiencyConfig", - "description": "(Optional) Configuration for memory and compute optimizations" - }, - "dtype": { - "type": "string", - "default": "bf16", - "description": "(Optional) Data type for model parameters (bf16, fp16, fp32)" - } - }, - "additionalProperties": false, - "required": [ - "n_epochs", - "max_steps_per_epoch", - "gradient_accumulation_steps" - ], - "title": "TrainingConfig", - "description": "Comprehensive configuration for the training process." - }, - "PreferenceOptimizeRequest": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string", - "description": "The UUID of the job to create." - }, - "finetuned_model": { - "type": "string", - "description": "The model to fine-tune." - }, - "algorithm_config": { - "$ref": "#/components/schemas/DPOAlignmentConfig", - "description": "The algorithm configuration." - }, - "training_config": { - "$ref": "#/components/schemas/TrainingConfig", - "description": "The training configuration." - }, - "hyperparam_search_config": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The hyperparam search configuration." - }, - "logger_config": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The logger configuration." - } - }, - "additionalProperties": false, - "required": [ - "job_uuid", - "finetuned_model", - "algorithm_config", - "training_config", - "hyperparam_search_config", - "logger_config" - ], - "title": "PreferenceOptimizeRequest" - }, - "PostTrainingJob": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "job_uuid" - ], - "title": "PostTrainingJob" + "title": "InsertRequest" }, "DefaultRAGQueryGeneratorConfig": { "type": "object", @@ -18040,6 +12117,483 @@ "title": "RAGQueryResult", "description": "Result of a RAG query containing retrieved content and metadata." }, + "ToolGroup": { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "model", + "shield", + "vector_db", + "dataset", + "scoring_function", + "benchmark", + "tool", + "tool_group", + "prompt" + ], + "const": "tool_group", + "default": "tool_group", + "description": "Type of resource, always 'tool_group'" + }, + "mcp_endpoint": { + "$ref": "#/components/schemas/URL", + "description": "(Optional) Model Context Protocol endpoint for remote tools" + }, + "args": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) Additional arguments for the tool group" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_id", + "type" + ], + "title": "ToolGroup", + "description": "A group of related tools managed together." + }, + "ListToolGroupsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolGroup" + }, + "description": "List of tool groups" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "ListToolGroupsResponse", + "description": "Response containing a list of tool groups." + }, + "RegisterToolGroupRequest": { + "type": "object", + "properties": { + "toolgroup_id": { + "type": "string", + "description": "The ID of the tool group to register." + }, + "provider_id": { + "type": "string", + "description": "The ID of the provider to use for the tool group." + }, + "mcp_endpoint": { + "$ref": "#/components/schemas/URL", + "description": "The MCP endpoint to use for the tool group." + }, + "args": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "A dictionary of arguments to pass to the tool group." + } + }, + "additionalProperties": false, + "required": [ + "toolgroup_id", + "provider_id" + ], + "title": "RegisterToolGroupRequest" + }, + "Tool": { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "model", + "shield", + "vector_db", + "dataset", + "scoring_function", + "benchmark", + "tool", + "tool_group", + "prompt" + ], + "const": "tool", + "default": "tool", + "description": "Type of resource, always 'tool'" + }, + "toolgroup_id": { + "type": "string", + "description": "ID of the tool group this tool belongs to" + }, + "description": { + "type": "string", + "description": "Human-readable description of what the tool does" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolParameter" + }, + "description": "List of parameters this tool accepts" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) Additional metadata about the tool" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_id", + "type", + "toolgroup_id", + "description", + "parameters" + ], + "title": "Tool", + "description": "A tool that can be invoked by agents." + }, + "ListToolsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tool" + }, + "description": "List of tools" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "ListToolsResponse", + "description": "Response containing a list of tools." + }, + "VectorDB": { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "provider_resource_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "model", + "shield", + "vector_db", + "dataset", + "scoring_function", + "benchmark", + "tool", + "tool_group", + "prompt" + ], + "const": "vector_db", + "default": "vector_db", + "description": "Type of resource, always 'vector_db' for vector databases" + }, + "embedding_model": { + "type": "string", + "description": "Name of the embedding model to use for vector generation" + }, + "embedding_dimension": { + "type": "integer", + "description": "Dimension of the embedding vectors" + }, + "vector_db_name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "identifier", + "provider_id", + "type", + "embedding_model", + "embedding_dimension" + ], + "title": "VectorDB", + "description": "Vector database resource for storing and querying vector embeddings." + }, + "ListVectorDBsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorDB" + }, + "description": "List of vector databases" + } + }, + "additionalProperties": false, + "required": [ + "data" + ], + "title": "ListVectorDBsResponse", + "description": "Response from listing vector databases." + }, + "RegisterVectorDbRequest": { + "type": "object", + "properties": { + "vector_db_id": { + "type": "string", + "description": "The identifier of the vector database to register." + }, + "embedding_model": { + "type": "string", + "description": "The embedding model to use." + }, + "embedding_dimension": { + "type": "integer", + "description": "The dimension of the embedding model." + }, + "provider_id": { + "type": "string", + "description": "The identifier of the provider." + }, + "vector_db_name": { + "type": "string", + "description": "The name of the vector database." + }, + "provider_vector_db_id": { + "type": "string", + "description": "The identifier of the vector database in the provider." + } + }, + "additionalProperties": false, + "required": [ + "vector_db_id", + "embedding_model" + ], + "title": "RegisterVectorDbRequest" + }, + "Chunk": { + "type": "object", + "properties": { + "content": { + "$ref": "#/components/schemas/InterleavedContent", + "description": "The content of the chunk, which can be interleaved text, images, or other types." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Metadata associated with the chunk that will be used in the model context during inference." + }, + "embedding": { + "type": "array", + "items": { + "type": "number" + }, + "description": "Optional embedding for the chunk. If not provided, it will be computed later." + }, + "stored_chunk_id": { + "type": "string", + "description": "The chunk ID that is stored in the vector database. Used for backend functionality." + }, + "chunk_metadata": { + "$ref": "#/components/schemas/ChunkMetadata", + "description": "Metadata for the chunk that will NOT be used in the context during inference. The `chunk_metadata` is required backend functionality." + } + }, + "additionalProperties": false, + "required": [ + "content", + "metadata" + ], + "title": "Chunk", + "description": "A chunk of content that can be inserted into a vector database." + }, + "ChunkMetadata": { + "type": "object", + "properties": { + "chunk_id": { + "type": "string", + "description": "The ID of the chunk. If not set, it will be generated based on the document ID and content." + }, + "document_id": { + "type": "string", + "description": "The ID of the document this chunk belongs to." + }, + "source": { + "type": "string", + "description": "The source of the content, such as a URL, file path, or other identifier." + }, + "created_timestamp": { + "type": "integer", + "description": "An optional timestamp indicating when the chunk was created." + }, + "updated_timestamp": { + "type": "integer", + "description": "An optional timestamp indicating when the chunk was last updated." + }, + "chunk_window": { + "type": "string", + "description": "The window of the chunk, which can be used to group related chunks together." + }, + "chunk_tokenizer": { + "type": "string", + "description": "The tokenizer used to create the chunk. Default is Tiktoken." + }, + "chunk_embedding_model": { + "type": "string", + "description": "The embedding model used to create the chunk's embedding." + }, + "chunk_embedding_dimension": { + "type": "integer", + "description": "The dimension of the embedding vector for the chunk." + }, + "content_token_count": { + "type": "integer", + "description": "The number of tokens in the content of the chunk." + }, + "metadata_token_count": { + "type": "integer", + "description": "The number of tokens in the metadata of the chunk." + } + }, + "additionalProperties": false, + "title": "ChunkMetadata", + "description": "`ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata` is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not expected to change after. Use `Chunk.metadata` for metadata that will be used in the context during inference." + }, + "InsertChunksRequest": { + "type": "object", + "properties": { + "vector_db_id": { + "type": "string", + "description": "The identifier of the vector database to insert the chunks into." + }, + "chunks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Chunk" + }, + "description": "The chunks to insert. Each `Chunk` should contain content which can be interleaved text, images, or other types. `metadata`: `dict[str, Any]` and `embedding`: `List[float]` are optional. If `metadata` is provided, you configure how Llama Stack formats the chunk during generation. If `embedding` is not provided, it will be computed later." + }, + "ttl_seconds": { + "type": "integer", + "description": "The time to live of the chunks." + } + }, + "additionalProperties": false, + "required": [ + "vector_db_id", + "chunks" + ], + "title": "InsertChunksRequest" + }, "QueryChunksRequest": { "type": "object", "properties": { @@ -18111,340 +12665,252 @@ "title": "QueryChunksResponse", "description": "Response from querying chunks in a vector database." }, - "QueryMetricsRequest": { + "VectorStoreFileCounts": { "type": "object", "properties": { - "start_time": { + "completed": { "type": "integer", - "description": "The start time of the metric to query." + "description": "Number of files that have been successfully processed" }, - "end_time": { + "cancelled": { "type": "integer", - "description": "The end time of the metric to query." + "description": "Number of files that had their processing cancelled" }, - "granularity": { + "failed": { + "type": "integer", + "description": "Number of files that failed to process" + }, + "in_progress": { + "type": "integer", + "description": "Number of files currently being processed" + }, + "total": { + "type": "integer", + "description": "Total number of files in the vector store" + } + }, + "additionalProperties": false, + "required": [ + "completed", + "cancelled", + "failed", + "in_progress", + "total" + ], + "title": "VectorStoreFileCounts", + "description": "File processing status counts for a vector store." + }, + "VectorStoreListResponse": { + "type": "object", + "properties": { + "object": { "type": "string", - "description": "The granularity of the metric to query." + "default": "list", + "description": "Object type identifier, always \"list\"" }, - "query_type": { - "type": "string", - "enum": [ - "range", - "instant" - ], - "description": "The type of query to perform." - }, - "label_matchers": { + "data": { "type": "array", "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the label to match" - }, - "value": { - "type": "string", - "description": "The value to match against" - }, - "operator": { - "type": "string", - "enum": [ - "=", - "!=", - "=~", - "!~" - ], - "description": "The comparison operator to use for matching", - "default": "=" - } - }, - "additionalProperties": false, - "required": [ - "name", - "value", - "operator" - ], - "title": "MetricLabelMatcher", - "description": "A matcher for filtering metrics by label values." + "$ref": "#/components/schemas/VectorStoreObject" }, - "description": "The label matchers to apply to the metric." + "description": "List of vector store objects" + }, + "first_id": { + "type": "string", + "description": "(Optional) ID of the first vector store in the list for pagination" + }, + "last_id": { + "type": "string", + "description": "(Optional) ID of the last vector store in the list for pagination" + }, + "has_more": { + "type": "boolean", + "default": false, + "description": "Whether there are more vector stores available beyond this page" } }, "additionalProperties": false, "required": [ - "start_time", - "query_type" + "object", + "data", + "has_more" ], - "title": "QueryMetricsRequest" + "title": "VectorStoreListResponse", + "description": "Response from listing vector stores." }, - "MetricDataPoint": { + "VectorStoreObject": { "type": "object", "properties": { - "timestamp": { + "id": { + "type": "string", + "description": "Unique identifier for the vector store" + }, + "object": { + "type": "string", + "default": "vector_store", + "description": "Object type identifier, always \"vector_store\"" + }, + "created_at": { "type": "integer", - "description": "Unix timestamp when the metric value was recorded" + "description": "Timestamp when the vector store was created" }, - "value": { - "type": "number", - "description": "The numeric value of the metric at this timestamp" + "name": { + "type": "string", + "description": "(Optional) Name of the vector store" }, - "unit": { - "type": "string" + "usage_bytes": { + "type": "integer", + "default": 0, + "description": "Storage space used by the vector store in bytes" + }, + "file_counts": { + "$ref": "#/components/schemas/VectorStoreFileCounts", + "description": "File processing status counts for the vector store" + }, + "status": { + "type": "string", + "default": "completed", + "description": "Current status of the vector store" + }, + "expires_after": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) Expiration policy for the vector store" + }, + "expires_at": { + "type": "integer", + "description": "(Optional) Timestamp when the vector store will expire" + }, + "last_active_at": { + "type": "integer", + "description": "(Optional) Timestamp of last activity on the vector store" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Set of key-value pairs that can be attached to the vector store" } }, "additionalProperties": false, "required": [ - "timestamp", - "value", - "unit" + "id", + "object", + "created_at", + "usage_bytes", + "file_counts", + "status", + "metadata" ], - "title": "MetricDataPoint", - "description": "A single data point in a metric time series." + "title": "VectorStoreObject", + "description": "OpenAI Vector Store object." }, - "MetricLabel": { + "OpenaiCreateVectorStoreRequest": { "type": "object", "properties": { "name": { "type": "string", - "description": "The name of the label" + "description": "A name for the vector store." }, - "value": { - "type": "string", - "description": "The value of the label" - } - }, - "additionalProperties": false, - "required": [ - "name", - "value" - ], - "title": "MetricLabel", - "description": "A label associated with a metric." - }, - "MetricSeries": { - "type": "object", - "properties": { - "metric": { - "type": "string", - "description": "The name of the metric" - }, - "labels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MetricLabel" - }, - "description": "List of labels associated with this metric series" - }, - "values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MetricDataPoint" - }, - "description": "List of data points in chronological order" - } - }, - "additionalProperties": false, - "required": [ - "metric", - "labels", - "values" - ], - "title": "MetricSeries", - "description": "A time series of metric data points." - }, - "QueryMetricsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MetricSeries" - }, - "description": "List of metric series matching the query criteria" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "QueryMetricsResponse", - "description": "Response containing metric time series data." - }, - "QueryCondition": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "The attribute key to filter on" - }, - "op": { - "$ref": "#/components/schemas/QueryConditionOp", - "description": "The comparison operator to apply" - }, - "value": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ], - "description": "The value to compare against" - } - }, - "additionalProperties": false, - "required": [ - "key", - "op", - "value" - ], - "title": "QueryCondition", - "description": "A condition for filtering query results." - }, - "QueryConditionOp": { - "type": "string", - "enum": [ - "eq", - "ne", - "gt", - "lt" - ], - "title": "QueryConditionOp", - "description": "Comparison operators for query conditions." - }, - "QuerySpansRequest": { - "type": "object", - "properties": { - "attribute_filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryCondition" - }, - "description": "The attribute filters to apply to the spans." - }, - "attributes_to_return": { + "file_ids": { "type": "array", "items": { "type": "string" }, - "description": "The attributes to return in the spans." + "description": "A list of File IDs that the vector store should use. Useful for tools like `file_search` that can access files." }, - "max_depth": { - "type": "integer", - "description": "The maximum depth of the tree." - } - }, - "additionalProperties": false, - "required": [ - "attribute_filters", - "attributes_to_return" - ], - "title": "QuerySpansRequest" - }, - "QuerySpansResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Span" + "expires_after": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] }, - "description": "List of spans matching the query criteria" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "QuerySpansResponse", - "description": "Response containing a list of spans." - }, - "QueryTracesRequest": { - "type": "object", - "properties": { - "attribute_filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryCondition" + "description": "The expiration policy for a vector store." + }, + "chunking_strategy": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] }, - "description": "The attribute filters to apply to the traces." - }, - "limit": { - "type": "integer", - "description": "The limit of traces to return." - }, - "offset": { - "type": "integer", - "description": "The offset of the traces to return." - }, - "order_by": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The order by of the traces to return." - } - }, - "additionalProperties": false, - "title": "QueryTracesRequest" - }, - "QueryTracesResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Trace" - }, - "description": "List of traces matching the query criteria" - } - }, - "additionalProperties": false, - "required": [ - "data" - ], - "title": "QueryTracesResponse", - "description": "Response containing a list of traces." - }, - "RegisterBenchmarkRequest": { - "type": "object", - "properties": { - "benchmark_id": { - "type": "string", - "description": "The ID of the benchmark to register." - }, - "dataset_id": { - "type": "string", - "description": "The ID of the dataset to use for the benchmark." - }, - "scoring_functions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The scoring functions to use for the benchmark." - }, - "provider_benchmark_id": { - "type": "string", - "description": "The ID of the provider benchmark to use for the benchmark." - }, - "provider_id": { - "type": "string", - "description": "The ID of the provider to use for the benchmark." + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy." }, "metadata": { "type": "object", @@ -18470,485 +12936,684 @@ } ] }, - "description": "The metadata to use for the benchmark." - } - }, - "additionalProperties": false, - "required": [ - "benchmark_id", - "dataset_id", - "scoring_functions" - ], - "title": "RegisterBenchmarkRequest" - }, - "DataSource": { - "oneOf": [ - { - "$ref": "#/components/schemas/URIDataSource" - }, - { - "$ref": "#/components/schemas/RowsDataSource" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "uri": "#/components/schemas/URIDataSource", - "rows": "#/components/schemas/RowsDataSource" - } - } - }, - "RegisterDatasetRequest": { - "type": "object", - "properties": { - "purpose": { - "type": "string", - "enum": [ - "post-training/messages", - "eval/question-answer", - "eval/messages-answer" - ], - "description": "The purpose of the dataset. One of: - \"post-training/messages\": The dataset contains a messages column with list of messages for post-training. { \"messages\": [ {\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}, ] } - \"eval/question-answer\": The dataset contains a question column and an answer column for evaluation. { \"question\": \"What is the capital of France?\", \"answer\": \"Paris\" } - \"eval/messages-answer\": The dataset contains a messages column with list of messages and an answer column for evaluation. { \"messages\": [ {\"role\": \"user\", \"content\": \"Hello, my name is John Doe.\"}, {\"role\": \"assistant\", \"content\": \"Hello, John Doe. How can I help you today?\"}, {\"role\": \"user\", \"content\": \"What's my name?\"}, ], \"answer\": \"John Doe\" }" - }, - "source": { - "$ref": "#/components/schemas/DataSource", - "description": "The data source of the dataset. Ensure that the data source schema is compatible with the purpose of the dataset. Examples: - { \"type\": \"uri\", \"uri\": \"https://mywebsite.com/mydata.jsonl\" } - { \"type\": \"uri\", \"uri\": \"lsfs://mydata.jsonl\" } - { \"type\": \"uri\", \"uri\": \"data:csv;base64,{base64_content}\" } - { \"type\": \"uri\", \"uri\": \"huggingface://llamastack/simpleqa?split=train\" } - { \"type\": \"rows\", \"rows\": [ { \"messages\": [ {\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}, ] } ] }" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The metadata for the dataset. - E.g. {\"description\": \"My dataset\"}." - }, - "dataset_id": { - "type": "string", - "description": "The ID of the dataset. If not provided, an ID will be generated." - } - }, - "additionalProperties": false, - "required": [ - "purpose", - "source" - ], - "title": "RegisterDatasetRequest" - }, - "RegisterModelRequest": { - "type": "object", - "properties": { - "model_id": { - "type": "string", - "description": "The identifier of the model to register." - }, - "provider_model_id": { - "type": "string", - "description": "The identifier of the model in the provider." - }, - "provider_id": { - "type": "string", - "description": "The identifier of the provider." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "Any additional metadata for this model." - }, - "model_type": { - "$ref": "#/components/schemas/ModelType", - "description": "The type of model to register." - } - }, - "additionalProperties": false, - "required": [ - "model_id" - ], - "title": "RegisterModelRequest" - }, - "ParamType": { - "oneOf": [ - { - "$ref": "#/components/schemas/StringType" - }, - { - "$ref": "#/components/schemas/NumberType" - }, - { - "$ref": "#/components/schemas/BooleanType" - }, - { - "$ref": "#/components/schemas/ArrayType" - }, - { - "$ref": "#/components/schemas/ObjectType" - }, - { - "$ref": "#/components/schemas/JsonType" - }, - { - "$ref": "#/components/schemas/UnionType" - }, - { - "$ref": "#/components/schemas/ChatCompletionInputType" - }, - { - "$ref": "#/components/schemas/CompletionInputType" - }, - { - "$ref": "#/components/schemas/AgentTurnInputType" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "string": "#/components/schemas/StringType", - "number": "#/components/schemas/NumberType", - "boolean": "#/components/schemas/BooleanType", - "array": "#/components/schemas/ArrayType", - "object": "#/components/schemas/ObjectType", - "json": "#/components/schemas/JsonType", - "union": "#/components/schemas/UnionType", - "chat_completion_input": "#/components/schemas/ChatCompletionInputType", - "completion_input": "#/components/schemas/CompletionInputType", - "agent_turn_input": "#/components/schemas/AgentTurnInputType" - } - } - }, - "RegisterScoringFunctionRequest": { - "type": "object", - "properties": { - "scoring_fn_id": { - "type": "string", - "description": "The ID of the scoring function to register." - }, - "description": { - "type": "string", - "description": "The description of the scoring function." - }, - "return_type": { - "$ref": "#/components/schemas/ParamType", - "description": "The return type of the scoring function." - }, - "provider_scoring_fn_id": { - "type": "string", - "description": "The ID of the provider scoring function to use for the scoring function." - }, - "provider_id": { - "type": "string", - "description": "The ID of the provider to use for the scoring function." - }, - "params": { - "$ref": "#/components/schemas/ScoringFnParams", - "description": "The parameters for the scoring function for benchmark eval, these can be overridden for app eval." - } - }, - "additionalProperties": false, - "required": [ - "scoring_fn_id", - "description", - "return_type" - ], - "title": "RegisterScoringFunctionRequest" - }, - "RegisterShieldRequest": { - "type": "object", - "properties": { - "shield_id": { - "type": "string", - "description": "The identifier of the shield to register." - }, - "provider_shield_id": { - "type": "string", - "description": "The identifier of the shield in the provider." - }, - "provider_id": { - "type": "string", - "description": "The identifier of the provider." - }, - "params": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The parameters of the shield." - } - }, - "additionalProperties": false, - "required": [ - "shield_id" - ], - "title": "RegisterShieldRequest" - }, - "RegisterToolGroupRequest": { - "type": "object", - "properties": { - "toolgroup_id": { - "type": "string", - "description": "The ID of the tool group to register." - }, - "provider_id": { - "type": "string", - "description": "The ID of the provider to use for the tool group." - }, - "mcp_endpoint": { - "$ref": "#/components/schemas/URL", - "description": "The MCP endpoint to use for the tool group." - }, - "args": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "A dictionary of arguments to pass to the tool group." - } - }, - "additionalProperties": false, - "required": [ - "toolgroup_id", - "provider_id" - ], - "title": "RegisterToolGroupRequest" - }, - "RegisterVectorDbRequest": { - "type": "object", - "properties": { - "vector_db_id": { - "type": "string", - "description": "The identifier of the vector database to register." + "description": "Set of 16 key-value pairs that can be attached to an object." }, "embedding_model": { "type": "string", - "description": "The embedding model to use." + "description": "The embedding model to use for this vector store." }, "embedding_dimension": { "type": "integer", - "description": "The dimension of the embedding model." + "description": "The dimension of the embedding vectors (default: 384)." }, "provider_id": { "type": "string", - "description": "The identifier of the provider." - }, - "vector_db_name": { - "type": "string", - "description": "The name of the vector database." - }, - "provider_vector_db_id": { - "type": "string", - "description": "The identifier of the vector database in the provider." + "description": "The ID of the provider to use for this vector store." } }, "additionalProperties": false, - "required": [ - "vector_db_id", - "embedding_model" - ], - "title": "RegisterVectorDbRequest" + "title": "OpenaiCreateVectorStoreRequest" }, - "RerankRequest": { + "OpenaiUpdateVectorStoreRequest": { "type": "object", "properties": { - "model": { + "name": { "type": "string", - "description": "The identifier of the reranking model to use." + "description": "The name of the vector store." }, - "query": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" - }, - { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartImageParam" - } - ], - "description": "The search query to rank items against. Can be a string, text content part, or image content part. The input must not exceed the model's max input token length." - }, - "items": { - "type": "array", - "items": { + "expires_after": { + "type": "object", + "additionalProperties": { "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, { "type": "string" }, { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" + "type": "array" }, { - "$ref": "#/components/schemas/OpenAIChatCompletionContentPartImageParam" + "type": "object" } ] }, - "description": "List of items to rerank. Each item can be a string, text content part, or image content part. Each input must not exceed the model's max input token length." + "description": "The expiration policy for a vector store." }, - "max_num_results": { - "type": "integer", - "description": "(Optional) Maximum number of results to return. Default: returns all." + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Set of 16 key-value pairs that can be attached to an object." + } + }, + "additionalProperties": false, + "title": "OpenaiUpdateVectorStoreRequest" + }, + "VectorStoreDeleteResponse": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the deleted vector store" + }, + "object": { + "type": "string", + "default": "vector_store.deleted", + "description": "Object type identifier for the deletion response" + }, + "deleted": { + "type": "boolean", + "default": true, + "description": "Whether the deletion operation was successful" } }, "additionalProperties": false, "required": [ - "model", - "query", - "items" + "id", + "object", + "deleted" ], - "title": "RerankRequest" + "title": "VectorStoreDeleteResponse", + "description": "Response from deleting a vector store." }, - "RerankData": { + "VectorStoreChunkingStrategy": { + "oneOf": [ + { + "$ref": "#/components/schemas/VectorStoreChunkingStrategyAuto" + }, + { + "$ref": "#/components/schemas/VectorStoreChunkingStrategyStatic" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "auto": "#/components/schemas/VectorStoreChunkingStrategyAuto", + "static": "#/components/schemas/VectorStoreChunkingStrategyStatic" + } + } + }, + "VectorStoreChunkingStrategyAuto": { "type": "object", "properties": { - "index": { - "type": "integer", - "description": "The original index of the document in the input list" - }, - "relevance_score": { - "type": "number", - "description": "The relevance score from the model output. Values are inverted when applicable so that higher scores indicate greater relevance." + "type": { + "type": "string", + "const": "auto", + "default": "auto", + "description": "Strategy type, always \"auto\" for automatic chunking" } }, "additionalProperties": false, "required": [ - "index", - "relevance_score" + "type" ], - "title": "RerankData", - "description": "A single rerank result from a reranking response." + "title": "VectorStoreChunkingStrategyAuto", + "description": "Automatic chunking strategy for vector store files." }, - "RerankResponse": { + "VectorStoreChunkingStrategyStatic": { "type": "object", "properties": { + "type": { + "type": "string", + "const": "static", + "default": "static", + "description": "Strategy type, always \"static\" for static chunking" + }, + "static": { + "$ref": "#/components/schemas/VectorStoreChunkingStrategyStaticConfig", + "description": "Configuration parameters for the static chunking strategy" + } + }, + "additionalProperties": false, + "required": [ + "type", + "static" + ], + "title": "VectorStoreChunkingStrategyStatic", + "description": "Static chunking strategy with configurable parameters." + }, + "VectorStoreChunkingStrategyStaticConfig": { + "type": "object", + "properties": { + "chunk_overlap_tokens": { + "type": "integer", + "default": 400, + "description": "Number of tokens to overlap between adjacent chunks" + }, + "max_chunk_size_tokens": { + "type": "integer", + "default": 800, + "description": "Maximum number of tokens per chunk, must be between 100 and 4096" + } + }, + "additionalProperties": false, + "required": [ + "chunk_overlap_tokens", + "max_chunk_size_tokens" + ], + "title": "VectorStoreChunkingStrategyStaticConfig", + "description": "Configuration for static chunking strategy." + }, + "OpenaiCreateVectorStoreFileBatchRequest": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of File IDs that the vector store should use." + }, + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "(Optional) Key-value attributes to store with the files." + }, + "chunking_strategy": { + "$ref": "#/components/schemas/VectorStoreChunkingStrategy", + "description": "(Optional) The chunking strategy used to chunk the file(s). Defaults to auto." + } + }, + "additionalProperties": false, + "required": [ + "file_ids" + ], + "title": "OpenaiCreateVectorStoreFileBatchRequest" + }, + "VectorStoreFileBatchObject": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the file batch" + }, + "object": { + "type": "string", + "default": "vector_store.file_batch", + "description": "Object type identifier, always \"vector_store.file_batch\"" + }, + "created_at": { + "type": "integer", + "description": "Timestamp when the file batch was created" + }, + "vector_store_id": { + "type": "string", + "description": "ID of the vector store containing the file batch" + }, + "status": { + "$ref": "#/components/schemas/VectorStoreFileStatus", + "description": "Current processing status of the file batch" + }, + "file_counts": { + "$ref": "#/components/schemas/VectorStoreFileCounts", + "description": "File processing status counts for the batch" + } + }, + "additionalProperties": false, + "required": [ + "id", + "object", + "created_at", + "vector_store_id", + "status", + "file_counts" + ], + "title": "VectorStoreFileBatchObject", + "description": "OpenAI Vector Store File Batch object." + }, + "VectorStoreFileStatus": { + "oneOf": [ + { + "type": "string", + "const": "completed" + }, + { + "type": "string", + "const": "in_progress" + }, + { + "type": "string", + "const": "cancelled" + }, + { + "type": "string", + "const": "failed" + } + ] + }, + "VectorStoreFileLastError": { + "type": "object", + "properties": { + "code": { + "oneOf": [ + { + "type": "string", + "const": "server_error" + }, + { + "type": "string", + "const": "rate_limit_exceeded" + } + ], + "description": "Error code indicating the type of failure" + }, + "message": { + "type": "string", + "description": "Human-readable error message describing the failure" + } + }, + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "title": "VectorStoreFileLastError", + "description": "Error information for failed vector store file processing." + }, + "VectorStoreFileObject": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the file" + }, + "object": { + "type": "string", + "default": "vector_store.file", + "description": "Object type identifier, always \"vector_store.file\"" + }, + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Key-value attributes associated with the file" + }, + "chunking_strategy": { + "oneOf": [ + { + "$ref": "#/components/schemas/VectorStoreChunkingStrategyAuto" + }, + { + "$ref": "#/components/schemas/VectorStoreChunkingStrategyStatic" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "auto": "#/components/schemas/VectorStoreChunkingStrategyAuto", + "static": "#/components/schemas/VectorStoreChunkingStrategyStatic" + } + }, + "description": "Strategy used for splitting the file into chunks" + }, + "created_at": { + "type": "integer", + "description": "Timestamp when the file was added to the vector store" + }, + "last_error": { + "$ref": "#/components/schemas/VectorStoreFileLastError", + "description": "(Optional) Error information if file processing failed" + }, + "status": { + "$ref": "#/components/schemas/VectorStoreFileStatus", + "description": "Current processing status of the file" + }, + "usage_bytes": { + "type": "integer", + "default": 0, + "description": "Storage space used by this file in bytes" + }, + "vector_store_id": { + "type": "string", + "description": "ID of the vector store containing this file" + } + }, + "additionalProperties": false, + "required": [ + "id", + "object", + "attributes", + "chunking_strategy", + "created_at", + "status", + "usage_bytes", + "vector_store_id" + ], + "title": "VectorStoreFileObject", + "description": "OpenAI Vector Store File object." + }, + "VectorStoreFilesListInBatchResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "default": "list", + "description": "Object type identifier, always \"list\"" + }, "data": { "type": "array", "items": { - "$ref": "#/components/schemas/RerankData" + "$ref": "#/components/schemas/VectorStoreFileObject" }, - "description": "List of rerank result objects, sorted by relevance score (descending)" + "description": "List of vector store file objects in the batch" + }, + "first_id": { + "type": "string", + "description": "(Optional) ID of the first file in the list for pagination" + }, + "last_id": { + "type": "string", + "description": "(Optional) ID of the last file in the list for pagination" + }, + "has_more": { + "type": "boolean", + "default": false, + "description": "Whether there are more files available beyond this page" } }, "additionalProperties": false, "required": [ - "data" + "object", + "data", + "has_more" ], - "title": "RerankResponse", - "description": "Response from a reranking request." + "title": "VectorStoreFilesListInBatchResponse", + "description": "Response from listing files in a vector store file batch." }, - "ResumeAgentTurnRequest": { + "VectorStoreListFilesResponse": { "type": "object", "properties": { - "tool_responses": { + "object": { + "type": "string", + "default": "list", + "description": "Object type identifier, always \"list\"" + }, + "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ToolResponse" + "$ref": "#/components/schemas/VectorStoreFileObject" }, - "description": "The tool call responses to resume the turn with." + "description": "List of vector store file objects" }, - "stream": { + "first_id": { + "type": "string", + "description": "(Optional) ID of the first file in the list for pagination" + }, + "last_id": { + "type": "string", + "description": "(Optional) ID of the last file in the list for pagination" + }, + "has_more": { "type": "boolean", - "description": "Whether to stream the response." + "default": false, + "description": "Whether there are more files available beyond this page" } }, "additionalProperties": false, "required": [ - "tool_responses" + "object", + "data", + "has_more" ], - "title": "ResumeAgentTurnRequest" + "title": "VectorStoreListFilesResponse", + "description": "Response from listing files in a vector store." }, - "RunEvalRequest": { + "OpenaiAttachFileToVectorStoreRequest": { "type": "object", "properties": { - "benchmark_config": { - "$ref": "#/components/schemas/BenchmarkConfig", - "description": "The configuration for the benchmark." + "file_id": { + "type": "string", + "description": "The ID of the file to attach to the vector store." + }, + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "The key-value attributes stored with the file, which can be used for filtering." + }, + "chunking_strategy": { + "$ref": "#/components/schemas/VectorStoreChunkingStrategy", + "description": "The chunking strategy to use for the file." } }, "additionalProperties": false, "required": [ - "benchmark_config" + "file_id" ], - "title": "RunEvalRequest" + "title": "OpenaiAttachFileToVectorStoreRequest" }, - "RunModerationRequest": { + "OpenaiUpdateVectorStoreFileRequest": { "type": "object", "properties": { - "input": { + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "The updated key-value attributes to store with the file." + } + }, + "additionalProperties": false, + "required": [ + "attributes" + ], + "title": "OpenaiUpdateVectorStoreFileRequest" + }, + "VectorStoreFileDeleteResponse": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the deleted file" + }, + "object": { + "type": "string", + "default": "vector_store.file.deleted", + "description": "Object type identifier for the deletion response" + }, + "deleted": { + "type": "boolean", + "default": true, + "description": "Whether the deletion operation was successful" + } + }, + "additionalProperties": false, + "required": [ + "id", + "object", + "deleted" + ], + "title": "VectorStoreFileDeleteResponse", + "description": "Response from deleting a vector store file." + }, + "VectorStoreContent": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text", + "description": "Content type, currently only \"text\" is supported" + }, + "text": { + "type": "string", + "description": "The actual text content" + } + }, + "additionalProperties": false, + "required": [ + "type", + "text" + ], + "title": "VectorStoreContent", + "description": "Content item from a vector store file or search result." + }, + "VectorStoreFileContentsResponse": { + "type": "object", + "properties": { + "file_id": { + "type": "string", + "description": "Unique identifier for the file" + }, + "filename": { + "type": "string", + "description": "Name of the file" + }, + "attributes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + }, + "description": "Key-value attributes associated with the file" + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorStoreContent" + }, + "description": "List of content items from the file" + } + }, + "additionalProperties": false, + "required": [ + "file_id", + "filename", + "attributes", + "content" + ], + "title": "VectorStoreFileContentsResponse", + "description": "Response from retrieving the contents of a vector store file." + }, + "OpenaiSearchVectorStoreRequest": { + "type": "object", + "properties": { + "query": { "oneOf": [ { "type": "string" @@ -18960,156 +13625,9 @@ } } ], - "description": "Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models." + "description": "The query string or array for performing the search." }, - "model": { - "type": "string", - "description": "The content moderation model you would like to use." - } - }, - "additionalProperties": false, - "required": [ - "input", - "model" - ], - "title": "RunModerationRequest" - }, - "ModerationObject": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the moderation request." - }, - "model": { - "type": "string", - "description": "The model used to generate the moderation results." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModerationObjectResults" - }, - "description": "A list of moderation objects" - } - }, - "additionalProperties": false, - "required": [ - "id", - "model", - "results" - ], - "title": "ModerationObject", - "description": "A moderation object." - }, - "ModerationObjectResults": { - "type": "object", - "properties": { - "flagged": { - "type": "boolean", - "description": "Whether any of the below categories are flagged." - }, - "categories": { - "type": "object", - "additionalProperties": { - "type": "boolean" - }, - "description": "A list of the categories, and whether they are flagged or not." - }, - "category_applied_input_types": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": "A list of the categories along with the input type(s) that the score applies to." - }, - "category_scores": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "description": "A list of the categories along with their scores as predicted by model." - }, - "user_message": { - "type": "string" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - }, - "additionalProperties": false, - "required": [ - "flagged", - "metadata" - ], - "title": "ModerationObjectResults", - "description": "A moderation object." - }, - "Message": { - "oneOf": [ - { - "$ref": "#/components/schemas/UserMessage" - }, - { - "$ref": "#/components/schemas/SystemMessage" - }, - { - "$ref": "#/components/schemas/ToolResponseMessage" - }, - { - "$ref": "#/components/schemas/CompletionMessage" - } - ], - "discriminator": { - "propertyName": "role", - "mapping": { - "user": "#/components/schemas/UserMessage", - "system": "#/components/schemas/SystemMessage", - "tool": "#/components/schemas/ToolResponseMessage", - "assistant": "#/components/schemas/CompletionMessage" - } - } - }, - "RunShieldRequest": { - "type": "object", - "properties": { - "shield_id": { - "type": "string", - "description": "The identifier of the shield to run." - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - }, - "description": "The messages to run the shield on." - }, - "params": { + "filters": { "type": "object", "additionalProperties": { "oneOf": [ @@ -19133,519 +13651,131 @@ } ] }, - "description": "The parameters of the shield." - } - }, - "additionalProperties": false, - "required": [ - "shield_id", - "messages", - "params" - ], - "title": "RunShieldRequest" - }, - "RunShieldResponse": { - "type": "object", - "properties": { - "violation": { - "$ref": "#/components/schemas/SafetyViolation", - "description": "(Optional) Safety violation detected by the shield, if any" - } - }, - "additionalProperties": false, - "title": "RunShieldResponse", - "description": "Response from running a safety shield." - }, - "SaveSpansToDatasetRequest": { - "type": "object", - "properties": { - "attribute_filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueryCondition" - }, - "description": "The attribute filters to apply to the spans." + "description": "Filters based on file attributes to narrow the search results." }, - "attributes_to_save": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The attributes to save to the dataset." - }, - "dataset_id": { - "type": "string", - "description": "The ID of the dataset to save the spans to." - }, - "max_depth": { + "max_num_results": { "type": "integer", - "description": "The maximum depth of the tree." - } - }, - "additionalProperties": false, - "required": [ - "attribute_filters", - "attributes_to_save", - "dataset_id" - ], - "title": "SaveSpansToDatasetRequest" - }, - "ScoreRequest": { - "type": "object", - "properties": { - "input_rows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] + "description": "Maximum number of results to return (1 to 50 inclusive, default 10)." + }, + "ranking_options": { + "type": "object", + "properties": { + "ranker": { + "type": "string", + "description": "(Optional) Name of the ranking algorithm to use" + }, + "score_threshold": { + "type": "number", + "default": 0.0, + "description": "(Optional) Minimum relevance score threshold for results" } }, - "description": "The rows to score." + "additionalProperties": false, + "description": "Ranking options for fine-tuning the search results." }, - "scoring_functions": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/ScoringFnParams" - }, - { - "type": "null" - } - ] - }, - "description": "The scoring functions to use for the scoring." - } - }, - "additionalProperties": false, - "required": [ - "input_rows", - "scoring_functions" - ], - "title": "ScoreRequest" - }, - "ScoreResponse": { - "type": "object", - "properties": { - "results": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ScoringResult" - }, - "description": "A map of scoring function name to ScoringResult." - } - }, - "additionalProperties": false, - "required": [ - "results" - ], - "title": "ScoreResponse", - "description": "The response from scoring." - }, - "ScoreBatchRequest": { - "type": "object", - "properties": { - "dataset_id": { - "type": "string", - "description": "The ID of the dataset to score." - }, - "scoring_functions": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/ScoringFnParams" - }, - { - "type": "null" - } - ] - }, - "description": "The scoring functions to use for the scoring." - }, - "save_results_dataset": { + "rewrite_query": { "type": "boolean", - "description": "Whether to save the results to a dataset." + "description": "Whether to rewrite the natural language query for vector search (default false)" + }, + "search_mode": { + "type": "string", + "description": "The search mode to use - \"keyword\", \"vector\", or \"hybrid\" (default \"vector\")" } }, "additionalProperties": false, "required": [ - "dataset_id", - "scoring_functions", - "save_results_dataset" + "query" ], - "title": "ScoreBatchRequest" + "title": "OpenaiSearchVectorStoreRequest" }, - "ScoreBatchResponse": { + "VectorStoreSearchResponse": { "type": "object", "properties": { - "dataset_id": { + "file_id": { "type": "string", - "description": "(Optional) The identifier of the dataset that was scored" + "description": "Unique identifier of the file containing the result" }, - "results": { + "filename": { + "type": "string", + "description": "Name of the file containing the result" + }, + "score": { + "type": "number", + "description": "Relevance score for this search result" + }, + "attributes": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/ScoringResult" + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] }, - "description": "A map of scoring function name to ScoringResult" - } - }, - "additionalProperties": false, - "required": [ - "results" - ], - "title": "ScoreBatchResponse", - "description": "Response from batch scoring operations on datasets." - }, - "SetDefaultVersionRequest": { - "type": "object", - "properties": { - "version": { - "type": "integer", - "description": "The version to set as default." - } - }, - "additionalProperties": false, - "required": [ - "version" - ], - "title": "SetDefaultVersionRequest" - }, - "AlgorithmConfig": { - "oneOf": [ - { - "$ref": "#/components/schemas/LoraFinetuningConfig" + "description": "(Optional) Key-value attributes associated with the file" }, - { - "$ref": "#/components/schemas/QATFinetuningConfig" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "LoRA": "#/components/schemas/LoraFinetuningConfig", - "QAT": "#/components/schemas/QATFinetuningConfig" - } - } - }, - "LoraFinetuningConfig": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "LoRA", - "default": "LoRA", - "description": "Algorithm type identifier, always \"LoRA\"" - }, - "lora_attn_modules": { + "content": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/VectorStoreContent" }, - "description": "List of attention module names to apply LoRA to" + "description": "List of content items matching the search query" + } + }, + "additionalProperties": false, + "required": [ + "file_id", + "filename", + "score", + "content" + ], + "title": "VectorStoreSearchResponse", + "description": "Response from searching a vector store." + }, + "VectorStoreSearchResponsePage": { + "type": "object", + "properties": { + "object": { + "type": "string", + "default": "vector_store.search_results.page", + "description": "Object type identifier for the search results page" }, - "apply_lora_to_mlp": { - "type": "boolean", - "description": "Whether to apply LoRA to MLP layers" + "search_query": { + "type": "string", + "description": "The original search query that was executed" }, - "apply_lora_to_output": { - "type": "boolean", - "description": "Whether to apply LoRA to output projection layers" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorStoreSearchResponse" + }, + "description": "List of search result objects" }, - "rank": { - "type": "integer", - "description": "Rank of the LoRA adaptation (lower rank = fewer parameters)" - }, - "alpha": { - "type": "integer", - "description": "LoRA scaling parameter that controls adaptation strength" - }, - "use_dora": { + "has_more": { "type": "boolean", "default": false, - "description": "(Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation)" + "description": "Whether there are more results available beyond this page" }, - "quantize_base": { - "type": "boolean", - "default": false, - "description": "(Optional) Whether to quantize the base model weights" + "next_page": { + "type": "string", + "description": "(Optional) Token for retrieving the next page of results" } }, "additionalProperties": false, "required": [ - "type", - "lora_attn_modules", - "apply_lora_to_mlp", - "apply_lora_to_output", - "rank", - "alpha" + "object", + "search_query", + "data", + "has_more" ], - "title": "LoraFinetuningConfig", - "description": "Configuration for Low-Rank Adaptation (LoRA) fine-tuning." - }, - "QATFinetuningConfig": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "QAT", - "default": "QAT", - "description": "Algorithm type identifier, always \"QAT\"" - }, - "quantizer_name": { - "type": "string", - "description": "Name of the quantization algorithm to use" - }, - "group_size": { - "type": "integer", - "description": "Size of groups for grouped quantization" - } - }, - "additionalProperties": false, - "required": [ - "type", - "quantizer_name", - "group_size" - ], - "title": "QATFinetuningConfig", - "description": "Configuration for Quantization-Aware Training (QAT) fine-tuning." - }, - "SupervisedFineTuneRequest": { - "type": "object", - "properties": { - "job_uuid": { - "type": "string", - "description": "The UUID of the job to create." - }, - "training_config": { - "$ref": "#/components/schemas/TrainingConfig", - "description": "The training configuration." - }, - "hyperparam_search_config": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The hyperparam search configuration." - }, - "logger_config": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "The logger configuration." - }, - "model": { - "type": "string", - "description": "The model to fine-tune." - }, - "checkpoint_dir": { - "type": "string", - "description": "The directory to save checkpoint(s) to." - }, - "algorithm_config": { - "$ref": "#/components/schemas/AlgorithmConfig", - "description": "The algorithm configuration." - } - }, - "additionalProperties": false, - "required": [ - "job_uuid", - "training_config", - "hyperparam_search_config", - "logger_config" - ], - "title": "SupervisedFineTuneRequest" - }, - "SyntheticDataGenerateRequest": { - "type": "object", - "properties": { - "dialogs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - }, - "description": "List of conversation messages to use as input for synthetic data generation" - }, - "filtering_function": { - "type": "string", - "enum": [ - "none", - "random", - "top_k", - "top_p", - "top_k_top_p", - "sigmoid" - ], - "description": "Type of filtering to apply to generated synthetic data samples" - }, - "model": { - "type": "string", - "description": "(Optional) The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint" - } - }, - "additionalProperties": false, - "required": [ - "dialogs", - "filtering_function" - ], - "title": "SyntheticDataGenerateRequest" - }, - "SyntheticDataGenerationResponse": { - "type": "object", - "properties": { - "synthetic_data": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - }, - "description": "List of generated synthetic data samples that passed the filtering criteria" - }, - "statistics": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - }, - "description": "(Optional) Statistical information about the generation process and filtering results" - } - }, - "additionalProperties": false, - "required": [ - "synthetic_data" - ], - "title": "SyntheticDataGenerationResponse", - "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold." - }, - "UpdatePromptRequest": { - "type": "object", - "properties": { - "prompt": { - "type": "string", - "description": "The updated prompt text content." - }, - "version": { - "type": "integer", - "description": "The current version of the prompt being updated." - }, - "variables": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Updated list of variable names that can be used in the prompt template." - }, - "set_as_default": { - "type": "boolean", - "description": "Set the new version as the default (default=True)." - } - }, - "additionalProperties": false, - "required": [ - "prompt", - "version", - "set_as_default" - ], - "title": "UpdatePromptRequest" + "title": "VectorStoreSearchResponsePage", + "description": "Paginated response from searching a vector store." }, "VersionInfo": { "type": "object", @@ -19734,11 +13864,8 @@ "tags": [ { "name": "Agents", - "description": "Main functionalities provided by this API:\n- Create agents with specific instructions and ability to use tools.\n- Interactions with agents are grouped into sessions (\"threads\"), and each interaction is called a \"turn\".\n- Agents can be provided with various tools (see the ToolGroups and ToolRuntime APIs for more details).\n- Agents can be provided with various shields (see the Safety API for more details).\n- Agents can also use Memory to retrieve information from knowledge bases. See the RAG Tool and Vector IO APIs for more details.", - "x-displayName": "Agents API for creating and interacting with agentic systems." - }, - { - "name": "Benchmarks" + "description": "APIs for creating and interacting with agentic systems.", + "x-displayName": "Agents" }, { "name": "DatasetIO" @@ -19746,10 +13873,6 @@ { "name": "Datasets" }, - { - "name": "Eval", - "x-displayName": "Llama Stack Evaluation API for running evaluations on model and agent candidates." - }, { "name": "Files" }, @@ -19764,9 +13887,6 @@ { "name": "Models" }, - { - "name": "PostTraining (Coming Soon)" - }, { "name": "Prompts", "x-displayName": "Protocol for prompt management operations." @@ -19811,15 +13931,12 @@ "name": "Operations", "tags": [ "Agents", - "Benchmarks", "DatasetIO", "Datasets", - "Eval", "Files", "Inference", "Inspect", "Models", - "PostTraining (Coming Soon)", "Prompts", "Providers", "Safety", diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 1920f422e..44b1a18fb 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -7,14 +7,20 @@ info: a set of endpoints and their corresponding interfaces that are tailored to best leverage Llama Models. + + **โœ… STABLE**: Production-ready APIs with backward compatibility guarantees. servers: - url: http://any-hosted-llama-stack.com paths: - /v1beta/datasetio/append-rows/{dataset_id}: - post: + /v1/chat/completions: + get: responses: '200': - description: OK + description: A ListOpenAIChatCompletionResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -26,23 +32,141 @@ paths: default: $ref: '#/components/responses/DefaultError' tags: - - DatasetIO - summary: Append rows to a dataset. - description: Append rows to a dataset. + - Inference + summary: List all chat completions. + description: List all chat completions. parameters: - - name: dataset_id - in: path + - name: after + in: query description: >- - The ID of the dataset to append the rows to. - required: true + The ID of the last chat completion to return. + required: false schema: type: string + - name: limit + in: query + description: >- + The maximum number of chat completions to return. + required: false + schema: + type: integer + - name: model + in: query + description: The model to filter by. + required: false + schema: + type: string + - name: order + in: query + description: >- + The order to sort the chat completions by: "asc" or "desc". Defaults to + "desc". + required: false + schema: + $ref: '#/components/schemas/Order' + deprecated: false + post: + responses: + '200': + description: An OpenAIChatCompletion. + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletion' + - $ref: '#/components/schemas/OpenAIChatCompletionChunk' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: >- + Generate an OpenAI-compatible chat completion for the given messages using + the specified model. + description: >- + Generate an OpenAI-compatible chat completion for the given messages using + the specified model. + parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/AppendRowsRequest' + $ref: '#/components/schemas/OpenaiChatCompletionRequest' required: true + deprecated: false + /v1/chat/completions/{completion_id}: + get: + responses: + '200': + description: A OpenAICompletionWithInputMessages. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: Describe a chat completion by its ID. + description: Describe a chat completion by its ID. + parameters: + - name: completion_id + in: path + description: ID of the chat completion. + required: true + schema: + type: string + deprecated: false + /v1/completions: + post: + responses: + '200': + description: An OpenAICompletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletion' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: >- + Generate an OpenAI-compatible completion for the given prompt using the specified + model. + description: >- + Generate an OpenAI-compatible completion for the given prompt using the specified + model. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenaiCompletionRequest' + required: true + deprecated: false /v1/datasetio/append-rows/{dataset_id}: post: responses: @@ -76,2338 +200,7 @@ paths: schema: $ref: '#/components/schemas/AppendRowsRequest' required: true - /v1alpha/post-training/job/cancel: - post: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Cancel a training job. - description: Cancel a training job. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CancelTrainingJobRequest' - required: true - /v1/post-training/job/cancel: - post: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Cancel a training job. - description: Cancel a training job. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CancelTrainingJobRequest' - required: true - /v1alpha/agents: - get: - responses: - '200': - description: A PaginatedResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all agents. - description: List all agents. - parameters: - - name: start_index - in: query - description: The index to start the pagination from. - required: false - schema: - type: integer - - name: limit - in: query - description: The number of agents to return. - required: false - schema: - type: integer - post: - responses: - '200': - description: >- - An AgentCreateResponse with the agent ID. - content: - application/json: - schema: - $ref: '#/components/schemas/AgentCreateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Create an agent with the given configuration. - description: >- - Create an agent with the given configuration. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentRequest' - required: true - /v1/agents: - get: - responses: - '200': - description: A PaginatedResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all agents. - description: List all agents. - parameters: - - name: start_index - in: query - description: The index to start the pagination from. - required: false - schema: - type: integer - - name: limit - in: query - description: The number of agents to return. - required: false - schema: - type: integer - post: - responses: - '200': - description: >- - An AgentCreateResponse with the agent ID. - content: - application/json: - schema: - $ref: '#/components/schemas/AgentCreateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Create an agent with the given configuration. - description: >- - Create an agent with the given configuration. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentRequest' - required: true - /v1alpha/agents/{agent_id}/session: - post: - responses: - '200': - description: An AgentSessionCreateResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/AgentSessionCreateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new session for an agent. - description: Create a new session for an agent. - parameters: - - name: agent_id - in: path - description: >- - The ID of the agent to create the session for. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentSessionRequest' - required: true - /v1/agents/{agent_id}/session: - post: - responses: - '200': - description: An AgentSessionCreateResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/AgentSessionCreateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new session for an agent. - description: Create a new session for an agent. - parameters: - - name: agent_id - in: path - description: >- - The ID of the agent to create the session for. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentSessionRequest' - required: true - /v1alpha/agents/{agent_id}/session/{session_id}/turn: - post: - responses: - '200': - description: >- - If stream=False, returns a Turn object. If stream=True, returns an SSE - event stream of AgentTurnResponseStreamChunk. - content: - application/json: - schema: - $ref: '#/components/schemas/Turn' - text/event-stream: - schema: - $ref: '#/components/schemas/AgentTurnResponseStreamChunk' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new turn for an agent. - description: Create a new turn for an agent. - parameters: - - name: agent_id - in: path - description: >- - The ID of the agent to create the turn for. - required: true - schema: - type: string - - name: session_id - in: path - description: >- - The ID of the session to create the turn for. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentTurnRequest' - required: true - /v1/agents/{agent_id}/session/{session_id}/turn: - post: - responses: - '200': - description: >- - If stream=False, returns a Turn object. If stream=True, returns an SSE - event stream of AgentTurnResponseStreamChunk. - content: - application/json: - schema: - $ref: '#/components/schemas/Turn' - text/event-stream: - schema: - $ref: '#/components/schemas/AgentTurnResponseStreamChunk' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new turn for an agent. - description: Create a new turn for an agent. - parameters: - - name: agent_id - in: path - description: >- - The ID of the agent to create the turn for. - required: true - schema: - type: string - - name: session_id - in: path - description: >- - The ID of the session to create the turn for. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentTurnRequest' - required: true - /v1/responses: - get: - responses: - '200': - description: A ListOpenAIResponseObject. - content: - application/json: - schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all OpenAI responses. - description: List all OpenAI responses. - parameters: - - name: after - in: query - description: The ID of the last response to return. - required: false - schema: - type: string - - name: limit - in: query - description: The number of responses to return. - required: false - schema: - type: integer - - name: model - in: query - description: The model to filter responses by. - required: false - schema: - type: string - - name: order - in: query - description: >- - The order to sort responses by when sorted by created_at ('asc' or 'desc'). - required: false - schema: - $ref: '#/components/schemas/Order' - post: - responses: - '200': - description: An OpenAIResponseObject. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' - text/event-stream: - schema: - $ref: '#/components/schemas/OpenAIResponseObjectStream' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new OpenAI response. - description: Create a new OpenAI response. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateOpenaiResponseRequest' - required: true - /v1/prompts: - get: - responses: - '200': - description: >- - A ListPromptsResponse containing all prompts. - content: - application/json: - schema: - $ref: '#/components/schemas/ListPromptsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Prompts - summary: List all prompts. - description: List all prompts. - parameters: [] - post: - responses: - '200': - description: The created Prompt resource. - content: - application/json: - schema: - $ref: '#/components/schemas/Prompt' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Prompts - summary: Create a new prompt. - description: Create a new prompt. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePromptRequest' - required: true - /v1alpha/agents/{agent_id}: - get: - responses: - '200': - description: An Agent of the agent. - content: - application/json: - schema: - $ref: '#/components/schemas/Agent' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Describe an agent by its ID. - description: Describe an agent by its ID. - parameters: - - name: agent_id - in: path - description: ID of the agent. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Delete an agent by its ID and its associated sessions and turns. - description: >- - Delete an agent by its ID and its associated sessions and turns. - parameters: - - name: agent_id - in: path - description: The ID of the agent to delete. - required: true - schema: - type: string - /v1/agents/{agent_id}: - get: - responses: - '200': - description: An Agent of the agent. - content: - application/json: - schema: - $ref: '#/components/schemas/Agent' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Describe an agent by its ID. - description: Describe an agent by its ID. - parameters: - - name: agent_id - in: path - description: ID of the agent. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Delete an agent by its ID and its associated sessions and turns. - description: >- - Delete an agent by its ID and its associated sessions and turns. - parameters: - - name: agent_id - in: path - description: The ID of the agent to delete. - required: true - schema: - type: string - /v1alpha/agents/{agent_id}/session/{session_id}: - get: - responses: - '200': - description: A Session. - content: - application/json: - schema: - $ref: '#/components/schemas/Session' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent session by its ID. - description: Retrieve an agent session by its ID. - parameters: - - name: session_id - in: path - description: The ID of the session to get. - required: true - schema: - type: string - - name: agent_id - in: path - description: >- - The ID of the agent to get the session for. - required: true - schema: - type: string - - name: turn_ids - in: query - description: >- - (Optional) List of turn IDs to filter the session by. - required: false - schema: - type: array - items: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Delete an agent session by its ID and its associated turns. - description: >- - Delete an agent session by its ID and its associated turns. - parameters: - - name: session_id - in: path - description: The ID of the session to delete. - required: true - schema: - type: string - - name: agent_id - in: path - description: >- - The ID of the agent to delete the session for. - required: true - schema: - type: string - /v1/agents/{agent_id}/session/{session_id}: - get: - responses: - '200': - description: A Session. - content: - application/json: - schema: - $ref: '#/components/schemas/Session' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent session by its ID. - description: Retrieve an agent session by its ID. - parameters: - - name: session_id - in: path - description: The ID of the session to get. - required: true - schema: - type: string - - name: agent_id - in: path - description: >- - The ID of the agent to get the session for. - required: true - schema: - type: string - - name: turn_ids - in: query - description: >- - (Optional) List of turn IDs to filter the session by. - required: false - schema: - type: array - items: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Delete an agent session by its ID and its associated turns. - description: >- - Delete an agent session by its ID and its associated turns. - parameters: - - name: session_id - in: path - description: The ID of the session to delete. - required: true - schema: - type: string - - name: agent_id - in: path - description: >- - The ID of the agent to delete the session for. - required: true - schema: - type: string - /v1/responses/{response_id}: - get: - responses: - '200': - description: An OpenAIResponseObject. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIResponseObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an OpenAI response by its ID. - description: Retrieve an OpenAI response by its ID. - parameters: - - name: response_id - in: path - description: >- - The ID of the OpenAI response to retrieve. - required: true - schema: - type: string - delete: - responses: - '200': - description: An OpenAIDeleteResponseObject - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIDeleteResponseObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Delete an OpenAI response by its ID. - description: Delete an OpenAI response by its ID. - parameters: - - name: response_id - in: path - description: The ID of the OpenAI response to delete. - required: true - schema: - type: string - /v1/prompts/{prompt_id}: - get: - responses: - '200': - description: A Prompt resource. - content: - application/json: - schema: - $ref: '#/components/schemas/Prompt' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Prompts - summary: >- - Get a prompt by its identifier and optional version. - description: >- - Get a prompt by its identifier and optional version. - parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to get. - required: true - schema: - type: string - - name: version - in: query - description: >- - The version of the prompt to get (defaults to latest). - required: false - schema: - type: integer - post: - responses: - '200': - description: >- - The updated Prompt resource with incremented version. - content: - application/json: - schema: - $ref: '#/components/schemas/Prompt' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Prompts - summary: >- - Update an existing prompt (increments version). - description: >- - Update an existing prompt (increments version). - parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdatePromptRequest' - required: true - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Prompts - summary: Delete a prompt. - description: Delete a prompt. - parameters: - - name: prompt_id - in: path - description: The identifier of the prompt to delete. - required: true - schema: - type: string - /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: - post: - responses: - '200': - description: >- - EvaluateResponse object containing generations and scores. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Evaluate a list of rows on a benchmark. - description: Evaluate a list of rows on a benchmark. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateRowsRequest' - required: true - /v1/eval/benchmarks/{benchmark_id}/evaluations: - post: - responses: - '200': - description: >- - EvaluateResponse object containing generations and scores. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Evaluate a list of rows on a benchmark. - description: Evaluate a list of rows on a benchmark. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateRowsRequest' - required: true - /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: - get: - responses: - '200': - description: An AgentStepResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/AgentStepResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent step by its ID. - description: Retrieve an agent step by its ID. - parameters: - - name: agent_id - in: path - description: The ID of the agent to get the step for. - required: true - schema: - type: string - - name: session_id - in: path - description: >- - The ID of the session to get the step for. - required: true - schema: - type: string - - name: turn_id - in: path - description: The ID of the turn to get the step for. - required: true - schema: - type: string - - name: step_id - in: path - description: The ID of the step to get. - required: true - schema: - type: string - /v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: - get: - responses: - '200': - description: An AgentStepResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/AgentStepResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent step by its ID. - description: Retrieve an agent step by its ID. - parameters: - - name: agent_id - in: path - description: The ID of the agent to get the step for. - required: true - schema: - type: string - - name: session_id - in: path - description: >- - The ID of the session to get the step for. - required: true - schema: - type: string - - name: turn_id - in: path - description: The ID of the turn to get the step for. - required: true - schema: - type: string - - name: step_id - in: path - description: The ID of the step to get. - required: true - schema: - type: string - /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}: - get: - responses: - '200': - description: A Turn. - content: - application/json: - schema: - $ref: '#/components/schemas/Turn' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent turn by its ID. - description: Retrieve an agent turn by its ID. - parameters: - - name: agent_id - in: path - description: The ID of the agent to get the turn for. - required: true - schema: - type: string - - name: session_id - in: path - description: >- - The ID of the session to get the turn for. - required: true - schema: - type: string - - name: turn_id - in: path - description: The ID of the turn to get. - required: true - schema: - type: string - /v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}: - get: - responses: - '200': - description: A Turn. - content: - application/json: - schema: - $ref: '#/components/schemas/Turn' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent turn by its ID. - description: Retrieve an agent turn by its ID. - parameters: - - name: agent_id - in: path - description: The ID of the agent to get the turn for. - required: true - schema: - type: string - - name: session_id - in: path - description: >- - The ID of the session to get the turn for. - required: true - schema: - type: string - - name: turn_id - in: path - description: The ID of the turn to get. - required: true - schema: - type: string - /v1alpha/eval/benchmarks/{benchmark_id}: - get: - responses: - '200': - description: A Benchmark. - content: - application/json: - schema: - $ref: '#/components/schemas/Benchmark' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Unregister a benchmark. - description: Unregister a benchmark. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to unregister. - required: true - schema: - type: string - /v1/eval/benchmarks/{benchmark_id}: - get: - responses: - '200': - description: A Benchmark. - content: - application/json: - schema: - $ref: '#/components/schemas/Benchmark' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Get a benchmark by its ID. - description: Get a benchmark by its ID. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Unregister a benchmark. - description: Unregister a benchmark. - parameters: - - name: benchmark_id - in: path - description: The ID of the benchmark to unregister. - required: true - schema: - type: string - /v1/chat/completions/{completion_id}: - get: - responses: - '200': - description: A OpenAICompletionWithInputMessages. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletionWithInputMessages' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Inference - summary: Describe a chat completion by its ID. - description: Describe a chat completion by its ID. - parameters: - - name: completion_id - in: path - description: ID of the chat completion. - required: true - schema: - type: string - /v1beta/datasets/{dataset_id}: - get: - responses: - '200': - description: A Dataset. - content: - application/json: - schema: - $ref: '#/components/schemas/Dataset' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Get a dataset by its ID. - description: Get a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Unregister a dataset by its ID. - description: Unregister a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string - /v1/datasets/{dataset_id}: - get: - responses: - '200': - description: A Dataset. - content: - application/json: - schema: - $ref: '#/components/schemas/Dataset' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Get a dataset by its ID. - description: Get a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Unregister a dataset by its ID. - description: Unregister a dataset by its ID. - parameters: - - name: dataset_id - in: path - description: The ID of the dataset to unregister. - required: true - schema: - type: string - /v1/models/{model_id}: - get: - responses: - '200': - description: A Model. - content: - application/json: - schema: - $ref: '#/components/schemas/Model' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Models - summary: Get a model by its identifier. - description: Get a model by its identifier. - parameters: - - name: model_id - in: path - description: The identifier of the model to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Models - summary: Unregister a model. - description: Unregister a model. - parameters: - - name: model_id - in: path - description: >- - The identifier of the model to unregister. - required: true - schema: - type: string - /v1/scoring-functions/{scoring_fn_id}: - get: - responses: - '200': - description: A ScoringFn. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoringFn' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ScoringFunctions - summary: Get a scoring function by its ID. - description: Get a scoring function by its ID. - parameters: - - name: scoring_fn_id - in: path - description: The ID of the scoring function to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ScoringFunctions - summary: Unregister a scoring function. - description: Unregister a scoring function. - parameters: - - name: scoring_fn_id - in: path - description: >- - The ID of the scoring function to unregister. - required: true - schema: - type: string - /v1/shields/{identifier}: - get: - responses: - '200': - description: A Shield. - content: - application/json: - schema: - $ref: '#/components/schemas/Shield' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Shields - summary: Get a shield by its identifier. - description: Get a shield by its identifier. - parameters: - - name: identifier - in: path - description: The identifier of the shield to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Shields - summary: Unregister a shield. - description: Unregister a shield. - parameters: - - name: identifier - in: path - description: >- - The identifier of the shield to unregister. - required: true - schema: - type: string - /v1alpha/telemetry/traces/{trace_id}/spans/{span_id}: - get: - responses: - '200': - description: A Span. - content: - application/json: - schema: - $ref: '#/components/schemas/Span' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Get a span by its ID. - description: Get a span by its ID. - parameters: - - name: trace_id - in: path - description: >- - The ID of the trace to get the span from. - required: true - schema: - type: string - - name: span_id - in: path - description: The ID of the span to get. - required: true - schema: - type: string - /v1/telemetry/traces/{trace_id}/spans/{span_id}: - get: - responses: - '200': - description: A Span. - content: - application/json: - schema: - $ref: '#/components/schemas/Span' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Get a span by its ID. - description: Get a span by its ID. - parameters: - - name: trace_id - in: path - description: >- - The ID of the trace to get the span from. - required: true - schema: - type: string - - name: span_id - in: path - description: The ID of the span to get. - required: true - schema: - type: string - /v1alpha/telemetry/spans/{span_id}/tree: - post: - responses: - '200': - description: A QuerySpanTreeResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QuerySpanTreeResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Get a span tree by its ID. - description: Get a span tree by its ID. - parameters: - - name: span_id - in: path - description: The ID of the span to get the tree from. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetSpanTreeRequest' - required: true - /v1/telemetry/spans/{span_id}/tree: - post: - responses: - '200': - description: A QuerySpanTreeResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QuerySpanTreeResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Get a span tree by its ID. - description: Get a span tree by its ID. - parameters: - - name: span_id - in: path - description: The ID of the span to get the tree from. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetSpanTreeRequest' - required: true - /v1/tools/{tool_name}: - get: - responses: - '200': - description: A Tool. - content: - application/json: - schema: - $ref: '#/components/schemas/Tool' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ToolGroups - summary: Get a tool by its name. - description: Get a tool by its name. - parameters: - - name: tool_name - in: path - description: The name of the tool to get. - required: true - schema: - type: string - /v1/toolgroups/{toolgroup_id}: - get: - responses: - '200': - description: A ToolGroup. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolGroup' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ToolGroups - summary: Get a tool group by its ID. - description: Get a tool group by its ID. - parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ToolGroups - summary: Unregister a tool group. - description: Unregister a tool group. - parameters: - - name: toolgroup_id - in: path - description: The ID of the tool group to unregister. - required: true - schema: - type: string - /v1alpha/telemetry/traces/{trace_id}: - get: - responses: - '200': - description: A Trace. - content: - application/json: - schema: - $ref: '#/components/schemas/Trace' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Get a trace by its ID. - description: Get a trace by its ID. - parameters: - - name: trace_id - in: path - description: The ID of the trace to get. - required: true - schema: - type: string - /v1/telemetry/traces/{trace_id}: - get: - responses: - '200': - description: A Trace. - content: - application/json: - schema: - $ref: '#/components/schemas/Trace' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Get a trace by its ID. - description: Get a trace by its ID. - parameters: - - name: trace_id - in: path - description: The ID of the trace to get. - required: true - schema: - type: string - /v1alpha/post-training/job/artifacts: - get: - responses: - '200': - description: A PostTrainingJobArtifactsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get the artifacts of a training job. - description: Get the artifacts of a training job. - parameters: - - name: job_uuid - in: query - description: >- - The UUID of the job to get the artifacts of. - required: true - schema: - type: string - /v1/post-training/job/artifacts: - get: - responses: - '200': - description: A PostTrainingJobArtifactsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get the artifacts of a training job. - description: Get the artifacts of a training job. - parameters: - - name: job_uuid - in: query - description: >- - The UUID of the job to get the artifacts of. - required: true - schema: - type: string - /v1alpha/post-training/job/status: - get: - responses: - '200': - description: A PostTrainingJobStatusResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get the status of a training job. - description: Get the status of a training job. - parameters: - - name: job_uuid - in: query - description: >- - The UUID of the job to get the status of. - required: true - schema: - type: string - /v1/post-training/job/status: - get: - responses: - '200': - description: A PostTrainingJobStatusResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get the status of a training job. - description: Get the status of a training job. - parameters: - - name: job_uuid - in: query - description: >- - The UUID of the job to get the status of. - required: true - schema: - type: string - /v1alpha/post-training/jobs: - get: - responses: - '200': - description: A ListPostTrainingJobsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get all training jobs. - description: Get all training jobs. - parameters: [] - /v1/post-training/jobs: - get: - responses: - '200': - description: A ListPostTrainingJobsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListPostTrainingJobsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get all training jobs. - description: Get all training jobs. - parameters: [] - /v1/vector-dbs/{vector_db_id}: - get: - responses: - '200': - description: A VectorDB. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorDB' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorDBs - summary: Get a vector database by its identifier. - description: Get a vector database by its identifier. - parameters: - - name: vector_db_id - in: path - description: >- - The identifier of the vector database to get. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorDBs - summary: Unregister a vector database. - description: Unregister a vector database. - parameters: - - name: vector_db_id - in: path - description: >- - The identifier of the vector database to unregister. - required: true - schema: - type: string - /v1/health: - get: - responses: - '200': - description: >- - Health information indicating if the service is operational. - content: - application/json: - schema: - $ref: '#/components/schemas/HealthInfo' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Inspect - summary: >- - Get the current health status of the service. - description: >- - Get the current health status of the service. - parameters: [] - /v1/tool-runtime/rag-tool/insert: - post: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ToolRuntime - summary: >- - Index documents so they can be used by the RAG system. - description: >- - Index documents so they can be used by the RAG system. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InsertRequest' - required: true - /v1/vector-io/insert: - post: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Insert chunks into a vector database. - description: Insert chunks into a vector database. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InsertChunksRequest' - required: true - /v1/providers/{provider_id}: - get: - responses: - '200': - description: >- - A ProviderInfo object containing the provider's details. - content: - application/json: - schema: - $ref: '#/components/schemas/ProviderInfo' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Providers - summary: >- - Get detailed information about a specific provider. - description: >- - Get detailed information about a specific provider. - parameters: - - name: provider_id - in: path - description: The ID of the provider to inspect. - required: true - schema: - type: string - /v1/tool-runtime/invoke: - post: - responses: - '200': - description: A ToolInvocationResult. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolInvocationResult' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ToolRuntime - summary: Run a tool with the given arguments. - description: Run a tool with the given arguments. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeToolRequest' - required: true - /v1beta/datasetio/iterrows/{dataset_id}: - get: - responses: - '200': - description: A PaginatedResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - DatasetIO - summary: >- - Get a paginated list of rows from a dataset. - description: >- - Get a paginated list of rows from a dataset. - - Uses offset-based pagination where: - - - start_index: The starting index (0-based). If None, starts from beginning. - - - limit: Number of items to return. If None or -1, returns all items. - - - The response includes: - - - data: List of items for the current page. - - - has_more: Whether there are more items available after this set. - parameters: - - name: dataset_id - in: path - description: >- - The ID of the dataset to get the rows from. - required: true - schema: - type: string - - name: start_index - in: query - description: >- - Index into dataset for the first row to get. Get all rows if None. - required: false - schema: - type: integer - - name: limit - in: query - description: The number of rows to get. - required: false - schema: - type: integer + deprecated: false /v1/datasetio/iterrows/{dataset_id}: get: responses: @@ -2467,542 +260,7 @@ paths: required: false schema: type: integer - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: - get: - responses: - '200': - description: The status of the evaluation job. - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the status of a job. - description: Get the status of a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the status of. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Cancel a job. - description: Cancel a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to cancel. - required: true - schema: - type: string - /v1/eval/benchmarks/{benchmark_id}/jobs/{job_id}: - get: - responses: - '200': - description: The status of the evaluation job. - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the status of a job. - description: Get the status of a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the status of. - required: true - schema: - type: string - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Cancel a job. - description: Cancel a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to cancel. - required: true - schema: - type: string - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: - get: - responses: - '200': - description: The result of the job. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the result of a job. - description: Get the result of a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the result of. - required: true - schema: - type: string - /v1/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: - get: - responses: - '200': - description: The result of the job. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the result of a job. - description: Get the result of a job. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - - name: job_id - in: path - description: The ID of the job to get the result of. - required: true - schema: - type: string - /v1alpha/agents/{agent_id}/sessions: - get: - responses: - '200': - description: A PaginatedResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all session(s) of a given agent. - description: List all session(s) of a given agent. - parameters: - - name: agent_id - in: path - description: >- - The ID of the agent to list sessions for. - required: true - schema: - type: string - - name: start_index - in: query - description: The index to start the pagination from. - required: false - schema: - type: integer - - name: limit - in: query - description: The number of sessions to return. - required: false - schema: - type: integer - /v1/agents/{agent_id}/sessions: - get: - responses: - '200': - description: A PaginatedResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all session(s) of a given agent. - description: List all session(s) of a given agent. - parameters: - - name: agent_id - in: path - description: >- - The ID of the agent to list sessions for. - required: true - schema: - type: string - - name: start_index - in: query - description: The index to start the pagination from. - required: false - schema: - type: integer - - name: limit - in: query - description: The number of sessions to return. - required: false - schema: - type: integer - /v1alpha/eval/benchmarks: - get: - responses: - '200': - description: A ListBenchmarksResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: List all benchmarks. - description: List all benchmarks. - parameters: [] - post: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Register a benchmark. - description: Register a benchmark. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' - required: true - /v1/eval/benchmarks: - get: - responses: - '200': - description: A ListBenchmarksResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListBenchmarksResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: List all benchmarks. - description: List all benchmarks. - parameters: [] - post: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Register a benchmark. - description: Register a benchmark. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' - required: true - /v1/chat/completions: - get: - responses: - '200': - description: A ListOpenAIChatCompletionResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Inference - summary: List all chat completions. - description: List all chat completions. - parameters: - - name: after - in: query - description: >- - The ID of the last chat completion to return. - required: false - schema: - type: string - - name: limit - in: query - description: >- - The maximum number of chat completions to return. - required: false - schema: - type: integer - - name: model - in: query - description: The model to filter by. - required: false - schema: - type: string - - name: order - in: query - description: >- - The order to sort the chat completions by: "asc" or "desc". Defaults to - "desc". - required: false - schema: - $ref: '#/components/schemas/Order' - post: - responses: - '200': - description: An OpenAIChatCompletion. - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletion' - - $ref: '#/components/schemas/OpenAIChatCompletionChunk' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Inference - summary: >- - Generate an OpenAI-compatible chat completion for the given messages using - the specified model. - description: >- - Generate an OpenAI-compatible chat completion for the given messages using - the specified model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiChatCompletionRequest' - required: true - /v1beta/datasets: - get: - responses: - '200': - description: A ListDatasetsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListDatasetsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: List all datasets. - description: List all datasets. - parameters: [] - post: - responses: - '200': - description: A Dataset. - content: - application/json: - schema: - $ref: '#/components/schemas/Dataset' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Register a new dataset. - description: Register a new dataset. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterDatasetRequest' - required: true + deprecated: false /v1/datasets: get: responses: @@ -3027,6 +285,7 @@ paths: summary: List all datasets. description: List all datasets. parameters: [] + deprecated: false post: responses: '200': @@ -3056,6 +315,371 @@ paths: schema: $ref: '#/components/schemas/RegisterDatasetRequest' required: true + deprecated: false + /v1/datasets/{dataset_id}: + get: + responses: + '200': + description: A Dataset. + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Get a dataset by its ID. + description: Get a dataset by its ID. + parameters: + - name: dataset_id + in: path + description: The ID of the dataset to get. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Datasets + summary: Unregister a dataset by its ID. + description: Unregister a dataset by its ID. + parameters: + - name: dataset_id + in: path + description: The ID of the dataset to unregister. + required: true + schema: + type: string + deprecated: false + /v1/embeddings: + post: + responses: + '200': + description: >- + An OpenAIEmbeddingsResponse containing the embeddings. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Inference + summary: >- + Generate OpenAI-compatible embeddings for the given input using the specified + model. + description: >- + Generate OpenAI-compatible embeddings for the given input using the specified + model. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenaiEmbeddingsRequest' + required: true + deprecated: false + /v1/files: + get: + responses: + '200': + description: >- + An ListOpenAIFileResponse containing the list of files. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIFileResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: >- + Returns a list of files that belong to the user's organization. + description: >- + Returns a list of files that belong to the user's organization. + parameters: + - name: after + in: query + description: >- + A cursor for use in pagination. `after` is an object ID that defines your + place in the list. For instance, if you make a list request and receive + 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo + in order to fetch the next page of the list. + required: false + schema: + type: string + - name: limit + in: query + description: >- + A limit on the number of objects to be returned. Limit can range between + 1 and 10,000, and the default is 10,000. + required: false + schema: + type: integer + - name: order + in: query + description: >- + Sort order by the `created_at` timestamp of the objects. `asc` for ascending + order and `desc` for descending order. + required: false + schema: + $ref: '#/components/schemas/Order' + - name: purpose + in: query + description: >- + Only return files with the given purpose. + required: false + schema: + $ref: '#/components/schemas/OpenAIFilePurpose' + deprecated: false + post: + responses: + '200': + description: >- + An OpenAIFileObject representing the uploaded file. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: >- + Upload a file that can be used across various endpoints. + description: >- + Upload a file that can be used across various endpoints. + + The file upload should be a multipart form request with: + + - file: The File object (not file name) to be uploaded. + + - purpose: The intended purpose of the uploaded file. + + - expires_after: Optional form values describing expiration for the file. + parameters: [] + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + expires_after: + $ref: '#/components/schemas/ExpiresAfter' + required: + - file + - purpose + required: true + deprecated: false + /v1/files/{file_id}: + get: + responses: + '200': + description: >- + An OpenAIFileObject containing file information. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: >- + Returns information about a specific file. + description: >- + Returns information about a specific file. + parameters: + - name: file_id + in: path + description: >- + The ID of the file to use for this request. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: >- + An OpenAIFileDeleteResponse indicating successful deletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: Delete a file. + description: Delete a file. + parameters: + - name: file_id + in: path + description: >- + The ID of the file to use for this request. + required: true + schema: + type: string + deprecated: false + /v1/files/{file_id}/content: + get: + responses: + '200': + description: >- + The raw file content as a binary response. + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Files + summary: >- + Returns the contents of the specified file. + description: >- + Returns the contents of the specified file. + parameters: + - name: file_id + in: path + description: >- + The ID of the file to use for this request. + required: true + schema: + type: string + deprecated: false + /v1/health: + get: + responses: + '200': + description: >- + Health information indicating if the service is operational. + content: + application/json: + schema: + $ref: '#/components/schemas/HealthInfo' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Inspect + summary: >- + Get the current health status of the service. + description: >- + Get the current health status of the service. + parameters: [] + deprecated: false + /v1/inspect/routes: + get: + responses: + '200': + description: >- + Response containing information about all available routes. + content: + application/json: + schema: + $ref: '#/components/schemas/ListRoutesResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Inspect + summary: >- + List all available API routes with their methods and implementing providers. + description: >- + List all available API routes with their methods and implementing providers. + parameters: [] + deprecated: false /v1/models: get: responses: @@ -3080,6 +704,7 @@ paths: summary: List all models. description: List all models. parameters: [] + deprecated: false post: responses: '200': @@ -3109,6 +734,537 @@ paths: schema: $ref: '#/components/schemas/RegisterModelRequest' required: true + deprecated: false + /v1/models/{model_id}: + get: + responses: + '200': + description: A Model. + content: + application/json: + schema: + $ref: '#/components/schemas/Model' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Get a model by its identifier. + description: Get a model by its identifier. + parameters: + - name: model_id + in: path + description: The identifier of the model to get. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Models + summary: Unregister a model. + description: Unregister a model. + parameters: + - name: model_id + in: path + description: >- + The identifier of the model to unregister. + required: true + schema: + type: string + deprecated: false + /v1/moderations: + post: + responses: + '200': + description: A moderation object. + content: + application/json: + schema: + $ref: '#/components/schemas/ModerationObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Safety + summary: >- + Classifies if text and/or image inputs are potentially harmful. + description: >- + Classifies if text and/or image inputs are potentially harmful. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunModerationRequest' + required: true + deprecated: false + /v1/prompts: + get: + responses: + '200': + description: >- + A ListPromptsResponse containing all prompts. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPromptsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: List all prompts. + description: List all prompts. + parameters: [] + deprecated: false + post: + responses: + '200': + description: The created Prompt resource. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: Create a new prompt. + description: Create a new prompt. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePromptRequest' + required: true + deprecated: false + /v1/prompts/{prompt_id}: + get: + responses: + '200': + description: A Prompt resource. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: >- + Get a prompt by its identifier and optional version. + description: >- + Get a prompt by its identifier and optional version. + parameters: + - name: prompt_id + in: path + description: The identifier of the prompt to get. + required: true + schema: + type: string + - name: version + in: query + description: >- + The version of the prompt to get (defaults to latest). + required: false + schema: + type: integer + deprecated: false + post: + responses: + '200': + description: >- + The updated Prompt resource with incremented version. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: >- + Update an existing prompt (increments version). + description: >- + Update an existing prompt (increments version). + parameters: + - name: prompt_id + in: path + description: The identifier of the prompt to update. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePromptRequest' + required: true + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: Delete a prompt. + description: Delete a prompt. + parameters: + - name: prompt_id + in: path + description: The identifier of the prompt to delete. + required: true + schema: + type: string + deprecated: false + /v1/prompts/{prompt_id}/set-default-version: + post: + responses: + '200': + description: >- + The prompt with the specified version now set as default. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: >- + Set which version of a prompt should be the default in get_prompt (latest). + description: >- + Set which version of a prompt should be the default in get_prompt (latest). + parameters: + - name: prompt_id + in: path + description: The identifier of the prompt. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SetDefaultVersionRequest' + required: true + deprecated: false + /v1/prompts/{prompt_id}/versions: + get: + responses: + '200': + description: >- + A ListPromptsResponse containing all versions of the prompt. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPromptsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Prompts + summary: List all versions of a specific prompt. + description: List all versions of a specific prompt. + parameters: + - name: prompt_id + in: path + description: >- + The identifier of the prompt to list versions for. + required: true + schema: + type: string + deprecated: false + /v1/providers: + get: + responses: + '200': + description: >- + A ListProvidersResponse containing information about all providers. + content: + application/json: + schema: + $ref: '#/components/schemas/ListProvidersResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Providers + summary: List all available providers. + description: List all available providers. + parameters: [] + deprecated: false + /v1/providers/{provider_id}: + get: + responses: + '200': + description: >- + A ProviderInfo object containing the provider's details. + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderInfo' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Providers + summary: >- + Get detailed information about a specific provider. + description: >- + Get detailed information about a specific provider. + parameters: + - name: provider_id + in: path + description: The ID of the provider to inspect. + required: true + schema: + type: string + deprecated: false + /v1/responses: + get: + responses: + '200': + description: A ListOpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: List all OpenAI responses. + description: List all OpenAI responses. + parameters: + - name: after + in: query + description: The ID of the last response to return. + required: false + schema: + type: string + - name: limit + in: query + description: The number of responses to return. + required: false + schema: + type: integer + - name: model + in: query + description: The model to filter responses by. + required: false + schema: + type: string + - name: order + in: query + description: >- + The order to sort responses by when sorted by created_at ('asc' or 'desc'). + required: false + schema: + $ref: '#/components/schemas/Order' + deprecated: false + post: + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Create a new OpenAI response. + description: Create a new OpenAI response. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOpenaiResponseRequest' + required: true + deprecated: false + /v1/responses/{response_id}: + get: + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Retrieve an OpenAI response by its ID. + description: Retrieve an OpenAI response by its ID. + parameters: + - name: response_id + in: path + description: >- + The ID of the OpenAI response to retrieve. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: An OpenAIDeleteResponseObject + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIDeleteResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Agents + summary: Delete an OpenAI response by its ID. + description: Delete an OpenAI response by its ID. + parameters: + - name: response_id + in: path + description: The ID of the OpenAI response to delete. + required: true + schema: + type: string + deprecated: false /v1/responses/{response_id}/input_items: get: responses: @@ -3180,16 +1336,16 @@ paths: required: false schema: $ref: '#/components/schemas/Order' - /v1/prompts/{prompt_id}/versions: - get: + deprecated: false + /v1/safety/run-shield: + post: responses: '200': - description: >- - A ListPromptsResponse containing all versions of the prompt. + description: A RunShieldResponse. content: application/json: schema: - $ref: '#/components/schemas/ListPromptsResponse' + $ref: '#/components/schemas/RunShieldResponse' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -3201,27 +1357,103 @@ paths: default: $ref: '#/components/responses/DefaultError' tags: - - Prompts - summary: List all versions of a specific prompt. - description: List all versions of a specific prompt. + - Safety + summary: Run a shield. + description: Run a shield. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunShieldRequest' + required: true + deprecated: false + /v1/scoring-functions: + get: + responses: + '200': + description: A ListScoringFunctionsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListScoringFunctionsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ScoringFunctions + summary: List all scoring functions. + description: List all scoring functions. + parameters: [] + deprecated: false + post: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ScoringFunctions + summary: Register a scoring function. + description: Register a scoring function. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterScoringFunctionRequest' + required: true + deprecated: false + /v1/scoring-functions/{scoring_fn_id}: + get: + responses: + '200': + description: A ScoringFn. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringFn' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ScoringFunctions + summary: Get a scoring function by its ID. + description: Get a scoring function by its ID. parameters: - - name: prompt_id + - name: scoring_fn_id in: path - description: >- - The identifier of the prompt to list versions for. + description: The ID of the scoring function to get. required: true schema: type: string - /v1/providers: - get: + deprecated: false + delete: responses: '200': - description: >- - A ListProvidersResponse containing information about all providers. - content: - application/json: - schema: - $ref: '#/components/schemas/ListProvidersResponse' + description: OK '400': $ref: '#/components/responses/BadRequest400' '429': @@ -3233,20 +1465,59 @@ paths: default: $ref: '#/components/responses/DefaultError' tags: - - Providers - summary: List all available providers. - description: List all available providers. + - ScoringFunctions + summary: Unregister a scoring function. + description: Unregister a scoring function. + parameters: + - name: scoring_fn_id + in: path + description: >- + The ID of the scoring function to unregister. + required: true + schema: + type: string + deprecated: false + /v1/scoring/score: + post: + responses: + '200': + description: >- + A ScoreResponse object containing rows and aggregated results. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Scoring + summary: Score a list of rows. + description: Score a list of rows. parameters: [] - /v1/inspect/routes: - get: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreRequest' + required: true + deprecated: false + /v1/scoring/score-batch: + post: responses: '200': - description: >- - Response containing information about all available routes. + description: A ScoreBatchResponse. content: application/json: schema: - $ref: '#/components/schemas/ListRoutesResponse' + $ref: '#/components/schemas/ScoreBatchResponse' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -3258,12 +1529,454 @@ paths: default: $ref: '#/components/responses/DefaultError' tags: - - Inspect + - Scoring + summary: Score a batch of rows. + description: Score a batch of rows. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreBatchRequest' + required: true + deprecated: false + /v1/shields: + get: + responses: + '200': + description: A ListShieldsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListShieldsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: List all shields. + description: List all shields. + parameters: [] + deprecated: false + post: + responses: + '200': + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Register a shield. + description: Register a shield. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterShieldRequest' + required: true + deprecated: false + /v1/shields/{identifier}: + get: + responses: + '200': + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Get a shield by its identifier. + description: Get a shield by its identifier. + parameters: + - name: identifier + in: path + description: The identifier of the shield to get. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Shields + summary: Unregister a shield. + description: Unregister a shield. + parameters: + - name: identifier + in: path + description: >- + The identifier of the shield to unregister. + required: true + schema: + type: string + deprecated: false + /v1/synthetic-data-generation/generate: + post: + responses: + '200': + description: >- + Response containing filtered synthetic data samples and optional statistics + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDataGenerationResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - SyntheticDataGeneration (Coming Soon) summary: >- - List all available API routes with their methods and implementing providers. + Generate synthetic data based on input dialogs and apply filtering. description: >- - List all available API routes with their methods and implementing providers. + Generate synthetic data based on input dialogs and apply filtering. parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticDataGenerateRequest' + required: true + deprecated: false + /v1/telemetry/events: + post: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Telemetry + summary: Log an event. + description: Log an event. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogEventRequest' + required: true + deprecated: false + /v1/telemetry/metrics/{metric_name}: + post: + responses: + '200': + description: A QueryMetricsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryMetricsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Telemetry + summary: Query metrics. + description: Query metrics. + parameters: + - name: metric_name + in: path + description: The name of the metric to query. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryMetricsRequest' + required: true + deprecated: false + /v1/telemetry/spans: + post: + responses: + '200': + description: A QuerySpansResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/QuerySpansResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Telemetry + summary: Query spans. + description: Query spans. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QuerySpansRequest' + required: true + deprecated: false + /v1/telemetry/spans/export: + post: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Telemetry + summary: Save spans to a dataset. + description: Save spans to a dataset. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SaveSpansToDatasetRequest' + required: true + deprecated: false + /v1/telemetry/spans/{span_id}/tree: + post: + responses: + '200': + description: A QuerySpanTreeResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/QuerySpanTreeResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Telemetry + summary: Get a span tree by its ID. + description: Get a span tree by its ID. + parameters: + - name: span_id + in: path + description: The ID of the span to get the tree from. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetSpanTreeRequest' + required: true + deprecated: false + /v1/telemetry/traces: + post: + responses: + '200': + description: A QueryTracesResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryTracesResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Telemetry + summary: Query traces. + description: Query traces. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryTracesRequest' + required: true + deprecated: false + /v1/telemetry/traces/{trace_id}: + get: + responses: + '200': + description: A Trace. + content: + application/json: + schema: + $ref: '#/components/schemas/Trace' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Telemetry + summary: Get a trace by its ID. + description: Get a trace by its ID. + parameters: + - name: trace_id + in: path + description: The ID of the trace to get. + required: true + schema: + type: string + deprecated: false + /v1/telemetry/traces/{trace_id}/spans/{span_id}: + get: + responses: + '200': + description: A Span. + content: + application/json: + schema: + $ref: '#/components/schemas/Span' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - Telemetry + summary: Get a span by its ID. + description: Get a span by its ID. + parameters: + - name: trace_id + in: path + description: >- + The ID of the trace to get the span from. + required: true + schema: + type: string + - name: span_id + in: path + description: The ID of the span to get. + required: true + schema: + type: string + deprecated: false + /v1/tool-runtime/invoke: + post: + responses: + '200': + description: A ToolInvocationResult. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolInvocationResult' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ToolRuntime + summary: Run a tool with the given arguments. + description: Run a tool with the given arguments. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InvokeToolRequest' + required: true + deprecated: false /v1/tool-runtime/list-tools: get: responses: @@ -3302,30 +2015,8 @@ paths: required: false schema: $ref: '#/components/schemas/URL' - /v1/scoring-functions: - get: - responses: - '200': - description: A ListScoringFunctionsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListScoringFunctionsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ScoringFunctions - summary: List all scoring functions. - description: List all scoring functions. - parameters: [] + deprecated: false + /v1/tool-runtime/rag-tool/insert: post: responses: '200': @@ -3341,48 +2032,29 @@ paths: default: $ref: '#/components/responses/DefaultError' tags: - - ScoringFunctions - summary: Register a scoring function. - description: Register a scoring function. + - ToolRuntime + summary: >- + Index documents so they can be used by the RAG system. + description: >- + Index documents so they can be used by the RAG system. parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterScoringFunctionRequest' + $ref: '#/components/schemas/InsertRequest' required: true - /v1/shields: - get: - responses: - '200': - description: A ListShieldsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ListShieldsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Shields - summary: List all shields. - description: List all shields. - parameters: [] + deprecated: false + /v1/tool-runtime/rag-tool/query: post: responses: '200': - description: A Shield. + description: >- + RAGQueryResult containing the retrieved content and metadata content: application/json: schema: - $ref: '#/components/schemas/Shield' + $ref: '#/components/schemas/RAGQueryResult' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -3394,16 +2066,19 @@ paths: default: $ref: '#/components/responses/DefaultError' tags: - - Shields - summary: Register a shield. - description: Register a shield. + - ToolRuntime + summary: >- + Query the RAG system for context; typically invoked by the agent. + description: >- + Query the RAG system for context; typically invoked by the agent. parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterShieldRequest' + $ref: '#/components/schemas/QueryRequest' required: true + deprecated: false /v1/toolgroups: get: responses: @@ -3428,6 +2103,7 @@ paths: summary: List tool groups with optional provider. description: List tool groups with optional provider. parameters: [] + deprecated: false post: responses: '200': @@ -3453,6 +2129,64 @@ paths: schema: $ref: '#/components/schemas/RegisterToolGroupRequest' required: true + deprecated: false + /v1/toolgroups/{toolgroup_id}: + get: + responses: + '200': + description: A ToolGroup. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolGroup' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ToolGroups + summary: Get a tool group by its ID. + description: Get a tool group by its ID. + parameters: + - name: toolgroup_id + in: path + description: The ID of the tool group to get. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ToolGroups + summary: Unregister a tool group. + description: Unregister a tool group. + parameters: + - name: toolgroup_id + in: path + description: The ID of the tool group to unregister. + required: true + schema: + type: string + deprecated: false /v1/tools: get: responses: @@ -3484,6 +2218,38 @@ paths: required: false schema: type: string + deprecated: false + /v1/tools/{tool_name}: + get: + responses: + '200': + description: A Tool. + content: + application/json: + schema: + $ref: '#/components/schemas/Tool' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - ToolGroups + summary: Get a tool by its name. + description: Get a tool by its name. + parameters: + - name: tool_name + in: path + description: The name of the tool to get. + required: true + schema: + type: string + deprecated: false /v1/vector-dbs: get: responses: @@ -3508,6 +2274,7 @@ paths: summary: List all vector databases. description: List all vector databases. parameters: [] + deprecated: false post: responses: '200': @@ -3537,7 +2304,67 @@ paths: schema: $ref: '#/components/schemas/RegisterVectorDbRequest' required: true - /v1/telemetry/events: + deprecated: false + /v1/vector-dbs/{vector_db_id}: + get: + responses: + '200': + description: A VectorDB. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorDB' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorDBs + summary: Get a vector database by its identifier. + description: Get a vector database by its identifier. + parameters: + - name: vector_db_id + in: path + description: >- + The identifier of the vector database to get. + required: true + schema: + type: string + deprecated: false + delete: + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorDBs + summary: Unregister a vector database. + description: Unregister a vector database. + parameters: + - name: vector_db_id + in: path + description: >- + The identifier of the vector database to unregister. + required: true + schema: + type: string + deprecated: false + /v1/vector-io/insert: post: responses: '200': @@ -3553,26 +2380,26 @@ paths: default: $ref: '#/components/responses/DefaultError' tags: - - Telemetry - summary: Log an event. - description: Log an event. + - VectorIO + summary: Insert chunks into a vector database. + description: Insert chunks into a vector database. parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/LogEventRequest' + $ref: '#/components/schemas/InsertChunksRequest' required: true - /v1/vector_stores/{vector_store_id}/files: - get: + deprecated: false + /v1/vector-io/query: + post: responses: '200': - description: >- - A VectorStoreListFilesResponse containing the list of files. + description: A QueryChunksResponse. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreListFilesResponse' + $ref: '#/components/schemas/QueryChunksResponse' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -3585,165 +2412,16 @@ paths: $ref: '#/components/responses/DefaultError' tags: - VectorIO - summary: List files in a vector store. - description: List files in a vector store. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to list files from. - required: true - schema: - type: string - - name: limit - in: query - description: >- - (Optional) A limit on the number of objects to be returned. Limit can - range between 1 and 100, and the default is 20. - required: false - schema: - type: integer - - name: order - in: query - description: >- - (Optional) Sort order by the `created_at` timestamp of the objects. `asc` - for ascending order and `desc` for descending order. - required: false - schema: - type: string - - name: after - in: query - description: >- - (Optional) A cursor for use in pagination. `after` is an object ID that - defines your place in the list. - required: false - schema: - type: string - - name: before - in: query - description: >- - (Optional) A cursor for use in pagination. `before` is an object ID that - defines your place in the list. - required: false - schema: - type: string - - name: filter - in: query - description: >- - (Optional) Filter by file status to only return files with the specified - status. - required: false - schema: - $ref: '#/components/schemas/VectorStoreFileStatus' - post: - responses: - '200': - description: >- - A VectorStoreFileObject representing the attached file. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Attach a file to a vector store. - description: Attach a file to a vector store. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store to attach the file to. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' - required: true - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: - post: - responses: - '200': - description: >- - A VectorStoreFileBatchObject representing the cancelled file batch. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Cancels a vector store file batch. - description: Cancels a vector store file batch. - parameters: - - name: batch_id - in: path - description: The ID of the file batch to cancel. - required: true - schema: - type: string - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file batch. - required: true - schema: - type: string - /v1/completions: - post: - responses: - '200': - description: An OpenAICompletion. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAICompletion' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Inference - summary: >- - Generate an OpenAI-compatible completion for the given prompt using the specified - model. - description: >- - Generate an OpenAI-compatible completion for the given prompt using the specified - model. + summary: Query chunks from a vector database. + description: Query chunks from a vector database. parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenaiCompletionRequest' + $ref: '#/components/schemas/QueryChunksRequest' required: true + deprecated: false /v1/vector_stores: get: responses: @@ -3801,6 +2479,7 @@ paths: required: false schema: type: string + deprecated: false post: responses: '200': @@ -3831,6 +2510,107 @@ paths: schema: $ref: '#/components/schemas/OpenaiCreateVectorStoreRequest' required: true + deprecated: false + /v1/vector_stores/{vector_store_id}: + get: + responses: + '200': + description: >- + A VectorStoreObject representing the vector store. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: Retrieves a vector store. + description: Retrieves a vector store. + parameters: + - name: vector_store_id + in: path + description: The ID of the vector store to retrieve. + required: true + schema: + type: string + deprecated: false + post: + responses: + '200': + description: >- + A VectorStoreObject representing the updated vector store. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: Updates a vector store. + description: Updates a vector store. + parameters: + - name: vector_store_id + in: path + description: The ID of the vector store to update. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' + required: true + deprecated: false + delete: + responses: + '200': + description: >- + A VectorStoreDeleteResponse indicating the deletion status. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: Delete a vector store. + description: Delete a vector store. + parameters: + - name: vector_store_id + in: path + description: The ID of the vector store to delete. + required: true + schema: + type: string + deprecated: false /v1/vector_stores/{vector_store_id}/file_batches: post: responses: @@ -3869,81 +2649,17 @@ paths: schema: $ref: '#/components/schemas/OpenaiCreateVectorStoreFileBatchRequest' required: true - /v1/files/{file_id}: + deprecated: false + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: responses: '200': description: >- - An OpenAIFileObject containing file information. + A VectorStoreFileBatchObject representing the file batch. content: application/json: schema: - $ref: '#/components/schemas/OpenAIFileObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Files - summary: >- - Returns information about a specific file. - description: >- - Returns information about a specific file. - parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - delete: - responses: - '200': - description: >- - An OpenAIFileDeleteResponse indicating successful deletion. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileDeleteResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Files - summary: Delete a file. - description: Delete a file. - parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - /v1/vector_stores/{vector_store_id}: - get: - responses: - '200': - description: >- - A VectorStoreObject representing the vector store. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -3956,24 +2672,33 @@ paths: $ref: '#/components/responses/DefaultError' tags: - VectorIO - summary: Retrieves a vector store. - description: Retrieves a vector store. + summary: Retrieve a vector store file batch. + description: Retrieve a vector store file batch. parameters: - - name: vector_store_id + - name: batch_id in: path - description: The ID of the vector store to retrieve. + description: The ID of the file batch to retrieve. required: true schema: type: string + - name: vector_store_id + in: path + description: >- + The ID of the vector store containing the file batch. + required: true + schema: + type: string + deprecated: false + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: responses: '200': description: >- - A VectorStoreObject representing the updated vector store. + A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -3986,315 +2711,23 @@ paths: $ref: '#/components/responses/DefaultError' tags: - VectorIO - summary: Updates a vector store. - description: Updates a vector store. + summary: Cancels a vector store file batch. + description: Cancels a vector store file batch. parameters: - - name: vector_store_id + - name: batch_id in: path - description: The ID of the vector store to update. + description: The ID of the file batch to cancel. required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' - required: true - delete: - responses: - '200': - description: >- - A VectorStoreDeleteResponse indicating the deletion status. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreDeleteResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Delete a vector store. - description: Delete a vector store. - parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to delete. - required: true - schema: - type: string - /v1/vector_stores/{vector_store_id}/files/{file_id}: - get: - responses: - '200': - description: >- - A VectorStoreFileObject representing the file. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Retrieves a vector store file. - description: Retrieves a vector store file. - parameters: - name: vector_store_id in: path description: >- - The ID of the vector store containing the file to retrieve. + The ID of the vector store containing the file batch. required: true schema: type: string - - name: file_id - in: path - description: The ID of the file to retrieve. - required: true - schema: - type: string - post: - responses: - '200': - description: >- - A VectorStoreFileObject representing the updated file. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Updates a vector store file. - description: Updates a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to update. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' - required: true - delete: - responses: - '200': - description: >- - A VectorStoreFileDeleteResponse indicating the deletion status. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileDeleteResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Delete a vector store file. - description: Delete a vector store file. - parameters: - - name: vector_store_id - in: path - description: >- - The ID of the vector store containing the file to delete. - required: true - schema: - type: string - - name: file_id - in: path - description: The ID of the file to delete. - required: true - schema: - type: string - /v1/embeddings: - post: - responses: - '200': - description: >- - An OpenAIEmbeddingsResponse containing the embeddings. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIEmbeddingsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Inference - summary: >- - Generate OpenAI-compatible embeddings for the given input using the specified - model. - description: >- - Generate OpenAI-compatible embeddings for the given input using the specified - model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenaiEmbeddingsRequest' - required: true - /v1/files: - get: - responses: - '200': - description: >- - An ListOpenAIFileResponse containing the list of files. - content: - application/json: - schema: - $ref: '#/components/schemas/ListOpenAIFileResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Files - summary: >- - Returns a list of files that belong to the user's organization. - description: >- - Returns a list of files that belong to the user's organization. - parameters: - - name: after - in: query - description: >- - A cursor for use in pagination. `after` is an object ID that defines your - place in the list. For instance, if you make a list request and receive - 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo - in order to fetch the next page of the list. - required: false - schema: - type: string - - name: limit - in: query - description: >- - A limit on the number of objects to be returned. Limit can range between - 1 and 10,000, and the default is 10,000. - required: false - schema: - type: integer - - name: order - in: query - description: >- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending - order and `desc` for descending order. - required: false - schema: - $ref: '#/components/schemas/Order' - - name: purpose - in: query - description: >- - Only return files with the given purpose. - required: false - schema: - $ref: '#/components/schemas/OpenAIFilePurpose' - post: - responses: - '200': - description: >- - An OpenAIFileObject representing the uploaded file. - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAIFileObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Files - summary: >- - Upload a file that can be used across various endpoints. - description: >- - Upload a file that can be used across various endpoints. - - The file upload should be a multipart form request with: - - - file: The File object (not file name) to be uploaded. - - - purpose: The intended purpose of the uploaded file. - - - expires_after: Optional form values describing expiration for the file. - parameters: [] - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - purpose: - $ref: '#/components/schemas/OpenAIFilePurpose' - expires_after: - $ref: '#/components/schemas/ExpiresAfter' - required: - - file - - purpose - required: true + deprecated: false /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: get: responses: @@ -4376,50 +2809,17 @@ paths: required: false schema: type: string - /v1/files/{file_id}/content: + deprecated: false + /v1/vector_stores/{vector_store_id}/files: get: responses: '200': description: >- - The raw file content as a binary response. + A VectorStoreListFilesResponse containing the list of files. content: application/json: schema: - $ref: '#/components/schemas/Response' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Files - summary: >- - Returns the contents of the specified file. - description: >- - Returns the contents of the specified file. - parameters: - - name: file_id - in: path - description: >- - The ID of the file to use for this request. - required: true - schema: - type: string - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: - get: - responses: - '200': - description: >- - A VectorStoreFileBatchObject representing the file batch. - content: - application/json: - schema: - $ref: '#/components/schemas/VectorStoreFileBatchObject' + $ref: '#/components/schemas/VectorStoreListFilesResponse' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -4432,22 +2832,216 @@ paths: $ref: '#/components/responses/DefaultError' tags: - VectorIO - summary: Retrieve a vector store file batch. - description: Retrieve a vector store file batch. + summary: List files in a vector store. + description: List files in a vector store. parameters: - - name: batch_id - in: path - description: The ID of the file batch to retrieve. - required: true - schema: - type: string - name: vector_store_id in: path description: >- - The ID of the vector store containing the file batch. + The ID of the vector store to list files from. required: true schema: type: string + - name: limit + in: query + description: >- + (Optional) A limit on the number of objects to be returned. Limit can + range between 1 and 100, and the default is 20. + required: false + schema: + type: integer + - name: order + in: query + description: >- + (Optional) Sort order by the `created_at` timestamp of the objects. `asc` + for ascending order and `desc` for descending order. + required: false + schema: + type: string + - name: after + in: query + description: >- + (Optional) A cursor for use in pagination. `after` is an object ID that + defines your place in the list. + required: false + schema: + type: string + - name: before + in: query + description: >- + (Optional) A cursor for use in pagination. `before` is an object ID that + defines your place in the list. + required: false + schema: + type: string + - name: filter + in: query + description: >- + (Optional) Filter by file status to only return files with the specified + status. + required: false + schema: + $ref: '#/components/schemas/VectorStoreFileStatus' + deprecated: false + post: + responses: + '200': + description: >- + A VectorStoreFileObject representing the attached file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: Attach a file to a vector store. + description: Attach a file to a vector store. + parameters: + - name: vector_store_id + in: path + description: >- + The ID of the vector store to attach the file to. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' + required: true + deprecated: false + /v1/vector_stores/{vector_store_id}/files/{file_id}: + get: + responses: + '200': + description: >- + A VectorStoreFileObject representing the file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: Retrieves a vector store file. + description: Retrieves a vector store file. + parameters: + - name: vector_store_id + in: path + description: >- + The ID of the vector store containing the file to retrieve. + required: true + schema: + type: string + - name: file_id + in: path + description: The ID of the file to retrieve. + required: true + schema: + type: string + deprecated: false + post: + responses: + '200': + description: >- + A VectorStoreFileObject representing the updated file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: Updates a vector store file. + description: Updates a vector store file. + parameters: + - name: vector_store_id + in: path + description: >- + The ID of the vector store containing the file to update. + required: true + schema: + type: string + - name: file_id + in: path + description: The ID of the file to update. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' + required: true + deprecated: false + delete: + responses: + '200': + description: >- + A VectorStoreFileDeleteResponse indicating the deletion status. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + '429': + $ref: >- + #/components/responses/TooManyRequests429 + '500': + $ref: >- + #/components/responses/InternalServerError500 + default: + $ref: '#/components/responses/DefaultError' + tags: + - VectorIO + summary: Delete a vector store file. + description: Delete a vector store file. + parameters: + - name: vector_store_id + in: path + description: >- + The ID of the vector store containing the file to delete. + required: true + schema: + type: string + - name: file_id + in: path + description: The ID of the file to delete. + required: true + schema: + type: string + deprecated: false /v1/vector_stores/{vector_store_id}/files/{file_id}/content: get: responses: @@ -4488,6 +3082,7 @@ paths: required: true schema: type: string + deprecated: false /v1/vector_stores/{vector_store_id}/search: post: responses: @@ -4529,855 +3124,7 @@ paths: schema: $ref: '#/components/schemas/OpenaiSearchVectorStoreRequest' required: true - /v1alpha/post-training/preference-optimize: - post: - responses: - '200': - description: A PostTrainingJob. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Run preference optimization of a model. - description: Run preference optimization of a model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PreferenceOptimizeRequest' - required: true - /v1/post-training/preference-optimize: - post: - responses: - '200': - description: A PostTrainingJob. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Run preference optimization of a model. - description: Run preference optimization of a model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PreferenceOptimizeRequest' - required: true - /v1/tool-runtime/rag-tool/query: - post: - responses: - '200': - description: >- - RAGQueryResult containing the retrieved content and metadata - content: - application/json: - schema: - $ref: '#/components/schemas/RAGQueryResult' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - ToolRuntime - summary: >- - Query the RAG system for context; typically invoked by the agent. - description: >- - Query the RAG system for context; typically invoked by the agent. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryRequest' - required: true - /v1/vector-io/query: - post: - responses: - '200': - description: A QueryChunksResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QueryChunksResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - VectorIO - summary: Query chunks from a vector database. - description: Query chunks from a vector database. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryChunksRequest' - required: true - /v1alpha/telemetry/metrics/{metric_name}: - post: - responses: - '200': - description: A QueryMetricsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QueryMetricsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Query metrics. - description: Query metrics. - parameters: - - name: metric_name - in: path - description: The name of the metric to query. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryMetricsRequest' - required: true - /v1/telemetry/metrics/{metric_name}: - post: - responses: - '200': - description: A QueryMetricsResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QueryMetricsResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Query metrics. - description: Query metrics. - parameters: - - name: metric_name - in: path - description: The name of the metric to query. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryMetricsRequest' - required: true - /v1alpha/telemetry/spans: - post: - responses: - '200': - description: A QuerySpansResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QuerySpansResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Query spans. - description: Query spans. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QuerySpansRequest' - required: true - /v1/telemetry/spans: - post: - responses: - '200': - description: A QuerySpansResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QuerySpansResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Query spans. - description: Query spans. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QuerySpansRequest' - required: true - /v1alpha/telemetry/traces: - post: - responses: - '200': - description: A QueryTracesResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QueryTracesResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Query traces. - description: Query traces. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryTracesRequest' - required: true - /v1/telemetry/traces: - post: - responses: - '200': - description: A QueryTracesResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/QueryTracesResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Query traces. - description: Query traces. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryTracesRequest' - required: true - /v1alpha/inference/rerank: - post: - responses: - '200': - description: >- - RerankResponse with indices sorted by relevance score (descending). - content: - application/json: - schema: - $ref: '#/components/schemas/RerankResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Inference - summary: >- - Rerank a list of documents based on their relevance to a query. - description: >- - Rerank a list of documents based on their relevance to a query. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RerankRequest' - required: true - /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume: - post: - responses: - '200': - description: >- - A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk - objects. - content: - application/json: - schema: - $ref: '#/components/schemas/Turn' - text/event-stream: - schema: - $ref: '#/components/schemas/AgentTurnResponseStreamChunk' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Resume an agent turn with executed tool call responses. - description: >- - Resume an agent turn with executed tool call responses. - - When a Turn has the status `awaiting_input` due to pending input from client - side tool calls, this endpoint can be used to submit the outputs from the - tool calls once they are ready. - parameters: - - name: agent_id - in: path - description: The ID of the agent to resume. - required: true - schema: - type: string - - name: session_id - in: path - description: The ID of the session to resume. - required: true - schema: - type: string - - name: turn_id - in: path - description: The ID of the turn to resume. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ResumeAgentTurnRequest' - required: true - /v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume: - post: - responses: - '200': - description: >- - A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk - objects. - content: - application/json: - schema: - $ref: '#/components/schemas/Turn' - text/event-stream: - schema: - $ref: '#/components/schemas/AgentTurnResponseStreamChunk' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Resume an agent turn with executed tool call responses. - description: >- - Resume an agent turn with executed tool call responses. - - When a Turn has the status `awaiting_input` due to pending input from client - side tool calls, this endpoint can be used to submit the outputs from the - tool calls once they are ready. - parameters: - - name: agent_id - in: path - description: The ID of the agent to resume. - required: true - schema: - type: string - - name: session_id - in: path - description: The ID of the session to resume. - required: true - schema: - type: string - - name: turn_id - in: path - description: The ID of the turn to resume. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ResumeAgentTurnRequest' - required: true - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: - responses: - '200': - description: >- - The job that was created to run the evaluation. - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Run an evaluation on a benchmark. - description: Run an evaluation on a benchmark. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunEvalRequest' - required: true - /v1/eval/benchmarks/{benchmark_id}/jobs: - post: - responses: - '200': - description: >- - The job that was created to run the evaluation. - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Run an evaluation on a benchmark. - description: Run an evaluation on a benchmark. - parameters: - - name: benchmark_id - in: path - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunEvalRequest' - required: true - /v1/moderations: - post: - responses: - '200': - description: A moderation object. - content: - application/json: - schema: - $ref: '#/components/schemas/ModerationObject' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Safety - summary: >- - Classifies if text and/or image inputs are potentially harmful. - description: >- - Classifies if text and/or image inputs are potentially harmful. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunModerationRequest' - required: true - /v1/safety/run-shield: - post: - responses: - '200': - description: A RunShieldResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/RunShieldResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Safety - summary: Run a shield. - description: Run a shield. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunShieldRequest' - required: true - /v1alpha/telemetry/spans/export: - post: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Save spans to a dataset. - description: Save spans to a dataset. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SaveSpansToDatasetRequest' - required: true - /v1/telemetry/spans/export: - post: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Telemetry - summary: Save spans to a dataset. - description: Save spans to a dataset. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SaveSpansToDatasetRequest' - required: true - /v1/scoring/score: - post: - responses: - '200': - description: >- - A ScoreResponse object containing rows and aggregated results. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Scoring - summary: Score a list of rows. - description: Score a list of rows. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreRequest' - required: true - /v1/scoring/score-batch: - post: - responses: - '200': - description: A ScoreBatchResponse. - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreBatchResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Scoring - summary: Score a batch of rows. - description: Score a batch of rows. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreBatchRequest' - required: true - /v1/prompts/{prompt_id}/set-default-version: - post: - responses: - '200': - description: >- - The prompt with the specified version now set as default. - content: - application/json: - schema: - $ref: '#/components/schemas/Prompt' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Prompts - summary: >- - Set which version of a prompt should be the default in get_prompt (latest). - description: >- - Set which version of a prompt should be the default in get_prompt (latest). - parameters: - - name: prompt_id - in: path - description: The identifier of the prompt. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SetDefaultVersionRequest' - required: true - /v1alpha/post-training/supervised-fine-tune: - post: - responses: - '200': - description: A PostTrainingJob. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Run supervised fine-tuning of a model. - description: Run supervised fine-tuning of a model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SupervisedFineTuneRequest' - required: true - /v1/post-training/supervised-fine-tune: - post: - responses: - '200': - description: A PostTrainingJob. - content: - application/json: - schema: - $ref: '#/components/schemas/PostTrainingJob' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Run supervised fine-tuning of a model. - description: Run supervised fine-tuning of a model. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SupervisedFineTuneRequest' - required: true - /v1/synthetic-data-generation/generate: - post: - responses: - '200': - description: >- - Response containing filtered synthetic data samples and optional statistics - content: - application/json: - schema: - $ref: '#/components/schemas/SyntheticDataGenerationResponse' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - SyntheticDataGeneration (Coming Soon) - summary: >- - Generate synthetic data based on input dialogs and apply filtering. - description: >- - Generate synthetic data based on input dialogs and apply filtering. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SyntheticDataGenerateRequest' - required: true + deprecated: false /v1/version: get: responses: @@ -5403,6 +3150,7 @@ paths: summary: Get the version of the service. description: Get the version of the service. parameters: [] + deprecated: false jsonSchemaDialect: >- https://json-schema.org/draft/2020-12/schema components: @@ -5435,6 +3183,1017 @@ components: title: Error description: >- Error response from the API. Roughly follows RFC 7807. + Order: + type: string + enum: + - asc + - desc + title: Order + description: Sort order for paginated responses. + ListOpenAIChatCompletionResponse: + type: object + properties: + data: + type: array + items: + type: object + properties: + id: + type: string + description: The ID of the chat completion + choices: + type: array + items: + $ref: '#/components/schemas/OpenAIChoice' + description: List of choices + object: + type: string + const: chat.completion + default: chat.completion + description: >- + The object type, which will be "chat.completion" + created: + type: integer + description: >- + The Unix timestamp in seconds when the chat completion was created + model: + type: string + description: >- + The model that was used to generate the chat completion + input_messages: + type: array + items: + $ref: '#/components/schemas/OpenAIMessageParam' + additionalProperties: false + required: + - id + - choices + - object + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + description: >- + List of chat completion objects with their input messages + has_more: + type: boolean + description: >- + Whether there are more completions available beyond this list + first_id: + type: string + description: ID of the first completion in this list + last_id: + type: string + description: ID of the last completion in this list + object: + type: string + const: list + default: list + description: >- + Must be "list" to identify this as a list response + additionalProperties: false + required: + - data + - has_more + - first_id + - last_id + - object + title: ListOpenAIChatCompletionResponse + description: >- + Response from listing OpenAI-compatible chat completions. + OpenAIAssistantMessageParam: + type: object + properties: + role: + type: string + const: assistant + default: assistant + description: >- + Must be "assistant" to identify this as the model's response + content: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + description: The content of the model's response + name: + type: string + description: >- + (Optional) The name of the assistant message participant. + tool_calls: + type: array + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + description: >- + List of tool calls. Each tool call is an OpenAIChatCompletionToolCall + object. + additionalProperties: false + required: + - role + title: OpenAIAssistantMessageParam + description: >- + A message containing the model's (assistant) response in an OpenAI-compatible + chat completion request. + "OpenAIChatCompletionContentPartImageParam": + type: object + properties: + type: + type: string + const: image_url + default: image_url + description: >- + Must be "image_url" to identify this as image content + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + description: >- + Image URL specification and processing details + additionalProperties: false + required: + - type + - image_url + title: >- + OpenAIChatCompletionContentPartImageParam + description: >- + Image content part for OpenAI-compatible chat completion messages. + OpenAIChatCompletionContentPartParam: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - $ref: '#/components/schemas/OpenAIFile' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + file: '#/components/schemas/OpenAIFile' + OpenAIChatCompletionContentPartTextParam: + type: object + properties: + type: + type: string + const: text + default: text + description: >- + Must be "text" to identify this as text content + text: + type: string + description: The text content of the message + additionalProperties: false + required: + - type + - text + title: OpenAIChatCompletionContentPartTextParam + description: >- + Text content part for OpenAI-compatible chat completion messages. + OpenAIChatCompletionToolCall: + type: object + properties: + index: + type: integer + description: >- + (Optional) Index of the tool call in the list + id: + type: string + description: >- + (Optional) Unique identifier for the tool call + type: + type: string + const: function + default: function + description: >- + Must be "function" to identify this as a function call + function: + $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + description: (Optional) Function call details + additionalProperties: false + required: + - type + title: OpenAIChatCompletionToolCall + description: >- + Tool call specification for OpenAI-compatible chat completion responses. + OpenAIChatCompletionToolCallFunction: + type: object + properties: + name: + type: string + description: (Optional) Name of the function to call + arguments: + type: string + description: >- + (Optional) Arguments to pass to the function as a JSON string + additionalProperties: false + title: OpenAIChatCompletionToolCallFunction + description: >- + Function call details for OpenAI-compatible tool calls. + OpenAIChoice: + type: object + properties: + message: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + discriminator: + propertyName: role + mapping: + user: '#/components/schemas/OpenAIUserMessageParam' + system: '#/components/schemas/OpenAISystemMessageParam' + assistant: '#/components/schemas/OpenAIAssistantMessageParam' + tool: '#/components/schemas/OpenAIToolMessageParam' + developer: '#/components/schemas/OpenAIDeveloperMessageParam' + description: The message from the model + finish_reason: + type: string + description: The reason the model stopped generating + index: + type: integer + description: The index of the choice + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs' + description: >- + (Optional) The log probabilities for the tokens in the message + additionalProperties: false + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: >- + A choice from an OpenAI-compatible chat completion response. + OpenAIChoiceLogprobs: + type: object + properties: + content: + type: array + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + description: >- + (Optional) The log probabilities for the tokens in the message + refusal: + type: array + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + description: >- + (Optional) The log probabilities for the tokens in the message + additionalProperties: false + title: OpenAIChoiceLogprobs + description: >- + The log probabilities for the tokens in the message from an OpenAI-compatible + chat completion response. + OpenAIDeveloperMessageParam: + type: object + properties: + role: + type: string + const: developer + default: developer + description: >- + Must be "developer" to identify this as a developer message + content: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + description: The content of the developer message + name: + type: string + description: >- + (Optional) The name of the developer message participant. + additionalProperties: false + required: + - role + - content + title: OpenAIDeveloperMessageParam + description: >- + A message from the developer in an OpenAI-compatible chat completion request. + OpenAIFile: + type: object + properties: + type: + type: string + const: file + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' + additionalProperties: false + required: + - type + - file + title: OpenAIFile + OpenAIFileFile: + type: object + properties: + file_data: + type: string + file_id: + type: string + filename: + type: string + additionalProperties: false + title: OpenAIFileFile + OpenAIImageURL: + type: object + properties: + url: + type: string + description: >- + URL of the image to include in the message + detail: + type: string + description: >- + (Optional) Level of detail for image processing. Can be "low", "high", + or "auto" + additionalProperties: false + required: + - url + title: OpenAIImageURL + description: >- + Image URL specification for OpenAI-compatible chat completion messages. + OpenAIMessageParam: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + discriminator: + propertyName: role + mapping: + user: '#/components/schemas/OpenAIUserMessageParam' + system: '#/components/schemas/OpenAISystemMessageParam' + assistant: '#/components/schemas/OpenAIAssistantMessageParam' + tool: '#/components/schemas/OpenAIToolMessageParam' + developer: '#/components/schemas/OpenAIDeveloperMessageParam' + OpenAISystemMessageParam: + type: object + properties: + role: + type: string + const: system + default: system + description: >- + Must be "system" to identify this as a system message + content: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + description: >- + The content of the "system prompt". If multiple system messages are provided, + they are concatenated. The underlying Llama Stack code may also add other + system messages (for example, for formatting tool definitions). + name: + type: string + description: >- + (Optional) The name of the system message participant. + additionalProperties: false + required: + - role + - content + title: OpenAISystemMessageParam + description: >- + A system message providing instructions or context to the model. + OpenAITokenLogProb: + type: object + properties: + token: + type: string + bytes: + type: array + items: + type: integer + logprob: + type: number + top_logprobs: + type: array + items: + $ref: '#/components/schemas/OpenAITopLogProb' + additionalProperties: false + required: + - token + - logprob + - top_logprobs + title: OpenAITokenLogProb + description: >- + The log probability for a token from an OpenAI-compatible chat completion + response. + OpenAIToolMessageParam: + type: object + properties: + role: + type: string + const: tool + default: tool + description: >- + Must be "tool" to identify this as a tool response + tool_call_id: + type: string + description: >- + Unique identifier for the tool call this response is for + content: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + description: The response content from the tool + additionalProperties: false + required: + - role + - tool_call_id + - content + title: OpenAIToolMessageParam + description: >- + A message representing the result of a tool invocation in an OpenAI-compatible + chat completion request. + OpenAITopLogProb: + type: object + properties: + token: + type: string + bytes: + type: array + items: + type: integer + logprob: + type: number + additionalProperties: false + required: + - token + - logprob + title: OpenAITopLogProb + description: >- + The top log probability for a token from an OpenAI-compatible chat completion + response. + OpenAIUserMessageParam: + type: object + properties: + role: + type: string + const: user + default: user + description: >- + Must be "user" to identify this as a user message + content: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartParam' + description: >- + The content of the message, which can include text and other media + name: + type: string + description: >- + (Optional) The name of the user message participant. + additionalProperties: false + required: + - role + - content + title: OpenAIUserMessageParam + description: >- + A message from the user in an OpenAI-compatible chat completion request. + OpenAIJSONSchema: + type: object + properties: + name: + type: string + description: Name of the schema + description: + type: string + description: (Optional) Description of the schema + strict: + type: boolean + description: >- + (Optional) Whether to enforce strict adherence to the schema + schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) The JSON schema definition + additionalProperties: false + required: + - name + title: OpenAIJSONSchema + description: >- + JSON schema specification for OpenAI-compatible structured response format. + OpenAIResponseFormatJSONObject: + type: object + properties: + type: + type: string + const: json_object + default: json_object + description: >- + Must be "json_object" to indicate generic JSON object response format + additionalProperties: false + required: + - type + title: OpenAIResponseFormatJSONObject + description: >- + JSON object response format for OpenAI-compatible chat completion requests. + OpenAIResponseFormatJSONSchema: + type: object + properties: + type: + type: string + const: json_schema + default: json_schema + description: >- + Must be "json_schema" to indicate structured JSON response format + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' + description: >- + The JSON schema specification for the response + additionalProperties: false + required: + - type + - json_schema + title: OpenAIResponseFormatJSONSchema + description: >- + JSON schema response format for OpenAI-compatible chat completion requests. + OpenAIResponseFormatParam: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/OpenAIResponseFormatText' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + OpenAIResponseFormatText: + type: object + properties: + type: + type: string + const: text + default: text + description: >- + Must be "text" to indicate plain text response format + additionalProperties: false + required: + - type + title: OpenAIResponseFormatText + description: >- + Text response format for OpenAI-compatible chat completion requests. + OpenaiChatCompletionRequest: + type: object + properties: + model: + type: string + description: >- + The identifier of the model to use. The model must be registered with + Llama Stack and available via the /models endpoint. + messages: + type: array + items: + $ref: '#/components/schemas/OpenAIMessageParam' + description: List of messages in the conversation. + frequency_penalty: + type: number + description: >- + (Optional) The penalty for repeated tokens. + function_call: + oneOf: + - type: string + - type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) The function call to use. + functions: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) List of functions to use. + logit_bias: + type: object + additionalProperties: + type: number + description: (Optional) The logit bias to use. + logprobs: + type: boolean + description: (Optional) The log probabilities to use. + max_completion_tokens: + type: integer + description: >- + (Optional) The maximum number of tokens to generate. + max_tokens: + type: integer + description: >- + (Optional) The maximum number of tokens to generate. + n: + type: integer + description: >- + (Optional) The number of completions to generate. + parallel_tool_calls: + type: boolean + description: >- + (Optional) Whether to parallelize tool calls. + presence_penalty: + type: number + description: >- + (Optional) The penalty for repeated tokens. + response_format: + $ref: '#/components/schemas/OpenAIResponseFormatParam' + description: (Optional) The response format to use. + seed: + type: integer + description: (Optional) The seed to use. + stop: + oneOf: + - type: string + - type: array + items: + type: string + description: (Optional) The stop tokens to use. + stream: + type: boolean + description: >- + (Optional) Whether to stream the response. + stream_options: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) The stream options to use. + temperature: + type: number + description: (Optional) The temperature to use. + tool_choice: + oneOf: + - type: string + - type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) The tool choice to use. + tools: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) The tools to use. + top_logprobs: + type: integer + description: >- + (Optional) The top log probabilities to use. + top_p: + type: number + description: (Optional) The top p to use. + user: + type: string + description: (Optional) The user to use. + additionalProperties: false + required: + - model + - messages + title: OpenaiChatCompletionRequest + OpenAIChatCompletion: + type: object + properties: + id: + type: string + description: The ID of the chat completion + choices: + type: array + items: + $ref: '#/components/schemas/OpenAIChoice' + description: List of choices + object: + type: string + const: chat.completion + default: chat.completion + description: >- + The object type, which will be "chat.completion" + created: + type: integer + description: >- + The Unix timestamp in seconds when the chat completion was created + model: + type: string + description: >- + The model that was used to generate the chat completion + additionalProperties: false + required: + - id + - choices + - object + - created + - model + title: OpenAIChatCompletion + description: >- + Response from an OpenAI-compatible chat completion request. + OpenAIChatCompletionChunk: + type: object + properties: + id: + type: string + description: The ID of the chat completion + choices: + type: array + items: + $ref: '#/components/schemas/OpenAIChunkChoice' + description: List of choices + object: + type: string + const: chat.completion.chunk + default: chat.completion.chunk + description: >- + The object type, which will be "chat.completion.chunk" + created: + type: integer + description: >- + The Unix timestamp in seconds when the chat completion was created + model: + type: string + description: >- + The model that was used to generate the chat completion + additionalProperties: false + required: + - id + - choices + - object + - created + - model + title: OpenAIChatCompletionChunk + description: >- + Chunk from a streaming response to an OpenAI-compatible chat completion request. + OpenAIChoiceDelta: + type: object + properties: + content: + type: string + description: (Optional) The content of the delta + refusal: + type: string + description: (Optional) The refusal of the delta + role: + type: string + description: (Optional) The role of the delta + tool_calls: + type: array + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + description: (Optional) The tool calls of the delta + additionalProperties: false + title: OpenAIChoiceDelta + description: >- + A delta from an OpenAI-compatible chat completion streaming response. + OpenAIChunkChoice: + type: object + properties: + delta: + $ref: '#/components/schemas/OpenAIChoiceDelta' + description: The delta from the chunk + finish_reason: + type: string + description: The reason the model stopped generating + index: + type: integer + description: The index of the choice + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs' + description: >- + (Optional) The log probabilities for the tokens in the message + additionalProperties: false + required: + - delta + - finish_reason + - index + title: OpenAIChunkChoice + description: >- + A chunk choice from an OpenAI-compatible chat completion streaming response. + OpenAICompletionWithInputMessages: + type: object + properties: + id: + type: string + description: The ID of the chat completion + choices: + type: array + items: + $ref: '#/components/schemas/OpenAIChoice' + description: List of choices + object: + type: string + const: chat.completion + default: chat.completion + description: >- + The object type, which will be "chat.completion" + created: + type: integer + description: >- + The Unix timestamp in seconds when the chat completion was created + model: + type: string + description: >- + The model that was used to generate the chat completion + input_messages: + type: array + items: + $ref: '#/components/schemas/OpenAIMessageParam' + additionalProperties: false + required: + - id + - choices + - object + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + OpenaiCompletionRequest: + type: object + properties: + model: + type: string + description: >- + The identifier of the model to use. The model must be registered with + Llama Stack and available via the /models endpoint. + prompt: + oneOf: + - type: string + - type: array + items: + type: string + - type: array + items: + type: integer + - type: array + items: + type: array + items: + type: integer + description: The prompt to generate a completion for. + best_of: + type: integer + description: >- + (Optional) The number of completions to generate. + echo: + type: boolean + description: (Optional) Whether to echo the prompt. + frequency_penalty: + type: number + description: >- + (Optional) The penalty for repeated tokens. + logit_bias: + type: object + additionalProperties: + type: number + description: (Optional) The logit bias to use. + logprobs: + type: boolean + description: (Optional) The log probabilities to use. + max_tokens: + type: integer + description: >- + (Optional) The maximum number of tokens to generate. + n: + type: integer + description: >- + (Optional) The number of completions to generate. + presence_penalty: + type: number + description: >- + (Optional) The penalty for repeated tokens. + seed: + type: integer + description: (Optional) The seed to use. + stop: + oneOf: + - type: string + - type: array + items: + type: string + description: (Optional) The stop tokens to use. + stream: + type: boolean + description: >- + (Optional) Whether to stream the response. + stream_options: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: (Optional) The stream options to use. + temperature: + type: number + description: (Optional) The temperature to use. + top_p: + type: number + description: (Optional) The top p to use. + user: + type: string + description: (Optional) The user to use. + guided_choice: + type: array + items: + type: string + prompt_logprobs: + type: integer + suffix: + type: string + description: >- + (Optional) The suffix that should be appended to the completion. + additionalProperties: false + required: + - model + - prompt + title: OpenaiCompletionRequest + OpenAICompletion: + type: object + properties: + id: + type: string + choices: + type: array + items: + $ref: '#/components/schemas/OpenAICompletionChoice' + created: + type: integer + model: + type: string + object: + type: string + const: text_completion + default: text_completion + additionalProperties: false + required: + - id + - choices + - created + - model + - object + title: OpenAICompletion + description: >- + Response from an OpenAI-compatible completion request. + OpenAICompletionChoice: + type: object + properties: + finish_reason: + type: string + text: + type: string + index: + type: integer + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs' + additionalProperties: false + required: + - finish_reason + - text + - index + title: OpenAICompletionChoice + description: >- + A choice from an OpenAI-compatible completion response. AppendRowsRequest: type: object properties: @@ -5455,304 +4214,555 @@ components: required: - rows title: AppendRowsRequest - CancelTrainingJobRequest: + PaginatedResponse: type: object properties: - job_uuid: + data: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The list of items for the current page + has_more: + type: boolean + description: >- + Whether there are more items available after this set + url: type: string - description: The UUID of the job to cancel. + description: The URL for accessing this list additionalProperties: false required: - - job_uuid - title: CancelTrainingJobRequest - AgentConfig: + - data + - has_more + title: PaginatedResponse + description: >- + A generic paginated response that follows a simple format. + Dataset: type: object properties: - sampling_params: - $ref: '#/components/schemas/SamplingParams' - input_shields: - type: array - items: - type: string - output_shields: - type: array - items: - type: string - toolgroups: - type: array - items: - $ref: '#/components/schemas/AgentTool' - client_tools: - type: array - items: - $ref: '#/components/schemas/ToolDef' - tool_choice: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: type: string enum: - - auto - - required - - none - title: ToolChoice + - model + - shield + - vector_db + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: dataset + default: dataset description: >- - Whether tool use is required or automatic. This is a hint to the model - which may not be followed. It depends on the Instruction Following capabilities - of the model. - deprecated: true - tool_prompt_format: + Type of resource, always 'dataset' for datasets + purpose: type: string enum: - - json - - function_tag - - python_list - title: ToolPromptFormat + - post-training/messages + - eval/question-answer + - eval/messages-answer description: >- - Prompt format for calling custom / zero shot tools. - deprecated: true - tool_config: - $ref: '#/components/schemas/ToolConfig' - max_infer_iters: - type: integer - default: 10 + Purpose of the dataset indicating its intended use + source: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + discriminator: + propertyName: type + mapping: + uri: '#/components/schemas/URIDataSource' + rows: '#/components/schemas/RowsDataSource' + description: >- + Data source configuration for the dataset + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Additional metadata for the dataset + additionalProperties: false + required: + - identifier + - provider_id + - type + - purpose + - source + - metadata + title: Dataset + description: >- + Dataset resource for storing and accessing training or evaluation data. + RowsDataSource: + type: object + properties: + type: + type: string + const: rows + default: rows + rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", + "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, + world!"}]} ] + additionalProperties: false + required: + - type + - rows + title: RowsDataSource + description: A dataset stored in rows. + URIDataSource: + type: object + properties: + type: + type: string + const: uri + default: uri + uri: + type: string + description: >- + The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" + - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" + additionalProperties: false + required: + - type + - uri + title: URIDataSource + description: >- + A dataset that can be obtained from a URI. + ListDatasetsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Dataset' + description: List of datasets + additionalProperties: false + required: + - data + title: ListDatasetsResponse + description: Response from listing datasets. + DataSource: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + discriminator: + propertyName: type + mapping: + uri: '#/components/schemas/URIDataSource' + rows: '#/components/schemas/RowsDataSource' + RegisterDatasetRequest: + type: object + properties: + purpose: + type: string + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + description: >- + The purpose of the dataset. One of: - "post-training/messages": The dataset + contains a messages column with list of messages for post-training. { + "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": "assistant", + "content": "Hello, world!"}, ] } - "eval/question-answer": The dataset + contains a question column and an answer column for evaluation. { "question": + "What is the capital of France?", "answer": "Paris" } - "eval/messages-answer": + The dataset contains a messages column with list of messages and an answer + column for evaluation. { "messages": [ {"role": "user", "content": "Hello, + my name is John Doe."}, {"role": "assistant", "content": "Hello, John + Doe. How can I help you today?"}, {"role": "user", "content": "What's + my name?"}, ], "answer": "John Doe" } + source: + $ref: '#/components/schemas/DataSource' + description: >- + The data source of the dataset. Ensure that the data source schema is + compatible with the purpose of the dataset. Examples: - { "type": "uri", + "uri": "https://mywebsite.com/mydata.jsonl" } - { "type": "uri", "uri": + "lsfs://mydata.jsonl" } - { "type": "uri", "uri": "data:csv;base64,{base64_content}" + } - { "type": "uri", "uri": "huggingface://llamastack/simpleqa?split=train" + } - { "type": "rows", "rows": [ { "messages": [ {"role": "user", "content": + "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}, ] + } ] } + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The metadata for the dataset. - E.g. {"description": "My dataset"}. + dataset_id: + type: string + description: >- + The ID of the dataset. If not provided, an ID will be generated. + additionalProperties: false + required: + - purpose + - source + title: RegisterDatasetRequest + OpenaiEmbeddingsRequest: + type: object + properties: model: type: string description: >- - The model identifier to use for the agent - instructions: - type: string - description: The system instructions for the agent - name: + The identifier of the model to use. The model must be an embedding model + registered with Llama Stack and available via the /models endpoint. + input: + oneOf: + - type: string + - type: array + items: + type: string + description: >- + Input text to embed, encoded as a string or array of strings. To embed + multiple inputs in a single request, pass an array of strings. + encoding_format: type: string description: >- - Optional name for the agent, used in telemetry and identification - enable_session_persistence: - type: boolean - default: false + (Optional) The format to return the embeddings in. Can be either "float" + or "base64". Defaults to "float". + dimensions: + type: integer description: >- - Optional flag indicating whether session data has to be persisted - response_format: - $ref: '#/components/schemas/ResponseFormat' - description: Optional response format configuration + (Optional) The number of dimensions the resulting output embeddings should + have. Only supported in text-embedding-3 and later models. + user: + type: string + description: >- + (Optional) A unique identifier representing your end-user, which can help + OpenAI to monitor and detect abuse. additionalProperties: false required: - model - - instructions - title: AgentConfig - description: Configuration for an agent. - AgentTool: - oneOf: - - type: string - - type: object - properties: - name: - type: string - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - additionalProperties: false - required: - - name - - args - title: AgentToolGroupWithArgs - GrammarResponseFormat: + - input + title: OpenaiEmbeddingsRequest + OpenAIEmbeddingData: type: object properties: - type: + object: type: string - enum: - - json_schema - - grammar + const: embedding + default: embedding description: >- - Must be "grammar" to identify this format type - const: grammar - default: grammar - bnf: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The BNF grammar specification the response should conform to - additionalProperties: false - required: - - type - - bnf - title: GrammarResponseFormat - description: >- - Configuration for grammar-guided response generation. - GreedySamplingStrategy: - type: object - properties: - type: - type: string - const: greedy - default: greedy - description: >- - Must be "greedy" to identify this sampling strategy - additionalProperties: false - required: - - type - title: GreedySamplingStrategy - description: >- - Greedy sampling strategy that selects the highest probability token at each - step. - JsonSchemaResponseFormat: - type: object - properties: - type: - type: string - enum: - - json_schema - - grammar - description: >- - Must be "json_schema" to identify this format type - const: json_schema - default: json_schema - json_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The JSON schema the response should conform to. In a Python SDK, this - is often a `pydantic` model. - additionalProperties: false - required: - - type - - json_schema - title: JsonSchemaResponseFormat - description: >- - Configuration for JSON schema-guided response generation. - ResponseFormat: - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - - $ref: '#/components/schemas/GrammarResponseFormat' - discriminator: - propertyName: type - mapping: - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - grammar: '#/components/schemas/GrammarResponseFormat' - SamplingParams: - type: object - properties: - strategy: + The object type, which will be "embedding" + embedding: oneOf: - - $ref: '#/components/schemas/GreedySamplingStrategy' - - $ref: '#/components/schemas/TopPSamplingStrategy' - - $ref: '#/components/schemas/TopKSamplingStrategy' - discriminator: - propertyName: type - mapping: - greedy: '#/components/schemas/GreedySamplingStrategy' - top_p: '#/components/schemas/TopPSamplingStrategy' - top_k: '#/components/schemas/TopKSamplingStrategy' - description: The sampling strategy. - max_tokens: + - type: array + items: + type: number + - type: string + description: >- + The embedding vector as a list of floats (when encoding_format="float") + or as a base64-encoded string (when encoding_format="base64") + index: type: integer - default: 0 description: >- - The maximum number of tokens that can be generated in the completion. - The token count of your prompt plus max_tokens cannot exceed the model's - context length. - repetition_penalty: - type: number - default: 1.0 + The index of the embedding in the input list + additionalProperties: false + required: + - object + - embedding + - index + title: OpenAIEmbeddingData + description: >- + A single embedding data object from an OpenAI-compatible embeddings response. + OpenAIEmbeddingUsage: + type: object + properties: + prompt_tokens: + type: integer + description: The number of tokens in the input + total_tokens: + type: integer + description: The total number of tokens used + additionalProperties: false + required: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage + description: >- + Usage information for an OpenAI-compatible embeddings response. + OpenAIEmbeddingsResponse: + type: object + properties: + object: + type: string + const: list + default: list + description: The object type, which will be "list" + data: + type: array + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + description: List of embedding data objects + model: + type: string description: >- - Number between -2.0 and 2.0. Positive values penalize new tokens based - on whether they appear in the text so far, increasing the model's likelihood - to talk about new topics. - stop: + The model that was used to generate the embeddings + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' + description: Usage information + additionalProperties: false + required: + - object + - data + - model + - usage + title: OpenAIEmbeddingsResponse + description: >- + Response from an OpenAI-compatible embeddings request. + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: >- + Valid purpose values for OpenAI Files API. + ListOpenAIFileResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIFileObject' + description: List of file objects + has_more: + type: boolean + description: >- + Whether there are more files available beyond this page + first_id: + type: string + description: >- + ID of the first file in the list for pagination + last_id: + type: string + description: >- + ID of the last file in the list for pagination + object: + type: string + const: list + default: list + description: The object type, which is always "list" + additionalProperties: false + required: + - data + - has_more + - first_id + - last_id + - object + title: ListOpenAIFileResponse + description: >- + Response for listing files in OpenAI Files API. + OpenAIFileObject: + type: object + properties: + object: + type: string + const: file + default: file + description: The object type, which is always "file" + id: + type: string + description: >- + The file identifier, which can be referenced in the API endpoints + bytes: + type: integer + description: The size of the file, in bytes + created_at: + type: integer + description: >- + The Unix timestamp (in seconds) for when the file was created + expires_at: + type: integer + description: >- + The Unix timestamp (in seconds) for when the file expires + filename: + type: string + description: The name of the file + purpose: + type: string + enum: + - assistants + - batch + description: The intended purpose of the file + additionalProperties: false + required: + - object + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject + description: >- + OpenAI File object as defined in the OpenAI Files API. + ExpiresAfter: + type: object + properties: + anchor: + type: string + const: created_at + seconds: + type: integer + additionalProperties: false + required: + - anchor + - seconds + title: ExpiresAfter + description: >- + Control expiration of uploaded files. + + Params: + - anchor, must be "created_at" + - seconds, must be int between 3600 and 2592000 (1 hour to 30 days) + OpenAIFileDeleteResponse: + type: object + properties: + id: + type: string + description: The file identifier that was deleted + object: + type: string + const: file + default: file + description: The object type, which is always "file" + deleted: + type: boolean + description: >- + Whether the file was successfully deleted + additionalProperties: false + required: + - id + - object + - deleted + title: OpenAIFileDeleteResponse + description: >- + Response for deleting a file in OpenAI Files API. + Response: + type: object + title: Response + HealthInfo: + type: object + properties: + status: + type: string + enum: + - OK + - Error + - Not Implemented + description: Current health status of the service + additionalProperties: false + required: + - status + title: HealthInfo + description: >- + Health status information for the service. + RouteInfo: + type: object + properties: + route: + type: string + description: The API endpoint path + method: + type: string + description: HTTP method for the route + provider_types: type: array items: type: string description: >- - Up to 4 sequences where the API will stop generating further tokens. The - returned text will not contain the stop sequence. + List of provider types that implement this route additionalProperties: false required: - - strategy - title: SamplingParams - description: Sampling parameters. - ToolConfig: + - route + - method + - provider_types + title: RouteInfo + description: >- + Information about an API route including its path, method, and implementing + providers. + ListRoutesResponse: type: object properties: - tool_choice: - oneOf: - - type: string - enum: - - auto - - required - - none - title: ToolChoice - description: >- - Whether tool use is required or automatic. This is a hint to the model - which may not be followed. It depends on the Instruction Following - capabilities of the model. - - type: string - default: auto - description: >- - (Optional) Whether tool use is automatic, required, or none. Can also - specify a tool name to use a specific tool. Defaults to ToolChoice.auto. - tool_prompt_format: - type: string - enum: - - json - - function_tag - - python_list - description: >- - (Optional) Instructs the model how to format tool calls. By default, Llama - Stack will attempt to use a format that is best adapted to the model. - - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. - - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a - tag. - `ToolPromptFormat.python_list`: The tool calls are output as Python - syntax -- a list of function calls. - system_message_behavior: - type: string - enum: - - append - - replace - description: >- - (Optional) Config for how to override the default system prompt. - `SystemMessageBehavior.append`: - Appends the provided system message to the default system prompt. - `SystemMessageBehavior.replace`: - Replaces the default system prompt with the provided system message. The - system message can include the string '{{function_definitions}}' to indicate - where the function definitions should be inserted. - default: append - additionalProperties: false - title: ToolConfig - description: Configuration for tool use. - ToolDef: - type: object - properties: - name: - type: string - description: Name of the tool - description: - type: string - description: >- - (Optional) Human-readable description of what the tool does - parameters: + data: type: array items: - $ref: '#/components/schemas/ToolParameter' + $ref: '#/components/schemas/RouteInfo' description: >- - (Optional) List of parameters this tool accepts + List of available route information objects + additionalProperties: false + required: + - data + title: ListRoutesResponse + description: >- + Response containing a list of all available API routes. + Model: + type: object + properties: + identifier: + type: string + description: >- + Unique identifier for this resource in llama stack + provider_resource_id: + type: string + description: >- + Unique identifier for this resource in the provider + provider_id: + type: string + description: >- + ID of the provider that owns this resource + type: + type: string + enum: + - model + - shield + - vector_db + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: model + default: model + description: >- + The resource type, always 'model' for model resources metadata: type: object additionalProperties: @@ -5763,904 +4773,54 @@ components: - type: string - type: array - type: object + description: Any additional metadata for this model + model_type: + $ref: '#/components/schemas/ModelType' + default: llm description: >- - (Optional) Additional metadata about the tool - additionalProperties: false - required: - - name - title: ToolDef - description: >- - Tool definition used in runtime contexts. - ToolParameter: - type: object - properties: - name: - type: string - description: Name of the parameter - parameter_type: - type: string - description: >- - Type of the parameter (e.g., string, integer) - description: - type: string - description: >- - Human-readable description of what the parameter does - required: - type: boolean - default: true - description: >- - Whether this parameter is required for tool invocation - items: - type: object - description: >- - Type of the elements when parameter_type is array - title: - type: string - description: (Optional) Title of the parameter - default: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Default value for the parameter if not provided - additionalProperties: false - required: - - name - - parameter_type - - description - - required - title: ToolParameter - description: Parameter definition for a tool. - TopKSamplingStrategy: - type: object - properties: - type: - type: string - const: top_k - default: top_k - description: >- - Must be "top_k" to identify this sampling strategy - top_k: - type: integer - description: >- - Number of top tokens to consider for sampling. Must be at least 1 + The type of model (LLM or embedding model) additionalProperties: false required: + - identifier + - provider_id - type - - top_k - title: TopKSamplingStrategy - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - TopPSamplingStrategy: - type: object - properties: - type: - type: string - const: top_p - default: top_p - description: >- - Must be "top_p" to identify this sampling strategy - temperature: - type: number - description: >- - Controls randomness in sampling. Higher values increase randomness - top_p: - type: number - default: 0.95 - description: >- - Cumulative probability threshold for nucleus sampling. Defaults to 0.95 - additionalProperties: false - required: - - type - title: TopPSamplingStrategy - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of tokens - with cumulative probability >= p. - CreateAgentRequest: - type: object - properties: - agent_config: - $ref: '#/components/schemas/AgentConfig' - description: The configuration for the agent. - additionalProperties: false - required: - - agent_config - title: CreateAgentRequest - AgentCreateResponse: - type: object - properties: - agent_id: - type: string - description: Unique identifier for the created agent - additionalProperties: false - required: - - agent_id - title: AgentCreateResponse - description: >- - Response returned when creating a new agent. - CreateAgentSessionRequest: - type: object - properties: - session_name: - type: string - description: The name of the session to create. - additionalProperties: false - required: - - session_name - title: CreateAgentSessionRequest - AgentSessionCreateResponse: - type: object - properties: - session_id: - type: string - description: >- - Unique identifier for the created session - additionalProperties: false - required: - - session_id - title: AgentSessionCreateResponse - description: >- - Response returned when creating a new agent session. - ImageContentItem: - type: object - properties: - type: - type: string - const: image - default: image - description: >- - Discriminator type of the content item. Always "image" - image: - type: object - properties: - url: - $ref: '#/components/schemas/URL' - description: >- - A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - data: - type: string - contentEncoding: base64 - description: base64 encoded image data as string - additionalProperties: false - description: >- - Image as a base64 encoded string or an URL - additionalProperties: false - required: - - type - - image - title: ImageContentItem - description: A image content item - InterleavedContent: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - InterleavedContentItem: - oneOf: - - $ref: '#/components/schemas/ImageContentItem' - - $ref: '#/components/schemas/TextContentItem' - discriminator: - propertyName: type - mapping: - image: '#/components/schemas/ImageContentItem' - text: '#/components/schemas/TextContentItem' - TextContentItem: - type: object - properties: - type: - type: string - const: text - default: text - description: >- - Discriminator type of the content item. Always "text" - text: - type: string - description: Text content - additionalProperties: false - required: - - type - - text - title: TextContentItem - description: A text content item - ToolResponseMessage: - type: object - properties: - role: - type: string - const: tool - default: tool - description: >- - Must be "tool" to identify this as a tool response - call_id: - type: string - description: >- - Unique identifier for the tool call this response is for - content: - $ref: '#/components/schemas/InterleavedContent' - description: The response content from the tool - additionalProperties: false - required: - - role - - call_id - - content - title: ToolResponseMessage - description: >- - A message representing the result of a tool invocation. - URL: - type: object - properties: - uri: - type: string - description: The URL string pointing to the resource - additionalProperties: false - required: - - uri - title: URL - description: A URL reference to external content. - UserMessage: - type: object - properties: - role: - type: string - const: user - default: user - description: >- - Must be "user" to identify this as a user message - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - The content of the message, which can include text and other media - context: - $ref: '#/components/schemas/InterleavedContent' - description: >- - (Optional) This field is used internally by Llama Stack to pass RAG context. - This field may be removed in the API in the future. - additionalProperties: false - required: - - role - - content - title: UserMessage - description: >- - A message from the user in a chat conversation. - CreateAgentTurnRequest: - type: object - properties: - messages: - type: array - items: - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - description: List of messages to start the turn with. - stream: - type: boolean - description: >- - (Optional) If True, generate an SSE event stream of the response. Defaults - to False. - documents: - type: array - items: - type: object - properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - - $ref: '#/components/schemas/URL' - description: The content of the document. - mime_type: - type: string - description: The MIME type of the document. - additionalProperties: false - required: - - content - - mime_type - title: Document - description: A document to be used by an agent. - description: >- - (Optional) List of documents to create the turn with. - toolgroups: - type: array - items: - $ref: '#/components/schemas/AgentTool' - description: >- - (Optional) List of toolgroups to create the turn with, will be used in - addition to the agent's config toolgroups for the request. - tool_config: - $ref: '#/components/schemas/ToolConfig' - description: >- - (Optional) The tool configuration to create the turn with, will be used - to override the agent's tool_config. - additionalProperties: false - required: - - messages - title: CreateAgentTurnRequest - CompletionMessage: - type: object - properties: - role: - type: string - const: assistant - default: assistant - description: >- - Must be "assistant" to identify this as the model's response - content: - $ref: '#/components/schemas/InterleavedContent' - description: The content of the model's response - stop_reason: - type: string - enum: - - end_of_turn - - end_of_message - - out_of_tokens - description: >- - Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: - The model finished generating the entire response. - `StopReason.end_of_message`: - The model finished generating but generated a partial response -- usually, - a tool call. The user may call the tool and continue the conversation - with the tool's response. - `StopReason.out_of_tokens`: The model ran - out of token budget. - tool_calls: - type: array - items: - $ref: '#/components/schemas/ToolCall' - description: >- - List of tool calls. Each tool call is a ToolCall object. - additionalProperties: false - required: - - role - - content - - stop_reason - title: CompletionMessage - description: >- - A message containing the model's (assistant) response in a chat conversation. - InferenceStep: - type: object - properties: - turn_id: - type: string - description: The ID of the turn. - step_id: - type: string - description: The ID of the step. - started_at: - type: string - format: date-time - description: The time the step started. - completed_at: - type: string - format: date-time - description: The time the step completed. - step_type: - type: string - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - title: StepType - description: Type of the step in an agent turn. - const: inference - default: inference - model_response: - $ref: '#/components/schemas/CompletionMessage' - description: The response from the LLM. - additionalProperties: false - required: - - turn_id - - step_id - - step_type - - model_response - title: InferenceStep - description: An inference step in an agent turn. - MemoryRetrievalStep: - type: object - properties: - turn_id: - type: string - description: The ID of the turn. - step_id: - type: string - description: The ID of the step. - started_at: - type: string - format: date-time - description: The time the step started. - completed_at: - type: string - format: date-time - description: The time the step completed. - step_type: - type: string - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - title: StepType - description: Type of the step in an agent turn. - const: memory_retrieval - default: memory_retrieval - vector_db_ids: - type: string - description: >- - The IDs of the vector databases to retrieve context from. - inserted_context: - $ref: '#/components/schemas/InterleavedContent' - description: >- - The context retrieved from the vector databases. - additionalProperties: false - required: - - turn_id - - step_id - - step_type - - vector_db_ids - - inserted_context - title: MemoryRetrievalStep - description: >- - A memory retrieval step in an agent turn. - SafetyViolation: - type: object - properties: - violation_level: - $ref: '#/components/schemas/ViolationLevel' - description: Severity level of the violation - user_message: - type: string - description: >- - (Optional) Message to convey to the user about the violation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Additional metadata including specific violation codes for debugging and - telemetry - additionalProperties: false - required: - - violation_level - metadata - title: SafetyViolation + - model_type + title: Model description: >- - Details of a safety violation detected by content moderation. - ShieldCallStep: - type: object - properties: - turn_id: - type: string - description: The ID of the turn. - step_id: - type: string - description: The ID of the step. - started_at: - type: string - format: date-time - description: The time the step started. - completed_at: - type: string - format: date-time - description: The time the step completed. - step_type: - type: string - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - title: StepType - description: Type of the step in an agent turn. - const: shield_call - default: shield_call - violation: - $ref: '#/components/schemas/SafetyViolation' - description: The violation from the shield call. - additionalProperties: false - required: - - turn_id - - step_id - - step_type - title: ShieldCallStep - description: A shield call step in an agent turn. - ToolCall: - type: object - properties: - call_id: - type: string - tool_name: - oneOf: - - type: string - enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - title: BuiltinTool - - type: string - arguments: - oneOf: - - type: string - - 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' - arguments_json: - type: string - additionalProperties: false - required: - - call_id - - tool_name - - arguments - title: ToolCall - ToolExecutionStep: - type: object - properties: - turn_id: - type: string - description: The ID of the turn. - step_id: - type: string - description: The ID of the step. - started_at: - type: string - format: date-time - description: The time the step started. - completed_at: - type: string - format: date-time - description: The time the step completed. - step_type: - type: string - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - title: StepType - description: Type of the step in an agent turn. - const: tool_execution - default: tool_execution - tool_calls: - type: array - items: - $ref: '#/components/schemas/ToolCall' - description: The tool calls to execute. - tool_responses: - type: array - items: - $ref: '#/components/schemas/ToolResponse' - description: The tool responses from the tool calls. - additionalProperties: false - required: - - turn_id - - step_id - - step_type - - tool_calls - - tool_responses - title: ToolExecutionStep - description: A tool execution step in an agent turn. - ToolResponse: - type: object - properties: - call_id: - type: string - description: >- - Unique identifier for the tool call this response is for - tool_name: - oneOf: - - type: string - enum: - - brave_search - - wolfram_alpha - - photogen - - code_interpreter - title: BuiltinTool - - type: string - description: Name of the tool that was invoked - content: - $ref: '#/components/schemas/InterleavedContent' - description: The response content from the tool - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool response - additionalProperties: false - required: - - call_id - - tool_name - - content - title: ToolResponse - description: Response from a tool invocation. - Turn: - type: object - properties: - turn_id: - type: string - description: >- - Unique identifier for the turn within a session - session_id: - type: string - description: >- - Unique identifier for the conversation session - input_messages: - type: array - items: - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - description: >- - List of messages that initiated this turn - steps: - type: array - items: - oneOf: - - $ref: '#/components/schemas/InferenceStep' - - $ref: '#/components/schemas/ToolExecutionStep' - - $ref: '#/components/schemas/ShieldCallStep' - - $ref: '#/components/schemas/MemoryRetrievalStep' - discriminator: - propertyName: step_type - mapping: - inference: '#/components/schemas/InferenceStep' - tool_execution: '#/components/schemas/ToolExecutionStep' - shield_call: '#/components/schemas/ShieldCallStep' - memory_retrieval: '#/components/schemas/MemoryRetrievalStep' - description: >- - Ordered list of processing steps executed during this turn - output_message: - $ref: '#/components/schemas/CompletionMessage' - description: >- - The model's generated response containing content and metadata - output_attachments: - type: array - items: - type: object - properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - - $ref: '#/components/schemas/URL' - description: The content of the attachment. - mime_type: - type: string - description: The MIME type of the attachment. - additionalProperties: false - required: - - content - - mime_type - title: Attachment - description: An attachment to an agent turn. - description: >- - (Optional) Files or media attached to the agent's response - started_at: - type: string - format: date-time - description: Timestamp when the turn began - completed_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the turn finished, if completed - additionalProperties: false - required: - - turn_id - - session_id - - input_messages - - steps - - output_message - - started_at - title: Turn - description: >- - A single turn in an interaction with an Agentic System. - ViolationLevel: + A model resource representing an AI model registered in Llama Stack. + ModelType: type: string enum: - - info - - warn - - error - title: ViolationLevel - description: Severity level of a safety violation. - AgentTurnResponseEvent: + - llm + - embedding + title: ModelType + description: >- + Enumeration of supported model types in Llama Stack. + ListModelsResponse: 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' - - $ref: '#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload' - discriminator: - propertyName: event_type - mapping: - step_start: '#/components/schemas/AgentTurnResponseStepStartPayload' - step_progress: '#/components/schemas/AgentTurnResponseStepProgressPayload' - step_complete: '#/components/schemas/AgentTurnResponseStepCompletePayload' - turn_start: '#/components/schemas/AgentTurnResponseTurnStartPayload' - turn_complete: '#/components/schemas/AgentTurnResponseTurnCompletePayload' - turn_awaiting_input: '#/components/schemas/AgentTurnResponseTurnAwaitingInputPayload' - description: >- - Event-specific payload containing event data + data: + type: array + items: + $ref: '#/components/schemas/Model' additionalProperties: false required: - - payload - title: AgentTurnResponseEvent - description: >- - An event in an agent turn response stream. - AgentTurnResponseStepCompletePayload: + - data + title: ListModelsResponse + RegisterModelRequest: type: object properties: - event_type: + model_id: type: string - enum: - - step_start - - step_complete - - step_progress - - turn_start - - turn_complete - - turn_awaiting_input - const: step_complete - default: step_complete - description: Type of event being reported - step_type: - type: string - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - description: Type of step being executed - step_id: + description: The identifier of the model to register. + provider_model_id: type: string description: >- - Unique identifier for the step within a turn - step_details: - oneOf: - - $ref: '#/components/schemas/InferenceStep' - - $ref: '#/components/schemas/ToolExecutionStep' - - $ref: '#/components/schemas/ShieldCallStep' - - $ref: '#/components/schemas/MemoryRetrievalStep' - discriminator: - propertyName: step_type - mapping: - inference: '#/components/schemas/InferenceStep' - tool_execution: '#/components/schemas/ToolExecutionStep' - shield_call: '#/components/schemas/ShieldCallStep' - memory_retrieval: '#/components/schemas/MemoryRetrievalStep' - description: Complete details of the executed step - additionalProperties: false - required: - - event_type - - step_type - - step_id - - step_details - title: AgentTurnResponseStepCompletePayload - description: >- - Payload for step completion events in agent turn responses. - AgentTurnResponseStepProgressPayload: - type: object - properties: - event_type: + The identifier of the model in the provider. + provider_id: type: string - enum: - - step_start - - step_complete - - step_progress - - turn_start - - turn_complete - - turn_awaiting_input - const: step_progress - default: step_progress - description: Type of event being reported - step_type: - type: string - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - description: Type of step being executed - step_id: - type: string - description: >- - Unique identifier for the step within a turn - delta: - oneOf: - - $ref: '#/components/schemas/TextDelta' - - $ref: '#/components/schemas/ImageDelta' - - $ref: '#/components/schemas/ToolCallDelta' - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/TextDelta' - image: '#/components/schemas/ImageDelta' - tool_call: '#/components/schemas/ToolCallDelta' - description: >- - Incremental content changes during step execution - additionalProperties: false - required: - - event_type - - step_type - - step_id - - delta - title: AgentTurnResponseStepProgressPayload - description: >- - Payload for step progress events in agent turn responses. - AgentTurnResponseStepStartPayload: - type: object - properties: - event_type: - type: string - enum: - - step_start - - step_complete - - step_progress - - turn_start - - turn_complete - - turn_awaiting_input - const: step_start - default: step_start - description: Type of event being reported - step_type: - type: string - enum: - - inference - - tool_execution - - shield_call - - memory_retrieval - description: Type of step being executed - step_id: - type: string - description: >- - Unique identifier for the step within a turn + description: The identifier of the provider. metadata: type: object additionalProperties: @@ -6671,177 +4831,302 @@ components: - type: string - type: array - type: object - description: >- - (Optional) Additional metadata for the step + description: Any additional metadata for this model. + model_type: + $ref: '#/components/schemas/ModelType' + description: The type of model to register. additionalProperties: false required: - - event_type - - step_type - - step_id - title: AgentTurnResponseStepStartPayload - description: >- - Payload for step start events in agent turn responses. - AgentTurnResponseStreamChunk: + - model_id + title: RegisterModelRequest + RunModerationRequest: type: object properties: - event: - $ref: '#/components/schemas/AgentTurnResponseEvent' - description: >- - Individual event in the agent turn response stream - additionalProperties: false - required: - - event - title: AgentTurnResponseStreamChunk - description: Streamed agent turn completion response. - "AgentTurnResponseTurnAwaitingInputPayload": - type: object - properties: - event_type: - type: string - enum: - - step_start - - step_complete - - step_progress - - turn_start - - turn_complete - - turn_awaiting_input - const: turn_awaiting_input - default: turn_awaiting_input - description: Type of event being reported - turn: - $ref: '#/components/schemas/Turn' - description: >- - Turn data when waiting for external tool responses - additionalProperties: false - required: - - event_type - - turn - title: >- - AgentTurnResponseTurnAwaitingInputPayload - description: >- - Payload for turn awaiting input events in agent turn responses. - AgentTurnResponseTurnCompletePayload: - type: object - properties: - event_type: - type: string - enum: - - step_start - - step_complete - - step_progress - - turn_start - - turn_complete - - turn_awaiting_input - const: turn_complete - default: turn_complete - description: Type of event being reported - turn: - $ref: '#/components/schemas/Turn' - description: >- - Complete turn data including all steps and results - additionalProperties: false - required: - - event_type - - turn - title: AgentTurnResponseTurnCompletePayload - description: >- - Payload for turn completion events in agent turn responses. - AgentTurnResponseTurnStartPayload: - type: object - properties: - event_type: - type: string - enum: - - step_start - - step_complete - - step_progress - - turn_start - - turn_complete - - turn_awaiting_input - const: turn_start - default: turn_start - description: Type of event being reported - turn_id: - type: string - description: >- - Unique identifier for the turn within a session - additionalProperties: false - required: - - event_type - - turn_id - title: AgentTurnResponseTurnStartPayload - description: >- - Payload for turn start events in agent turn responses. - ImageDelta: - type: object - properties: - type: - type: string - const: image - default: image - description: >- - Discriminator type of the delta. Always "image" - image: - type: string - contentEncoding: base64 - description: The incremental image data as bytes - additionalProperties: false - required: - - type - - image - title: ImageDelta - description: >- - An image content delta for streaming responses. - TextDelta: - type: object - properties: - type: - type: string - const: text - default: text - description: >- - Discriminator type of the delta. Always "text" - text: - type: string - description: The incremental text content - additionalProperties: false - required: - - type - - text - title: TextDelta - description: >- - A text content delta for streaming responses. - ToolCallDelta: - type: object - properties: - type: - type: string - const: tool_call - default: tool_call - description: >- - Discriminator type of the delta. Always "tool_call" - tool_call: + input: oneOf: - type: string - - $ref: '#/components/schemas/ToolCall' + - type: array + items: + type: string description: >- - Either an in-progress tool call string or the final parsed tool call - parse_status: + Input (or inputs) to classify. Can be a single string, an array of strings, + or an array of multi-modal input objects similar to other models. + model: type: string - enum: - - started - - in_progress - - failed - - succeeded - description: Current parsing status of the tool call + description: >- + The content moderation model you would like to use. additionalProperties: false required: - - type - - tool_call - - parse_status - title: ToolCallDelta + - input + - model + title: RunModerationRequest + ModerationObject: + type: object + properties: + id: + type: string + description: >- + The unique identifier for the moderation request. + model: + type: string + description: >- + The model used to generate the moderation results. + results: + type: array + items: + $ref: '#/components/schemas/ModerationObjectResults' + description: A list of moderation objects + additionalProperties: false + required: + - id + - model + - results + title: ModerationObject + description: A moderation object. + ModerationObjectResults: + type: object + properties: + flagged: + type: boolean + description: >- + Whether any of the below categories are flagged. + categories: + type: object + additionalProperties: + type: boolean + description: >- + A list of the categories, and whether they are flagged or not. + category_applied_input_types: + type: object + additionalProperties: + type: array + items: + type: string + description: >- + A list of the categories along with the input type(s) that the score applies + to. + category_scores: + type: object + additionalProperties: + type: number + description: >- + A list of the categories along with their scores as predicted by model. + user_message: + type: string + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + additionalProperties: false + required: + - flagged + - metadata + title: ModerationObjectResults + description: A moderation object. + Prompt: + type: object + properties: + prompt: + type: string + description: >- + The system prompt text with variable placeholders. Variables are only + supported when using the Responses API. + version: + type: integer + description: >- + Version (integer starting at 1, incremented on save) + prompt_id: + type: string + description: >- + Unique identifier formatted as 'pmpt_<48-digit-hash>' + variables: + type: array + items: + type: string + description: >- + List of prompt variable names that can be used in the prompt template + is_default: + type: boolean + default: false + description: >- + Boolean indicating whether this version is the default version for this + prompt + additionalProperties: false + required: + - version + - prompt_id + - variables + - is_default + title: Prompt description: >- - A tool call content delta for streaming responses. + A prompt resource representing a stored OpenAI Compatible prompt template + in Llama Stack. + ListPromptsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Prompt' + additionalProperties: false + required: + - data + title: ListPromptsResponse + description: Response model to list prompts. + CreatePromptRequest: + type: object + properties: + prompt: + type: string + description: >- + The prompt text content with variable placeholders. + variables: + type: array + items: + type: string + description: >- + List of variable names that can be used in the prompt template. + additionalProperties: false + required: + - prompt + title: CreatePromptRequest + UpdatePromptRequest: + type: object + properties: + prompt: + type: string + description: The updated prompt text content. + version: + type: integer + description: >- + The current version of the prompt being updated. + variables: + type: array + items: + type: string + description: >- + Updated list of variable names that can be used in the prompt template. + set_as_default: + type: boolean + description: >- + Set the new version as the default (default=True). + additionalProperties: false + required: + - prompt + - version + - set_as_default + title: UpdatePromptRequest + SetDefaultVersionRequest: + type: object + properties: + version: + type: integer + description: The version to set as default. + additionalProperties: false + required: + - version + title: SetDefaultVersionRequest + ProviderInfo: + type: object + properties: + api: + type: string + description: The API name this provider implements + provider_id: + type: string + description: Unique identifier for the provider + provider_type: + type: string + description: The type of provider implementation + config: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Configuration parameters for the provider + health: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Current health status of the provider + additionalProperties: false + required: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + description: >- + Information about a registered provider including its configuration and health + status. + ListProvidersResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ProviderInfo' + description: List of provider information objects + additionalProperties: false + required: + - data + title: ListProvidersResponse + description: >- + Response containing a list of all available providers. + ListOpenAIResponseObject: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + description: >- + List of response objects with their input context + has_more: + type: boolean + description: >- + Whether there are more results available beyond this page + first_id: + type: string + description: >- + Identifier of the first item in this page + last_id: + type: string + description: Identifier of the last item in this page + object: + type: string + const: list + default: list + description: Object type identifier, always "list" + additionalProperties: false + required: + - data + - has_more + - first_id + - last_id + - object + title: ListOpenAIResponseObject + description: >- + Paginated list of OpenAI response objects with navigation metadata. OpenAIResponseAnnotationCitation: type: object properties: @@ -6960,6 +5245,24 @@ components: url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + OpenAIResponseError: + type: object + properties: + code: + type: string + description: >- + Error code identifying the type of failure + message: + type: string + description: >- + Human-readable error message describing the failure + additionalProperties: false + required: + - code + - message + title: OpenAIResponseError + description: >- + Error details for failed OpenAI response requests. OpenAIResponseInput: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' @@ -7052,6 +5355,499 @@ components: title: OpenAIResponseInputMessageContentText description: >- Text content for input messages in OpenAI response format. + OpenAIResponseMCPApprovalRequest: + type: object + properties: + arguments: + type: string + id: + type: string + name: + type: string + server_label: + type: string + type: + type: string + const: mcp_approval_request + default: mcp_approval_request + additionalProperties: false + required: + - arguments + - id + - name + - server_label + - type + title: OpenAIResponseMCPApprovalRequest + description: >- + A request for human approval of a tool invocation. + OpenAIResponseMCPApprovalResponse: + type: object + properties: + approval_request_id: + type: string + approve: + type: boolean + type: + type: string + const: mcp_approval_response + default: mcp_approval_response + id: + type: string + reason: + type: string + additionalProperties: false + required: + - approval_request_id + - approve + - type + title: OpenAIResponseMCPApprovalResponse + description: A response to an MCP approval request. + OpenAIResponseMessage: + type: object + properties: + content: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/OpenAIResponseInputMessageContent' + - type: array + items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageContent' + role: + oneOf: + - type: string + const: system + - type: string + const: developer + - type: string + const: user + - type: string + const: assistant + type: + type: string + const: message + default: message + id: + type: string + status: + type: string + additionalProperties: false + required: + - content + - role + - type + title: OpenAIResponseMessage + description: >- + Corresponds to the various Message types in the Responses API. They are all + under one type because the Responses API gives them all the same "type" value, + and there is no way to tell them apart in certain scenarios. + OpenAIResponseObjectWithInput: + type: object + properties: + created_at: + type: integer + description: >- + Unix timestamp when the response was created + error: + $ref: '#/components/schemas/OpenAIResponseError' + description: >- + (Optional) Error details if the response generation failed + id: + type: string + description: Unique identifier for this response + model: + type: string + description: Model identifier used for generation + object: + type: string + const: response + default: response + description: >- + Object type identifier, always "response" + output: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseOutput' + description: >- + List of generated output items (messages, tool calls, etc.) + parallel_tool_calls: + type: boolean + default: false + description: >- + Whether tool calls can be executed in parallel + previous_response_id: + type: string + description: >- + (Optional) ID of the previous response in a conversation + status: + type: string + description: >- + Current status of the response generation + temperature: + type: number + description: >- + (Optional) Sampling temperature used for generation + text: + $ref: '#/components/schemas/OpenAIResponseText' + description: >- + Text formatting configuration for the response + top_p: + type: number + description: >- + (Optional) Nucleus sampling parameter used for generation + truncation: + type: string + description: >- + (Optional) Truncation strategy applied to the response + input: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: >- + List of input items that led to this response + additionalProperties: false + required: + - created_at + - id + - model + - object + - output + - parallel_tool_calls + - status + - text + - input + title: OpenAIResponseObjectWithInput + description: >- + OpenAI response object extended with input context information. + OpenAIResponseOutput: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + discriminator: + propertyName: type + mapping: + message: '#/components/schemas/OpenAIResponseMessage' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + OpenAIResponseOutputMessageContent: + type: object + properties: + text: + type: string + type: + type: string + const: output_text + default: output_text + annotations: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseAnnotations' + additionalProperties: false + required: + - text + - type + - annotations + title: >- + OpenAIResponseOutputMessageContentOutputText + "OpenAIResponseOutputMessageFileSearchToolCall": + type: object + properties: + id: + type: string + description: Unique identifier for this tool call + queries: + type: array + items: + type: string + description: List of search queries executed + status: + type: string + description: >- + Current status of the file search operation + type: + type: string + const: file_search_call + default: file_search_call + description: >- + Tool call type identifier, always "file_search_call" + results: + type: array + items: + type: object + properties: + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Key-value attributes associated with the file + file_id: + type: string + description: >- + Unique identifier of the file containing the result + filename: + type: string + description: Name of the file containing the result + score: + type: number + description: >- + Relevance score for this search result (between 0 and 1) + text: + type: string + description: Text content of the search result + additionalProperties: false + required: + - attributes + - file_id + - filename + - score + - text + title: >- + OpenAIResponseOutputMessageFileSearchToolCallResults + description: >- + Search results returned by the file search operation. + description: >- + (Optional) Search results returned by the file search operation + additionalProperties: false + required: + - id + - queries + - status + - type + title: >- + OpenAIResponseOutputMessageFileSearchToolCall + description: >- + File search tool call output message for OpenAI responses. + "OpenAIResponseOutputMessageFunctionToolCall": + type: object + properties: + call_id: + type: string + description: Unique identifier for the function call + name: + type: string + description: Name of the function being called + arguments: + type: string + description: >- + JSON string containing the function arguments + type: + type: string + const: function_call + default: function_call + description: >- + Tool call type identifier, always "function_call" + id: + type: string + description: >- + (Optional) Additional identifier for the tool call + status: + type: string + description: >- + (Optional) Current status of the function call execution + additionalProperties: false + required: + - call_id + - name + - arguments + - type + title: >- + OpenAIResponseOutputMessageFunctionToolCall + description: >- + Function tool call output message for OpenAI responses. + OpenAIResponseOutputMessageMCPCall: + type: object + properties: + id: + type: string + description: Unique identifier for this MCP call + type: + type: string + const: mcp_call + default: mcp_call + description: >- + Tool call type identifier, always "mcp_call" + arguments: + type: string + description: >- + JSON string containing the MCP call arguments + name: + type: string + description: Name of the MCP method being called + server_label: + type: string + description: >- + Label identifying the MCP server handling the call + error: + type: string + description: >- + (Optional) Error message if the MCP call failed + output: + type: string + description: >- + (Optional) Output result from the successful MCP call + additionalProperties: false + required: + - id + - type + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: >- + Model Context Protocol (MCP) call output message for OpenAI responses. + OpenAIResponseOutputMessageMCPListTools: + type: object + properties: + id: + type: string + description: >- + Unique identifier for this MCP list tools operation + type: + type: string + const: mcp_list_tools + default: mcp_list_tools + description: >- + Tool call type identifier, always "mcp_list_tools" + server_label: + type: string + description: >- + Label identifying the MCP server providing the tools + tools: + type: array + items: + type: object + properties: + input_schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + JSON schema defining the tool's input parameters + name: + type: string + description: Name of the tool + description: + type: string + description: >- + (Optional) Description of what the tool does + additionalProperties: false + required: + - input_schema + - name + title: MCPListToolsTool + description: >- + Tool definition returned by MCP list tools operation. + description: >- + List of available tools provided by the MCP server + additionalProperties: false + required: + - id + - type + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools + description: >- + MCP list tools output message containing available tools from an MCP server. + "OpenAIResponseOutputMessageWebSearchToolCall": + type: object + properties: + id: + type: string + description: Unique identifier for this tool call + status: + type: string + description: >- + Current status of the web search operation + type: + type: string + const: web_search_call + default: web_search_call + description: >- + Tool call type identifier, always "web_search_call" + additionalProperties: false + required: + - id + - status + - type + title: >- + OpenAIResponseOutputMessageWebSearchToolCall + description: >- + Web search tool call output message for OpenAI responses. + OpenAIResponseText: + type: object + properties: + format: + type: object + properties: + type: + oneOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + description: >- + Must be "text", "json_schema", or "json_object" to identify the format + type + name: + type: string + description: >- + The name of the response format. Only used for json_schema. + schema: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The JSON schema the response should conform to. In a Python SDK, this + is often a `pydantic` model. Only used for json_schema. + description: + type: string + description: >- + (Optional) A description of the response format. Only used for json_schema. + strict: + type: boolean + description: >- + (Optional) Whether to strictly enforce the JSON schema. If true, the + response must match the schema exactly. Only used for json_schema. + additionalProperties: false + required: + - type + description: >- + (Optional) Text format configuration specifying output format requirements + additionalProperties: false + title: OpenAIResponseText + description: >- + Text response configuration for OpenAI responses. OpenAIResponseInputTool: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' @@ -7262,302 +6058,6 @@ components: title: OpenAIResponseInputToolWebSearch description: >- Web search tool configuration for OpenAI response inputs. - OpenAIResponseMCPApprovalRequest: - type: object - properties: - arguments: - type: string - id: - type: string - name: - type: string - server_label: - type: string - type: - type: string - const: mcp_approval_request - default: mcp_approval_request - additionalProperties: false - required: - - arguments - - id - - name - - server_label - - type - title: OpenAIResponseMCPApprovalRequest - description: >- - A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: - type: object - properties: - approval_request_id: - type: string - approve: - type: boolean - type: - type: string - const: mcp_approval_response - default: mcp_approval_response - id: - type: string - reason: - type: string - additionalProperties: false - required: - - approval_request_id - - approve - - type - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage: - type: object - properties: - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInputMessageContent' - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContent' - role: - oneOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - type: - type: string - const: message - default: message - id: - type: string - status: - type: string - additionalProperties: false - required: - - content - - role - - type - title: OpenAIResponseMessage - description: >- - Corresponds to the various Message types in the Responses API. They are all - under one type because the Responses API gives them all the same "type" value, - and there is no way to tell them apart in certain scenarios. - OpenAIResponseOutputMessageContent: - type: object - properties: - text: - type: string - type: - type: string - const: output_text - default: output_text - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' - additionalProperties: false - required: - - text - - type - - annotations - title: >- - OpenAIResponseOutputMessageContentOutputText - "OpenAIResponseOutputMessageFileSearchToolCall": - type: object - properties: - id: - type: string - description: Unique identifier for this tool call - queries: - type: array - items: - type: string - description: List of search queries executed - status: - type: string - description: >- - Current status of the file search operation - type: - type: string - const: file_search_call - default: file_search_call - description: >- - Tool call type identifier, always "file_search_call" - results: - type: array - items: - type: object - properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes associated with the file - file_id: - type: string - description: >- - Unique identifier of the file containing the result - filename: - type: string - description: Name of the file containing the result - score: - type: number - description: >- - Relevance score for this search result (between 0 and 1) - text: - type: string - description: Text content of the search result - additionalProperties: false - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - description: >- - Search results returned by the file search operation. - description: >- - (Optional) Search results returned by the file search operation - additionalProperties: false - required: - - id - - queries - - status - - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": - type: object - properties: - call_id: - type: string - description: Unique identifier for the function call - name: - type: string - description: Name of the function being called - arguments: - type: string - description: >- - JSON string containing the function arguments - type: - type: string - const: function_call - default: function_call - description: >- - Tool call type identifier, always "function_call" - id: - type: string - description: >- - (Optional) Additional identifier for the tool call - status: - type: string - description: >- - (Optional) Current status of the function call execution - additionalProperties: false - required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall - description: >- - Function tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageWebSearchToolCall": - type: object - properties: - id: - type: string - description: Unique identifier for this tool call - status: - type: string - description: >- - Current status of the web search operation - type: - type: string - const: web_search_call - default: web_search_call - description: >- - Tool call type identifier, always "web_search_call" - additionalProperties: false - required: - - id - - status - - type - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - description: >- - Web search tool call output message for OpenAI responses. - OpenAIResponseText: - type: object - properties: - format: - type: object - properties: - type: - oneOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - description: >- - Must be "text", "json_schema", or "json_object" to identify the format - type - name: - type: string - description: >- - The name of the response format. Only used for json_schema. - schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The JSON schema the response should conform to. In a Python SDK, this - is often a `pydantic` model. Only used for json_schema. - description: - type: string - description: >- - (Optional) A description of the response format. Only used for json_schema. - strict: - type: boolean - description: >- - (Optional) Whether to strictly enforce the JSON schema. If true, the - response must match the schema exactly. Only used for json_schema. - additionalProperties: false - required: - - type - description: >- - (Optional) Text format configuration specifying output format requirements - additionalProperties: false - title: OpenAIResponseText - description: >- - Text response configuration for OpenAI responses. CreateOpenaiResponseRequest: type: object properties: @@ -7604,24 +6104,6 @@ components: - input - model title: CreateOpenaiResponseRequest - OpenAIResponseError: - type: object - properties: - code: - type: string - description: >- - Error code identifying the type of failure - message: - type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false - required: - - code - - message - title: OpenAIResponseError - description: >- - Error details for failed OpenAI response requests. OpenAIResponseObject: type: object properties: @@ -7693,125 +6175,6 @@ components: title: OpenAIResponseObject description: >- Complete OpenAI response object containing generation results and metadata. - OpenAIResponseOutput: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - discriminator: - propertyName: type - mapping: - message: '#/components/schemas/OpenAIResponseMessage' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - OpenAIResponseOutputMessageMCPCall: - type: object - properties: - id: - type: string - description: Unique identifier for this MCP call - type: - type: string - const: mcp_call - default: mcp_call - description: >- - Tool call type identifier, always "mcp_call" - arguments: - type: string - description: >- - JSON string containing the MCP call arguments - name: - type: string - description: Name of the MCP method being called - server_label: - type: string - description: >- - Label identifying the MCP server handling the call - error: - type: string - description: >- - (Optional) Error message if the MCP call failed - output: - type: string - description: >- - (Optional) Output result from the successful MCP call - additionalProperties: false - required: - - id - - type - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: - type: object - properties: - id: - type: string - description: >- - Unique identifier for this MCP list tools operation - type: - type: string - const: mcp_list_tools - default: mcp_list_tools - description: >- - Tool call type identifier, always "mcp_list_tools" - server_label: - type: string - description: >- - Label identifying the MCP server providing the tools - tools: - type: array - items: - type: object - properties: - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - JSON schema defining the tool's input parameters - name: - type: string - description: Name of the tool - description: - type: string - description: >- - (Optional) Description of what the tool does - additionalProperties: false - required: - - input_schema - - name - title: MCPListToolsTool - description: >- - Tool definition returned by MCP list tools operation. - description: >- - List of available tools provided by the MCP server - additionalProperties: false - required: - - id - - type - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - description: >- - MCP list tools output message containing available tools from an MCP server. OpenAIResponseContentPartOutputText: type: object properties: @@ -8513,61 +6876,6 @@ components: - type title: >- OpenAIResponseObjectStreamResponseWebSearchCallSearching - CreatePromptRequest: - type: object - properties: - prompt: - type: string - description: >- - The prompt text content with variable placeholders. - variables: - type: array - items: - type: string - description: >- - List of variable names that can be used in the prompt template. - additionalProperties: false - required: - - prompt - title: CreatePromptRequest - Prompt: - type: object - properties: - prompt: - type: string - description: >- - The system prompt text with variable placeholders. Variables are only - supported when using the Responses API. - version: - type: integer - description: >- - Version (integer starting at 1, incremented on save) - prompt_id: - type: string - description: >- - Unique identifier formatted as 'pmpt_<48-digit-hash>' - variables: - type: array - items: - type: string - description: >- - List of prompt variable names that can be used in the prompt template - is_default: - type: boolean - default: false - description: >- - Boolean indicating whether this version is the default version for this - prompt - additionalProperties: false - required: - - version - - prompt_id - - variables - - is_default - title: Prompt - description: >- - A prompt resource representing a stored OpenAI Compatible prompt template - in Llama Stack. OpenAIDeleteResponseObject: type: object properties: @@ -8593,200 +6901,124 @@ components: title: OpenAIDeleteResponseObject description: >- Response object confirming deletion of an OpenAI response. - AgentCandidate: + ListOpenAIResponseInputItem: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/OpenAIResponseInput' + description: List of input items + object: + type: string + const: list + default: list + description: Object type identifier, always "list" + additionalProperties: false + required: + - data + - object + title: ListOpenAIResponseInputItem + description: >- + List container for OpenAI response input items. + CompletionMessage: + type: object + properties: + role: + type: string + const: assistant + default: assistant + description: >- + Must be "assistant" to identify this as the model's response + content: + $ref: '#/components/schemas/InterleavedContent' + description: The content of the model's response + stop_reason: + type: string + enum: + - end_of_turn + - end_of_message + - out_of_tokens + description: >- + Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: + The model finished generating the entire response. - `StopReason.end_of_message`: + The model finished generating but generated a partial response -- usually, + a tool call. The user may call the tool and continue the conversation + with the tool's response. - `StopReason.out_of_tokens`: The model ran + out of token budget. + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + description: >- + List of tool calls. Each tool call is a ToolCall object. + additionalProperties: false + required: + - role + - content + - stop_reason + title: CompletionMessage + description: >- + A message containing the model's (assistant) response in a chat conversation. + ImageContentItem: type: object properties: type: type: string - const: agent - default: agent - config: - $ref: '#/components/schemas/AgentConfig' + const: image + default: image description: >- - The configuration for the agent candidate. - additionalProperties: false - required: - - type - - config - title: AgentCandidate - description: An agent candidate for evaluation. - AggregationFunctionType: - type: string - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - description: >- - Types of aggregation functions for scoring results. - BasicScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: basic - default: basic - description: >- - The type of scoring function parameters, always basic - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - aggregation_functions - title: BasicScoringFnParams - description: >- - Parameters for basic scoring function configuration. - BenchmarkConfig: - type: object - properties: - eval_candidate: - oneOf: - - $ref: '#/components/schemas/ModelCandidate' - - $ref: '#/components/schemas/AgentCandidate' - discriminator: - propertyName: type - mapping: - model: '#/components/schemas/ModelCandidate' - agent: '#/components/schemas/AgentCandidate' - description: The candidate to evaluate. - scoring_params: + Discriminator type of the content item. Always "image" + image: type: object - additionalProperties: - $ref: '#/components/schemas/ScoringFnParams' + properties: + url: + $ref: '#/components/schemas/URL' + description: >- + A URL of the image or data URL in the format of data:image/{type};base64,{data}. + Note that URL could have length limits. + data: + type: string + contentEncoding: base64 + description: base64 encoded image data as string + additionalProperties: false description: >- - Map between scoring function id and parameters for each scoring function - you want to run - num_examples: - type: integer - description: >- - (Optional) The number of examples to evaluate. If not provided, all examples - in the dataset will be evaluated - additionalProperties: false - required: - - eval_candidate - - scoring_params - title: BenchmarkConfig - description: >- - A benchmark configuration for evaluation. - LLMAsJudgeScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: llm_as_judge - default: llm_as_judge - description: >- - The type of scoring function parameters, always llm_as_judge - judge_model: - type: string - description: >- - Identifier of the LLM model to use as a judge for scoring - prompt_template: - type: string - description: >- - (Optional) Custom prompt template for the judge model - judge_score_regexes: - type: array - items: - type: string - description: >- - Regexes to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row + Image as a base64 encoded string or an URL additionalProperties: false required: - type - - judge_model - - judge_score_regexes - - aggregation_functions - title: LLMAsJudgeScoringFnParams - description: >- - Parameters for LLM-as-judge scoring function configuration. - ModelCandidate: - type: object - properties: - type: - type: string - const: model - default: model - model: - type: string - description: The model ID to evaluate. - sampling_params: - $ref: '#/components/schemas/SamplingParams' - description: The sampling parameters for the model. - system_message: - $ref: '#/components/schemas/SystemMessage' - description: >- - (Optional) The system message providing instructions or context to the - model. - additionalProperties: false - required: - - type - - model - - sampling_params - title: ModelCandidate - description: A model candidate for evaluation. - RegexParserScoringFnParams: - type: object - properties: - type: - $ref: '#/components/schemas/ScoringFnParamsType' - const: regex_parser - default: regex_parser - description: >- - The type of scoring function parameters, always regex_parser - parsing_regexes: - type: array - items: - type: string - description: >- - Regex to extract the answer from generated response - aggregation_functions: - type: array - items: - $ref: '#/components/schemas/AggregationFunctionType' - description: >- - Aggregation functions to apply to the scores of each row - additionalProperties: false - required: - - type - - parsing_regexes - - aggregation_functions - title: RegexParserScoringFnParams - description: >- - Parameters for regex parser scoring function configuration. - ScoringFnParams: + - image + title: ImageContentItem + description: A image content item + InterleavedContent: oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + InterleavedContentItem: + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - basic: '#/components/schemas/BasicScoringFnParams' - ScoringFnParamsType: - type: string - enum: - - llm_as_judge - - regex_parser - - basic - title: ScoringFnParamsType - description: >- - Types of scoring function parameter configurations. + image: '#/components/schemas/ImageContentItem' + text: '#/components/schemas/TextContentItem' + Message: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' + discriminator: + propertyName: role + mapping: + user: '#/components/schemas/UserMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolResponseMessage' + assistant: '#/components/schemas/CompletionMessage' SystemMessage: type: object properties: @@ -8809,295 +7041,7 @@ components: title: SystemMessage description: >- A system message providing instructions or context to the model. - EvaluateRowsRequest: - type: object - properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to evaluate. - scoring_functions: - type: array - items: - type: string - description: >- - The scoring functions to use for the evaluation. - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. - additionalProperties: false - required: - - input_rows - - scoring_functions - - benchmark_config - title: EvaluateRowsRequest - EvaluateResponse: - type: object - properties: - generations: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The generations from the evaluation. - scores: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: The scores from the evaluation. - additionalProperties: false - required: - - generations - - scores - title: EvaluateResponse - description: The response from an evaluation. - 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 - description: >- - The scoring result for each row. Each row is a map of column name to value. - aggregated_results: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Map of metric name to aggregated value - additionalProperties: false - required: - - score_rows - - aggregated_results - title: ScoringResult - description: A scoring result for a single row. - Agent: - type: object - properties: - agent_id: - type: string - description: Unique identifier for the agent - agent_config: - $ref: '#/components/schemas/AgentConfig' - description: Configuration settings for the agent - created_at: - type: string - format: date-time - description: Timestamp when the agent was created - additionalProperties: false - required: - - agent_id - - agent_config - - created_at - title: Agent - description: >- - An agent instance with configuration and metadata. - Session: - type: object - properties: - session_id: - type: string - description: >- - Unique identifier for the conversation session - session_name: - type: string - description: Human-readable name for the session - turns: - type: array - items: - $ref: '#/components/schemas/Turn' - description: >- - List of all turns that have occurred in this session - started_at: - type: string - format: date-time - description: Timestamp when the session was created - additionalProperties: false - required: - - session_id - - session_name - - turns - - started_at - title: Session - description: >- - A single session of an interaction with an Agentic System. - AgentStepResponse: - type: object - properties: - step: - oneOf: - - $ref: '#/components/schemas/InferenceStep' - - $ref: '#/components/schemas/ToolExecutionStep' - - $ref: '#/components/schemas/ShieldCallStep' - - $ref: '#/components/schemas/MemoryRetrievalStep' - discriminator: - propertyName: step_type - mapping: - inference: '#/components/schemas/InferenceStep' - tool_execution: '#/components/schemas/ToolExecutionStep' - shield_call: '#/components/schemas/ShieldCallStep' - memory_retrieval: '#/components/schemas/MemoryRetrievalStep' - description: >- - The complete step data and execution details - additionalProperties: false - required: - - step - title: AgentStepResponse - description: >- - Response containing details of a specific agent step. - Benchmark: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_db - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: benchmark - default: benchmark - description: The resource type, always benchmark - dataset_id: - type: string - description: >- - Identifier of the dataset to use for the benchmark evaluation - scoring_functions: - type: array - items: - type: string - description: >- - List of scoring function identifiers to apply during evaluation - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Metadata for this evaluation task - additionalProperties: false - required: - - identifier - - provider_id - - type - - dataset_id - - scoring_functions - - metadata - title: Benchmark - description: >- - A benchmark resource for evaluating model performance. - OpenAIAssistantMessageParam: - type: object - properties: - role: - type: string - const: assistant - default: assistant - description: >- - Must be "assistant" to identify this as the model's response - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The content of the model's response - name: - type: string - description: >- - (Optional) The name of the assistant message participant. - tool_calls: - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - description: >- - List of tool calls. Each tool call is an OpenAIChatCompletionToolCall - object. - additionalProperties: false - required: - - role - title: OpenAIAssistantMessageParam - description: >- - A message containing the model's (assistant) response in an OpenAI-compatible - chat completion request. - "OpenAIChatCompletionContentPartImageParam": - type: object - properties: - type: - type: string - const: image_url - default: image_url - description: >- - Must be "image_url" to identify this as image content - image_url: - $ref: '#/components/schemas/OpenAIImageURL' - description: >- - Image URL specification and processing details - additionalProperties: false - required: - - type - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - description: >- - Image content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionContentPartParam: - oneOf: - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - - $ref: '#/components/schemas/OpenAIFile' - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' - file: '#/components/schemas/OpenAIFile' - OpenAIChatCompletionContentPartTextParam: + TextContentItem: type: object properties: type: @@ -9105,254 +7049,67 @@ components: const: text default: text description: >- - Must be "text" to identify this as text content + Discriminator type of the content item. Always "text" text: type: string - description: The text content of the message + description: Text content additionalProperties: false required: - type - text - title: OpenAIChatCompletionContentPartTextParam - description: >- - Text content part for OpenAI-compatible chat completion messages. - OpenAIChatCompletionToolCall: + title: TextContentItem + description: A text content item + ToolCall: type: object properties: - index: - type: integer - description: >- - (Optional) Index of the tool call in the list - id: + call_id: type: string - description: >- - (Optional) Unique identifier for the tool call - type: - type: string - const: function - default: function - description: >- - Must be "function" to identify this as a function call - function: - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - description: (Optional) Function call details - additionalProperties: false - required: - - type - title: OpenAIChatCompletionToolCall - description: >- - Tool call specification for OpenAI-compatible chat completion responses. - OpenAIChatCompletionToolCallFunction: - type: object - properties: - name: - type: string - description: (Optional) Name of the function to call + tool_name: + oneOf: + - type: string + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + - type: string arguments: - type: string - description: >- - (Optional) Arguments to pass to the function as a JSON string - additionalProperties: false - title: OpenAIChatCompletionToolCallFunction - description: >- - Function call details for OpenAI-compatible tool calls. - OpenAIChoice: - type: object - properties: - message: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/OpenAIUserMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - description: The message from the model - finish_reason: - type: string - description: The reason the model stopped generating - index: - type: integer - description: The index of the choice - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - description: >- - (Optional) The log probabilities for the tokens in the message - additionalProperties: false - required: - - message - - finish_reason - - index - title: OpenAIChoice - description: >- - A choice from an OpenAI-compatible chat completion response. - OpenAIChoiceLogprobs: - type: object - properties: - content: - type: array - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - description: >- - (Optional) The log probabilities for the tokens in the message - refusal: - type: array - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - description: >- - (Optional) The log probabilities for the tokens in the message - additionalProperties: false - title: OpenAIChoiceLogprobs - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - OpenAIDeveloperMessageParam: - type: object - properties: - role: - type: string - const: developer - default: developer - description: >- - Must be "developer" to identify this as a developer message - content: oneOf: - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: The content of the developer message - name: + - 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' + arguments_json: type: string - description: >- - (Optional) The name of the developer message participant. additionalProperties: false required: - - role - - content - title: OpenAIDeveloperMessageParam - description: >- - A message from the developer in an OpenAI-compatible chat completion request. - OpenAIFile: - type: object - properties: - type: - type: string - const: file - default: file - file: - $ref: '#/components/schemas/OpenAIFileFile' - additionalProperties: false - required: - - type - - file - title: OpenAIFile - OpenAIFileFile: - type: object - properties: - file_data: - type: string - file_id: - type: string - filename: - type: string - additionalProperties: false - title: OpenAIFileFile - OpenAIImageURL: - type: object - properties: - url: - type: string - description: >- - URL of the image to include in the message - detail: - type: string - description: >- - (Optional) Level of detail for image processing. Can be "low", "high", - or "auto" - additionalProperties: false - required: - - url - title: OpenAIImageURL - description: >- - Image URL specification for OpenAI-compatible chat completion messages. - OpenAIMessageParam: - oneOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/OpenAIUserMessageParam' - system: '#/components/schemas/OpenAISystemMessageParam' - assistant: '#/components/schemas/OpenAIAssistantMessageParam' - tool: '#/components/schemas/OpenAIToolMessageParam' - developer: '#/components/schemas/OpenAIDeveloperMessageParam' - OpenAISystemMessageParam: - type: object - properties: - role: - type: string - const: system - default: system - description: >- - Must be "system" to identify this as a system message - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - description: >- - The content of the "system prompt". If multiple system messages are provided, - they are concatenated. The underlying Llama Stack code may also add other - system messages (for example, for formatting tool definitions). - name: - type: string - description: >- - (Optional) The name of the system message participant. - additionalProperties: false - required: - - role - - content - title: OpenAISystemMessageParam - description: >- - A system message providing instructions or context to the model. - OpenAITokenLogProb: - type: object - properties: - token: - type: string - bytes: - type: array - items: - type: integer - logprob: - type: number - top_logprobs: - type: array - items: - $ref: '#/components/schemas/OpenAITopLogProb' - additionalProperties: false - required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb - description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - OpenAIToolMessageParam: + - call_id + - tool_name + - arguments + title: ToolCall + ToolResponseMessage: type: object properties: role: @@ -9361,46 +7118,33 @@ components: default: tool description: >- Must be "tool" to identify this as a tool response - tool_call_id: + call_id: type: string description: >- Unique identifier for the tool call this response is for content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + $ref: '#/components/schemas/InterleavedContent' description: The response content from the tool additionalProperties: false required: - role - - tool_call_id + - call_id - content - title: OpenAIToolMessageParam + title: ToolResponseMessage description: >- - A message representing the result of a tool invocation in an OpenAI-compatible - chat completion request. - OpenAITopLogProb: + A message representing the result of a tool invocation. + URL: type: object properties: - token: + uri: type: string - bytes: - type: array - items: - type: integer - logprob: - type: number + description: The URL string pointing to the resource additionalProperties: false required: - - token - - logprob - title: OpenAITopLogProb - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - OpenAIUserMessageParam: + - uri + title: URL + description: A URL reference to external content. + UserMessage: type: object properties: role: @@ -9410,106 +7154,69 @@ components: description: >- Must be "user" to identify this as a user message content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionContentPartParam' + $ref: '#/components/schemas/InterleavedContent' description: >- The content of the message, which can include text and other media - name: - type: string + context: + $ref: '#/components/schemas/InterleavedContent' description: >- - (Optional) The name of the user message participant. + (Optional) This field is used internally by Llama Stack to pass RAG context. + This field may be removed in the API in the future. additionalProperties: false required: - role - content - title: OpenAIUserMessageParam + title: UserMessage description: >- - A message from the user in an OpenAI-compatible chat completion request. - OpenAICompletionWithInputMessages: + A message from the user in a chat conversation. + RunShieldRequest: type: object properties: - id: + shield_id: type: string - description: The ID of the chat completion - choices: + description: The identifier of the shield to run. + messages: type: array items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: - type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - input_messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' + $ref: '#/components/schemas/Message' + description: The messages to run the shield on. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the shield. additionalProperties: false required: - - id - - choices - - object - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - Dataset: + - shield_id + - messages + - params + title: RunShieldRequest + RunShieldResponse: type: object properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_db - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: dataset - default: dataset + violation: + $ref: '#/components/schemas/SafetyViolation' description: >- - Type of resource, always 'dataset' for datasets - purpose: + (Optional) Safety violation detected by the shield, if any + additionalProperties: false + title: RunShieldResponse + description: Response from running a safety shield. + SafetyViolation: + type: object + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + description: Severity level of the violation + user_message: type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer description: >- - Purpose of the dataset indicating its intended use - source: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - description: >- - Data source configuration for the dataset + (Optional) Message to convey to the user about the violation metadata: type: object additionalProperties: @@ -9520,131 +7227,24 @@ components: - type: string - type: array - type: object - description: Additional metadata for the dataset + description: >- + Additional metadata including specific violation codes for debugging and + telemetry additionalProperties: false required: - - identifier - - provider_id - - type - - purpose - - source + - violation_level - metadata - title: Dataset + title: SafetyViolation description: >- - Dataset resource for storing and accessing training or evaluation data. - RowsDataSource: - type: object - properties: - type: - type: string - const: rows - default: rows - rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", - "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, - world!"}]} ] - additionalProperties: false - required: - - type - - rows - title: RowsDataSource - description: A dataset stored in rows. - URIDataSource: - type: object - properties: - type: - type: string - const: uri - default: uri - uri: - type: string - description: >- - The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" - additionalProperties: false - required: - - type - - uri - title: URIDataSource - description: >- - A dataset that can be obtained from a URI. - Model: - type: object - properties: - identifier: - type: string - description: >- - Unique identifier for this resource in llama stack - provider_resource_id: - type: string - description: >- - Unique identifier for this resource in the provider - provider_id: - type: string - description: >- - ID of the provider that owns this resource - type: - type: string - enum: - - model - - shield - - vector_db - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: model - default: model - description: >- - The resource type, always 'model' for model resources - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model - model_type: - $ref: '#/components/schemas/ModelType' - default: llm - description: >- - The type of model (LLM or embedding model) - additionalProperties: false - required: - - identifier - - provider_id - - type - - metadata - - model_type - title: Model - description: >- - A model resource representing an AI model registered in Llama Stack. - ModelType: + Details of a safety violation detected by content moderation. + ViolationLevel: type: string enum: - - llm - - embedding - title: ModelType - description: >- - Enumeration of supported model types in Llama Stack. + - info + - warn + - error + title: ViolationLevel + description: Severity level of a safety violation. AgentTurnInputType: type: object properties: @@ -9659,6 +7259,17 @@ components: - type title: AgentTurnInputType description: Parameter type for agent turn input. + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: >- + Types of aggregation functions for scoring results. ArrayType: type: object properties: @@ -9672,6 +7283,28 @@ components: - type title: ArrayType description: Parameter type for array values. + BasicScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: basic + default: basic + description: >- + The type of scoring function parameters, always basic + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - aggregation_functions + title: BasicScoringFnParams + description: >- + Parameters for basic scoring function configuration. BooleanType: type: object properties: @@ -9727,6 +7360,44 @@ components: - type title: JsonType description: Parameter type for JSON values. + LLMAsJudgeScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: llm_as_judge + default: llm_as_judge + description: >- + The type of scoring function parameters, always llm_as_judge + judge_model: + type: string + description: >- + Identifier of the LLM model to use as a judge for scoring + prompt_template: + type: string + description: >- + (Optional) Custom prompt template for the judge model + judge_score_regexes: + type: array + items: + type: string + description: >- + Regexes to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - judge_model + - judge_score_regexes + - aggregation_functions + title: LLMAsJudgeScoringFnParams + description: >- + Parameters for LLM-as-judge scoring function configuration. NumberType: type: object properties: @@ -9753,6 +7424,35 @@ components: - type title: ObjectType description: Parameter type for object values. + RegexParserScoringFnParams: + type: object + properties: + type: + $ref: '#/components/schemas/ScoringFnParamsType' + const: regex_parser + default: regex_parser + description: >- + The type of scoring function parameters, always regex_parser + parsing_regexes: + type: array + items: + type: string + description: >- + Regex to extract the answer from generated response + aggregation_functions: + type: array + items: + $ref: '#/components/schemas/AggregationFunctionType' + description: >- + Aggregation functions to apply to the scores of each row + additionalProperties: false + required: + - type + - parsing_regexes + - aggregation_functions + title: RegexParserScoringFnParams + description: >- + Parameters for regex parser scoring function configuration. ScoringFn: type: object properties: @@ -9827,6 +7527,26 @@ components: title: ScoringFn description: >- A scoring function resource for evaluating model outputs. + ScoringFnParams: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + basic: '#/components/schemas/BasicScoringFnParams' + ScoringFnParamsType: + type: string + enum: + - llm_as_judge + - regex_parser + - basic + title: ScoringFnParamsType + description: >- + Types of scoring function parameter configurations. StringType: type: object properties: @@ -9853,6 +7573,194 @@ components: - type title: UnionType description: Parameter type for union values. + ListScoringFunctionsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ScoringFn' + additionalProperties: false + required: + - data + title: ListScoringFunctionsResponse + ParamType: + oneOf: + - $ref: '#/components/schemas/StringType' + - $ref: '#/components/schemas/NumberType' + - $ref: '#/components/schemas/BooleanType' + - $ref: '#/components/schemas/ArrayType' + - $ref: '#/components/schemas/ObjectType' + - $ref: '#/components/schemas/JsonType' + - $ref: '#/components/schemas/UnionType' + - $ref: '#/components/schemas/ChatCompletionInputType' + - $ref: '#/components/schemas/CompletionInputType' + - $ref: '#/components/schemas/AgentTurnInputType' + discriminator: + propertyName: type + mapping: + string: '#/components/schemas/StringType' + number: '#/components/schemas/NumberType' + boolean: '#/components/schemas/BooleanType' + array: '#/components/schemas/ArrayType' + object: '#/components/schemas/ObjectType' + json: '#/components/schemas/JsonType' + union: '#/components/schemas/UnionType' + chat_completion_input: '#/components/schemas/ChatCompletionInputType' + completion_input: '#/components/schemas/CompletionInputType' + agent_turn_input: '#/components/schemas/AgentTurnInputType' + RegisterScoringFunctionRequest: + type: object + properties: + scoring_fn_id: + type: string + description: >- + The ID of the scoring function to register. + description: + type: string + description: The description of the scoring function. + return_type: + $ref: '#/components/schemas/ParamType' + description: The return type of the scoring function. + provider_scoring_fn_id: + type: string + description: >- + The ID of the provider scoring function to use for the scoring function. + provider_id: + type: string + description: >- + The ID of the provider to use for the scoring function. + params: + $ref: '#/components/schemas/ScoringFnParams' + description: >- + The parameters for the scoring function for benchmark eval, these can + be overridden for app eval. + additionalProperties: false + required: + - scoring_fn_id + - description + - return_type + title: RegisterScoringFunctionRequest + ScoreRequest: + type: object + properties: + input_rows: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The rows to score. + scoring_functions: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/ScoringFnParams' + - type: 'null' + description: >- + The scoring functions to use for the scoring. + additionalProperties: false + required: + - input_rows + - scoring_functions + title: ScoreRequest + ScoreResponse: + type: object + properties: + results: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + description: >- + A map of scoring function name to ScoringResult. + additionalProperties: false + required: + - results + title: ScoreResponse + description: The response from scoring. + 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 + description: >- + The scoring result for each row. Each row is a map of column name to value. + aggregated_results: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Map of metric name to aggregated value + additionalProperties: false + required: + - score_rows + - aggregated_results + title: ScoringResult + description: A scoring result for a single row. + ScoreBatchRequest: + type: object + properties: + dataset_id: + type: string + description: The ID of the dataset to score. + scoring_functions: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/ScoringFnParams' + - type: 'null' + description: >- + The scoring functions to use for the scoring. + save_results_dataset: + type: boolean + description: >- + Whether to save the results to a dataset. + additionalProperties: false + required: + - dataset_id + - scoring_functions + - save_results_dataset + title: ScoreBatchRequest + ScoreBatchResponse: + type: object + properties: + dataset_id: + type: string + description: >- + (Optional) The identifier of the dataset that was scored + results: + type: object + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + description: >- + A map of scoring function name to ScoringResult + additionalProperties: false + required: + - results + title: ScoreBatchResponse + description: >- + Response from batch scoring operations on datasets. Shield: type: object properties: @@ -9897,1163 +7805,6 @@ components: title: Shield description: >- A safety shield resource that can be used to check content. - Span: - type: object - properties: - span_id: - type: string - description: Unique identifier for the span - trace_id: - type: string - description: >- - Unique identifier for the trace this span belongs to - parent_span_id: - type: string - description: >- - (Optional) Unique identifier for the parent span, if this is a child span - name: - type: string - description: >- - Human-readable name describing the operation this span represents - start_time: - type: string - format: date-time - description: Timestamp when the operation began - end_time: - type: string - format: date-time - description: >- - (Optional) Timestamp when the operation finished, if completed - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value pairs containing additional metadata about the span - additionalProperties: false - required: - - span_id - - trace_id - - name - - start_time - title: Span - description: >- - A span representing a single operation within a trace. - GetSpanTreeRequest: - type: object - properties: - attributes_to_return: - type: array - items: - type: string - description: The attributes to return in the tree. - max_depth: - type: integer - description: The maximum depth of the tree. - additionalProperties: false - title: GetSpanTreeRequest - SpanStatus: - type: string - enum: - - ok - - error - title: SpanStatus - description: >- - The status of a span indicating whether it completed successfully or with - an error. - SpanWithStatus: - type: object - properties: - span_id: - type: string - description: Unique identifier for the span - trace_id: - type: string - description: >- - Unique identifier for the trace this span belongs to - parent_span_id: - type: string - description: >- - (Optional) Unique identifier for the parent span, if this is a child span - name: - type: string - description: >- - Human-readable name describing the operation this span represents - start_time: - type: string - format: date-time - description: Timestamp when the operation began - end_time: - type: string - format: date-time - description: >- - (Optional) Timestamp when the operation finished, if completed - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value pairs containing additional metadata about the span - status: - $ref: '#/components/schemas/SpanStatus' - description: >- - (Optional) The current status of the span - additionalProperties: false - required: - - span_id - - trace_id - - name - - start_time - title: SpanWithStatus - description: A span that includes status information. - QuerySpanTreeResponse: - type: object - properties: - data: - type: object - additionalProperties: - $ref: '#/components/schemas/SpanWithStatus' - description: >- - Dictionary mapping span IDs to spans with status information - additionalProperties: false - required: - - data - title: QuerySpanTreeResponse - description: >- - Response containing a tree structure of spans. - Tool: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_db - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: tool - default: tool - description: Type of resource, always 'tool' - toolgroup_id: - type: string - description: >- - ID of the tool group this tool belongs to - description: - type: string - description: >- - Human-readable description of what the tool does - parameters: - type: array - items: - $ref: '#/components/schemas/ToolParameter' - description: List of parameters this tool accepts - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool - additionalProperties: false - required: - - identifier - - provider_id - - type - - toolgroup_id - - description - - parameters - title: Tool - description: A tool that can be invoked by agents. - ToolGroup: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_db - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: tool_group - default: tool_group - description: Type of resource, always 'tool_group' - mcp_endpoint: - $ref: '#/components/schemas/URL' - description: >- - (Optional) Model Context Protocol endpoint for remote tools - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional arguments for the tool group - additionalProperties: false - required: - - identifier - - provider_id - - type - title: ToolGroup - description: >- - A group of related tools managed together. - Trace: - type: object - properties: - trace_id: - type: string - description: Unique identifier for the trace - root_span_id: - type: string - description: >- - Unique identifier for the root span that started this trace - start_time: - type: string - format: date-time - description: Timestamp when the trace began - end_time: - type: string - format: date-time - description: >- - (Optional) Timestamp when the trace finished, if completed - additionalProperties: false - required: - - trace_id - - root_span_id - - start_time - title: Trace - description: >- - A trace representing the complete execution path of a request across multiple - operations. - Checkpoint: - type: object - properties: - identifier: - type: string - description: Unique identifier for the checkpoint - created_at: - type: string - format: date-time - description: >- - Timestamp when the checkpoint was created - epoch: - type: integer - description: >- - Training epoch when the checkpoint was saved - post_training_job_id: - type: string - description: >- - Identifier of the training job that created this checkpoint - path: - type: string - description: >- - File system path where the checkpoint is stored - training_metrics: - $ref: '#/components/schemas/PostTrainingMetric' - description: >- - (Optional) Training metrics associated with this checkpoint - additionalProperties: false - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - description: Checkpoint created during training runs. - PostTrainingJobArtifactsResponse: - type: object - properties: - job_uuid: - type: string - description: Unique identifier for the training job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false - required: - - job_uuid - - checkpoints - title: PostTrainingJobArtifactsResponse - description: Artifacts of a finetuning job. - PostTrainingMetric: - type: object - properties: - epoch: - type: integer - description: Training epoch number - train_loss: - type: number - description: Loss value on the training dataset - validation_loss: - type: number - description: Loss value on the validation dataset - perplexity: - type: number - description: >- - Perplexity metric indicating model confidence - additionalProperties: false - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - description: >- - Training metrics captured during post-training jobs. - PostTrainingJobStatusResponse: - type: object - properties: - job_uuid: - type: string - description: Unique identifier for the training job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current status of the training job - scheduled_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job was scheduled - started_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job execution began - completed_at: - type: string - format: date-time - description: >- - (Optional) Timestamp when the job finished, if completed - resources_allocated: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Information about computational resources allocated to the - job - checkpoints: - type: array - items: - $ref: '#/components/schemas/Checkpoint' - description: >- - List of model checkpoints created during training - additionalProperties: false - required: - - job_uuid - - status - - checkpoints - title: PostTrainingJobStatusResponse - description: Status of a finetuning job. - ListPostTrainingJobsResponse: - type: object - properties: - data: - type: array - items: - type: object - properties: - job_uuid: - type: string - additionalProperties: false - required: - - job_uuid - title: PostTrainingJob - additionalProperties: false - required: - - data - title: ListPostTrainingJobsResponse - VectorDB: - type: object - properties: - identifier: - type: string - provider_resource_id: - type: string - provider_id: - type: string - type: - type: string - enum: - - model - - shield - - vector_db - - dataset - - scoring_function - - benchmark - - tool - - tool_group - - prompt - const: vector_db - default: vector_db - description: >- - Type of resource, always 'vector_db' for vector databases - embedding_model: - type: string - description: >- - Name of the embedding model to use for vector generation - embedding_dimension: - type: integer - description: Dimension of the embedding vectors - vector_db_name: - type: string - additionalProperties: false - required: - - identifier - - provider_id - - type - - embedding_model - - embedding_dimension - title: VectorDB - description: >- - Vector database resource for storing and querying vector embeddings. - HealthInfo: - type: object - properties: - status: - type: string - enum: - - OK - - Error - - Not Implemented - description: Current health status of the service - additionalProperties: false - required: - - status - title: HealthInfo - description: >- - Health status information for the service. - RAGDocument: - type: object - properties: - document_id: - type: string - description: The unique identifier for the document. - content: - oneOf: - - type: string - - $ref: '#/components/schemas/InterleavedContentItem' - - type: array - items: - $ref: '#/components/schemas/InterleavedContentItem' - - $ref: '#/components/schemas/URL' - description: The content of the document. - mime_type: - type: string - description: The MIME type of the document. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Additional metadata for the document. - additionalProperties: false - required: - - document_id - - content - - metadata - title: RAGDocument - description: >- - A document to be used for document ingestion in the RAG Tool. - InsertRequest: - type: object - properties: - documents: - type: array - items: - $ref: '#/components/schemas/RAGDocument' - description: >- - List of documents to index in the RAG system - vector_db_id: - type: string - description: >- - ID of the vector database to store the document embeddings - chunk_size_in_tokens: - type: integer - description: >- - (Optional) Size in tokens for document chunking during indexing - additionalProperties: false - required: - - documents - - vector_db_id - - chunk_size_in_tokens - title: InsertRequest - Chunk: - type: object - properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - The content of the chunk, which can be interleaved text, images, or other - types. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Metadata associated with the chunk that will be used in the model context - during inference. - embedding: - type: array - items: - type: number - description: >- - Optional embedding for the chunk. If not provided, it will be computed - later. - stored_chunk_id: - type: string - description: >- - The chunk ID that is stored in the vector database. Used for backend functionality. - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: >- - Metadata for the chunk that will NOT be used in the context during inference. - The `chunk_metadata` is required backend functionality. - additionalProperties: false - required: - - content - - metadata - title: Chunk - description: >- - A chunk of content that can be inserted into a vector database. - ChunkMetadata: - type: object - properties: - chunk_id: - type: string - description: >- - The ID of the chunk. If not set, it will be generated based on the document - ID and content. - document_id: - type: string - description: >- - The ID of the document this chunk belongs to. - source: - type: string - description: >- - The source of the content, such as a URL, file path, or other identifier. - created_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was created. - updated_timestamp: - type: integer - description: >- - An optional timestamp indicating when the chunk was last updated. - chunk_window: - type: string - description: >- - The window of the chunk, which can be used to group related chunks together. - chunk_tokenizer: - type: string - description: >- - The tokenizer used to create the chunk. Default is Tiktoken. - chunk_embedding_model: - type: string - description: >- - The embedding model used to create the chunk's embedding. - chunk_embedding_dimension: - type: integer - description: >- - The dimension of the embedding vector for the chunk. - content_token_count: - type: integer - description: >- - The number of tokens in the content of the chunk. - metadata_token_count: - type: integer - description: >- - The number of tokens in the metadata of the chunk. - additionalProperties: false - title: ChunkMetadata - description: >- - `ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional - information about the chunk that will not be used in the context during - inference, but is required for backend functionality. The `ChunkMetadata` is - set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not - expected to change after. Use `Chunk.metadata` for metadata that will - be used in the context during inference. - InsertChunksRequest: - type: object - properties: - vector_db_id: - type: string - description: >- - The identifier of the vector database to insert the chunks into. - chunks: - type: array - items: - $ref: '#/components/schemas/Chunk' - description: >- - The chunks to insert. Each `Chunk` should contain content which can be - interleaved text, images, or other types. `metadata`: `dict[str, Any]` - and `embedding`: `List[float]` are optional. If `metadata` is provided, - you configure how Llama Stack formats the chunk during generation. If - `embedding` is not provided, it will be computed later. - ttl_seconds: - type: integer - description: The time to live of the chunks. - additionalProperties: false - required: - - vector_db_id - - chunks - title: InsertChunksRequest - ProviderInfo: - type: object - properties: - api: - type: string - description: The API name this provider implements - provider_id: - type: string - description: Unique identifier for the provider - provider_type: - type: string - description: The type of provider implementation - config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Configuration parameters for the provider - health: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Current health status of the provider - additionalProperties: false - required: - - api - - provider_id - - provider_type - - config - - health - title: ProviderInfo - description: >- - Information about a registered provider including its configuration and health - status. - InvokeToolRequest: - type: object - properties: - tool_name: - type: string - description: The name of the tool to invoke. - kwargs: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - A dictionary of arguments to pass to the tool. - additionalProperties: false - required: - - tool_name - - kwargs - title: InvokeToolRequest - ToolInvocationResult: - type: object - properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - (Optional) The output content from the tool execution - error_message: - type: string - description: >- - (Optional) Error message if the tool execution failed - error_code: - type: integer - description: >- - (Optional) Numeric error code if the tool execution failed - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional metadata about the tool execution - additionalProperties: false - title: ToolInvocationResult - description: Result of a tool invocation. - PaginatedResponse: - type: object - properties: - data: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The list of items for the current page - has_more: - type: boolean - description: >- - Whether there are more items available after this set - url: - type: string - description: The URL for accessing this list - additionalProperties: false - required: - - data - - has_more - title: PaginatedResponse - description: >- - A generic paginated response that follows a simple format. - Job: - type: object - properties: - job_id: - type: string - description: Unique identifier for the job - status: - type: string - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - description: Current execution status of the job - additionalProperties: false - required: - - job_id - - status - title: Job - description: >- - A job execution instance with status tracking. - ListBenchmarksResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Benchmark' - additionalProperties: false - required: - - data - title: ListBenchmarksResponse - Order: - type: string - enum: - - asc - - desc - title: Order - description: Sort order for paginated responses. - ListOpenAIChatCompletionResponse: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: - type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - input_messages: - type: array - items: - $ref: '#/components/schemas/OpenAIMessageParam' - additionalProperties: false - required: - - id - - choices - - object - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - description: >- - List of chat completion objects with their input messages - has_more: - type: boolean - description: >- - Whether there are more completions available beyond this list - first_id: - type: string - description: ID of the first completion in this list - last_id: - type: string - description: ID of the last completion in this list - object: - type: string - const: list - default: list - description: >- - Must be "list" to identify this as a list response - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIChatCompletionResponse - description: >- - Response from listing OpenAI-compatible chat completions. - ListDatasetsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Dataset' - description: List of datasets - additionalProperties: false - required: - - data - title: ListDatasetsResponse - description: Response from listing datasets. - ListModelsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Model' - additionalProperties: false - required: - - data - title: ListModelsResponse - ListOpenAIResponseInputItem: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: List of input items - object: - type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false - required: - - data - - object - title: ListOpenAIResponseInputItem - description: >- - List container for OpenAI response input items. - ListOpenAIResponseObject: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseObjectWithInput' - description: >- - List of response objects with their input context - has_more: - type: boolean - description: >- - Whether there are more results available beyond this page - first_id: - type: string - description: >- - Identifier of the first item in this page - last_id: - type: string - description: Identifier of the last item in this page - object: - type: string - const: list - default: list - description: Object type identifier, always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIResponseObject - description: >- - Paginated list of OpenAI response objects with navigation metadata. - OpenAIResponseObjectWithInput: - type: object - properties: - created_at: - type: integer - description: >- - Unix timestamp when the response was created - error: - $ref: '#/components/schemas/OpenAIResponseError' - description: >- - (Optional) Error details if the response generation failed - id: - type: string - description: Unique identifier for this response - model: - type: string - description: Model identifier used for generation - object: - type: string - const: response - default: response - description: >- - Object type identifier, always "response" - output: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseOutput' - description: >- - List of generated output items (messages, tool calls, etc.) - parallel_tool_calls: - type: boolean - default: false - description: >- - Whether tool calls can be executed in parallel - previous_response_id: - type: string - description: >- - (Optional) ID of the previous response in a conversation - status: - type: string - description: >- - Current status of the response generation - temperature: - type: number - description: >- - (Optional) Sampling temperature used for generation - text: - $ref: '#/components/schemas/OpenAIResponseText' - description: >- - Text formatting configuration for the response - top_p: - type: number - description: >- - (Optional) Nucleus sampling parameter used for generation - truncation: - type: string - description: >- - (Optional) Truncation strategy applied to the response - input: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: >- - List of input items that led to this response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - - input - title: OpenAIResponseObjectWithInput - description: >- - OpenAI response object extended with input context information. - ListPromptsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Prompt' - additionalProperties: false - required: - - data - title: ListPromptsResponse - description: Response model to list prompts. - ListProvidersResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ProviderInfo' - description: List of provider information objects - additionalProperties: false - required: - - data - title: ListProvidersResponse - description: >- - Response containing a list of all available providers. - RouteInfo: - type: object - properties: - route: - type: string - description: The API endpoint path - method: - type: string - description: HTTP method for the route - provider_types: - type: array - items: - type: string - description: >- - List of provider types that implement this route - additionalProperties: false - required: - - route - - method - - provider_types - title: RouteInfo - description: >- - Information about an API route including its path, method, and implementing - providers. - ListRoutesResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RouteInfo' - description: >- - List of available route information objects - additionalProperties: false - required: - - data - title: ListRoutesResponse - description: >- - Response containing a list of all available API routes. - ListToolDefsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolDef' - description: List of tool definitions - additionalProperties: false - required: - - data - title: ListToolDefsResponse - description: >- - Response containing a list of tool definitions. - ListScoringFunctionsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ScoringFn' - additionalProperties: false - required: - - data - title: ListScoringFunctionsResponse ListShieldsResponse: type: object properties: @@ -11065,46 +7816,102 @@ components: required: - data title: ListShieldsResponse - ListToolGroupsResponse: + RegisterShieldRequest: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/ToolGroup' - description: List of tool groups + shield_id: + type: string + description: >- + The identifier of the shield to register. + provider_shield_id: + type: string + description: >- + The identifier of the shield in the provider. + provider_id: + type: string + description: The identifier of the provider. + params: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The parameters of the shield. additionalProperties: false required: - - data - title: ListToolGroupsResponse + - shield_id + title: RegisterShieldRequest + SyntheticDataGenerateRequest: + type: object + properties: + dialogs: + type: array + items: + $ref: '#/components/schemas/Message' + description: >- + List of conversation messages to use as input for synthetic data generation + filtering_function: + type: string + enum: + - none + - random + - top_k + - top_p + - top_k_top_p + - sigmoid + description: >- + Type of filtering to apply to generated synthetic data samples + model: + type: string + description: >- + (Optional) The identifier of the model to use. The model must be registered + with Llama Stack and available via the /models endpoint + additionalProperties: false + required: + - dialogs + - filtering_function + title: SyntheticDataGenerateRequest + SyntheticDataGenerationResponse: + type: object + properties: + synthetic_data: + type: array + items: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + List of generated synthetic data samples that passed the filtering criteria + statistics: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Statistical information about the generation process and filtering + results + additionalProperties: false + required: + - synthetic_data + title: SyntheticDataGenerationResponse description: >- - Response containing a list of tool groups. - ListToolsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Tool' - description: List of tools - additionalProperties: false - required: - - data - title: ListToolsResponse - description: Response containing a list of tools. - ListVectorDBsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/VectorDB' - description: List of vector databases - additionalProperties: false - required: - - data - title: ListVectorDBsResponse - description: Response from listing vector databases. + Response from the synthetic data generation. Batch of (prompt, response, score) + tuples that pass the threshold. Event: oneOf: - $ref: '#/components/schemas/UnstructuredLogEvent' @@ -11233,6 +8040,15 @@ components: - name title: SpanStartPayload description: Payload for a span start event. + SpanStatus: + type: string + enum: + - ok + - error + title: SpanStatus + description: >- + The status of a span indicating whether it completed successfully or with + an error. StructuredLogEvent: type: object properties: @@ -11357,1515 +8173,220 @@ components: - event - ttl_seconds title: LogEventRequest - VectorStoreChunkingStrategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - VectorStoreChunkingStrategyAuto: + QueryMetricsRequest: type: object properties: - type: + start_time: + type: integer + description: The start time of the metric to query. + end_time: + type: integer + description: The end time of the metric to query. + granularity: type: string - const: auto - default: auto + description: The granularity of the metric to query. + query_type: + type: string + enum: + - range + - instant + description: The type of query to perform. + label_matchers: + type: array + items: + type: object + properties: + name: + type: string + description: The name of the label to match + value: + type: string + description: The value to match against + operator: + type: string + enum: + - '=' + - '!=' + - =~ + - '!~' + description: >- + The comparison operator to use for matching + default: '=' + additionalProperties: false + required: + - name + - value + - operator + title: MetricLabelMatcher + description: >- + A matcher for filtering metrics by label values. description: >- - Strategy type, always "auto" for automatic chunking + The label matchers to apply to the metric. additionalProperties: false required: - - type - title: VectorStoreChunkingStrategyAuto + - start_time + - query_type + title: QueryMetricsRequest + MetricDataPoint: + type: object + properties: + timestamp: + type: integer + description: >- + Unix timestamp when the metric value was recorded + value: + type: number + description: >- + The numeric value of the metric at this timestamp + unit: + type: string + additionalProperties: false + required: + - timestamp + - value + - unit + title: MetricDataPoint description: >- - Automatic chunking strategy for vector store files. - VectorStoreChunkingStrategyStatic: - type: object - properties: - type: - type: string - const: static - default: static - description: >- - Strategy type, always "static" for static chunking - static: - $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' - description: >- - Configuration parameters for the static chunking strategy - additionalProperties: false - required: - - type - - static - title: VectorStoreChunkingStrategyStatic - description: >- - Static chunking strategy with configurable parameters. - VectorStoreChunkingStrategyStaticConfig: - type: object - properties: - chunk_overlap_tokens: - type: integer - default: 400 - description: >- - Number of tokens to overlap between adjacent chunks - max_chunk_size_tokens: - type: integer - default: 800 - description: >- - Maximum number of tokens per chunk, must be between 100 and 4096 - additionalProperties: false - required: - - chunk_overlap_tokens - - max_chunk_size_tokens - title: VectorStoreChunkingStrategyStaticConfig - description: >- - Configuration for static chunking strategy. - OpenaiAttachFileToVectorStoreRequest: - type: object - properties: - file_id: - type: string - description: >- - The ID of the file to attach to the vector store. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The key-value attributes stored with the file, which can be used for filtering. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - The chunking strategy to use for the file. - additionalProperties: false - required: - - file_id - title: OpenaiAttachFileToVectorStoreRequest - VectorStoreFileLastError: - type: object - properties: - code: - oneOf: - - type: string - const: server_error - - type: string - const: rate_limit_exceeded - description: >- - Error code indicating the type of failure - message: - type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false - required: - - code - - message - title: VectorStoreFileLastError - description: >- - Error information for failed vector store file processing. - VectorStoreFileObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file - object: - type: string - default: vector_store.file - description: >- - Object type identifier, always "vector_store.file" - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - chunking_strategy: - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - description: >- - Strategy used for splitting the file into chunks - created_at: - type: integer - description: >- - Timestamp when the file was added to the vector store - last_error: - $ref: '#/components/schemas/VectorStoreFileLastError' - description: >- - (Optional) Error information if file processing failed - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: Current processing status of the file - usage_bytes: - type: integer - default: 0 - description: Storage space used by this file in bytes - vector_store_id: - type: string - description: >- - ID of the vector store containing this file - additionalProperties: false - required: - - id - - object - - attributes - - chunking_strategy - - created_at - - status - - usage_bytes - - vector_store_id - title: VectorStoreFileObject - description: OpenAI Vector Store File object. - VectorStoreFileStatus: - oneOf: - - type: string - const: completed - - type: string - const: in_progress - - type: string - const: cancelled - - type: string - const: failed - VectorStoreFileBatchObject: - type: object - properties: - id: - type: string - description: Unique identifier for the file batch - object: - type: string - default: vector_store.file_batch - description: >- - Object type identifier, always "vector_store.file_batch" - created_at: - type: integer - description: >- - Timestamp when the file batch was created - vector_store_id: - type: string - description: >- - ID of the vector store containing the file batch - status: - $ref: '#/components/schemas/VectorStoreFileStatus' - description: >- - Current processing status of the file batch - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the batch - additionalProperties: false - required: - - id - - object - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - description: OpenAI Vector Store File Batch object. - VectorStoreFileCounts: - type: object - properties: - completed: - type: integer - description: >- - Number of files that have been successfully processed - cancelled: - type: integer - description: >- - Number of files that had their processing cancelled - failed: - type: integer - description: Number of files that failed to process - in_progress: - type: integer - description: >- - Number of files currently being processed - total: - type: integer - description: >- - Total number of files in the vector store - additionalProperties: false - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - description: >- - File processing status counts for a vector store. - OpenAIJSONSchema: + A single data point in a metric time series. + MetricLabel: type: object properties: name: type: string - description: Name of the schema - description: + description: The name of the label + value: type: string - description: (Optional) Description of the schema - strict: - type: boolean - description: >- - (Optional) Whether to enforce strict adherence to the schema - schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The JSON schema definition + description: The value of the label additionalProperties: false required: - name - title: OpenAIJSONSchema - description: >- - JSON schema specification for OpenAI-compatible structured response format. - OpenAIResponseFormatJSONObject: + - value + title: MetricLabel + description: A label associated with a metric. + MetricSeries: type: object properties: - type: + metric: type: string - const: json_object - default: json_object - description: >- - Must be "json_object" to indicate generic JSON object response format - additionalProperties: false - required: - - type - title: OpenAIResponseFormatJSONObject - description: >- - JSON object response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatJSONSchema: - type: object - properties: - type: - type: string - const: json_schema - default: json_schema - description: >- - Must be "json_schema" to indicate structured JSON response format - json_schema: - $ref: '#/components/schemas/OpenAIJSONSchema' - description: >- - The JSON schema specification for the response - additionalProperties: false - required: - - type - - json_schema - title: OpenAIResponseFormatJSONSchema - description: >- - JSON schema response format for OpenAI-compatible chat completion requests. - OpenAIResponseFormatParam: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - discriminator: - propertyName: type - mapping: - text: '#/components/schemas/OpenAIResponseFormatText' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - OpenAIResponseFormatText: - type: object - properties: - type: - type: string - const: text - default: text - description: >- - Must be "text" to indicate plain text response format - additionalProperties: false - required: - - type - title: OpenAIResponseFormatText - description: >- - Text response format for OpenAI-compatible chat completion requests. - OpenaiChatCompletionRequest: - type: object - properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be registered with - Llama Stack and available via the /models endpoint. - messages: + description: The name of the metric + labels: type: array items: - $ref: '#/components/schemas/OpenAIMessageParam' - description: List of messages in the conversation. - frequency_penalty: - type: number + $ref: '#/components/schemas/MetricLabel' description: >- - (Optional) The penalty for repeated tokens. - function_call: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The function call to use. - functions: + List of labels associated with this metric series + values: type: array items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) List of functions to use. - logit_bias: - type: object - additionalProperties: - type: number - description: (Optional) The logit bias to use. - logprobs: - type: boolean - description: (Optional) The log probabilities to use. - max_completion_tokens: - type: integer + $ref: '#/components/schemas/MetricDataPoint' description: >- - (Optional) The maximum number of tokens to generate. - max_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - n: - type: integer - description: >- - (Optional) The number of completions to generate. - parallel_tool_calls: - type: boolean - description: >- - (Optional) Whether to parallelize tool calls. - presence_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - response_format: - $ref: '#/components/schemas/OpenAIResponseFormatParam' - description: (Optional) The response format to use. - seed: - type: integer - description: (Optional) The seed to use. - stop: - oneOf: - - type: string - - type: array - items: - type: string - description: (Optional) The stop tokens to use. - stream: - type: boolean - description: >- - (Optional) Whether to stream the response. - stream_options: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The stream options to use. - temperature: - type: number - description: (Optional) The temperature to use. - tool_choice: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The tool choice to use. - tools: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The tools to use. - top_logprobs: - type: integer - description: >- - (Optional) The top log probabilities to use. - top_p: - type: number - description: (Optional) The top p to use. - user: - type: string - description: (Optional) The user to use. + List of data points in chronological order additionalProperties: false required: - - model - - messages - title: OpenaiChatCompletionRequest - OpenAIChatCompletion: + - metric + - labels + - values + title: MetricSeries + description: A time series of metric data points. + QueryMetricsResponse: type: object properties: - id: - type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChoice' - description: List of choices - object: - type: string - const: chat.completion - default: chat.completion - description: >- - The object type, which will be "chat.completion" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - additionalProperties: false - required: - - id - - choices - - object - - created - - model - title: OpenAIChatCompletion - description: >- - Response from an OpenAI-compatible chat completion request. - OpenAIChatCompletionChunk: - type: object - properties: - id: - type: string - description: The ID of the chat completion - choices: - type: array - items: - $ref: '#/components/schemas/OpenAIChunkChoice' - description: List of choices - object: - type: string - const: chat.completion.chunk - default: chat.completion.chunk - description: >- - The object type, which will be "chat.completion.chunk" - created: - type: integer - description: >- - The Unix timestamp in seconds when the chat completion was created - model: - type: string - description: >- - The model that was used to generate the chat completion - additionalProperties: false - required: - - id - - choices - - object - - created - - model - title: OpenAIChatCompletionChunk - description: >- - Chunk from a streaming response to an OpenAI-compatible chat completion request. - OpenAIChoiceDelta: - type: object - properties: - content: - type: string - description: (Optional) The content of the delta - refusal: - type: string - description: (Optional) The refusal of the delta - role: - type: string - description: (Optional) The role of the delta - tool_calls: - type: array - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - description: (Optional) The tool calls of the delta - additionalProperties: false - title: OpenAIChoiceDelta - description: >- - A delta from an OpenAI-compatible chat completion streaming response. - OpenAIChunkChoice: - type: object - properties: - delta: - $ref: '#/components/schemas/OpenAIChoiceDelta' - description: The delta from the chunk - finish_reason: - type: string - description: The reason the model stopped generating - index: - type: integer - description: The index of the choice - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - description: >- - (Optional) The log probabilities for the tokens in the message - additionalProperties: false - required: - - delta - - finish_reason - - index - title: OpenAIChunkChoice - description: >- - A chunk choice from an OpenAI-compatible chat completion streaming response. - OpenaiCompletionRequest: - type: object - properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be registered with - Llama Stack and available via the /models endpoint. - prompt: - oneOf: - - type: string - - type: array - items: - type: string - - type: array - items: - type: integer - - type: array - items: - type: array - items: - type: integer - description: The prompt to generate a completion for. - best_of: - type: integer - description: >- - (Optional) The number of completions to generate. - echo: - type: boolean - description: (Optional) Whether to echo the prompt. - frequency_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - logit_bias: - type: object - additionalProperties: - type: number - description: (Optional) The logit bias to use. - logprobs: - type: boolean - description: (Optional) The log probabilities to use. - max_tokens: - type: integer - description: >- - (Optional) The maximum number of tokens to generate. - n: - type: integer - description: >- - (Optional) The number of completions to generate. - presence_penalty: - type: number - description: >- - (Optional) The penalty for repeated tokens. - seed: - type: integer - description: (Optional) The seed to use. - stop: - oneOf: - - type: string - - type: array - items: - type: string - description: (Optional) The stop tokens to use. - stream: - type: boolean - description: >- - (Optional) Whether to stream the response. - stream_options: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: (Optional) The stream options to use. - temperature: - type: number - description: (Optional) The temperature to use. - top_p: - type: number - description: (Optional) The top p to use. - user: - type: string - description: (Optional) The user to use. - guided_choice: - type: array - items: - type: string - prompt_logprobs: - type: integer - suffix: - type: string - description: >- - (Optional) The suffix that should be appended to the completion. - additionalProperties: false - required: - - model - - prompt - title: OpenaiCompletionRequest - OpenAICompletion: - type: object - properties: - id: - type: string - choices: - type: array - items: - $ref: '#/components/schemas/OpenAICompletionChoice' - created: - type: integer - model: - type: string - object: - type: string - const: text_completion - default: text_completion - additionalProperties: false - required: - - id - - choices - - created - - model - - object - title: OpenAICompletion - description: >- - Response from an OpenAI-compatible completion request. - OpenAICompletionChoice: - type: object - properties: - finish_reason: - type: string - text: - type: string - index: - type: integer - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - additionalProperties: false - required: - - finish_reason - - text - - index - title: OpenAICompletionChoice - description: >- - A choice from an OpenAI-compatible completion response. - OpenaiCreateVectorStoreRequest: - type: object - properties: - name: - type: string - description: A name for the vector store. - file_ids: - type: array - items: - type: string - description: >- - A list of File IDs that the vector store should use. Useful for tools - like `file_search` that can access files. - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The expiration policy for a vector store. - chunking_strategy: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The chunking strategy used to chunk the file(s). If not set, will use - the `auto` strategy. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of 16 key-value pairs that can be attached to an object. - embedding_model: - type: string - description: >- - The embedding model to use for this vector store. - embedding_dimension: - type: integer - description: >- - The dimension of the embedding vectors (default: 384). - provider_id: - type: string - description: >- - The ID of the provider to use for this vector store. - additionalProperties: false - title: OpenaiCreateVectorStoreRequest - VectorStoreObject: - type: object - properties: - id: - type: string - description: Unique identifier for the vector store - object: - type: string - default: vector_store - description: >- - Object type identifier, always "vector_store" - created_at: - type: integer - description: >- - Timestamp when the vector store was created - name: - type: string - description: (Optional) Name of the vector store - usage_bytes: - type: integer - default: 0 - description: >- - Storage space used by the vector store in bytes - file_counts: - $ref: '#/components/schemas/VectorStoreFileCounts' - description: >- - File processing status counts for the vector store - status: - type: string - default: completed - description: Current status of the vector store - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Expiration policy for the vector store - expires_at: - type: integer - description: >- - (Optional) Timestamp when the vector store will expire - last_active_at: - type: integer - description: >- - (Optional) Timestamp of last activity on the vector store - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Set of key-value pairs that can be attached to the vector store - additionalProperties: false - required: - - id - - object - - created_at - - usage_bytes - - file_counts - - status - - metadata - title: VectorStoreObject - description: OpenAI Vector Store object. - OpenaiCreateVectorStoreFileBatchRequest: - type: object - properties: - file_ids: - type: array - items: - type: string - description: >- - A list of File IDs that the vector store should use. - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes to store with the files. - chunking_strategy: - $ref: '#/components/schemas/VectorStoreChunkingStrategy' - description: >- - (Optional) The chunking strategy used to chunk the file(s). Defaults to - auto. - additionalProperties: false - required: - - file_ids - title: OpenaiCreateVectorStoreFileBatchRequest - OpenAIFileDeleteResponse: - type: object - properties: - id: - type: string - description: The file identifier that was deleted - object: - type: string - const: file - default: file - description: The object type, which is always "file" - deleted: - type: boolean - description: >- - Whether the file was successfully deleted - additionalProperties: false - required: - - id - - object - - deleted - title: OpenAIFileDeleteResponse - description: >- - Response for deleting a file in OpenAI Files API. - VectorStoreDeleteResponse: - type: object - properties: - id: - type: string - description: >- - Unique identifier of the deleted vector store - object: - type: string - default: vector_store.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreDeleteResponse - description: Response from deleting a vector store. - VectorStoreFileDeleteResponse: - type: object - properties: - id: - type: string - description: Unique identifier of the deleted file - object: - type: string - default: vector_store.file.deleted - description: >- - Object type identifier for the deletion response - deleted: - type: boolean - default: true - description: >- - Whether the deletion operation was successful - additionalProperties: false - required: - - id - - object - - deleted - title: VectorStoreFileDeleteResponse - description: >- - Response from deleting a vector store file. - OpenaiEmbeddingsRequest: - type: object - properties: - model: - type: string - description: >- - The identifier of the model to use. The model must be an embedding model - registered with Llama Stack and available via the /models endpoint. - input: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - Input text to embed, encoded as a string or array of strings. To embed - multiple inputs in a single request, pass an array of strings. - encoding_format: - type: string - description: >- - (Optional) The format to return the embeddings in. Can be either "float" - or "base64". Defaults to "float". - dimensions: - type: integer - description: >- - (Optional) The number of dimensions the resulting output embeddings should - have. Only supported in text-embedding-3 and later models. - user: - type: string - description: >- - (Optional) A unique identifier representing your end-user, which can help - OpenAI to monitor and detect abuse. - additionalProperties: false - required: - - model - - input - title: OpenaiEmbeddingsRequest - OpenAIEmbeddingData: - type: object - properties: - object: - type: string - const: embedding - default: embedding - description: >- - The object type, which will be "embedding" - embedding: - oneOf: - - type: array - items: - type: number - - type: string - description: >- - The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - index: - type: integer - description: >- - The index of the embedding in the input list - additionalProperties: false - required: - - object - - embedding - - index - title: OpenAIEmbeddingData - description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - OpenAIEmbeddingUsage: - type: object - properties: - prompt_tokens: - type: integer - description: The number of tokens in the input - total_tokens: - type: integer - description: The total number of tokens used - additionalProperties: false - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - description: >- - Usage information for an OpenAI-compatible embeddings response. - OpenAIEmbeddingsResponse: - type: object - properties: - object: - type: string - const: list - default: list - description: The object type, which will be "list" data: type: array items: - $ref: '#/components/schemas/OpenAIEmbeddingData' - description: List of embedding data objects - model: - type: string + $ref: '#/components/schemas/MetricSeries' description: >- - The model that was used to generate the embeddings - usage: - $ref: '#/components/schemas/OpenAIEmbeddingUsage' - description: Usage information + List of metric series matching the query criteria additionalProperties: false required: - - object - data - - model - - usage - title: OpenAIEmbeddingsResponse + title: QueryMetricsResponse description: >- - Response from an OpenAI-compatible embeddings request. - OpenAIFilePurpose: + Response containing metric time series data. + QueryCondition: + type: object + properties: + key: + type: string + description: The attribute key to filter on + op: + $ref: '#/components/schemas/QueryConditionOp' + description: The comparison operator to apply + value: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: The value to compare against + additionalProperties: false + required: + - key + - op + - value + title: QueryCondition + description: A condition for filtering query results. + QueryConditionOp: type: string enum: - - assistants - - batch - title: OpenAIFilePurpose + - eq + - ne + - gt + - lt + title: QueryConditionOp description: >- - Valid purpose values for OpenAI Files API. - ListOpenAIFileResponse: + Comparison operators for query conditions. + QuerySpansRequest: type: object properties: - data: + attribute_filters: type: array items: - $ref: '#/components/schemas/OpenAIFileObject' - description: List of file objects - has_more: - type: boolean + $ref: '#/components/schemas/QueryCondition' description: >- - Whether there are more files available beyond this page - first_id: - type: string - description: >- - ID of the first file in the list for pagination - last_id: - type: string - description: >- - ID of the last file in the list for pagination - object: - type: string - const: list - default: list - description: The object type, which is always "list" - additionalProperties: false - required: - - data - - has_more - - first_id - - last_id - - object - title: ListOpenAIFileResponse - description: >- - Response for listing files in OpenAI Files API. - OpenAIFileObject: - type: object - properties: - object: - type: string - const: file - default: file - description: The object type, which is always "file" - id: - type: string - description: >- - The file identifier, which can be referenced in the API endpoints - bytes: + The attribute filters to apply to the spans. + attributes_to_return: + type: array + items: + type: string + description: The attributes to return in the spans. + max_depth: type: integer - description: The size of the file, in bytes - created_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file was created - expires_at: - type: integer - description: >- - The Unix timestamp (in seconds) for when the file expires - filename: - type: string - description: The name of the file - purpose: - type: string - enum: - - assistants - - batch - description: The intended purpose of the file + description: The maximum depth of the tree. additionalProperties: false required: - - object - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject - description: >- - OpenAI File object as defined in the OpenAI Files API. - VectorStoreListFilesResponse: + - attribute_filters + - attributes_to_return + title: QuerySpansRequest + Span: type: object properties: - object: + span_id: type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: List of vector store file objects - first_id: + description: Unique identifier for the span + trace_id: type: string description: >- - (Optional) ID of the first file in the list for pagination - last_id: + Unique identifier for the trace this span belongs to + parent_span_id: type: string description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListFilesResponse - description: >- - Response from listing files in a vector store. - VectorStoreFilesListInBatchResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreFileObject' - description: >- - List of vector store file objects in the batch - first_id: - type: string - description: >- - (Optional) ID of the first file in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last file in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more files available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreFilesListInBatchResponse - description: >- - Response from listing files in a vector store file batch. - VectorStoreListResponse: - type: object - properties: - object: - type: string - default: list - description: Object type identifier, always "list" - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreObject' - description: List of vector store objects - first_id: - type: string - description: >- - (Optional) ID of the first vector store in the list for pagination - last_id: - type: string - description: >- - (Optional) ID of the last vector store in the list for pagination - has_more: - type: boolean - default: false - description: >- - Whether there are more vector stores available beyond this page - additionalProperties: false - required: - - object - - data - - has_more - title: VectorStoreListResponse - description: Response from listing vector stores. - Response: - type: object - title: Response - VectorStoreContent: - type: object - properties: - type: - type: string - const: text - description: >- - Content type, currently only "text" is supported - text: - type: string - description: The actual text content - additionalProperties: false - required: - - type - - text - title: VectorStoreContent - description: >- - Content item from a vector store file or search result. - VectorStoreFileContentsResponse: - type: object - properties: - file_id: - type: string - description: Unique identifier for the file - filename: - type: string - description: Name of the file - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: List of content items from the file - additionalProperties: false - required: - - file_id - - filename - - attributes - - content - title: VectorStoreFileContentsResponse - description: >- - Response from retrieving the contents of a vector store file. - OpenaiSearchVectorStoreRequest: - type: object - properties: - query: - oneOf: - - type: string - - type: array - items: - type: string - description: >- - The query string or array for performing the search. - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Filters based on file attributes to narrow the search results. - max_num_results: - type: integer - description: >- - Maximum number of results to return (1 to 50 inclusive, default 10). - ranking_options: - type: object - properties: - ranker: - type: string - description: >- - (Optional) Name of the ranking algorithm to use - score_threshold: - type: number - default: 0.0 - description: >- - (Optional) Minimum relevance score threshold for results - additionalProperties: false - description: >- - Ranking options for fine-tuning the search results. - rewrite_query: - type: boolean - description: >- - Whether to rewrite the natural language query for vector search (default - false) - search_mode: - type: string - description: >- - The search mode to use - "keyword", "vector", or "hybrid" (default "vector") - additionalProperties: false - required: - - query - title: OpenaiSearchVectorStoreRequest - VectorStoreSearchResponse: - type: object - properties: - file_id: - type: string - description: >- - Unique identifier of the file containing the result - filename: - type: string - description: Name of the file containing the result - score: - type: number - description: Relevance score for this search result - attributes: - type: object - additionalProperties: - oneOf: - - type: string - - type: number - - type: boolean - description: >- - (Optional) Key-value attributes associated with the file - content: - type: array - items: - $ref: '#/components/schemas/VectorStoreContent' - description: >- - List of content items matching the search query - additionalProperties: false - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - description: Response from searching a vector store. - VectorStoreSearchResponsePage: - type: object - properties: - object: - type: string - default: vector_store.search_results.page - description: >- - Object type identifier for the search results page - search_query: - type: string - description: >- - The original search query that was executed - data: - type: array - items: - $ref: '#/components/schemas/VectorStoreSearchResponse' - description: List of search result objects - has_more: - type: boolean - default: false - description: >- - Whether there are more results available beyond this page - next_page: - type: string - description: >- - (Optional) Token for retrieving the next page of results - additionalProperties: false - required: - - object - - search_query - - data - - has_more - title: VectorStoreSearchResponsePage - description: >- - Paginated response from searching a vector store. - OpenaiUpdateVectorStoreRequest: - type: object - properties: + (Optional) Unique identifier for the parent span, if this is a child span name: type: string - description: The name of the vector store. - expires_after: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object description: >- - The expiration policy for a vector store. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + Human-readable name describing the operation this span represents + start_time: + type: string + format: date-time + description: Timestamp when the operation began + end_time: + type: string + format: date-time description: >- - Set of 16 key-value pairs that can be attached to an object. - additionalProperties: false - title: OpenaiUpdateVectorStoreRequest - OpenaiUpdateVectorStoreFileRequest: - type: object - properties: + (Optional) Timestamp when the operation finished, if completed attributes: type: object additionalProperties: @@ -12877,227 +8398,98 @@ components: - type: array - type: object description: >- - The updated key-value attributes to store with the file. + (Optional) Key-value pairs containing additional metadata about the span additionalProperties: false required: - - attributes - title: OpenaiUpdateVectorStoreFileRequest - ExpiresAfter: - type: object - properties: - anchor: - type: string - const: created_at - seconds: - type: integer - additionalProperties: false - required: - - anchor - - seconds - title: ExpiresAfter + - span_id + - trace_id + - name + - start_time + title: Span description: >- - Control expiration of uploaded files. - - Params: - - anchor, must be "created_at" - - seconds, must be int between 3600 and 2592000 (1 hour to 30 days) - DPOAlignmentConfig: + A span representing a single operation within a trace. + QuerySpansResponse: type: object properties: - beta: - type: number - description: Temperature parameter for the DPO loss - loss_type: - $ref: '#/components/schemas/DPOLossType' - default: sigmoid - description: The type of loss function to use for DPO + data: + type: array + items: + $ref: '#/components/schemas/Span' + description: >- + List of spans matching the query criteria additionalProperties: false required: - - beta - - loss_type - title: DPOAlignmentConfig - description: >- - Configuration for Direct Preference Optimization (DPO) alignment. - DPOLossType: - type: string - enum: - - sigmoid - - hinge - - ipo - - kto_pair - title: DPOLossType - DataConfig: + - data + title: QuerySpansResponse + description: Response containing a list of spans. + SaveSpansToDatasetRequest: type: object properties: + attribute_filters: + type: array + items: + $ref: '#/components/schemas/QueryCondition' + description: >- + The attribute filters to apply to the spans. + attributes_to_save: + type: array + items: + type: string + description: The attributes to save to the dataset. dataset_id: type: string description: >- - Unique identifier for the training dataset - batch_size: + The ID of the dataset to save the spans to. + max_depth: type: integer - description: Number of samples per training batch - shuffle: - type: boolean - description: >- - Whether to shuffle the dataset during training - data_format: - $ref: '#/components/schemas/DatasetFormat' - description: >- - Format of the dataset (instruct or dialog) - validation_dataset_id: - type: string - description: >- - (Optional) Unique identifier for the validation dataset - packed: - type: boolean - default: false - description: >- - (Optional) Whether to pack multiple samples into a single sequence for - efficiency - train_on_input: - type: boolean - default: false - description: >- - (Optional) Whether to compute loss on input tokens as well as output tokens + description: The maximum depth of the tree. additionalProperties: false required: + - attribute_filters + - attributes_to_save - dataset_id - - batch_size - - shuffle - - data_format - title: DataConfig - description: >- - Configuration for training data and data loading. - DatasetFormat: - type: string - enum: - - instruct - - dialog - title: DatasetFormat - description: Format of the training dataset. - EfficiencyConfig: + title: SaveSpansToDatasetRequest + GetSpanTreeRequest: type: object properties: - enable_activation_checkpointing: - type: boolean - default: false - description: >- - (Optional) Whether to use activation checkpointing to reduce memory usage - enable_activation_offloading: - type: boolean - default: false - description: >- - (Optional) Whether to offload activations to CPU to save GPU memory - memory_efficient_fsdp_wrap: - type: boolean - default: false - description: >- - (Optional) Whether to use memory-efficient FSDP wrapping - fsdp_cpu_offload: - type: boolean - default: false - description: >- - (Optional) Whether to offload FSDP parameters to CPU + attributes_to_return: + type: array + items: + type: string + description: The attributes to return in the tree. + max_depth: + type: integer + description: The maximum depth of the tree. additionalProperties: false - title: EfficiencyConfig - description: >- - Configuration for memory and compute efficiency optimizations. - OptimizerConfig: + title: GetSpanTreeRequest + SpanWithStatus: type: object properties: - optimizer_type: - $ref: '#/components/schemas/OptimizerType' - description: >- - Type of optimizer to use (adam, adamw, or sgd) - lr: - type: number - description: Learning rate for the optimizer - weight_decay: - type: number - description: >- - Weight decay coefficient for regularization - num_warmup_steps: - type: integer - description: Number of steps for learning rate warmup - additionalProperties: false - required: - - optimizer_type - - lr - - weight_decay - - num_warmup_steps - title: OptimizerConfig - description: >- - Configuration parameters for the optimization algorithm. - OptimizerType: - type: string - enum: - - adam - - adamw - - sgd - title: OptimizerType - description: >- - Available optimizer algorithms for training. - TrainingConfig: - type: object - properties: - n_epochs: - type: integer - description: Number of training epochs to run - max_steps_per_epoch: - type: integer - default: 1 - description: Maximum number of steps to run per epoch - gradient_accumulation_steps: - type: integer - default: 1 - description: >- - Number of steps to accumulate gradients before updating - max_validation_steps: - type: integer - default: 1 - description: >- - (Optional) Maximum number of validation steps per epoch - data_config: - $ref: '#/components/schemas/DataConfig' - description: >- - (Optional) Configuration for data loading and formatting - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' - description: >- - (Optional) Configuration for the optimization algorithm - efficiency_config: - $ref: '#/components/schemas/EfficiencyConfig' - description: >- - (Optional) Configuration for memory and compute optimizations - dtype: + span_id: + type: string + description: Unique identifier for the span + trace_id: type: string - default: bf16 description: >- - (Optional) Data type for model parameters (bf16, fp16, fp32) - additionalProperties: false - required: - - n_epochs - - max_steps_per_epoch - - gradient_accumulation_steps - title: TrainingConfig - description: >- - Comprehensive configuration for the training process. - PreferenceOptimizeRequest: - type: object - properties: - job_uuid: + Unique identifier for the trace this span belongs to + parent_span_id: type: string - description: The UUID of the job to create. - finetuned_model: + description: >- + (Optional) Unique identifier for the parent span, if this is a child span + name: type: string - description: The model to fine-tune. - algorithm_config: - $ref: '#/components/schemas/DPOAlignmentConfig' - description: The algorithm configuration. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: + description: >- + Human-readable name describing the operation this span represents + start_time: + type: string + format: date-time + description: Timestamp when the operation began + end_time: + type: string + format: date-time + description: >- + (Optional) Timestamp when the operation finished, if completed + attributes: type: object additionalProperties: oneOf: @@ -13107,8 +8499,106 @@ components: - type: string - type: array - type: object - description: The hyperparam search configuration. - logger_config: + description: >- + (Optional) Key-value pairs containing additional metadata about the span + status: + $ref: '#/components/schemas/SpanStatus' + description: >- + (Optional) The current status of the span + additionalProperties: false + required: + - span_id + - trace_id + - name + - start_time + title: SpanWithStatus + description: A span that includes status information. + QuerySpanTreeResponse: + type: object + properties: + data: + type: object + additionalProperties: + $ref: '#/components/schemas/SpanWithStatus' + description: >- + Dictionary mapping span IDs to spans with status information + additionalProperties: false + required: + - data + title: QuerySpanTreeResponse + description: >- + Response containing a tree structure of spans. + QueryTracesRequest: + type: object + properties: + attribute_filters: + type: array + items: + $ref: '#/components/schemas/QueryCondition' + description: >- + The attribute filters to apply to the traces. + limit: + type: integer + description: The limit of traces to return. + offset: + type: integer + description: The offset of the traces to return. + order_by: + type: array + items: + type: string + description: The order by of the traces to return. + additionalProperties: false + title: QueryTracesRequest + Trace: + type: object + properties: + trace_id: + type: string + description: Unique identifier for the trace + root_span_id: + type: string + description: >- + Unique identifier for the root span that started this trace + start_time: + type: string + format: date-time + description: Timestamp when the trace began + end_time: + type: string + format: date-time + description: >- + (Optional) Timestamp when the trace finished, if completed + additionalProperties: false + required: + - trace_id + - root_span_id + - start_time + title: Trace + description: >- + A trace representing the complete execution path of a request across multiple + operations. + QueryTracesResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Trace' + description: >- + List of traces matching the query criteria + additionalProperties: false + required: + - data + title: QueryTracesResponse + description: Response containing a list of traces. + InvokeToolRequest: + type: object + properties: + tool_name: + type: string + description: The name of the tool to invoke. + kwargs: type: object additionalProperties: oneOf: @@ -13118,25 +8608,195 @@ components: - type: string - type: array - type: object - description: The logger configuration. + description: >- + A dictionary of arguments to pass to the tool. additionalProperties: false required: - - job_uuid - - finetuned_model - - algorithm_config - - training_config - - hyperparam_search_config - - logger_config - title: PreferenceOptimizeRequest - PostTrainingJob: + - tool_name + - kwargs + title: InvokeToolRequest + ToolInvocationResult: type: object properties: - job_uuid: + content: + $ref: '#/components/schemas/InterleavedContent' + description: >- + (Optional) The output content from the tool execution + error_message: type: string + description: >- + (Optional) Error message if the tool execution failed + error_code: + type: integer + description: >- + (Optional) Numeric error code if the tool execution failed + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool execution + additionalProperties: false + title: ToolInvocationResult + description: Result of a tool invocation. + ToolDef: + type: object + properties: + name: + type: string + description: Name of the tool + description: + type: string + description: >- + (Optional) Human-readable description of what the tool does + parameters: + type: array + items: + $ref: '#/components/schemas/ToolParameter' + description: >- + (Optional) List of parameters this tool accepts + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool additionalProperties: false required: - - job_uuid - title: PostTrainingJob + - name + title: ToolDef + description: >- + Tool definition used in runtime contexts. + ToolParameter: + type: object + properties: + name: + type: string + description: Name of the parameter + parameter_type: + type: string + description: >- + Type of the parameter (e.g., string, integer) + description: + type: string + description: >- + Human-readable description of what the parameter does + required: + type: boolean + default: true + description: >- + Whether this parameter is required for tool invocation + items: + type: object + description: >- + Type of the elements when parameter_type is array + title: + type: string + description: (Optional) Title of the parameter + default: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Default value for the parameter if not provided + additionalProperties: false + required: + - name + - parameter_type + - description + - required + title: ToolParameter + description: Parameter definition for a tool. + ListToolDefsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ToolDef' + description: List of tool definitions + additionalProperties: false + required: + - data + title: ListToolDefsResponse + description: >- + Response containing a list of tool definitions. + RAGDocument: + type: object + properties: + document_id: + type: string + description: The unique identifier for the document. + content: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - type: array + items: + $ref: '#/components/schemas/InterleavedContentItem' + - $ref: '#/components/schemas/URL' + description: The content of the document. + mime_type: + type: string + description: The MIME type of the document. + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: Additional metadata for the document. + additionalProperties: false + required: + - document_id + - content + - metadata + title: RAGDocument + description: >- + A document to be used for document ingestion in the RAG Tool. + InsertRequest: + type: object + properties: + documents: + type: array + items: + $ref: '#/components/schemas/RAGDocument' + description: >- + List of documents to index in the RAG system + vector_db_id: + type: string + description: >- + ID of the vector database to store the document embeddings + chunk_size_in_tokens: + type: integer + description: >- + (Optional) Size in tokens for document chunking during indexing + additionalProperties: false + required: + - documents + - vector_db_id + - chunk_size_in_tokens + title: InsertRequest DefaultRAGQueryGeneratorConfig: type: object properties: @@ -13345,6 +9005,382 @@ components: title: RAGQueryResult description: >- Result of a RAG query containing retrieved content and metadata. + ToolGroup: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_db + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: tool_group + default: tool_group + description: Type of resource, always 'tool_group' + mcp_endpoint: + $ref: '#/components/schemas/URL' + description: >- + (Optional) Model Context Protocol endpoint for remote tools + args: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional arguments for the tool group + additionalProperties: false + required: + - identifier + - provider_id + - type + title: ToolGroup + description: >- + A group of related tools managed together. + ListToolGroupsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ToolGroup' + description: List of tool groups + additionalProperties: false + required: + - data + title: ListToolGroupsResponse + description: >- + Response containing a list of tool groups. + RegisterToolGroupRequest: + type: object + properties: + toolgroup_id: + type: string + description: The ID of the tool group to register. + provider_id: + type: string + description: >- + The ID of the provider to use for the tool group. + mcp_endpoint: + $ref: '#/components/schemas/URL' + description: >- + The MCP endpoint to use for the tool group. + args: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + A dictionary of arguments to pass to the tool group. + additionalProperties: false + required: + - toolgroup_id + - provider_id + title: RegisterToolGroupRequest + Tool: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_db + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: tool + default: tool + description: Type of resource, always 'tool' + toolgroup_id: + type: string + description: >- + ID of the tool group this tool belongs to + description: + type: string + description: >- + Human-readable description of what the tool does + parameters: + type: array + items: + $ref: '#/components/schemas/ToolParameter' + description: List of parameters this tool accepts + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Additional metadata about the tool + additionalProperties: false + required: + - identifier + - provider_id + - type + - toolgroup_id + - description + - parameters + title: Tool + description: A tool that can be invoked by agents. + ListToolsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Tool' + description: List of tools + additionalProperties: false + required: + - data + title: ListToolsResponse + description: Response containing a list of tools. + VectorDB: + type: object + properties: + identifier: + type: string + provider_resource_id: + type: string + provider_id: + type: string + type: + type: string + enum: + - model + - shield + - vector_db + - dataset + - scoring_function + - benchmark + - tool + - tool_group + - prompt + const: vector_db + default: vector_db + description: >- + Type of resource, always 'vector_db' for vector databases + embedding_model: + type: string + description: >- + Name of the embedding model to use for vector generation + embedding_dimension: + type: integer + description: Dimension of the embedding vectors + vector_db_name: + type: string + additionalProperties: false + required: + - identifier + - provider_id + - type + - embedding_model + - embedding_dimension + title: VectorDB + description: >- + Vector database resource for storing and querying vector embeddings. + ListVectorDBsResponse: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/VectorDB' + description: List of vector databases + additionalProperties: false + required: + - data + title: ListVectorDBsResponse + description: Response from listing vector databases. + RegisterVectorDbRequest: + type: object + properties: + vector_db_id: + type: string + description: >- + The identifier of the vector database to register. + embedding_model: + type: string + description: The embedding model to use. + embedding_dimension: + type: integer + description: The dimension of the embedding model. + provider_id: + type: string + description: The identifier of the provider. + vector_db_name: + type: string + description: The name of the vector database. + provider_vector_db_id: + type: string + description: >- + The identifier of the vector database in the provider. + additionalProperties: false + required: + - vector_db_id + - embedding_model + title: RegisterVectorDbRequest + Chunk: + type: object + properties: + content: + $ref: '#/components/schemas/InterleavedContent' + description: >- + The content of the chunk, which can be interleaved text, images, or other + types. + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Metadata associated with the chunk that will be used in the model context + during inference. + embedding: + type: array + items: + type: number + description: >- + Optional embedding for the chunk. If not provided, it will be computed + later. + stored_chunk_id: + type: string + description: >- + The chunk ID that is stored in the vector database. Used for backend functionality. + chunk_metadata: + $ref: '#/components/schemas/ChunkMetadata' + description: >- + Metadata for the chunk that will NOT be used in the context during inference. + The `chunk_metadata` is required backend functionality. + additionalProperties: false + required: + - content + - metadata + title: Chunk + description: >- + A chunk of content that can be inserted into a vector database. + ChunkMetadata: + type: object + properties: + chunk_id: + type: string + description: >- + The ID of the chunk. If not set, it will be generated based on the document + ID and content. + document_id: + type: string + description: >- + The ID of the document this chunk belongs to. + source: + type: string + description: >- + The source of the content, such as a URL, file path, or other identifier. + created_timestamp: + type: integer + description: >- + An optional timestamp indicating when the chunk was created. + updated_timestamp: + type: integer + description: >- + An optional timestamp indicating when the chunk was last updated. + chunk_window: + type: string + description: >- + The window of the chunk, which can be used to group related chunks together. + chunk_tokenizer: + type: string + description: >- + The tokenizer used to create the chunk. Default is Tiktoken. + chunk_embedding_model: + type: string + description: >- + The embedding model used to create the chunk's embedding. + chunk_embedding_dimension: + type: integer + description: >- + The dimension of the embedding vector for the chunk. + content_token_count: + type: integer + description: >- + The number of tokens in the content of the chunk. + metadata_token_count: + type: integer + description: >- + The number of tokens in the metadata of the chunk. + additionalProperties: false + title: ChunkMetadata + description: >- + `ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional + information about the chunk that will not be used in the context during + inference, but is required for backend functionality. The `ChunkMetadata` is + set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not + expected to change after. Use `Chunk.metadata` for metadata that will + be used in the context during inference. + InsertChunksRequest: + type: object + properties: + vector_db_id: + type: string + description: >- + The identifier of the vector database to insert the chunks into. + chunks: + type: array + items: + $ref: '#/components/schemas/Chunk' + description: >- + The chunks to insert. Each `Chunk` should contain content which can be + interleaved text, images, or other types. `metadata`: `dict[str, Any]` + and `embedding`: `List[float]` are optional. If `metadata` is provided, + you configure how Llama Stack formats the chunk during generation. If + `embedding` is not provided, it will be computed later. + ttl_seconds: + type: integer + description: The time to live of the chunks. + additionalProperties: false + required: + - vector_db_id + - chunks + title: InsertChunksRequest QueryChunksRequest: type: object properties: @@ -13393,268 +9429,158 @@ components: title: QueryChunksResponse description: >- Response from querying chunks in a vector database. - QueryMetricsRequest: + VectorStoreFileCounts: type: object properties: - start_time: + completed: type: integer - description: The start time of the metric to query. - end_time: + description: >- + Number of files that have been successfully processed + cancelled: type: integer - description: The end time of the metric to query. - granularity: + description: >- + Number of files that had their processing cancelled + failed: + type: integer + description: Number of files that failed to process + in_progress: + type: integer + description: >- + Number of files currently being processed + total: + type: integer + description: >- + Total number of files in the vector store + additionalProperties: false + required: + - completed + - cancelled + - failed + - in_progress + - total + title: VectorStoreFileCounts + description: >- + File processing status counts for a vector store. + VectorStoreListResponse: + type: object + properties: + object: type: string - description: The granularity of the metric to query. - query_type: - type: string - enum: - - range - - instant - description: The type of query to perform. - label_matchers: + default: list + description: Object type identifier, always "list" + data: type: array items: - type: object - properties: - name: - type: string - description: The name of the label to match - value: - type: string - description: The value to match against - operator: - type: string - enum: - - '=' - - '!=' - - =~ - - '!~' - description: >- - The comparison operator to use for matching - default: '=' - additionalProperties: false - required: - - name - - value - - operator - title: MetricLabelMatcher - description: >- - A matcher for filtering metrics by label values. + $ref: '#/components/schemas/VectorStoreObject' + description: List of vector store objects + first_id: + type: string description: >- - The label matchers to apply to the metric. + (Optional) ID of the first vector store in the list for pagination + last_id: + type: string + description: >- + (Optional) ID of the last vector store in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more vector stores available beyond this page additionalProperties: false required: - - start_time - - query_type - title: QueryMetricsRequest - MetricDataPoint: + - object + - data + - has_more + title: VectorStoreListResponse + description: Response from listing vector stores. + VectorStoreObject: type: object properties: - timestamp: + id: + type: string + description: Unique identifier for the vector store + object: + type: string + default: vector_store + description: >- + Object type identifier, always "vector_store" + created_at: type: integer description: >- - Unix timestamp when the metric value was recorded - value: - type: number - description: >- - The numeric value of the metric at this timestamp - unit: + Timestamp when the vector store was created + name: type: string + description: (Optional) Name of the vector store + usage_bytes: + type: integer + default: 0 + description: >- + Storage space used by the vector store in bytes + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + description: >- + File processing status counts for the vector store + status: + type: string + default: completed + description: Current status of the vector store + expires_after: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + (Optional) Expiration policy for the vector store + expires_at: + type: integer + description: >- + (Optional) Timestamp when the vector store will expire + last_active_at: + type: integer + description: >- + (Optional) Timestamp of last activity on the vector store + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Set of key-value pairs that can be attached to the vector store additionalProperties: false required: - - timestamp - - value - - unit - title: MetricDataPoint - description: >- - A single data point in a metric time series. - MetricLabel: + - id + - object + - created_at + - usage_bytes + - file_counts + - status + - metadata + title: VectorStoreObject + description: OpenAI Vector Store object. + OpenaiCreateVectorStoreRequest: type: object properties: name: type: string - description: The name of the label - value: - type: string - description: The value of the label - additionalProperties: false - required: - - name - - value - title: MetricLabel - description: A label associated with a metric. - MetricSeries: - type: object - properties: - metric: - type: string - description: The name of the metric - labels: - type: array - items: - $ref: '#/components/schemas/MetricLabel' - description: >- - List of labels associated with this metric series - values: - type: array - items: - $ref: '#/components/schemas/MetricDataPoint' - description: >- - List of data points in chronological order - additionalProperties: false - required: - - metric - - labels - - values - title: MetricSeries - description: A time series of metric data points. - QueryMetricsResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/MetricSeries' - description: >- - List of metric series matching the query criteria - additionalProperties: false - required: - - data - title: QueryMetricsResponse - description: >- - Response containing metric time series data. - QueryCondition: - type: object - properties: - key: - type: string - description: The attribute key to filter on - op: - $ref: '#/components/schemas/QueryConditionOp' - description: The comparison operator to apply - value: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The value to compare against - additionalProperties: false - required: - - key - - op - - value - title: QueryCondition - description: A condition for filtering query results. - QueryConditionOp: - type: string - enum: - - eq - - ne - - gt - - lt - title: QueryConditionOp - description: >- - Comparison operators for query conditions. - QuerySpansRequest: - type: object - properties: - attribute_filters: - type: array - items: - $ref: '#/components/schemas/QueryCondition' - description: >- - The attribute filters to apply to the spans. - attributes_to_return: - type: array - items: - type: string - description: The attributes to return in the spans. - max_depth: - type: integer - description: The maximum depth of the tree. - additionalProperties: false - required: - - attribute_filters - - attributes_to_return - title: QuerySpansRequest - QuerySpansResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Span' - description: >- - List of spans matching the query criteria - additionalProperties: false - required: - - data - title: QuerySpansResponse - description: Response containing a list of spans. - QueryTracesRequest: - type: object - properties: - attribute_filters: - type: array - items: - $ref: '#/components/schemas/QueryCondition' - description: >- - The attribute filters to apply to the traces. - limit: - type: integer - description: The limit of traces to return. - offset: - type: integer - description: The offset of the traces to return. - order_by: - type: array - items: - type: string - description: The order by of the traces to return. - additionalProperties: false - title: QueryTracesRequest - QueryTracesResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Trace' - description: >- - List of traces matching the query criteria - additionalProperties: false - required: - - data - title: QueryTracesResponse - description: Response containing a list of traces. - RegisterBenchmarkRequest: - type: object - properties: - benchmark_id: - type: string - description: The ID of the benchmark to register. - dataset_id: - type: string - description: >- - The ID of the dataset to use for the benchmark. - scoring_functions: + description: A name for the vector store. + file_ids: type: array items: type: string description: >- - The scoring functions to use for the benchmark. - provider_benchmark_id: - type: string - description: >- - The ID of the provider benchmark to use for the benchmark. - provider_id: - type: string - description: >- - The ID of the provider to use for the benchmark. - metadata: + A list of File IDs that the vector store should use. Useful for tools + like `file_search` that can access files. + expires_after: type: object additionalProperties: oneOf: @@ -13664,54 +9590,21 @@ components: - type: string - type: array - type: object - description: The metadata to use for the benchmark. - additionalProperties: false - required: - - benchmark_id - - dataset_id - - scoring_functions - title: RegisterBenchmarkRequest - DataSource: - oneOf: - - $ref: '#/components/schemas/URIDataSource' - - $ref: '#/components/schemas/RowsDataSource' - discriminator: - propertyName: type - mapping: - uri: '#/components/schemas/URIDataSource' - rows: '#/components/schemas/RowsDataSource' - RegisterDatasetRequest: - type: object - properties: - purpose: - type: string - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer description: >- - The purpose of the dataset. One of: - "post-training/messages": The dataset - contains a messages column with list of messages for post-training. { - "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": "assistant", - "content": "Hello, world!"}, ] } - "eval/question-answer": The dataset - contains a question column and an answer column for evaluation. { "question": - "What is the capital of France?", "answer": "Paris" } - "eval/messages-answer": - The dataset contains a messages column with list of messages and an answer - column for evaluation. { "messages": [ {"role": "user", "content": "Hello, - my name is John Doe."}, {"role": "assistant", "content": "Hello, John - Doe. How can I help you today?"}, {"role": "user", "content": "What's - my name?"}, ], "answer": "John Doe" } - source: - $ref: '#/components/schemas/DataSource' + The expiration policy for a vector store. + chunking_strategy: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - The data source of the dataset. Ensure that the data source schema is - compatible with the purpose of the dataset. Examples: - { "type": "uri", - "uri": "https://mywebsite.com/mydata.jsonl" } - { "type": "uri", "uri": - "lsfs://mydata.jsonl" } - { "type": "uri", "uri": "data:csv;base64,{base64_content}" - } - { "type": "uri", "uri": "huggingface://llamastack/simpleqa?split=train" - } - { "type": "rows", "rows": [ { "messages": [ {"role": "user", "content": - "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}, ] - } ] } + The chunking strategy used to chunk the file(s). If not set, will use + the `auto` strategy. metadata: type: object additionalProperties: @@ -13723,774 +9616,621 @@ components: - type: array - type: object description: >- - The metadata for the dataset. - E.g. {"description": "My dataset"}. - dataset_id: - type: string - description: >- - The ID of the dataset. If not provided, an ID will be generated. - additionalProperties: false - required: - - purpose - - source - title: RegisterDatasetRequest - RegisterModelRequest: - type: object - properties: - model_id: - type: string - description: The identifier of the model to register. - provider_model_id: - type: string - description: >- - The identifier of the model in the provider. - provider_id: - type: string - description: The identifier of the provider. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: Any additional metadata for this model. - model_type: - $ref: '#/components/schemas/ModelType' - description: The type of model to register. - additionalProperties: false - required: - - model_id - title: RegisterModelRequest - ParamType: - oneOf: - - $ref: '#/components/schemas/StringType' - - $ref: '#/components/schemas/NumberType' - - $ref: '#/components/schemas/BooleanType' - - $ref: '#/components/schemas/ArrayType' - - $ref: '#/components/schemas/ObjectType' - - $ref: '#/components/schemas/JsonType' - - $ref: '#/components/schemas/UnionType' - - $ref: '#/components/schemas/ChatCompletionInputType' - - $ref: '#/components/schemas/CompletionInputType' - - $ref: '#/components/schemas/AgentTurnInputType' - discriminator: - propertyName: type - mapping: - string: '#/components/schemas/StringType' - number: '#/components/schemas/NumberType' - boolean: '#/components/schemas/BooleanType' - array: '#/components/schemas/ArrayType' - object: '#/components/schemas/ObjectType' - json: '#/components/schemas/JsonType' - union: '#/components/schemas/UnionType' - chat_completion_input: '#/components/schemas/ChatCompletionInputType' - completion_input: '#/components/schemas/CompletionInputType' - agent_turn_input: '#/components/schemas/AgentTurnInputType' - RegisterScoringFunctionRequest: - type: object - properties: - scoring_fn_id: - type: string - description: >- - The ID of the scoring function to register. - description: - type: string - description: The description of the scoring function. - return_type: - $ref: '#/components/schemas/ParamType' - description: The return type of the scoring function. - provider_scoring_fn_id: - type: string - description: >- - The ID of the provider scoring function to use for the scoring function. - provider_id: - type: string - description: >- - The ID of the provider to use for the scoring function. - params: - $ref: '#/components/schemas/ScoringFnParams' - description: >- - The parameters for the scoring function for benchmark eval, these can - be overridden for app eval. - additionalProperties: false - required: - - scoring_fn_id - - description - - return_type - title: RegisterScoringFunctionRequest - RegisterShieldRequest: - type: object - properties: - shield_id: - type: string - description: >- - The identifier of the shield to register. - provider_shield_id: - type: string - description: >- - The identifier of the shield in the provider. - provider_id: - type: string - description: The identifier of the provider. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false - required: - - shield_id - title: RegisterShieldRequest - RegisterToolGroupRequest: - type: object - properties: - toolgroup_id: - type: string - description: The ID of the tool group to register. - provider_id: - type: string - description: >- - The ID of the provider to use for the tool group. - mcp_endpoint: - $ref: '#/components/schemas/URL' - description: >- - The MCP endpoint to use for the tool group. - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - A dictionary of arguments to pass to the tool group. - additionalProperties: false - required: - - toolgroup_id - - provider_id - title: RegisterToolGroupRequest - RegisterVectorDbRequest: - type: object - properties: - vector_db_id: - type: string - description: >- - The identifier of the vector database to register. + Set of 16 key-value pairs that can be attached to an object. embedding_model: type: string - description: The embedding model to use. + description: >- + The embedding model to use for this vector store. embedding_dimension: type: integer - description: The dimension of the embedding model. + description: >- + The dimension of the embedding vectors (default: 384). provider_id: - type: string - description: The identifier of the provider. - vector_db_name: - type: string - description: The name of the vector database. - provider_vector_db_id: type: string description: >- - The identifier of the vector database in the provider. + The ID of the provider to use for this vector store. additionalProperties: false - required: - - vector_db_id - - embedding_model - title: RegisterVectorDbRequest - RerankRequest: + title: OpenaiCreateVectorStoreRequest + OpenaiUpdateVectorStoreRequest: type: object properties: - model: + name: + type: string + description: The name of the vector store. + expires_after: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The expiration policy for a vector store. + metadata: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Set of 16 key-value pairs that can be attached to an object. + additionalProperties: false + title: OpenaiUpdateVectorStoreRequest + VectorStoreDeleteResponse: + type: object + properties: + id: type: string description: >- - The identifier of the reranking model to use. - query: - oneOf: - - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + Unique identifier of the deleted vector store + object: + type: string + default: vector_store.deleted description: >- - The search query to rank items against. Can be a string, text content - part, or image content part. The input must not exceed the model's max - input token length. - items: + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful + additionalProperties: false + required: + - id + - object + - deleted + title: VectorStoreDeleteResponse + description: Response from deleting a vector store. + VectorStoreChunkingStrategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + VectorStoreChunkingStrategyAuto: + type: object + properties: + type: + type: string + const: auto + default: auto + description: >- + Strategy type, always "auto" for automatic chunking + additionalProperties: false + required: + - type + title: VectorStoreChunkingStrategyAuto + description: >- + Automatic chunking strategy for vector store files. + VectorStoreChunkingStrategyStatic: + type: object + properties: + type: + type: string + const: static + default: static + description: >- + Strategy type, always "static" for static chunking + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + description: >- + Configuration parameters for the static chunking strategy + additionalProperties: false + required: + - type + - static + title: VectorStoreChunkingStrategyStatic + description: >- + Static chunking strategy with configurable parameters. + VectorStoreChunkingStrategyStaticConfig: + type: object + properties: + chunk_overlap_tokens: + type: integer + default: 400 + description: >- + Number of tokens to overlap between adjacent chunks + max_chunk_size_tokens: + type: integer + default: 800 + description: >- + Maximum number of tokens per chunk, must be between 100 and 4096 + additionalProperties: false + required: + - chunk_overlap_tokens + - max_chunk_size_tokens + title: VectorStoreChunkingStrategyStaticConfig + description: >- + Configuration for static chunking strategy. + OpenaiCreateVectorStoreFileBatchRequest: + type: object + properties: + file_ids: type: array items: + type: string + description: >- + A list of File IDs that the vector store should use. + attributes: + type: object + additionalProperties: oneOf: + - type: 'null' + - type: boolean + - type: number - type: string - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' - - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - type: array + - type: object description: >- - List of items to rerank. Each item can be a string, text content part, - or image content part. Each input must not exceed the model's max input - token length. - max_num_results: - type: integer + (Optional) Key-value attributes to store with the files. + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' description: >- - (Optional) Maximum number of results to return. Default: returns all. + (Optional) The chunking strategy used to chunk the file(s). Defaults to + auto. additionalProperties: false required: - - model - - query - - items - title: RerankRequest - RerankData: + - file_ids + title: OpenaiCreateVectorStoreFileBatchRequest + VectorStoreFileBatchObject: type: object properties: - index: + id: + type: string + description: Unique identifier for the file batch + object: + type: string + default: vector_store.file_batch + description: >- + Object type identifier, always "vector_store.file_batch" + created_at: type: integer description: >- - The original index of the document in the input list - relevance_score: - type: number + Timestamp when the file batch was created + vector_store_id: + type: string description: >- - The relevance score from the model output. Values are inverted when applicable - so that higher scores indicate greater relevance. + ID of the vector store containing the file batch + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: >- + Current processing status of the file batch + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + description: >- + File processing status counts for the batch additionalProperties: false required: - - index - - relevance_score - title: RerankData + - id + - object + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + description: OpenAI Vector Store File Batch object. + VectorStoreFileStatus: + oneOf: + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + VectorStoreFileLastError: + type: object + properties: + code: + oneOf: + - type: string + const: server_error + - type: string + const: rate_limit_exceeded + description: >- + Error code indicating the type of failure + message: + type: string + description: >- + Human-readable error message describing the failure + additionalProperties: false + required: + - code + - message + title: VectorStoreFileLastError description: >- - A single rerank result from a reranking response. - RerankResponse: + Error information for failed vector store file processing. + VectorStoreFileObject: type: object properties: + id: + type: string + description: Unique identifier for the file + object: + type: string + default: vector_store.file + description: >- + Object type identifier, always "vector_store.file" + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Key-value attributes associated with the file + chunking_strategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + description: >- + Strategy used for splitting the file into chunks + created_at: + type: integer + description: >- + Timestamp when the file was added to the vector store + last_error: + $ref: '#/components/schemas/VectorStoreFileLastError' + description: >- + (Optional) Error information if file processing failed + status: + $ref: '#/components/schemas/VectorStoreFileStatus' + description: Current processing status of the file + usage_bytes: + type: integer + default: 0 + description: Storage space used by this file in bytes + vector_store_id: + type: string + description: >- + ID of the vector store containing this file + additionalProperties: false + required: + - id + - object + - attributes + - chunking_strategy + - created_at + - status + - usage_bytes + - vector_store_id + title: VectorStoreFileObject + description: OpenAI Vector Store File object. + VectorStoreFilesListInBatchResponse: + type: object + properties: + object: + type: string + default: list + description: Object type identifier, always "list" data: type: array items: - $ref: '#/components/schemas/RerankData' + $ref: '#/components/schemas/VectorStoreFileObject' description: >- - List of rerank result objects, sorted by relevance score (descending) + List of vector store file objects in the batch + first_id: + type: string + description: >- + (Optional) ID of the first file in the list for pagination + last_id: + type: string + description: >- + (Optional) ID of the last file in the list for pagination + has_more: + type: boolean + default: false + description: >- + Whether there are more files available beyond this page additionalProperties: false required: + - object - data - title: RerankResponse - description: Response from a reranking request. - ResumeAgentTurnRequest: + - has_more + title: VectorStoreFilesListInBatchResponse + description: >- + Response from listing files in a vector store file batch. + VectorStoreListFilesResponse: type: object properties: - tool_responses: + object: + type: string + default: list + description: Object type identifier, always "list" + data: type: array items: - $ref: '#/components/schemas/ToolResponse' + $ref: '#/components/schemas/VectorStoreFileObject' + description: List of vector store file objects + first_id: + type: string description: >- - The tool call responses to resume the turn with. - stream: + (Optional) ID of the first file in the list for pagination + last_id: + type: string + description: >- + (Optional) ID of the last file in the list for pagination + has_more: type: boolean - description: Whether to stream the response. + default: false + description: >- + Whether there are more files available beyond this page additionalProperties: false required: - - tool_responses - title: ResumeAgentTurnRequest - RunEvalRequest: + - object + - data + - has_more + title: VectorStoreListFilesResponse + description: >- + Response from listing files in a vector store. + OpenaiAttachFileToVectorStoreRequest: type: object properties: - benchmark_config: - $ref: '#/components/schemas/BenchmarkConfig' - description: The configuration for the benchmark. + file_id: + type: string + description: >- + The ID of the file to attach to the vector store. + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The key-value attributes stored with the file, which can be used for filtering. + chunking_strategy: + $ref: '#/components/schemas/VectorStoreChunkingStrategy' + description: >- + The chunking strategy to use for the file. additionalProperties: false required: - - benchmark_config - title: RunEvalRequest - RunModerationRequest: + - file_id + title: OpenaiAttachFileToVectorStoreRequest + OpenaiUpdateVectorStoreFileRequest: type: object properties: - input: + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + The updated key-value attributes to store with the file. + additionalProperties: false + required: + - attributes + title: OpenaiUpdateVectorStoreFileRequest + VectorStoreFileDeleteResponse: + type: object + properties: + id: + type: string + description: Unique identifier of the deleted file + object: + type: string + default: vector_store.file.deleted + description: >- + Object type identifier for the deletion response + deleted: + type: boolean + default: true + description: >- + Whether the deletion operation was successful + additionalProperties: false + required: + - id + - object + - deleted + title: VectorStoreFileDeleteResponse + description: >- + Response from deleting a vector store file. + VectorStoreContent: + type: object + properties: + type: + type: string + const: text + description: >- + Content type, currently only "text" is supported + text: + type: string + description: The actual text content + additionalProperties: false + required: + - type + - text + title: VectorStoreContent + description: >- + Content item from a vector store file or search result. + VectorStoreFileContentsResponse: + type: object + properties: + file_id: + type: string + description: Unique identifier for the file + filename: + type: string + description: Name of the file + attributes: + type: object + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: >- + Key-value attributes associated with the file + content: + type: array + items: + $ref: '#/components/schemas/VectorStoreContent' + description: List of content items from the file + additionalProperties: false + required: + - file_id + - filename + - attributes + - content + title: VectorStoreFileContentsResponse + description: >- + Response from retrieving the contents of a vector store file. + OpenaiSearchVectorStoreRequest: + type: object + properties: + query: oneOf: - type: string - type: array items: type: string description: >- - Input (or inputs) to classify. Can be a single string, an array of strings, - or an array of multi-modal input objects similar to other models. - model: - type: string - description: >- - The content moderation model you would like to use. - additionalProperties: false - required: - - input - - model - title: RunModerationRequest - ModerationObject: - type: object - properties: - id: - type: string - description: >- - The unique identifier for the moderation request. - model: - type: string - description: >- - The model used to generate the moderation results. - results: - type: array - items: - $ref: '#/components/schemas/ModerationObjectResults' - description: A list of moderation objects - additionalProperties: false - required: - - id - - model - - results - title: ModerationObject - description: A moderation object. - ModerationObjectResults: - type: object - properties: - flagged: - type: boolean - description: >- - Whether any of the below categories are flagged. - categories: + The query string or array for performing the search. + filters: type: object additionalProperties: - type: boolean + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object description: >- - A list of the categories, and whether they are flagged or not. - category_applied_input_types: + Filters based on file attributes to narrow the search results. + max_num_results: + type: integer + description: >- + Maximum number of results to return (1 to 50 inclusive, default 10). + ranking_options: type: object - additionalProperties: - type: array - items: + properties: + ranker: type: string + description: >- + (Optional) Name of the ranking algorithm to use + score_threshold: + type: number + default: 0.0 + description: >- + (Optional) Minimum relevance score threshold for results + additionalProperties: false description: >- - A list of the categories along with the input type(s) that the score applies - to. - category_scores: - type: object - additionalProperties: - type: number + Ranking options for fine-tuning the search results. + rewrite_query: + type: boolean description: >- - A list of the categories along with their scores as predicted by model. - user_message: + Whether to rewrite the natural language query for vector search (default + false) + search_mode: type: string - metadata: + description: >- + The search mode to use - "keyword", "vector", or "hybrid" (default "vector") + additionalProperties: false + required: + - query + title: OpenaiSearchVectorStoreRequest + VectorStoreSearchResponse: + type: object + properties: + file_id: + type: string + description: >- + Unique identifier of the file containing the result + filename: + type: string + description: Name of the file containing the result + score: + type: number + description: Relevance score for this search result + attributes: type: object additionalProperties: oneOf: - - type: 'null' - - type: boolean - - type: number - type: string - - type: array - - type: object - additionalProperties: false - required: - - flagged - - metadata - title: ModerationObjectResults - description: A moderation object. - Message: - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/UserMessage' - system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolResponseMessage' - assistant: '#/components/schemas/CompletionMessage' - RunShieldRequest: - type: object - properties: - shield_id: - type: string - description: The identifier of the shield to run. - messages: - type: array - items: - $ref: '#/components/schemas/Message' - description: The messages to run the shield on. - params: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - type: number - - type: string - - type: array - - type: object - description: The parameters of the shield. - additionalProperties: false - required: - - shield_id - - messages - - params - title: RunShieldRequest - RunShieldResponse: - type: object - properties: - violation: - $ref: '#/components/schemas/SafetyViolation' + - type: boolean description: >- - (Optional) Safety violation detected by the shield, if any - additionalProperties: false - title: RunShieldResponse - description: Response from running a safety shield. - SaveSpansToDatasetRequest: - type: object - properties: - attribute_filters: + (Optional) Key-value attributes associated with the file + content: type: array items: - $ref: '#/components/schemas/QueryCondition' + $ref: '#/components/schemas/VectorStoreContent' description: >- - The attribute filters to apply to the spans. - attributes_to_save: + List of content items matching the search query + additionalProperties: false + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + description: Response from searching a vector store. + VectorStoreSearchResponsePage: + type: object + properties: + object: + type: string + default: vector_store.search_results.page + description: >- + Object type identifier for the search results page + search_query: + type: string + description: >- + The original search query that was executed + data: type: array items: - type: string - description: The attributes to save to the dataset. - dataset_id: - type: string - description: >- - The ID of the dataset to save the spans to. - max_depth: - type: integer - description: The maximum depth of the tree. - additionalProperties: false - required: - - attribute_filters - - attributes_to_save - - dataset_id - title: SaveSpansToDatasetRequest - ScoreRequest: - type: object - properties: - input_rows: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The rows to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - additionalProperties: false - required: - - input_rows - - scoring_functions - title: ScoreRequest - ScoreResponse: - type: object - properties: - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult. - additionalProperties: false - required: - - results - title: ScoreResponse - description: The response from scoring. - ScoreBatchRequest: - type: object - properties: - dataset_id: - type: string - description: The ID of the dataset to score. - scoring_functions: - type: object - additionalProperties: - oneOf: - - $ref: '#/components/schemas/ScoringFnParams' - - type: 'null' - description: >- - The scoring functions to use for the scoring. - save_results_dataset: - type: boolean - description: >- - Whether to save the results to a dataset. - additionalProperties: false - required: - - dataset_id - - scoring_functions - - save_results_dataset - title: ScoreBatchRequest - ScoreBatchResponse: - type: object - properties: - dataset_id: - type: string - description: >- - (Optional) The identifier of the dataset that was scored - results: - type: object - additionalProperties: - $ref: '#/components/schemas/ScoringResult' - description: >- - A map of scoring function name to ScoringResult - additionalProperties: false - required: - - results - title: ScoreBatchResponse - description: >- - Response from batch scoring operations on datasets. - SetDefaultVersionRequest: - type: object - properties: - version: - type: integer - description: The version to set as default. - additionalProperties: false - required: - - version - title: SetDefaultVersionRequest - AlgorithmConfig: - oneOf: - - $ref: '#/components/schemas/LoraFinetuningConfig' - - $ref: '#/components/schemas/QATFinetuningConfig' - discriminator: - propertyName: type - mapping: - LoRA: '#/components/schemas/LoraFinetuningConfig' - QAT: '#/components/schemas/QATFinetuningConfig' - LoraFinetuningConfig: - type: object - properties: - type: - type: string - const: LoRA - default: LoRA - description: Algorithm type identifier, always "LoRA" - lora_attn_modules: - type: array - items: - type: string - description: >- - List of attention module names to apply LoRA to - apply_lora_to_mlp: - type: boolean - description: Whether to apply LoRA to MLP layers - apply_lora_to_output: - type: boolean - description: >- - Whether to apply LoRA to output projection layers - rank: - type: integer - description: >- - Rank of the LoRA adaptation (lower rank = fewer parameters) - alpha: - type: integer - description: >- - LoRA scaling parameter that controls adaptation strength - use_dora: + $ref: '#/components/schemas/VectorStoreSearchResponse' + description: List of search result objects + has_more: type: boolean default: false description: >- - (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation) - quantize_base: - type: boolean - default: false + Whether there are more results available beyond this page + next_page: + type: string description: >- - (Optional) Whether to quantize the base model weights + (Optional) Token for retrieving the next page of results additionalProperties: false required: - - type - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - title: LoraFinetuningConfig + - object + - search_query + - data + - has_more + title: VectorStoreSearchResponsePage description: >- - Configuration for Low-Rank Adaptation (LoRA) fine-tuning. - QATFinetuningConfig: - type: object - properties: - type: - type: string - const: QAT - default: QAT - description: Algorithm type identifier, always "QAT" - quantizer_name: - type: string - description: >- - Name of the quantization algorithm to use - group_size: - type: integer - description: Size of groups for grouped quantization - additionalProperties: false - required: - - type - - quantizer_name - - group_size - title: QATFinetuningConfig - description: >- - Configuration for Quantization-Aware Training (QAT) fine-tuning. - SupervisedFineTuneRequest: - type: object - properties: - job_uuid: - type: string - description: The UUID of the job to create. - training_config: - $ref: '#/components/schemas/TrainingConfig' - description: The training configuration. - hyperparam_search_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The hyperparam search configuration. - logger_config: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: The logger configuration. - model: - type: string - description: The model to fine-tune. - checkpoint_dir: - type: string - description: The directory to save checkpoint(s) to. - algorithm_config: - $ref: '#/components/schemas/AlgorithmConfig' - description: The algorithm configuration. - additionalProperties: false - required: - - job_uuid - - training_config - - hyperparam_search_config - - logger_config - title: SupervisedFineTuneRequest - SyntheticDataGenerateRequest: - type: object - properties: - dialogs: - type: array - items: - $ref: '#/components/schemas/Message' - description: >- - List of conversation messages to use as input for synthetic data generation - filtering_function: - type: string - enum: - - none - - random - - top_k - - top_p - - top_k_top_p - - sigmoid - description: >- - Type of filtering to apply to generated synthetic data samples - model: - type: string - description: >- - (Optional) The identifier of the model to use. The model must be registered - with Llama Stack and available via the /models endpoint - additionalProperties: false - required: - - dialogs - - filtering_function - title: SyntheticDataGenerateRequest - SyntheticDataGenerationResponse: - type: object - properties: - synthetic_data: - type: array - items: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - List of generated synthetic data samples that passed the filtering criteria - statistics: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Statistical information about the generation process and filtering - results - additionalProperties: false - required: - - synthetic_data - title: SyntheticDataGenerationResponse - description: >- - Response from the synthetic data generation. Batch of (prompt, response, score) - tuples that pass the threshold. - UpdatePromptRequest: - type: object - properties: - prompt: - type: string - description: The updated prompt text content. - version: - type: integer - description: >- - The current version of the prompt being updated. - variables: - type: array - items: - type: string - description: >- - Updated list of variable names that can be used in the prompt template. - set_as_default: - type: boolean - description: >- - Set the new version as the default (default=True). - additionalProperties: false - required: - - prompt - - version - - set_as_default - title: UpdatePromptRequest + Paginated response from searching a vector store. VersionInfo: type: object properties: @@ -14552,28 +10292,10 @@ security: tags: - name: Agents description: >- - Main functionalities provided by this API: - - - Create agents with specific instructions and ability to use tools. - - - Interactions with agents are grouped into sessions ("threads"), and each interaction - is called a "turn". - - - Agents can be provided with various tools (see the ToolGroups and ToolRuntime - APIs for more details). - - - Agents can be provided with various shields (see the Safety API for more details). - - - Agents can also use Memory to retrieve information from knowledge bases. See - the RAG Tool and Vector IO APIs for more details. - x-displayName: >- - Agents API for creating and interacting with agentic systems. - - name: Benchmarks + APIs for creating and interacting with agentic systems. + x-displayName: Agents - name: DatasetIO - name: Datasets - - name: Eval - x-displayName: >- - Llama Stack Evaluation API for running evaluations on model and agent candidates. - name: Files - name: Inference description: >- @@ -14589,7 +10311,6 @@ tags: embeddings. - name: Inspect - name: Models - - name: PostTraining (Coming Soon) - name: Prompts x-displayName: >- Protocol for prompt management operations. @@ -14610,15 +10331,12 @@ x-tagGroups: - name: Operations tags: - Agents - - Benchmarks - DatasetIO - Datasets - - Eval - Files - Inference - Inspect - Models - - PostTraining (Coming Soon) - Prompts - Providers - Safety diff --git a/llama_stack/apis/agents/agents.py b/llama_stack/apis/agents/agents.py index f732dd1ed..97d80af59 100644 --- a/llama_stack/apis/agents/agents.py +++ b/llama_stack/apis/agents/agents.py @@ -472,20 +472,23 @@ class AgentStepResponse(BaseModel): @runtime_checkable class Agents(Protocol): - """Agents API for creating and interacting with agentic systems. + """Agents - Main functionalities provided by this API: - - Create agents with specific instructions and ability to use tools. - - Interactions with agents are grouped into sessions ("threads"), and each interaction is called a "turn". - - Agents can be provided with various tools (see the ToolGroups and ToolRuntime APIs for more details). - - Agents can be provided with various shields (see the Safety API for more details). - - Agents can also use Memory to retrieve information from knowledge bases. See the RAG Tool and Vector IO APIs for more details. - """ + APIs for creating and interacting with agentic systems.""" @webmethod( - route="/agents", method="POST", descriptive_name="create_agent", deprecated=True, level=LLAMA_STACK_API_V1 + route="/agents", + method="POST", + descriptive_name="create_agent", + deprecated=True, + level=LLAMA_STACK_API_V1, + ) + @webmethod( + route="/agents", + method="POST", + descriptive_name="create_agent", + level=LLAMA_STACK_API_V1ALPHA, ) - @webmethod(route="/agents", method="POST", descriptive_name="create_agent", level=LLAMA_STACK_API_V1ALPHA) async def create_agent( self, agent_config: AgentConfig, @@ -648,8 +651,17 @@ class Agents(Protocol): """ ... - @webmethod(route="/agents/{agent_id}/session/{session_id}", method="GET", deprecated=True, level=LLAMA_STACK_API_V1) - @webmethod(route="/agents/{agent_id}/session/{session_id}", method="GET", level=LLAMA_STACK_API_V1ALPHA) + @webmethod( + route="/agents/{agent_id}/session/{session_id}", + method="GET", + deprecated=True, + level=LLAMA_STACK_API_V1, + ) + @webmethod( + route="/agents/{agent_id}/session/{session_id}", + method="GET", + level=LLAMA_STACK_API_V1ALPHA, + ) async def get_agents_session( self, session_id: str, @@ -666,9 +678,16 @@ class Agents(Protocol): ... @webmethod( - route="/agents/{agent_id}/session/{session_id}", method="DELETE", deprecated=True, level=LLAMA_STACK_API_V1 + route="/agents/{agent_id}/session/{session_id}", + method="DELETE", + deprecated=True, + level=LLAMA_STACK_API_V1, + ) + @webmethod( + route="/agents/{agent_id}/session/{session_id}", + method="DELETE", + level=LLAMA_STACK_API_V1ALPHA, ) - @webmethod(route="/agents/{agent_id}/session/{session_id}", method="DELETE", level=LLAMA_STACK_API_V1ALPHA) async def delete_agents_session( self, session_id: str, @@ -681,7 +700,12 @@ class Agents(Protocol): """ ... - @webmethod(route="/agents/{agent_id}", method="DELETE", deprecated=True, level=LLAMA_STACK_API_V1) + @webmethod( + route="/agents/{agent_id}", + method="DELETE", + deprecated=True, + level=LLAMA_STACK_API_V1, + ) @webmethod(route="/agents/{agent_id}", method="DELETE", level=LLAMA_STACK_API_V1ALPHA) async def delete_agent( self, @@ -704,7 +728,12 @@ class Agents(Protocol): """ ... - @webmethod(route="/agents/{agent_id}", method="GET", deprecated=True, level=LLAMA_STACK_API_V1) + @webmethod( + route="/agents/{agent_id}", + method="GET", + deprecated=True, + level=LLAMA_STACK_API_V1, + ) @webmethod(route="/agents/{agent_id}", method="GET", level=LLAMA_STACK_API_V1ALPHA) async def get_agent(self, agent_id: str) -> Agent: """Describe an agent by its ID. @@ -714,7 +743,12 @@ class Agents(Protocol): """ ... - @webmethod(route="/agents/{agent_id}/sessions", method="GET", deprecated=True, level=LLAMA_STACK_API_V1) + @webmethod( + route="/agents/{agent_id}/sessions", + method="GET", + deprecated=True, + level=LLAMA_STACK_API_V1, + ) @webmethod(route="/agents/{agent_id}/sessions", method="GET", level=LLAMA_STACK_API_V1ALPHA) async def list_agent_sessions( self, @@ -793,7 +827,11 @@ class Agents(Protocol): """ ... - @webmethod(route="/responses/{response_id}/input_items", method="GET", level=LLAMA_STACK_API_V1) + @webmethod( + route="/responses/{response_id}/input_items", + method="GET", + level=LLAMA_STACK_API_V1, + ) async def list_openai_response_input_items( self, response_id: str,