Fix the OpenAPI HTML

This commit is contained in:
Ashwin Bharambe 2025-02-04 10:38:49 -08:00
parent c9ab72fa82
commit b17277b06a
5 changed files with 250 additions and 120 deletions

View file

@ -644,10 +644,12 @@ class Generator:
else: else:
callbacks = None callbacks = None
description = "\n".join(filter(None, [doc_string.short_description, doc_string.long_description]))
return Operation( return Operation(
tags=[op.defining_class.__name__], tags=[op.defining_class.__name__],
summary=doc_string.short_description, summary=None,
description=doc_string.long_description, # summary=doc_string.short_description,
description=description,
parameters=parameters, parameters=parameters,
requestBody=requestBody, requestBody=requestBody,
responses=responses, responses=responses,

View file

@ -6,36 +6,36 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>OpenAPI specification</title> <title>OpenAPI specification</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<script type="module" src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">
<style> <style>
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 100vh;
} }
elements-api {
height: 100%;
}
</style> </style>
<script defer="defer" src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script> </head>
<script defer="defer">
<body>
<elements-api id="openapi-container" router="hash" layout="sidebar" hideExport="true"
hideInternal="true"></elements-api>
<script>
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
spec = { /* OPENAPI_SPECIFICATION */ }; const spec = { /* OPENAPI_SPECIFICATION */ };
options = { const element = document.getElementById("openapi-container");
downloadFileName: "openapi.json", element.apiDescriptionDocument = spec;
expandResponses: "200",
expandSingleSchemaField: true,
jsonSampleExpandLevel: "all",
schemaExpansionLevel: "all",
};
element = document.getElementById("openapi-container");
Redoc.init(spec, options, element);
if (spec.info && spec.info.title) { if (spec.info && spec.info.title) {
document.title = spec.info.title; document.title = spec.info.title;
} }
}); });
</script> </script>
</head>
<body>
<div id="openapi-container"></div>
</body> </body>
</html> </html>

View file

