mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-29 03:14:19 +00:00
1322 lines
55 KiB
HTML
1322 lines
55 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>OpenAPI specification</title>
|
|
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
</style>
|
|
<script defer="defer" src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
|
|
<script defer="defer">
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
spec = {
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "Llama Stack specification",
|
|
"version": "0.1",
|
|
"description": "This is the llama stack"
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "http://llama.meta.com"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/agentic_system/create": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AgenticSystemCreateResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"AgenticSystem"
|
|
],
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AgenticSystemCreateRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/agentic_system/execute": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "non-stream response from the agentic system. **OR** Streamed agent execution response.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AgenticSystemExecuteResponse"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/AgenticSystemExecuteResponseStreamChunk"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"AgenticSystem"
|
|
],
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AgenticSystemExecuteRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/chat_completion": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Normal chat completion response. **OR** Streamed chat completion response. The actual response is a series of such objects.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ChatCompletionResponse"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ChatCompletionResponseStreamChunk"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Inference"
|
|
],
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChatCompletionRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/completion": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Normal completion response. **OR** streamed completion response.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CompletionResponse"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CompletionResponseStreamChunk"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Inference"
|
|
],
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CompletionRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
|
|
"components": {
|
|
"schemas": {
|
|
"AgenticSystemCreateRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"instructions": {
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"type": "string",
|
|
"enum": [
|
|
"llama3_8b_chat",
|
|
"llama3_70b_chat"
|
|
]
|
|
},
|
|
"available_tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": [
|
|
"web_search",
|
|
"math",
|
|
"image_gen",
|
|
"code_interpreter"
|
|
],
|
|
"title": "Builtin tools are tools the model is natively aware of and was potentially fine-tuned with."
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"tool_name": {
|
|
"type": "string"
|
|
},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"tool_name",
|
|
"parameters"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"executable_tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"uniqueItems": true
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"instructions",
|
|
"model",
|
|
"available_tools",
|
|
"executable_tools"
|
|
]
|
|
},
|
|
"AgenticSystemCreateResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"agent_id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"agent_id"
|
|
]
|
|
},
|
|
"AgenticSystemExecuteRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"agent_id": {
|
|
"type": "string"
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
},
|
|
"turn_history": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/AgenticSystemTurn"
|
|
}
|
|
},
|
|
"stream": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"agent_id",
|
|
"messages",
|
|
"turn_history",
|
|
"stream"
|
|
]
|
|
},
|
|
"AgenticSystemTurn": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user_messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
},
|
|
"steps": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"step_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"model_inference",
|
|
"tool_execution",
|
|
"safety_filtering",
|
|
"memory_retrieval"
|
|
],
|
|
"title": "The type of execution step.",
|
|
"default": "model_inference"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"logprobs": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"step_type",
|
|
"text"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"step_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"model_inference",
|
|
"tool_execution",
|
|
"safety_filtering",
|
|
"memory_retrieval"
|
|
],
|
|
"title": "The type of execution step.",
|
|
"default": "tool_execution"
|
|
},
|
|
"tool_calls": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tool_name": {
|
|
"type": "string"
|
|
},
|
|
"arguments": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"tool_name",
|
|
"arguments"
|
|
],
|
|
"title": "A tool call is a request to a tool."
|
|
}
|
|
},
|
|
"tool_responses": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tool_name": {
|
|
"type": "string"
|
|
},
|
|
"response": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"tool_name",
|
|
"response"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"step_type",
|
|
"tool_calls",
|
|
"tool_responses"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"step_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"model_inference",
|
|
"tool_execution",
|
|
"safety_filtering",
|
|
"memory_retrieval"
|
|
],
|
|
"title": "The type of execution step.",
|
|
"default": "safety_filtering"
|
|
},
|
|
"violation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"violation_type": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"type": "string"
|
|
},
|
|
"suggested_user_response": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"violation_type",
|
|
"details"
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"step_type"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"step_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"model_inference",
|
|
"tool_execution",
|
|
"safety_filtering",
|
|
"memory_retrieval"
|
|
],
|
|
"title": "The type of execution step.",
|
|
"default": "memory_retrieval"
|
|
},
|
|
"documents": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"scores": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"step_type",
|
|
"documents",
|
|
"scores"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response_message": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"user_messages",
|
|
"steps",
|
|
"response_message"
|
|
],
|
|
"title": "A single turn in an interaction with an Agentic System."
|
|
},
|
|
"Attachment": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"$ref": "#/components/schemas/URL"
|
|
},
|
|
"mime_type": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"url",
|
|
"mime_type"
|
|
],
|
|
"title": "Attachments are used to refer to external resources, such as images, videos, audio, etc."
|
|
},
|
|
"Message": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role": {
|
|
"type": "string",
|
|
"enum": [
|
|
"system",
|
|
"user",
|
|
"assistant",
|
|
"tool"
|
|
]
|
|
},
|
|
"content": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Attachment"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"tool_calls": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tool_name": {
|
|
"type": "string"
|
|
},
|
|
"arguments": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"tool_name",
|
|
"arguments"
|
|
],
|
|
"title": "A tool call is a request to a tool."
|
|
}
|
|
},
|
|
"tool_responses": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tool_name": {
|
|
"type": "string"
|
|
},
|
|
"response": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"tool_name",
|
|
"response"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"role",
|
|
"content",
|
|
"tool_calls",
|
|
"tool_responses"
|
|
]
|
|
},
|
|
"URL": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^(https?://|file://|data:)"
|
|
},
|
|
"AgenticSystemExecuteResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"turn": {
|
|
"$ref": "#/components/schemas/AgenticSystemTurn"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"turn"
|
|
],
|
|
"title": "non-stream response from the agentic system."
|
|
},
|
|
"AgenticSystemExecuteResponseStreamChunk": {
|
|
"type": "object",
|
|
"properties": {
|
|
"turn": {
|
|
"$ref": "#/components/schemas/AgenticSystemTurn"
|
|
},
|
|
"stop_reason": {
|
|
"type": "string",
|
|
"enum": [
|
|
"not_stopped",
|
|
"finished_ok",
|
|
"max_tokens"
|
|
],
|
|
"title": "Stop reasons are used to indicate why the model stopped generating text."
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"turn"
|
|
],
|
|
"title": "Streamed agent execution response."
|
|
},
|
|
"ChatCompletionRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"$ref": "#/components/schemas/Message"
|
|
},
|
|
"model": {
|
|
"type": "string",
|
|
"enum": [
|
|
"llama3_8b_chat",
|
|
"llama3_70b_chat"
|
|
]
|
|
},
|
|
"message_history": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
},
|
|
"sampling_params": {
|
|
"type": "object",
|
|
"properties": {
|
|
"temperature": {
|
|
"type": "number",
|
|
"default": 0.0
|
|
},
|
|
"strategy": {
|
|
"type": "string",
|
|
"default": "greedy"
|
|
},
|
|
"top_p": {
|
|
"type": "number",
|
|
"default": 0.95
|
|
},
|
|
"top_k": {
|
|
"type": "integer",
|
|
"default": 0
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"temperature",
|
|
"strategy",
|
|
"top_p",
|
|
"top_k"
|
|
]
|
|
},
|
|
"available_tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": [
|
|
"web_search",
|
|
"math",
|
|
"image_gen",
|
|
"code_interpreter"
|
|
],
|
|
"title": "Builtin tools are tools the model is natively aware of and was potentially fine-tuned with."
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"tool_name": {
|
|
"type": "string"
|
|
},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"tool_name",
|
|
"parameters"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"max_tokens": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"stream": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"logprobs": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"message",
|
|
"model",
|
|
"message_history",
|
|
"sampling_params",
|
|
"available_tools",
|
|
"max_tokens",
|
|
"stream",
|
|
"logprobs"
|
|
]
|
|
},
|
|
"ChatCompletionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Attachment"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"tool_calls": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tool_name": {
|
|
"type": "string"
|
|
},
|
|
"arguments": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"tool_name",
|
|
"arguments"
|
|
],
|
|
"title": "A tool call is a request to a tool."
|
|
}
|
|
},
|
|
"stop_reason": {
|
|
"type": "string",
|
|
"enum": [
|
|
"not_stopped",
|
|
"finished_ok",
|
|
"max_tokens"
|
|
],
|
|
"title": "Stop reasons are used to indicate why the model stopped generating text."
|
|
},
|
|
"logprobs": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"content",
|
|
"tool_calls"
|
|
],
|
|
"title": "Normal chat completion response."
|
|
},
|
|
"ChatCompletionResponseStreamChunk": {
|
|
"type": "object",
|
|
"properties": {
|
|
"text_delta": {
|
|
"type": "string"
|
|
},
|
|
"stop_reason": {
|
|
"type": "string",
|
|
"enum": [
|
|
"not_stopped",
|
|
"finished_ok",
|
|
"max_tokens"
|
|
],
|
|
"title": "Stop reasons are used to indicate why the model stopped generating text."
|
|
},
|
|
"tool_call": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tool_name": {
|
|
"type": "string"
|
|
},
|
|
"arguments": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"tool_name",
|
|
"arguments"
|
|
],
|
|
"title": "A tool call is a request to a tool."
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"text_delta"
|
|
],
|
|
"title": "Streamed chat completion response. The actual response is a series of such objects."
|
|
},
|
|
"CompletionRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Attachment"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"model": {
|
|
"type": "string",
|
|
"enum": [
|
|
"llama3_8b",
|
|
"llama3_70b"
|
|
]
|
|
},
|
|
"sampling_params": {
|
|
"type": "object",
|
|
"properties": {
|
|
"temperature": {
|
|
"type": "number",
|
|
"default": 0.0
|
|
},
|
|
"strategy": {
|
|
"type": "string",
|
|
"default": "greedy"
|
|
},
|
|
"top_p": {
|
|
"type": "number",
|
|
"default": 0.95
|
|
},
|
|
"top_k": {
|
|
"type": "integer",
|
|
"default": 0
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"temperature",
|
|
"strategy",
|
|
"top_p",
|
|
"top_k"
|
|
]
|
|
},
|
|
"max_tokens": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"stream": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"logprobs": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"content",
|
|
"model",
|
|
"sampling_params",
|
|
"max_tokens",
|
|
"stream",
|
|
"logprobs"
|
|
]
|
|
},
|
|
"CompletionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Attachment"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"stop_reason": {
|
|
"type": "string",
|
|
"enum": [
|
|
"not_stopped",
|
|
"finished_ok",
|
|
"max_tokens"
|
|
],
|
|
"title": "Stop reasons are used to indicate why the model stopped generating text."
|
|
},
|
|
"logprobs": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"content"
|
|
],
|
|
"title": "Normal completion response."
|
|
},
|
|
"CompletionResponseStreamChunk": {
|
|
"type": "object",
|
|
"properties": {
|
|
"text_delta": {
|
|
"type": "string"
|
|
},
|
|
"stop_reason": {
|
|
"type": "string",
|
|
"enum": [
|
|
"not_stopped",
|
|
"finished_ok",
|
|
"max_tokens"
|
|
],
|
|
"title": "Stop reasons are used to indicate why the model stopped generating text."
|
|
},
|
|
"logprobs": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"oneOf": [
|
|
{
|
|
"type": "null"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"text_delta"
|
|
],
|
|
"title": "streamed completion response."
|
|
}
|
|
},
|
|
"responses": {}
|
|
},
|
|
"security": [
|
|
{
|
|
"Default": []
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "Inference"
|
|
},
|
|
{
|
|
"name": "AgenticSystem"
|
|
},
|
|
{
|
|
"name": "AgenticSystemCreateRequest",
|
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemCreateRequest\" />"
|
|
},
|
|
{
|
|
"name": "AgenticSystemCreateResponse",
|
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemCreateResponse\" />"
|
|
},
|
|
{
|
|
"name": "AgenticSystemExecuteRequest",
|
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemExecuteRequest\" />"
|
|
},
|
|
{
|
|
"name": "AgenticSystemTurn",
|
|
"description": "A single turn in an interaction with an Agentic System.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemTurn\" />"
|
|
},
|
|
{
|
|
"name": "Attachment",
|
|
"description": "Attachments are used to refer to external resources, such as images, videos, audio, etc.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Attachment\" />"
|
|
},
|
|
{
|
|
"name": "Message",
|
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Message\" />"
|
|
},
|
|
{
|
|
"name": "URL",
|
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/URL\" />"
|
|
},
|
|
{
|
|
"name": "AgenticSystemExecuteResponse",
|
|
"description": "non-stream response from the agentic system.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemExecuteResponse\" />"
|
|
},
|
|
{
|
|
"name": "AgenticSystemExecuteResponseStreamChunk",
|
|
"description": "Streamed agent execution response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemExecuteResponseStreamChunk\" />"
|
|
},
|
|
{
|
|
"name": "ChatCompletionRequest",
|
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionRequest\" />"
|
|
},
|
|
{
|
|
"name": "ChatCompletionResponse",
|
|
"description": "Normal chat completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponse\" />"
|
|
},
|
|
{
|
|
"name": "ChatCompletionResponseStreamChunk",
|
|
"description": "Streamed chat completion response. The actual response is a series of such objects.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponseStreamChunk\" />"
|
|
},
|
|
{
|
|
"name": "CompletionRequest",
|
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CompletionRequest\" />"
|
|
},
|
|
{
|
|
"name": "CompletionResponse",
|
|
"description": "Normal completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/CompletionResponse\" />"
|
|
},
|
|
{
|
|
"name": "CompletionResponseStreamChunk",
|
|
"description": "streamed completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/CompletionResponseStreamChunk\" />"
|
|
}
|
|
],
|
|
"x-tagGroups": [
|
|
{
|
|
"name": "Operations",
|
|
"tags": [
|
|
"AgenticSystem",
|
|
"Inference"
|
|
]
|
|
},
|
|
{
|
|
"name": "Types",
|
|
"tags": [
|
|
"AgenticSystemCreateRequest",
|
|
"AgenticSystemCreateResponse",
|
|
"AgenticSystemExecuteRequest",
|
|
"AgenticSystemExecuteResponse",
|
|
"AgenticSystemExecuteResponseStreamChunk",
|
|
"AgenticSystemTurn",
|
|
"Attachment",
|
|
"ChatCompletionRequest",
|
|
"ChatCompletionResponse",
|
|
"ChatCompletionResponseStreamChunk",
|
|
"CompletionRequest",
|
|
"CompletionResponse",
|
|
"CompletionResponseStreamChunk",
|
|
"Message",
|
|
"URL"
|
|
]
|
|
}
|
|
]
|
|
};
|
|
options = {
|
|
downloadFileName: "openapi.json",
|
|
expandResponses: "200",
|
|
expandSingleSchemaField: true,
|
|
jsonSampleExpandLevel: "all",
|
|
schemaExpansionLevel: "all",
|
|
};
|
|
element = document.getElementById("openapi-container");
|
|
Redoc.init(spec, options, element);
|
|
|
|
if (spec.info && spec.info.title) {
|
|
document.title = spec.info.title;
|
|
}
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="openapi-container"></div>
|
|
</body>
|
|
|
|
</html>
|