@ -109,10 +109,10 @@ def get_class_property_docstrings(
def docstring_to_schema(data_type: type) -> Schema: def docstring_to_schema(data_type: type) -> Schema:
short_description, long_description = get_class_docstrings(data_type) short_description, long_description = get_class_docstrings(data_type)
schema: Schema = {} schema: Schema = {}
if short_description:
schema["title"] = short_description description = "\n".join(filter(None, [short_description, long_description]))
if long_description: if description:
schema["description"] = long_description schema["description"] = description
return schema return schema

View file

@ -6,17 +6,28 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>OpenAPI specification</title> <title>OpenAPI specification</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<script type="module" src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">
<style> <style>
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 100vh;
} }
elements-api {
height: 100%;
}
</style> </style>
<script defer="defer" src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script> </head>
<script defer="defer">
<body>
<elements-api id="openapi-container" router="hash" layout="sidebar" hideExport="true"
hideInternal="true"></elements-api>
<script>
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
spec = { const spec = {
"openapi": "3.1.0", "openapi": "3.1.0",
"info": { "info": {
"title": "Llama Stack Specification", "title": "Llama Stack Specification",
@ -46,6 +57,7 @@
"tags": [ "tags": [
"DatasetIO" "DatasetIO"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "dataset_id", "name": "dataset_id",
@ -90,6 +102,7 @@
"tags": [ "tags": [
"DatasetIO" "DatasetIO"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -120,6 +133,7 @@
"tags": [ "tags": [
"BatchInference (Coming Soon)" "BatchInference (Coming Soon)"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -150,6 +164,7 @@
"tags": [ "tags": [
"BatchInference (Coming Soon)" "BatchInference (Coming Soon)"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -173,6 +188,7 @@
"tags": [ "tags": [
"PostTraining (Coming Soon)" "PostTraining (Coming Soon)"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -208,7 +224,7 @@
"tags": [ "tags": [
"Inference" "Inference"
], ],
"summary": "Generate a chat completion for the given messages using the specified model.", "description": "Generate a chat completion for the given messages using the specified model.",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -244,7 +260,7 @@
"tags": [ "tags": [
"Inference" "Inference"
], ],
"summary": "Generate a completion for the given content using the specified model.", "description": "Generate a completion for the given content using the specified model.",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -275,6 +291,7 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -305,6 +322,7 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "agent_id", "name": "agent_id",
@ -349,6 +367,7 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "agent_id", "name": "agent_id",
@ -389,6 +408,7 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "agent_id", "name": "agent_id",
@ -418,6 +438,7 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "session_id", "name": "session_id",
@ -457,6 +478,7 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "session_id", "name": "session_id",
@ -494,7 +516,7 @@
"tags": [ "tags": [
"Inference" "Inference"
], ],
"summary": "Generate embeddings for content pieces using the specified model.", "description": "Generate embeddings for content pieces using the specified model.",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -525,6 +547,7 @@
"tags": [ "tags": [
"Eval" "Eval"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "task_id", "name": "task_id",
@ -564,6 +587,7 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "agent_id", "name": "agent_id",
@ -617,6 +641,7 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "agent_id", "name": "agent_id",
@ -669,6 +694,7 @@
"tags": [ "tags": [
"Datasets" "Datasets"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "dataset_id", "name": "dataset_id",
@ -689,6 +715,7 @@
"tags": [ "tags": [
"Datasets" "Datasets"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "dataset_id", "name": "dataset_id",
@ -725,6 +752,7 @@
"tags": [ "tags": [
"EvalTasks" "EvalTasks"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "eval_task_id", "name": "eval_task_id",
@ -761,6 +789,7 @@
"tags": [ "tags": [
"Models" "Models"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "model_id", "name": "model_id",
@ -781,6 +810,7 @@
"tags": [ "tags": [
"Models" "Models"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "model_id", "name": "model_id",
@ -817,6 +847,7 @@
"tags": [ "tags": [
"ScoringFunctions" "ScoringFunctions"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "scoring_fn_id", "name": "scoring_fn_id",
@ -853,6 +884,7 @@
"tags": [ "tags": [
"Shields" "Shields"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "identifier", "name": "identifier",
@ -882,6 +914,7 @@
"tags": [ "tags": [
"Telemetry" "Telemetry"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "trace_id", "name": "trace_id",
@ -919,6 +952,7 @@
"tags": [ "tags": [
"Telemetry" "Telemetry"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "span_id", "name": "span_id",
@ -967,6 +1001,7 @@
"tags": [ "tags": [
"ToolGroups" "ToolGroups"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "tool_name", "name": "tool_name",
@ -996,6 +1031,7 @@
"tags": [ "tags": [
"ToolGroups" "ToolGroups"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "toolgroup_id", "name": "toolgroup_id",
@ -1016,7 +1052,7 @@
"tags": [ "tags": [
"ToolGroups" "ToolGroups"
], ],
"summary": "Unregister a tool group", "description": "Unregister a tool group",
"parameters": [ "parameters": [
{ {
"name": "toolgroup_id", "name": "toolgroup_id",
@ -1046,6 +1082,7 @@
"tags": [ "tags": [
"Telemetry" "Telemetry"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "trace_id", "name": "trace_id",
@ -1082,6 +1119,7 @@
"tags": [ "tags": [
"PostTraining (Coming Soon)" "PostTraining (Coming Soon)"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "job_uuid", "name": "job_uuid",
@ -1118,6 +1156,7 @@
"tags": [ "tags": [
"PostTraining (Coming Soon)" "PostTraining (Coming Soon)"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "job_uuid", "name": "job_uuid",
@ -1147,6 +1186,7 @@
"tags": [ "tags": [
"PostTraining (Coming Soon)" "PostTraining (Coming Soon)"
], ],
"description": "",
"parameters": [] "parameters": []
} }
}, },
@ -1174,6 +1214,7 @@
"tags": [ "tags": [
"VectorDBs" "VectorDBs"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "vector_db_id", "name": "vector_db_id",
@ -1194,6 +1235,7 @@
"tags": [ "tags": [
"VectorDBs" "VectorDBs"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "vector_db_id", "name": "vector_db_id",
@ -1223,6 +1265,7 @@
"tags": [ "tags": [
"Inspect" "Inspect"
], ],
"description": "",
"parameters": [] "parameters": []
} }
}, },
@ -1236,7 +1279,7 @@
"tags": [ "tags": [
"ToolRuntime" "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": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1260,6 +1303,7 @@
"tags": [ "tags": [
"VectorIO" "VectorIO"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1290,7 +1334,7 @@
"tags": [ "tags": [
"ToolRuntime" "ToolRuntime"
], ],
"summary": "Run a tool with the given arguments", "description": "Run a tool with the given arguments",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1328,6 +1372,7 @@
"tags": [ "tags": [
"Eval" "Eval"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "task_id", "name": "task_id",
@ -1356,6 +1401,7 @@
"tags": [ "tags": [
"Eval" "Eval"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "task_id", "name": "task_id",
@ -1393,6 +1439,7 @@
"tags": [ "tags": [
"Eval" "Eval"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "job_id", "name": "job_id",
@ -1430,6 +1477,7 @@
"tags": [ "tags": [
"Datasets" "Datasets"
], ],
"description": "",
"parameters": [] "parameters": []
}, },
"post": { "post": {
@ -1441,6 +1489,7 @@
"tags": [ "tags": [
"Datasets" "Datasets"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1471,6 +1520,7 @@
"tags": [ "tags": [
"EvalTasks" "EvalTasks"
], ],
"description": "",
"parameters": [] "parameters": []
}, },
"post": { "post": {
@ -1482,6 +1532,7 @@
"tags": [ "tags": [
"EvalTasks" "EvalTasks"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1512,6 +1563,7 @@
"tags": [ "tags": [
"Models" "Models"
], ],
"description": "",
"parameters": [] "parameters": []
}, },
"post": { "post": {
@ -1530,6 +1582,7 @@
"tags": [ "tags": [
"Models" "Models"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1560,6 +1613,7 @@
"tags": [ "tags": [
"Inspect" "Inspect"
], ],
"description": "",
"parameters": [] "parameters": []
} }
}, },
@ -1580,6 +1634,7 @@
"tags": [ "tags": [
"Inspect" "Inspect"
], ],
"description": "",
"parameters": [] "parameters": []
} }
}, },
@ -1600,6 +1655,7 @@
"tags": [ "tags": [
"ToolRuntime" "ToolRuntime"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "tool_group_id", "name": "tool_group_id",
@ -1637,6 +1693,7 @@
"tags": [ "tags": [
"ScoringFunctions" "ScoringFunctions"
], ],
"description": "",
"parameters": [] "parameters": []
}, },
"post": { "post": {
@ -1648,6 +1705,7 @@
"tags": [ "tags": [
"ScoringFunctions" "ScoringFunctions"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1678,6 +1736,7 @@
"tags": [ "tags": [
"Shields" "Shields"
], ],
"description": "",
"parameters": [] "parameters": []
}, },
"post": { "post": {
@ -1696,6 +1755,7 @@
"tags": [ "tags": [
"Shields" "Shields"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1726,7 +1786,7 @@
"tags": [ "tags": [
"ToolGroups" "ToolGroups"
], ],
"summary": "List tool groups with optional provider", "description": "List tool groups with optional provider",
"parameters": [] "parameters": []
}, },
"post": { "post": {
@ -1738,7 +1798,7 @@
"tags": [ "tags": [
"ToolGroups" "ToolGroups"
], ],
"summary": "Register a tool group", "description": "Register a tool group",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1769,7 +1829,7 @@
"tags": [ "tags": [
"ToolGroups" "ToolGroups"
], ],
"summary": "List tools with optional tool group", "description": "List tools with optional tool group",
"parameters": [ "parameters": [
{ {
"name": "toolgroup_id", "name": "toolgroup_id",
@ -1799,6 +1859,7 @@
"tags": [ "tags": [
"VectorDBs" "VectorDBs"
], ],
"description": "",
"parameters": [] "parameters": []
}, },
"post": { "post": {
@ -1817,6 +1878,7 @@
"tags": [ "tags": [
"VectorDBs" "VectorDBs"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1840,6 +1902,7 @@
"tags": [ "tags": [
"Telemetry" "Telemetry"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1870,6 +1933,7 @@
"tags": [ "tags": [
"PostTraining (Coming Soon)" "PostTraining (Coming Soon)"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1900,7 +1964,7 @@
"tags": [ "tags": [
"ToolRuntime" "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": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1931,6 +1995,7 @@
"tags": [ "tags": [
"VectorIO" "VectorIO"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -1961,6 +2026,7 @@
"tags": [ "tags": [
"Telemetry" "Telemetry"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "attribute_filters", "name": "attribute_filters",
@ -2012,6 +2078,7 @@
"tags": [ "tags": [
"Telemetry" "Telemetry"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "attribute_filters", "name": "attribute_filters",
@ -2071,6 +2138,7 @@
"tags": [ "tags": [
"Eval" "Eval"
], ],
"description": "",
"parameters": [ "parameters": [
{ {
"name": "task_id", "name": "task_id",
@ -2110,6 +2178,7 @@
"tags": [ "tags": [
"Safety" "Safety"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -2133,6 +2202,7 @@
"tags": [ "tags": [
"Telemetry" "Telemetry"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -2163,6 +2233,7 @@
"tags": [ "tags": [
"Scoring" "Scoring"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -2193,6 +2264,7 @@
"tags": [ "tags": [
"Scoring" "Scoring"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -2223,6 +2295,7 @@
"tags": [ "tags": [
"PostTraining (Coming Soon)" "PostTraining (Coming Soon)"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -2253,6 +2326,7 @@
"tags": [ "tags": [
"SyntheticDataGeneration (Coming Soon)" "SyntheticDataGeneration (Coming Soon)"
], ],
"description": "",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
@ -2283,6 +2357,7 @@
"tags": [ "tags": [
"Inspect" "Inspect"
], ],
"description": "",
"parameters": [] "parameters": []
} }
} }
@ -2368,7 +2443,7 @@
"stop_reason", "stop_reason",
"tool_calls" "tool_calls"
], ],
"title": "A message containing the model's (assistant) response in a chat conversation." "description": "A message containing the model's (assistant) response in a chat conversation."
}, },
"GrammarResponseFormat": { "GrammarResponseFormat": {
"type": "object", "type": "object",
@ -2411,7 +2486,7 @@
"type", "type",
"bnf" "bnf"
], ],
"title": "Configuration for grammar-guided response generation." "description": "Configuration for grammar-guided response generation."
}, },
"GreedySamplingStrategy": { "GreedySamplingStrategy": {
"type": "object", "type": "object",
@ -2458,7 +2533,7 @@
"type", "type",
"image" "image"
], ],
"title": "A image content item" "description": "A image content item"
}, },
"InterleavedContent": { "InterleavedContent": {
"oneOf": [ "oneOf": [
@ -2534,7 +2609,7 @@
"type", "type",
"json_schema" "json_schema"
], ],
"title": "Configuration for JSON schema-guided response generation." "description": "Configuration for JSON schema-guided response generation."
}, },
"Message": { "Message": {
"oneOf": [ "oneOf": [
@ -2638,7 +2713,7 @@
"role", "role",
"content" "content"
], ],
"title": "A system message providing instructions or context to the model." "description": "A system message providing instructions or context to the model."
}, },
"TextContentItem": { "TextContentItem": {
"type": "object", "type": "object",
@ -2659,7 +2734,7 @@
"type", "type",
"text" "text"
], ],
"title": "A text content item" "description": "A text content item"
}, },
"ToolCall": { "ToolCall": {
"type": "object", "type": "object",
@ -2874,7 +2949,7 @@
"tool_name", "tool_name",
"content" "content"
], ],
"title": "A message representing the result of a tool invocation." "description": "A message representing the result of a tool invocation."
}, },
"TopKSamplingStrategy": { "TopKSamplingStrategy": {
"type": "object", "type": "object",
@ -2950,7 +3025,7 @@
"role", "role",
"content" "content"
], ],
"title": "A message from the user in a chat conversation." "description": "A message from the user in a chat conversation."
}, },
"BatchChatCompletionRequest": { "BatchChatCompletionRequest": {
"type": "object", "type": "object",
@ -2982,7 +3057,7 @@
"auto", "auto",
"required" "required"
], ],
"title": "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." "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."
}, },
"tool_prompt_format": { "tool_prompt_format": {
"type": "string", "type": "string",
@ -2991,7 +3066,7 @@
"function_tag", "function_tag",
"python_list" "python_list"
], ],
"title": "Prompt format for calling custom / zero shot tools." "description": "Prompt format for calling custom / zero shot tools."
}, },
"response_format": { "response_format": {
"$ref": "#/components/schemas/ResponseFormat" "$ref": "#/components/schemas/ResponseFormat"
@ -3048,7 +3123,7 @@
"required": [ "required": [
"completion_message" "completion_message"
], ],
"title": "Response from a chat completion request." "description": "Response from a chat completion request."
}, },
"TokenLogProbs": { "TokenLogProbs": {
"type": "object", "type": "object",
@ -3065,7 +3140,7 @@
"required": [ "required": [
"logprobs_by_token" "logprobs_by_token"
], ],
"title": "Log probabilities for generated tokens." "description": "Log probabilities for generated tokens."
}, },
"BatchCompletionRequest": { "BatchCompletionRequest": {
"type": "object", "type": "object",
@ -3147,7 +3222,7 @@
"content", "content",
"stop_reason" "stop_reason"
], ],
"title": "Response from a completion request." "description": "Response from a completion request."
}, },
"CancelTrainingJobRequest": { "CancelTrainingJobRequest": {
"type": "object", "type": "object",
@ -3170,8 +3245,8 @@
"auto", "auto",
"required" "required"
], ],
"default": "auto", "description": "(Optional) Whether tool use is required or automatic. Defaults to ToolChoice.auto.",
"description": "(Optional) Whether tool use is required or automatic. Defaults to ToolChoice.auto." "default": "auto"
}, },
"tool_prompt_format": { "tool_prompt_format": {
"type": "string", "type": "string",
@ -3188,15 +3263,15 @@
"append", "append",
"replace" "replace"
], ],
"default": "append", "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.",
"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, "additionalProperties": false,
"required": [ "required": [
"system_message_behavior" "system_message_behavior"
], ],
"title": "Configuration for tool use." "description": "Configuration for tool use."
}, },
"ChatCompletionRequest": { "ChatCompletionRequest": {
"type": "object", "type": "object",
@ -3309,7 +3384,7 @@
"event_type", "event_type",
"delta" "delta"
], ],
"title": "An event during chat completion generation." "description": "An event during chat completion generation."
}, },
"ChatCompletionResponseStreamChunk": { "ChatCompletionResponseStreamChunk": {
"type": "object", "type": "object",
@ -3323,7 +3398,7 @@
"required": [ "required": [
"event" "event"
], ],
"title": "A chunk of a streamed chat completion response." "description": "A chunk of a streamed chat completion response."
}, },
"ContentDelta": { "ContentDelta": {
"oneOf": [ "oneOf": [
@ -3488,7 +3563,7 @@
"required": [ "required": [
"delta" "delta"
], ],
"title": "A chunk of a streamed completion response." "description": "A chunk of a streamed completion response."
}, },
"AgentConfig": { "AgentConfig": {
"type": "object", "type": "object",
@ -3526,7 +3601,7 @@
"auto", "auto",
"required" "required"
], ],
"title": "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.", "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.",
"default": "auto" "default": "auto"
}, },
"tool_prompt_format": { "tool_prompt_format": {
@ -3536,7 +3611,7 @@
"function_tag", "function_tag",
"python_list" "python_list"
], ],
"title": "Prompt format for calling custom / zero shot tools." "description": "Prompt format for calling custom / zero shot tools."
}, },
"max_infer_iters": { "max_infer_iters": {
"type": "integer", "type": "integer",
@ -4145,7 +4220,7 @@
"output_attachments", "output_attachments",
"started_at" "started_at"
], ],
"title": "A single turn in an interaction with an Agentic System." "description": "A single turn in an interaction with an Agentic System."
}, },
"ViolationLevel": { "ViolationLevel": {
"type": "string", "type": "string",
@ -4346,7 +4421,7 @@
"required": [ "required": [
"event" "event"
], ],
"title": "streamed agent turn completion response." "description": "streamed agent turn completion response."
}, },
"AgentTurnResponseTurnCompletePayload": { "AgentTurnResponseTurnCompletePayload": {
"type": "object", "type": "object",
@ -4423,7 +4498,7 @@
"required": [ "required": [
"embeddings" "embeddings"
], ],
"title": "Response containing generated embeddings." "description": "Response containing generated embeddings."
}, },
"AgentCandidate": { "AgentCandidate": {
"type": "object", "type": "object",
@ -4842,7 +4917,7 @@
"turns", "turns",
"started_at" "started_at"
], ],
"title": "A single session of an interaction with an Agentic System." "description": "A single session of an interaction with an Agentic System."
}, },
"AgentStepResponse": { "AgentStepResponse": {
"type": "object", "type": "object",
@ -5413,7 +5488,7 @@
"provider_id", "provider_id",
"type" "type"
], ],
"title": "A safety shield resource that can be used to check content" "description": "A safety shield resource that can be used to check content"
}, },
"Span": { "Span": {
"type": "object", "type": "object",
@ -5732,7 +5807,7 @@
"job_uuid", "job_uuid",
"checkpoints" "checkpoints"
], ],
"title": "Artifacts of a finetuning job." "description": "Artifacts of a finetuning job."
}, },
"JobStatus": { "JobStatus": {
"type": "string", "type": "string",
@ -5802,7 +5877,7 @@
"status", "status",
"checkpoints" "checkpoints"
], ],
"title": "Status of a finetuning job." "description": "Status of a finetuning job."
}, },
"ListPostTrainingJobsResponse": { "ListPostTrainingJobsResponse": {
"type": "object", "type": "object",
@ -7786,7 +7861,7 @@
"top_k_top_p", "top_k_top_p",
"sigmoid" "sigmoid"
], ],
"title": "The type of filtering function." "description": "The type of filtering function."
}, },
"model": { "model": {
"type": "string" "type": "string"
@ -7859,7 +7934,7 @@
"required": [ "required": [
"synthetic_data" "synthetic_data"
], ],
"title": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold." "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold."
}, },
"VersionInfo": { "VersionInfo": {
"type": "object", "type": "object",
@ -7975,25 +8050,14 @@
} }
] ]
}; };
options = { const element = document.getElementById("openapi-container");
downloadFileName: "openapi.json", element.apiDescriptionDocument = spec;
expandResponses: "200",
expandSingleSchemaField: true,
jsonSampleExpandLevel: "all",
schemaExpansionLevel: "all",
};
element = document.getElementById("openapi-container");
Redoc.init(spec, options, element);
if (spec.info && spec.info.title) { if (spec.info && spec.info.title) {
document.title = spec.info.title; document.title = spec.info.title;
} }
}); });
</script> </script>
</head>
<body>
<div id="openapi-container"></div>
</body> </body>
</html> </html>

View file

@ -21,6 +21,7 @@ paths:
$ref: '#/components/schemas/PaginatedRowsResult' $ref: '#/components/schemas/PaginatedRowsResult'
tags: tags:
- DatasetIO - DatasetIO
description: ''
parameters: parameters:
- name: dataset_id - name: dataset_id
in: query in: query
@ -48,6 +49,7 @@ paths:
description: OK description: OK
tags: tags:
- DatasetIO - DatasetIO
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -66,6 +68,7 @@ paths:
$ref: '#/components/schemas/BatchChatCompletionResponse' $ref: '#/components/schemas/BatchChatCompletionResponse'
tags: tags:
- BatchInference (Coming Soon) - BatchInference (Coming Soon)
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -84,6 +87,7 @@ paths:
$ref: '#/components/schemas/BatchCompletionResponse' $ref: '#/components/schemas/BatchCompletionResponse'
tags: tags:
- BatchInference (Coming Soon) - BatchInference (Coming Soon)
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -98,6 +102,7 @@ paths:
description: OK description: OK
tags: tags:
- PostTraining (Coming Soon) - PostTraining (Coming Soon)
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -121,7 +126,7 @@ paths:
$ref: '#/components/schemas/ChatCompletionResponseStreamChunk' $ref: '#/components/schemas/ChatCompletionResponseStreamChunk'
tags: tags:
- Inference - Inference
summary: >- description: >-
Generate a chat completion for the given messages using the specified model. Generate a chat completion for the given messages using the specified model.
parameters: [] parameters: []
requestBody: requestBody:
@ -146,7 +151,7 @@ paths:
$ref: '#/components/schemas/CompletionResponseStreamChunk' $ref: '#/components/schemas/CompletionResponseStreamChunk'
tags: tags:
- Inference - Inference
summary: >- description: >-
Generate a completion for the given content using the specified model. Generate a completion for the given content using the specified model.
parameters: [] parameters: []
requestBody: requestBody:
@ -166,6 +171,7 @@ paths:
$ref: '#/components/schemas/AgentCreateResponse' $ref: '#/components/schemas/AgentCreateResponse'
tags: tags:
- Agents - Agents
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -184,6 +190,7 @@ paths:
$ref: '#/components/schemas/AgentSessionCreateResponse' $ref: '#/components/schemas/AgentSessionCreateResponse'
tags: tags:
- Agents - Agents
description: ''
parameters: parameters:
- name: agent_id - name: agent_id
in: path in: path
@ -212,6 +219,7 @@ paths:
$ref: '#/components/schemas/AgentTurnResponseStreamChunk' $ref: '#/components/schemas/AgentTurnResponseStreamChunk'
tags: tags:
- Agents - Agents
description: ''
parameters: parameters:
- name: agent_id - name: agent_id
in: path in: path
@ -236,6 +244,7 @@ paths:
description: OK description: OK
tags: tags:
- Agents - Agents
description: ''
parameters: parameters:
- name: agent_id - name: agent_id
in: path in: path
@ -253,6 +262,7 @@ paths:
$ref: '#/components/schemas/Session' $ref: '#/components/schemas/Session'
tags: tags:
- Agents - Agents
description: ''
parameters: parameters:
- name: session_id - name: session_id
in: path in: path
@ -277,6 +287,7 @@ paths:
description: OK description: OK
tags: tags:
- Agents - Agents
description: ''
parameters: parameters:
- name: session_id - name: session_id
in: path in: path
@ -302,7 +313,7 @@ paths:
$ref: '#/components/schemas/EmbeddingsResponse' $ref: '#/components/schemas/EmbeddingsResponse'
tags: tags:
- Inference - Inference
summary: >- description: >-
Generate embeddings for content pieces using the specified model. Generate embeddings for content pieces using the specified model.
parameters: [] parameters: []
requestBody: requestBody:
@ -322,6 +333,7 @@ paths:
$ref: '#/components/schemas/EvaluateResponse' $ref: '#/components/schemas/EvaluateResponse'
tags: tags:
- Eval - Eval
description: ''
parameters: parameters:
- name: task_id - name: task_id
in: path in: path
@ -345,6 +357,7 @@ paths:
$ref: '#/components/schemas/AgentStepResponse' $ref: '#/components/schemas/AgentStepResponse'
tags: tags:
- Agents - Agents
description: ''
parameters: parameters:
- name: agent_id - name: agent_id
in: path in: path
@ -377,6 +390,7 @@ paths:
$ref: '#/components/schemas/Turn' $ref: '#/components/schemas/Turn'
tags: tags:
- Agents - Agents
description: ''
parameters: parameters:
- name: agent_id - name: agent_id
in: path in: path
@ -406,6 +420,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- Datasets - Datasets
description: ''
parameters: parameters:
- name: dataset_id - name: dataset_id
in: path in: path
@ -418,6 +433,7 @@ paths:
description: OK description: OK
tags: tags:
- Datasets - Datasets
description: ''
parameters: parameters:
- name: dataset_id - name: dataset_id
in: path in: path
@ -437,6 +453,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- EvalTasks - EvalTasks
description: ''
parameters: parameters:
- name: eval_task_id - name: eval_task_id
in: path in: path
@ -456,6 +473,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- Models - Models
description: ''
parameters: parameters:
- name: model_id - name: model_id
in: path in: path
@ -468,6 +486,7 @@ paths:
description: OK description: OK
tags: tags:
- Models - Models
description: ''
parameters: parameters:
- name: model_id - name: model_id
in: path in: path
@ -487,6 +506,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- ScoringFunctions - ScoringFunctions
description: ''
parameters: parameters:
- name: scoring_fn_id - name: scoring_fn_id
in: path in: path
@ -506,6 +526,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- Shields - Shields
description: ''
parameters: parameters:
- name: identifier - name: identifier
in: path in: path
@ -523,6 +544,7 @@ paths:
$ref: '#/components/schemas/Span' $ref: '#/components/schemas/Span'
tags: tags:
- Telemetry - Telemetry
description: ''
parameters: parameters:
- name: trace_id - name: trace_id
in: path in: path
@ -545,6 +567,7 @@ paths:
$ref: '#/components/schemas/QuerySpanTreeResponse' $ref: '#/components/schemas/QuerySpanTreeResponse'
tags: tags:
- Telemetry - Telemetry
description: ''
parameters: parameters:
- name: span_id - name: span_id
in: path in: path
@ -574,6 +597,7 @@ paths:
$ref: '#/components/schemas/Tool' $ref: '#/components/schemas/Tool'
tags: tags:
- ToolGroups - ToolGroups
description: ''
parameters: parameters:
- name: tool_name - name: tool_name
in: path in: path
@ -591,6 +615,7 @@ paths:
$ref: '#/components/schemas/ToolGroup' $ref: '#/components/schemas/ToolGroup'
tags: tags:
- ToolGroups - ToolGroups
description: ''
parameters: parameters:
- name: toolgroup_id - name: toolgroup_id
in: path in: path
@ -603,7 +628,7 @@ paths:
description: OK description: OK
tags: tags:
- ToolGroups - ToolGroups
summary: Unregister a tool group description: Unregister a tool group
parameters: parameters:
- name: toolgroup_id - name: toolgroup_id
in: path in: path
@ -621,6 +646,7 @@ paths:
$ref: '#/components/schemas/Trace' $ref: '#/components/schemas/Trace'
tags: tags:
- Telemetry - Telemetry
description: ''
parameters: parameters:
- name: trace_id - name: trace_id
in: path in: path
@ -640,6 +666,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- PostTraining (Coming Soon) - PostTraining (Coming Soon)
description: ''
parameters: parameters:
- name: job_uuid - name: job_uuid
in: query in: query
@ -659,6 +686,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- PostTraining (Coming Soon) - PostTraining (Coming Soon)
description: ''
parameters: parameters:
- name: job_uuid - name: job_uuid
in: query in: query
@ -676,6 +704,7 @@ paths:
$ref: '#/components/schemas/ListPostTrainingJobsResponse' $ref: '#/components/schemas/ListPostTrainingJobsResponse'
tags: tags:
- PostTraining (Coming Soon) - PostTraining (Coming Soon)
description: ''
parameters: [] parameters: []
/v1/vector-dbs/{vector_db_id}: /v1/vector-dbs/{vector_db_id}:
get: get:
@ -690,6 +719,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- VectorDBs - VectorDBs
description: ''
parameters: parameters:
- name: vector_db_id - name: vector_db_id
in: path in: path
@ -702,6 +732,7 @@ paths:
description: OK description: OK
tags: tags:
- VectorDBs - VectorDBs
description: ''
parameters: parameters:
- name: vector_db_id - name: vector_db_id
in: path in: path
@ -719,6 +750,7 @@ paths:
$ref: '#/components/schemas/HealthInfo' $ref: '#/components/schemas/HealthInfo'
tags: tags:
- Inspect - Inspect
description: ''
parameters: [] parameters: []
/v1/tool-runtime/rag-tool/insert: /v1/tool-runtime/rag-tool/insert:
post: post:
@ -727,7 +759,7 @@ paths:
description: OK description: OK
tags: tags:
- ToolRuntime - ToolRuntime
summary: >- description: >-
Index documents so they can be used by the RAG system Index documents so they can be used by the RAG system
parameters: [] parameters: []
requestBody: requestBody:
@ -743,6 +775,7 @@ paths:
description: OK description: OK
tags: tags:
- VectorIO - VectorIO
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -761,7 +794,7 @@ paths:
$ref: '#/components/schemas/ToolInvocationResult' $ref: '#/components/schemas/ToolInvocationResult'
tags: tags:
- ToolRuntime - ToolRuntime
summary: Run a tool with the given arguments description: Run a tool with the given arguments
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -782,6 +815,7 @@ paths:
- type: 'null' - type: 'null'
tags: tags:
- Eval - Eval
description: ''
parameters: parameters:
- name: task_id - name: task_id
in: path in: path
@ -799,6 +833,7 @@ paths:
description: OK description: OK
tags: tags:
- Eval - Eval
description: ''
parameters: parameters:
- name: task_id - name: task_id
in: path in: path
@ -821,6 +856,7 @@ paths:
$ref: '#/components/schemas/EvaluateResponse' $ref: '#/components/schemas/EvaluateResponse'
tags: tags:
- Eval - Eval
description: ''
parameters: parameters:
- name: job_id - name: job_id
in: path in: path
@ -843,6 +879,7 @@ paths:
$ref: '#/components/schemas/ListDatasetsResponse' $ref: '#/components/schemas/ListDatasetsResponse'
tags: tags:
- Datasets - Datasets
description: ''
parameters: [] parameters: []
post: post:
responses: responses:
@ -850,6 +887,7 @@ paths:
description: OK description: OK
tags: tags:
- Datasets - Datasets
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -868,6 +906,7 @@ paths:
$ref: '#/components/schemas/ListEvalTasksResponse' $ref: '#/components/schemas/ListEvalTasksResponse'
tags: tags:
- EvalTasks - EvalTasks
description: ''
parameters: [] parameters: []
post: post:
responses: responses:
@ -875,6 +914,7 @@ paths:
description: OK description: OK
tags: tags:
- EvalTasks - EvalTasks
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -893,6 +933,7 @@ paths:
$ref: '#/components/schemas/ListModelsResponse' $ref: '#/components/schemas/ListModelsResponse'
tags: tags:
- Models - Models
description: ''
parameters: [] parameters: []
post: post:
responses: responses:
@ -904,6 +945,7 @@ paths:
$ref: '#/components/schemas/Model' $ref: '#/components/schemas/Model'
tags: tags:
- Models - Models
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -922,6 +964,7 @@ paths:
$ref: '#/components/schemas/ListProvidersResponse' $ref: '#/components/schemas/ListProvidersResponse'
tags: tags:
- Inspect - Inspect
description: ''
parameters: [] parameters: []
/v1/inspect/routes: /v1/inspect/routes:
get: get:
@ -934,6 +977,7 @@ paths:
$ref: '#/components/schemas/ListRoutesResponse' $ref: '#/components/schemas/ListRoutesResponse'
tags: tags:
- Inspect - Inspect
description: ''
parameters: [] parameters: []
/v1/tool-runtime/list-tools: /v1/tool-runtime/list-tools:
get: get:
@ -946,6 +990,7 @@ paths:
$ref: '#/components/schemas/ToolDef' $ref: '#/components/schemas/ToolDef'
tags: tags:
- ToolRuntime - ToolRuntime
description: ''
parameters: parameters:
- name: tool_group_id - name: tool_group_id
in: query in: query
@ -968,6 +1013,7 @@ paths:
$ref: '#/components/schemas/ListScoringFunctionsResponse' $ref: '#/components/schemas/ListScoringFunctionsResponse'
tags: tags:
- ScoringFunctions - ScoringFunctions
description: ''
parameters: [] parameters: []
post: post:
responses: responses:
@ -975,6 +1021,7 @@ paths:
description: OK description: OK
tags: tags:
- ScoringFunctions - ScoringFunctions
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -993,6 +1040,7 @@ paths:
$ref: '#/components/schemas/ListShieldsResponse' $ref: '#/components/schemas/ListShieldsResponse'
tags: tags:
- Shields - Shields
description: ''
parameters: [] parameters: []
post: post:
responses: responses:
@ -1004,6 +1052,7 @@ paths:
$ref: '#/components/schemas/Shield' $ref: '#/components/schemas/Shield'
tags: tags:
- Shields - Shields
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1022,7 +1071,7 @@ paths:
$ref: '#/components/schemas/ListToolGroupsResponse' $ref: '#/components/schemas/ListToolGroupsResponse'
tags: tags:
- ToolGroups - ToolGroups
summary: List tool groups with optional provider description: List tool groups with optional provider
parameters: [] parameters: []
post: post:
responses: responses:
@ -1030,7 +1079,7 @@ paths:
description: OK description: OK
tags: tags:
- ToolGroups - ToolGroups
summary: Register a tool group description: Register a tool group
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1049,7 +1098,7 @@ paths:
$ref: '#/components/schemas/ListToolsResponse' $ref: '#/components/schemas/ListToolsResponse'
tags: tags:
- ToolGroups - ToolGroups
summary: List tools with optional tool group description: List tools with optional tool group
parameters: parameters:
- name: toolgroup_id - name: toolgroup_id
in: query in: query
@ -1067,6 +1116,7 @@ paths:
$ref: '#/components/schemas/ListVectorDBsResponse' $ref: '#/components/schemas/ListVectorDBsResponse'
tags: tags:
- VectorDBs - VectorDBs
description: ''
parameters: [] parameters: []
post: post:
responses: responses:
@ -1078,6 +1128,7 @@ paths:
$ref: '#/components/schemas/VectorDB' $ref: '#/components/schemas/VectorDB'
tags: tags:
- VectorDBs - VectorDBs
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1092,6 +1143,7 @@ paths:
description: OK description: OK
tags: tags:
- Telemetry - Telemetry
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1110,6 +1162,7 @@ paths:
$ref: '#/components/schemas/PostTrainingJob' $ref: '#/components/schemas/PostTrainingJob'
tags: tags:
- PostTraining (Coming Soon) - PostTraining (Coming Soon)
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1128,7 +1181,7 @@ paths:
$ref: '#/components/schemas/RAGQueryResult' $ref: '#/components/schemas/RAGQueryResult'
tags: tags:
- ToolRuntime - ToolRuntime
summary: >- description: >-
Query the RAG system for context; typically invoked by the agent Query the RAG system for context; typically invoked by the agent
parameters: [] parameters: []
requestBody: requestBody:
@ -1148,6 +1201,7 @@ paths:
$ref: '#/components/schemas/QueryChunksResponse' $ref: '#/components/schemas/QueryChunksResponse'
tags: tags:
- VectorIO - VectorIO
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1166,6 +1220,7 @@ paths:
$ref: '#/components/schemas/QuerySpansResponse' $ref: '#/components/schemas/QuerySpansResponse'
tags: tags:
- Telemetry - Telemetry
description: ''
parameters: parameters:
- name: attribute_filters - name: attribute_filters
in: query in: query
@ -1197,6 +1252,7 @@ paths:
$ref: '#/components/schemas/QueryTracesResponse' $ref: '#/components/schemas/QueryTracesResponse'
tags: tags:
- Telemetry - Telemetry
description: ''
parameters: parameters:
- name: attribute_filters - name: attribute_filters
in: query in: query
@ -1233,6 +1289,7 @@ paths:
$ref: '#/components/schemas/Job' $ref: '#/components/schemas/Job'
tags: tags:
- Eval - Eval
description: ''
parameters: parameters:
- name: task_id - name: task_id
in: path in: path
@ -1256,6 +1313,7 @@ paths:
$ref: '#/components/schemas/RunShieldResponse' $ref: '#/components/schemas/RunShieldResponse'
tags: tags:
- Safety - Safety
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1270,6 +1328,7 @@ paths:
description: OK description: OK
tags: tags:
- Telemetry - Telemetry
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1288,6 +1347,7 @@ paths:
$ref: '#/components/schemas/ScoreResponse' $ref: '#/components/schemas/ScoreResponse'
tags: tags:
- Scoring - Scoring
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1306,6 +1366,7 @@ paths:
$ref: '#/components/schemas/ScoreBatchResponse' $ref: '#/components/schemas/ScoreBatchResponse'
tags: tags:
- Scoring - Scoring
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1324,6 +1385,7 @@ paths:
$ref: '#/components/schemas/PostTrainingJob' $ref: '#/components/schemas/PostTrainingJob'
tags: tags:
- PostTraining (Coming Soon) - PostTraining (Coming Soon)
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1342,6 +1404,7 @@ paths:
$ref: '#/components/schemas/SyntheticDataGenerationResponse' $ref: '#/components/schemas/SyntheticDataGenerationResponse'
tags: tags:
- SyntheticDataGeneration (Coming Soon) - SyntheticDataGeneration (Coming Soon)
description: ''
parameters: [] parameters: []
requestBody: requestBody:
content: content:
@ -1360,6 +1423,7 @@ paths:
$ref: '#/components/schemas/VersionInfo' $ref: '#/components/schemas/VersionInfo'
tags: tags:
- Inspect - Inspect
description: ''
parameters: [] parameters: []
jsonSchemaDialect: >- jsonSchemaDialect: >-
https://json-schema.org/draft/2020-12/schema https://json-schema.org/draft/2020-12/schema
@ -1423,7 +1487,7 @@ components:
- content - content
- stop_reason - stop_reason
- tool_calls - tool_calls
title: >- description: >-
A message containing the model's (assistant) response in a chat conversation. A message containing the model's (assistant) response in a chat conversation.
GrammarResponseFormat: GrammarResponseFormat:
type: object type: object
@ -1450,7 +1514,7 @@ components:
required: required:
- type - type
- bnf - bnf
title: >- description: >-
Configuration for grammar-guided response generation. Configuration for grammar-guided response generation.
GreedySamplingStrategy: GreedySamplingStrategy:
type: object type: object
@ -1490,7 +1554,7 @@ components:
required: required:
- type - type
- image - image
title: A image content item description: A image content item
InterleavedContent: InterleavedContent:
oneOf: oneOf:
- type: string - type: string
@ -1533,7 +1597,7 @@ components:
required: required:
- type - type
- json_schema - json_schema
title: >- description: >-
Configuration for JSON schema-guided response generation. Configuration for JSON schema-guided response generation.
Message: Message:
oneOf: oneOf:
@ -1601,7 +1665,7 @@ components:
required: required:
- role - role
- content - content
title: >- description: >-
A system message providing instructions or context to the model. A system message providing instructions or context to the model.
TextContentItem: TextContentItem:
type: object type: object
@ -1619,7 +1683,7 @@ components:
required: required:
- type - type
- text - text
title: A text content item description: A text content item
ToolCall: ToolCall:
type: object type: object
properties: properties:
@ -1738,7 +1802,7 @@ components:
- call_id - call_id
- tool_name - tool_name
- content - content
title: >- description: >-
A message representing the result of a tool invocation. A message representing the result of a tool invocation.
TopKSamplingStrategy: TopKSamplingStrategy:
type: object type: object
@ -1798,7 +1862,7 @@ components:
required: required:
- role - role
- content - content
title: >- description: >-
A message from the user in a chat conversation. A message from the user in a chat conversation.
BatchChatCompletionRequest: BatchChatCompletionRequest:
type: object type: object
@ -1822,7 +1886,7 @@ components:
enum: enum:
- auto - auto
- required - required
title: >- description: >-
Whether tool use is required or automatic. This is a hint to the model 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 which may not be followed. It depends on the Instruction Following capabilities
of the model. of the model.
@ -1832,7 +1896,7 @@ components:
- json - json
- function_tag - function_tag
- python_list - python_list
title: >- description: >-
Prompt format for calling custom / zero shot tools. Prompt format for calling custom / zero shot tools.
response_format: response_format:
$ref: '#/components/schemas/ResponseFormat' $ref: '#/components/schemas/ResponseFormat'
@ -1874,7 +1938,7 @@ components:
additionalProperties: false additionalProperties: false
required: required:
- completion_message - completion_message
title: Response from a chat completion request. description: Response from a chat completion request.
TokenLogProbs: TokenLogProbs:
type: object type: object
properties: properties:
@ -1887,7 +1951,7 @@ components:
additionalProperties: false additionalProperties: false
required: required:
- logprobs_by_token - logprobs_by_token
title: Log probabilities for generated tokens. description: Log probabilities for generated tokens.
BatchCompletionRequest: BatchCompletionRequest:
type: object type: object
properties: properties:
@ -1947,7 +2011,7 @@ components:
required: required:
- content - content
- stop_reason - stop_reason
title: Response from a completion request. description: Response from a completion request.
CancelTrainingJobRequest: CancelTrainingJobRequest:
type: object type: object
properties: properties:
@ -1964,9 +2028,9 @@ components:
enum: enum:
- auto - auto
- required - required
default: auto
description: >- description: >-
(Optional) Whether tool use is required or automatic. Defaults to ToolChoice.auto. (Optional) Whether tool use is required or automatic. Defaults to ToolChoice.auto.
default: auto
tool_prompt_format: tool_prompt_format:
type: string type: string
enum: enum:
@ -1985,17 +2049,17 @@ components:
enum: enum:
- append - append
- replace - replace
default: append
description: >- description: >-
(Optional) Config for how to override the default system prompt. - `SystemMessageBehavior.append`: (Optional) Config for how to override the default system prompt. - `SystemMessageBehavior.append`:
Appends the provided system message to the default system prompt. - `SystemMessageBehavior.replace`: Appends the provided system message to the default system prompt. - `SystemMessageBehavior.replace`:
Replaces the default system prompt with the provided system message. The Replaces the default system prompt with the provided system message. The
system message can include the string '{{function_definitions}}' to indicate system message can include the string '{{function_definitions}}' to indicate
where the function definitions should be inserted. where the function definitions should be inserted.
default: append
additionalProperties: false additionalProperties: false
required: required:
- system_message_behavior - system_message_behavior
title: Configuration for tool use. description: Configuration for tool use.
ChatCompletionRequest: ChatCompletionRequest:
type: object type: object
properties: properties:
@ -2105,7 +2169,7 @@ components:
required: required:
- event_type - event_type
- delta - delta
title: >- description: >-
An event during chat completion generation. An event during chat completion generation.
ChatCompletionResponseStreamChunk: ChatCompletionResponseStreamChunk:
type: object type: object
@ -2116,7 +2180,7 @@ components:
additionalProperties: false additionalProperties: false
required: required:
- event - event
title: >- description: >-
A chunk of a streamed chat completion response. A chunk of a streamed chat completion response.
ContentDelta: ContentDelta:
oneOf: oneOf:
@ -2243,7 +2307,7 @@ components:
additionalProperties: false additionalProperties: false
required: required:
- delta - delta
title: >- description: >-
A chunk of a streamed completion response. A chunk of a streamed completion response.
AgentConfig: AgentConfig:
type: object type: object
@ -2271,7 +2335,7 @@ components:
enum: enum:
- auto - auto
- required - required
title: >- description: >-
Whether tool use is required or automatic. This is a hint to the model 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 which may not be followed. It depends on the Instruction Following capabilities
of the model. of the model.
@ -2282,7 +2346,7 @@ components:
- json - json
- function_tag - function_tag
- python_list - python_list
title: >- description: >-
Prompt format for calling custom / zero shot tools. Prompt format for calling custom / zero shot tools.
max_infer_iters: max_infer_iters:
type: integer type: integer
@ -2656,7 +2720,7 @@ components:
- output_message - output_message
- output_attachments - output_attachments
- started_at - started_at
title: >- description: >-
A single turn in an interaction with an Agentic System. A single turn in an interaction with an Agentic System.
ViolationLevel: ViolationLevel:
type: string type: string
@ -2785,7 +2849,7 @@ components:
additionalProperties: false additionalProperties: false
required: required:
- event - event
title: streamed agent turn completion response. description: streamed agent turn completion response.
AgentTurnResponseTurnCompletePayload: AgentTurnResponseTurnCompletePayload:
type: object type: object
properties: properties:
@ -2848,7 +2912,7 @@ components:
additionalProperties: false additionalProperties: false
required: required:
- embeddings - embeddings
title: >- description: >-
Response containing generated embeddings. Response containing generated embeddings.
AgentCandidate: AgentCandidate:
type: object type: object
@ -3105,7 +3169,7 @@ components:
- session_name - session_name
- turns - turns
- started_at - started_at
title: >- description: >-
A single session of an interaction with an Agentic System. A single session of an interaction with an Agentic System.
AgentStepResponse: AgentStepResponse:
type: object type: object
@ -3455,7 +3519,7 @@ components:
- provider_resource_id - provider_resource_id
- provider_id - provider_id
- type - type
title: >- description: >-
A safety shield resource that can be used to check content A safety shield resource that can be used to check content
Span: Span:
type: object type: object
@ -3653,7 +3717,7 @@ components:
required: required:
- job_uuid - job_uuid
- checkpoints - checkpoints
title: Artifacts of a finetuning job. description: Artifacts of a finetuning job.
JobStatus: JobStatus:
type: string type: string
enum: enum:
@ -3696,7 +3760,7 @@ components:
- job_uuid - job_uuid
- status - status
- checkpoints - checkpoints
title: Status of a finetuning job. description: Status of a finetuning job.
ListPostTrainingJobsResponse: ListPostTrainingJobsResponse:
type: object type: object
properties: properties:
@ -4911,7 +4975,7 @@ components:
- top_p - top_p
- top_k_top_p - top_k_top_p
- sigmoid - sigmoid
title: The type of filtering function. description: The type of filtering function.
model: model:
type: string type: string
additionalProperties: false additionalProperties: false
@ -4946,7 +5010,7 @@ components:
additionalProperties: false additionalProperties: false
required: required:
- synthetic_data - synthetic_data
title: >- description: >-
Response from the synthetic data generation. Batch of (prompt, response, score) Response from the synthetic data generation. Batch of (prompt, response, score)
tuples that pass the threshold. tuples that pass the threshold.
VersionInfo: VersionInfo: