diff --git a/README.md b/README.md index 5a40fab..cc53f15 100644 --- a/README.md +++ b/README.md @@ -9,49 +9,86 @@ llama-stack-client-swift brings the inference and agents APIs of [Llama Stack](h - **Inference & Agents:** Leverage remote Llama Stack distributions for inference, code execution, and safety. - **Custom Tool Calling:** Provide Swift tools that Llama agents can understand and use. +## Quick Demo +See [here](https://github.com/meta-llama/llama-stack-apps/tree/ios_demo/examples/ios_quick_demo/iOSQuickDemo) for a complete iOS demo ([video](https://drive.google.com/file/d/1HnME3VmsYlyeFgsIOMlxZy5c8S2xP4r4/view?usp=sharing)) using a remote Llama Stack server for inferencing. + ## Installation -1. Xcode > File > Add Package Dependencies... +1. Click "Xcode > File > Add Package Dependencies...". + +2. Add this repo URL at the top right: `https://github.com/meta-llama/llama-stack-client-swift`. + +3. Select and add `llama-stack-client-swift` to your app target. -2. Add this repo URL at the top right: `https://github.com/meta-llama/llama-stack-client-swift` +4. On the first build: Enable & Trust the OpenAPIGenerator extension when prompted. -3. Select and add `llama-stack-client-swift` to your app target +5. Set up a remote Llama Stack distributions, assuming you have a [Fireworks](https://fireworks.ai/account/api-keys) or [Together](https://api.together.ai/) API key, which you can get easily by clicking the link: -4. On the first build: Enable & Trust the OpenAPIGenerator extension when prompted +``` +conda create -n llama-stack python=3.10 +conda activate llama-stack +pip install llama-stack=0.1.0 +``` +Then, either: +``` +llama stack build --template fireworks --image-type conda +export FIREWORKS_API_KEY="" +llama stack run fireworks +``` +or +``` +llama stack build --template together --image-type conda +export TOGETHER_API_KEY="" +llama stack run together +``` -5. `import LlamaStackClient` and test out a call: +The default port is 5000 for `llama stack run` and you can specify a different port by adding `--port ` to the end of `llama stack run fireworks|together`. + +6. Replace the `RemoteInference` url below with the your host IP and port: ```swift import LlamaStackClient + let inference = RemoteInference(url: URL(string: "http://127.0.0.1:5000")!) + +do { for await chunk in try await inference.chatCompletion( - request: - Components.Schemas.ChatCompletionRequest( - messages: [ - .UserMessage(Components.Schemas.UserMessage( - content: .case1("Hello Llama!"), - role: .user) - ) - ], model_id: "Meta-Llama3.1-8B-Instruct", - stream: true) - ) { + request: + Components.Schemas.ChatCompletionRequest( + messages: [ + .UserMessage(Components.Schemas.UserMessage( + content: .case1(userInput), + role: .user) + ) + ], model_id: "meta-llama/Llama-3.1-8B-Instruct", + stream: true) + ) { switch (chunk.event.delta) { - case .case1(let s): - print(s) - case .ToolCallDelta(_): + case .TextDelta(let s): + print(s.text) + break + case .ImageDelta(let s): + print("> \(s)") + break + case .ToolCallDelta(let s): + print("> \(s)") break } } +} +catch { + print("Error: \(error)") +} ``` -## Contributing - ### Syncing the API spec -Llama Stack types are generated from the OpenAPI spec in the [main repo](https://github.com/meta-llama/llama-stack). -That spec is synced to this repo via a git submodule and script. We'll typically take care of this and you shouldn't need to run this. +Llama Stack `Types.swift` file is generated from the Llama Stack [API spec](https://github.com/meta-llama/llama-stack/blob/main/docs/resources/llama-stack-spec.yaml) in the main [Llama Stack repo](https://github.com/meta-llama/llama-stack). That spec is synced to this repo via a git submodule and script. You shouldn't need to run this, unless the API spec and your remote server get updated. ``` git submodule update --init --recursive scripts/generate_swift_types.sh ``` + +This will update the `openapi.yaml` file in the Llama Stack Swift SDK source folder `Sources/LlamaStackClient`. + diff --git a/Sources/LlamaStackClient/Agents/Agents.swift b/Sources/LlamaStackClient/Agents/Agents.swift index 2261905..6f7725c 100644 --- a/Sources/LlamaStackClient/Agents/Agents.swift +++ b/Sources/LlamaStackClient/Agents/Agents.swift @@ -5,7 +5,7 @@ import OpenAPIURLSession public protocol Agents { func create(request: Components.Schemas.CreateAgentRequest) async throws -> Components.Schemas.AgentCreateResponse - func createSession(request: Components.Schemas.CreateAgentSessionRequest) async throws -> Components.Schemas.AgentSessionCreateResponse + func createSession(agent_id: String, request: Components.Schemas.CreateAgentSessionRequest) async throws -> Components.Schemas.AgentSessionCreateResponse - func createTurn(request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream + func createTurn(agent_id: String, session_id: String, request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream } diff --git a/Sources/LlamaStackClient/Agents/ChatAgent.swift b/Sources/LlamaStackClient/Agents/ChatAgent.swift index d99b38b..206e7f7 100644 --- a/Sources/LlamaStackClient/Agents/ChatAgent.swift +++ b/Sources/LlamaStackClient/Agents/ChatAgent.swift @@ -31,10 +31,10 @@ class ChatAgent { return session } - public func createAndExecuteTurn(request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream { + public func createAndExecuteTurn(agent_id: String, session_id: String, request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream { return AsyncStream { continuation in Task { - let session = sessions[request.session_id] + let session = sessions[session_id] let turnId = UUID().uuidString let startTime = Date() @@ -46,69 +46,6 @@ class ChatAgent { )) )) ) - - // TODO: Build out step history - let steps: [Components.Schemas.Turn.stepsPayloadPayload] = [] - var outputMessage: Components.Schemas.CompletionMessage? = nil - - for await chunk in self.run( - session: session!, - turnId: turnId, - inputMessages: request.messages.map { $0.toChatCompletionRequest() }, - attachments: request.attachments ?? [], - samplingParams: agentConfig.sampling_params - ) { - let payload = chunk.event.payload - switch (payload) { - case .AgentTurnResponseStepStartPayload(_): - break - case .AgentTurnResponseStepProgressPayload(_): - break - case .AgentTurnResponseStepCompletePayload(let step): - switch (step.step_details) { - case .InferenceStep(let step): - outputMessage = step.model_response - case .ToolExecutionStep(_): - break - case .ShieldCallStep(_): - break - case .MemoryRetrievalStep(_): - break - } - case .AgentTurnResponseTurnStartPayload(_): - break - case .AgentTurnResponseTurnCompletePayload(_): - break - } - - continuation.yield(chunk) - } - - let turn = Components.Schemas.Turn( - input_messages: request.messages.map { $0.toAgenticSystemTurnCreateRequest() }, - output_attachments: [], - output_message: outputMessage!, - session_id: request.session_id, - started_at: Date(), - steps: steps, - turn_id: turnId - ) - - await MainActor.run { - var s = self.sessions[request.session_id] - s!.turns.append(turn) - } - - continuation.yield( - Components.Schemas.AgentTurnResponseStreamChunk( - event: Components.Schemas.AgentTurnResponseEvent( - payload: - .AgentTurnResponseTurnCompletePayload(Components.Schemas.AgentTurnResponseTurnCompletePayload( - event_type: .turn_complete, - turn: turn)) - ) - ) - ) } } } @@ -116,8 +53,8 @@ class ChatAgent { public func run( session: Components.Schemas.Session, turnId: String, - inputMessages: [Components.Schemas.ChatCompletionRequest.messagesPayloadPayload], - attachments: [Components.Schemas.Attachment], + inputMessages: [Components.Schemas.Message], + attachments: [Components.Schemas.Turn.output_attachmentsPayload], samplingParams: Components.Schemas.SamplingParams?, stream: Bool = false ) -> AsyncStream { @@ -129,19 +66,19 @@ class ChatAgent { messages: inputMessages, model_id: agentConfig.model, stream: true, - tools: agentConfig.toolDefinitions + tools: [] //agentConfig.client_tools ) ) { switch(chunk.event.delta) { - case .case1(let s): + case .TextDelta(let s): continuation.yield( Components.Schemas.AgentTurnResponseStreamChunk( event: Components.Schemas.AgentTurnResponseEvent( payload: .AgentTurnResponseStepProgressPayload( Components.Schemas.AgentTurnResponseStepProgressPayload( + delta: .TextDelta(s), event_type: .step_progress, - model_response_text_delta: s, step_id: UUID().uuidString, step_type: .inference ) @@ -149,17 +86,33 @@ class ChatAgent { ) ) ) - case .ToolCallDelta(let toolDelta): + case .ImageDelta(let s): continuation.yield( Components.Schemas.AgentTurnResponseStreamChunk( event: Components.Schemas.AgentTurnResponseEvent( payload: .AgentTurnResponseStepProgressPayload( Components.Schemas.AgentTurnResponseStepProgressPayload( + delta: .ImageDelta(s), event_type: .step_progress, step_id: UUID().uuidString, - step_type: .inference, - tool_call_delta: toolDelta + step_type: .inference + ) + ) + ) + ) + ) + case .ToolCallDelta(let s): + continuation.yield( + Components.Schemas.AgentTurnResponseStreamChunk( + event: Components.Schemas.AgentTurnResponseEvent( + payload: + .AgentTurnResponseStepProgressPayload( + Components.Schemas.AgentTurnResponseStepProgressPayload( + delta: .ToolCallDelta(s), + event_type: .step_progress, + step_id: UUID().uuidString, + step_type: .inference ) ) ) @@ -167,6 +120,7 @@ class ChatAgent { ) } } + continuation.finish() } catch { print("Error occurred: \(error)") } diff --git a/Sources/LlamaStackClient/Agents/CustomTools.swift b/Sources/LlamaStackClient/Agents/CustomTools.swift index c9657c4..697624e 100644 --- a/Sources/LlamaStackClient/Agents/CustomTools.swift +++ b/Sources/LlamaStackClient/Agents/CustomTools.swift @@ -3,11 +3,11 @@ import OpenAPIRuntime public class CustomTools { - public class func getCreateEventTool() -> Components.Schemas.FunctionCallToolDefinition { - return Components.Schemas.FunctionCallToolDefinition( + // for chat completion (inference) tool calling + public class func getCreateEventTool() -> Components.Schemas.ToolDefinition { + return Components.Schemas.ToolDefinition( description: "Create a calendar event", - function_name: "create_event", - parameters: Components.Schemas.FunctionCallToolDefinition.parametersPayload( + parameters: Components.Schemas.ToolDefinition.parametersPayload( additionalProperties: [ "event_name": Components.Schemas.ToolParamDefinition( description: "The name of the meeting", @@ -26,7 +26,34 @@ public class CustomTools { ), ] ), - _type: .function_call + tool_name: Components.Schemas.ToolDefinition.tool_namePayload.case2( "create_event") + + ) + } + + // for agent tool calling + public class func getCreateEventToolForAgent() -> Components.Schemas.ToolDef { + return Components.Schemas.ToolDef( + description: "Create a calendar event", + metadata: nil, + name: "create_event", + parameters: [ + Components.Schemas.ToolParameter( + description: "The name of the meeting", + name: "event_name", + parameter_type: "string", + required: true), + Components.Schemas.ToolParameter( + description: "Start date in yyyy-MM-dd HH:mm format, eg. '2024-01-01 13:00'", + name: "start", + parameter_type: "string", + required: true), + Components.Schemas.ToolParameter( + description: "End date in yyyy-MM-dd HH:mm format, eg. '2024-01-01 14:00'", + name: "end", + parameter_type: "string", + required: true) + ] ) } } diff --git a/Sources/LlamaStackClient/Agents/LocalAgents.swift b/Sources/LlamaStackClient/Agents/LocalAgents.swift index b569ac7..c35ea7f 100644 --- a/Sources/LlamaStackClient/Agents/LocalAgents.swift +++ b/Sources/LlamaStackClient/Agents/LocalAgents.swift @@ -22,30 +22,28 @@ public class LocalAgents: Agents { instructions: "You are a helpful assistant", max_infer_iters: 1, model: "Meta-Llama3.1-8B-Instruct", - output_shields: [], - tools: [ - Components.Schemas.AgentConfig.toolsPayloadPayload.FunctionCallToolDefinition( - CustomTools.getCreateEventTool() - ) - ] + output_shields: [] +// tools: [ +// Components.Schemas.AgentConfig.toolsPayloadPayload.FunctionCallToolDefinition( +// CustomTools.getCreateEventTool() +// ) +// ] ) ) ) let agentId = createSystemResponse.agent_id - let createSessionResponse = try await createSession( - request: Components.Schemas.CreateAgentSessionRequest(agent_id: agentId, session_name: "pocket-llama") + let createSessionResponse = try await createSession(agent_id: agentId, + request: Components.Schemas.CreateAgentSessionRequest(session_name: "pocket-llama") ) let agenticSystemSessionId = createSessionResponse.session_id let request = Components.Schemas.CreateAgentTurnRequest( - agent_id: agentId, messages: messages, - session_id: agenticSystemSessionId, stream: true ) - return try await createTurn(request: request) + return try await createTurn(agent_id: agentId, session_id: agenticSystemSessionId, request: request) } public func create(request: Components.Schemas.CreateAgentRequest) async throws -> Components.Schemas.AgentCreateResponse { @@ -60,16 +58,16 @@ public class LocalAgents: Agents { return Components.Schemas.AgentCreateResponse(agent_id: agentId) } - public func createSession(request: Components.Schemas.CreateAgentSessionRequest) async throws -> Components.Schemas.AgentSessionCreateResponse { - let agent = agents[request.agent_id] + public func createSession(agent_id: String, request: Components.Schemas.CreateAgentSessionRequest) async throws -> Components.Schemas.AgentSessionCreateResponse { + let agent = agents[agent_id] let session = agent!.createSession(name: request.session_name) return Components.Schemas.AgentSessionCreateResponse( session_id: session.session_id ) } - public func createTurn(request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream { - let agent = agents[request.agent_id]! - return try await agent.createAndExecuteTurn(request: request) + public func createTurn(agent_id: String, session_id: String, request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream { + let agent = agents[agent_id]! + return try await agent.createAndExecuteTurn(agent_id: agent_id, session_id: session_id, request: request) } } diff --git a/Sources/LlamaStackClient/Agents/RemoteAgents.swift b/Sources/LlamaStackClient/Agents/RemoteAgents.swift index 76bdb08..6b0529e 100644 --- a/Sources/LlamaStackClient/Agents/RemoteAgents.swift +++ b/Sources/LlamaStackClient/Agents/RemoteAgents.swift @@ -20,54 +20,52 @@ public class RemoteAgents: Agents { let createSystemResponse = try await create( request: Components.Schemas.CreateAgentRequest( agent_config: Components.Schemas.AgentConfig( + client_tools: [ CustomTools.getCreateEventToolForAgent() ], enable_session_persistence: false, input_shields: ["llama_guard"], instructions: "You are a helpful assistant", max_infer_iters: 1, model: "Meta-Llama3.1-8B-Instruct", - output_shields: ["llama_guard"], - tools: [ - Components.Schemas.AgentConfig.toolsPayloadPayload.FunctionCallToolDefinition( - CustomTools.getCreateEventTool() - ) - ] + output_shields: ["llama_guard"] ) ) ) let agentId = createSystemResponse.agent_id let createSessionResponse = try await createSession( - request: Components.Schemas.CreateAgentSessionRequest(agent_id: agentId, session_name: "pocket-llama") + agent_id: agentId, request: Components.Schemas.CreateAgentSessionRequest(session_name: "pocket-llama") ) let agenticSystemSessionId = createSessionResponse.session_id let request = Components.Schemas.CreateAgentTurnRequest( - agent_id: agentId, messages: messages, - session_id: agenticSystemSessionId, stream: true ) - return try await createTurn(request: request) + return try await createTurn(agent_id: agentId, session_id: agenticSystemSessionId, request: request) } public func create(request: Components.Schemas.CreateAgentRequest) async throws -> Components.Schemas.AgentCreateResponse { - let response = try await client.post_sol_alpha_sol_agents_sol_create(body: Operations.post_sol_alpha_sol_agents_sol_create.Input.Body.json(request)) + let response = try await client.post_sol_v1_sol_agents(body: Operations.post_sol_v1_sol_agents.Input.Body.json(request)) return try response.ok.body.json } - public func createSession(request: Components.Schemas.CreateAgentSessionRequest) async throws -> Components.Schemas.AgentSessionCreateResponse { - let response = try await client.post_sol_alpha_sol_agents_sol_session_sol_create(body: Operations.post_sol_alpha_sol_agents_sol_session_sol_create.Input.Body.json(request)) + public func createSession(agent_id: String, request: Components.Schemas.CreateAgentSessionRequest) async throws -> Components.Schemas.AgentSessionCreateResponse { + let response = try await client.post_sol_v1_sol_agents_sol__lcub_agent_id_rcub__sol_session( + path: Operations.post_sol_v1_sol_agents_sol__lcub_agent_id_rcub__sol_session.Input.Path(agent_id: agent_id), + headers: Operations.post_sol_v1_sol_agents_sol__lcub_agent_id_rcub__sol_session.Input.Headers.init(), + body: Operations.post_sol_v1_sol_agents_sol__lcub_agent_id_rcub__sol_session.Input.Body.json(request)) return try response.ok.body.json } - public func createTurn(request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream { + public func createTurn(agent_id: String, session_id: String, request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream { return AsyncStream { continuation in Task { do { - let response = try await self.client.post_sol_alpha_sol_agents_sol_turn_sol_create( - body: Operations.post_sol_alpha_sol_agents_sol_turn_sol_create.Input.Body.json(request) - ) + let response = try await self.client.post_sol_v1_sol_agents_sol__lcub_agent_id_rcub__sol_session_sol__lcub_session_id_rcub__sol_turn( + path: Operations.post_sol_v1_sol_agents_sol__lcub_agent_id_rcub__sol_session_sol__lcub_session_id_rcub__sol_turn.Input.Path(agent_id: agent_id, session_id: session_id), + headers: Operations.post_sol_v1_sol_agents_sol__lcub_agent_id_rcub__sol_session_sol__lcub_session_id_rcub__sol_turn.Input.Headers.init(), + body: Operations.post_sol_v1_sol_agents_sol__lcub_agent_id_rcub__sol_session_sol__lcub_session_id_rcub__sol_turn.Input.Body.json(request)) let stream = try response.ok.body.text_event_hyphen_stream.asDecodedServerSentEventsWithJSONData( of: Components.Schemas.AgentTurnResponseStreamChunk.self ) diff --git a/Sources/LlamaStackClient/Agents/TypeExtensions.swift b/Sources/LlamaStackClient/Agents/TypeExtensions.swift index a036f3c..54bae70 100644 --- a/Sources/LlamaStackClient/Agents/TypeExtensions.swift +++ b/Sources/LlamaStackClient/Agents/TypeExtensions.swift @@ -2,21 +2,21 @@ import Foundation import OpenAPIRuntime import OpenAPIURLSession -public extension Components.Schemas.ChatCompletionRequest.messagesPayloadPayload { +public extension Components.Schemas.CreateAgentTurnRequest.messagesPayloadPayload { func toAgenticSystemTurnCreateRequest() -> Components.Schemas.CreateAgentTurnRequest.messagesPayloadPayload? { switch self { case .UserMessage(let userMessage): return .UserMessage(userMessage) case .ToolResponseMessage(let toolResponseMessage): return .ToolResponseMessage(toolResponseMessage) - case .SystemMessage, .CompletionMessage: - return nil +// case .SystemMessage, .CompletionMessage: +// return nil } } } public extension Components.Schemas.CreateAgentTurnRequest.messagesPayloadPayload { - func toChatCompletionRequest() -> Components.Schemas.ChatCompletionRequest.messagesPayloadPayload { + func toChatCompletionRequest() -> Components.Schemas.CreateAgentTurnRequest.messagesPayloadPayload { switch self { case .UserMessage(let userMessage): return .UserMessage(userMessage) @@ -35,55 +35,55 @@ public extension Components.Schemas.CreateAgentTurnRequest.messagesPayloadPayloa } } -public extension Components.Schemas.AgentConfig.toolsPayloadPayload { - func toToolDefinition() -> Components.Schemas.ToolDefinition { - switch self { - case .SearchToolDefinition(_): - return Components.Schemas.ToolDefinition( - tool_name: .BuiltinTool(.brave_search) - ) - case .WolframAlphaToolDefinition(_): - return Components.Schemas.ToolDefinition( - tool_name: .BuiltinTool(.wolfram_alpha) - ) - case .PhotogenToolDefinition(_): - return Components.Schemas.ToolDefinition( - tool_name: .BuiltinTool(.photogen) - ) - case .CodeInterpreterToolDefinition(_): - return Components.Schemas.ToolDefinition( - tool_name: .BuiltinTool(.code_interpreter) - ) - case .FunctionCallToolDefinition(let tool): - return Components.Schemas.ToolDefinition( - description: tool.description, - parameters: tool.parameters.toToolDefinitionParameters(), - tool_name: .case2(tool.function_name) - ) - case .MemoryToolDefinition(let value): - return Components.Schemas.ToolDefinition( - description: "Memory Tool", - parameters: nil, - tool_name: .case2("memory") - ) - } - } -} +//public extension Components.Schemas.AgentConfig.toolsPayloadPayload { +// func toToolDefinition() -> Components.Schemas.ToolDefinition { +// switch self { +// case .SearchToolDefinition(_): +// return Components.Schemas.ToolDefinition( +// tool_name: .BuiltinTool(.brave_search) +// ) +// case .WolframAlphaToolDefinition(_): +// return Components.Schemas.ToolDefinition( +// tool_name: .BuiltinTool(.wolfram_alpha) +// ) +// case .PhotogenToolDefinition(_): +// return Components.Schemas.ToolDefinition( +// tool_name: .BuiltinTool(.photogen) +// ) +// case .CodeInterpreterToolDefinition(_): +// return Components.Schemas.ToolDefinition( +// tool_name: .BuiltinTool(.code_interpreter) +// ) +// case .FunctionCallToolDefinition(let tool): +// return Components.Schemas.ToolDefinition( +// description: tool.description, +// parameters: tool.parameters.toToolDefinitionParameters(), +// tool_name: .case2(tool.function_name) +// ) +// case .MemoryToolDefinition(let value): +// return Components.Schemas.ToolDefinition( +// description: "Memory Tool", +// parameters: nil, +// tool_name: .case2("memory") +// ) +// } +// } +//} -public extension Components.Schemas.AgentConfig { - var toolDefinitions: [Components.Schemas.ToolDefinition]? { - return tools?.map { $0.toToolDefinition() } - } -} +//public extension Components.Schemas.AgentConfig { +// var toolDefinitions: [Components.Schemas.ToolDef]? { +// return client_tools?.map { $0.toToolDefinition() } +// } +//} -public extension Components.Schemas.FunctionCallToolDefinition.parametersPayload { +public extension Components.Schemas.ToolDefinition.parametersPayload { func toToolDefinitionParameters() -> Components.Schemas.ToolDefinition.parametersPayload { return Components.Schemas.ToolDefinition.parametersPayload(additionalProperties: self.additionalProperties) } } public extension Components.Schemas.ToolDefinition.parametersPayload { - init(fromFunctionCallParameters params: Components.Schemas.FunctionCallToolDefinition.parametersPayload) { + init(fromFunctionCallParameters params: Components.Schemas.ToolDefinition.parametersPayload) { self.init(additionalProperties: params.additionalProperties) } } diff --git a/Sources/LlamaStackClient/Inference/RemoteInference.swift b/Sources/LlamaStackClient/Inference/RemoteInference.swift index a6c5686..caf5bcd 100644 --- a/Sources/LlamaStackClient/Inference/RemoteInference.swift +++ b/Sources/LlamaStackClient/Inference/RemoteInference.swift @@ -18,8 +18,8 @@ public class RemoteInference: Inference { return AsyncStream { continuation in Task { do { - let response = try await self.client.post_sol_alpha_sol_inference_sol_chat_hyphen_completion( - body: Operations.post_sol_alpha_sol_inference_sol_chat_hyphen_completion.Input.Body.json(request) + let response = try await self.client.post_sol_v1_sol_inference_sol_chat_hyphen_completion( + body: Operations.post_sol_v1_sol_inference_sol_chat_hyphen_completion.Input.Body.json(request) ) let stream = try response.ok.body.text_event_hyphen_stream.asDecodedServerSentEventsWithJSONData( of: Components.Schemas.ChatCompletionResponseStreamChunk.self diff --git a/Sources/LlamaStackClient/openapi.yaml b/Sources/LlamaStackClient/openapi.yaml index bf9da81..f269a13 100644 --- a/Sources/LlamaStackClient/openapi.yaml +++ b/Sources/LlamaStackClient/openapi.yaml @@ -17,6 +17,10 @@ components: AgentConfig: additionalProperties: false properties: + client_tools: + items: + $ref: '#/components/schemas/ToolDef' + type: array enable_session_persistence: type: boolean input_shields: @@ -42,15 +46,9 @@ components: tool_prompt_format: $ref: '#/components/schemas/ToolPromptFormat' default: json - tools: + toolgroups: items: - oneOf: - - $ref: '#/components/schemas/SearchToolDefinition' - - $ref: '#/components/schemas/WolframAlphaToolDefinition' - - $ref: '#/components/schemas/PhotogenToolDefinition' - - $ref: '#/components/schemas/CodeInterpreterToolDefinition' - - $ref: '#/components/schemas/FunctionCallToolDefinition' - - $ref: '#/components/schemas/MemoryToolDefinition' + $ref: '#/components/schemas/AgentTool' type: array required: - max_infer_iters @@ -86,6 +84,36 @@ components: required: - step type: object + AgentTool: + oneOf: + - type: string + - additionalProperties: false + properties: + args: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + name: + type: string + required: + - name + - args + type: object + AgentTurnInputType: + additionalProperties: false + properties: + type: + const: agent_turn_input + default: agent_turn_input + type: string + required: + - type + type: object AgentTurnResponseEvent: additionalProperties: false properties: @@ -113,6 +141,8 @@ components: - $ref: '#/components/schemas/ToolExecutionStep' - $ref: '#/components/schemas/ShieldCallStep' - $ref: '#/components/schemas/MemoryRetrievalStep' + step_id: + type: string step_type: enum: - inference @@ -123,17 +153,18 @@ components: required: - event_type - step_type + - step_id - step_details type: object AgentTurnResponseStepProgressPayload: additionalProperties: false properties: + delta: + $ref: '#/components/schemas/ContentDelta' event_type: const: step_progress default: step_progress type: string - model_response_text_delta: - type: string step_id: type: string step_type: @@ -143,14 +174,11 @@ components: - shield_call - memory_retrieval type: string - tool_call_delta: - $ref: '#/components/schemas/ToolCallDelta' - tool_response_text_delta: - type: string required: - event_type - step_type - step_id + - delta type: object AgentTurnResponseStepStartPayload: additionalProperties: false @@ -217,6 +245,13 @@ components: - event_type - turn_id type: object + AggregationFunctionType: + enum: + - average + - median + - categorical_count + - accuracy + type: string AppEvalTaskConfig: additionalProperties: false properties: @@ -231,6 +266,7 @@ components: oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' type: object type: const: app @@ -261,24 +297,29 @@ components: - dataset_id - rows type: object - Attachment: + ArrayType: additionalProperties: false properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - - $ref: '#/components/schemas/URL' - mime_type: + type: + const: array + default: array type: string required: - - content - - mime_type + - type + type: object + BasicScoringFnParams: + additionalProperties: false + properties: + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + type: + const: basic + default: basic + type: string + required: + - type type: object BatchChatCompletionRequest: additionalProperties: false @@ -293,11 +334,7 @@ components: messages_batch: items: items: - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' + $ref: '#/components/schemas/Message' type: array type: array model: @@ -331,14 +368,7 @@ components: properties: content_batch: items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' type: array logprobs: additionalProperties: false @@ -382,6 +412,16 @@ components: - type - eval_candidate type: object + BooleanType: + additionalProperties: false + properties: + type: + const: boolean + default: boolean + type: string + required: + - type + type: object BuiltinTool: enum: - brave_search @@ -397,6 +437,16 @@ components: required: - job_uuid type: object + ChatCompletionInputType: + additionalProperties: false + properties: + type: + const: chat_completion_input + default: chat_completion_input + type: string + required: + - type + type: object ChatCompletionRequest: additionalProperties: false properties: @@ -409,54 +459,12 @@ components: type: object messages: items: - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' + $ref: '#/components/schemas/Message' type: array model_id: type: string response_format: - oneOf: - - additionalProperties: false - properties: - json_schema: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - type: - const: json_schema - default: json_schema - type: string - required: - - type - - json_schema - type: object - - additionalProperties: false - properties: - bnf: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - type: - const: grammar - default: grammar - type: string - required: - - type - - bnf - type: object + $ref: '#/components/schemas/ResponseFormat' sampling_params: $ref: '#/components/schemas/SamplingParams' stream: @@ -490,9 +498,7 @@ components: additionalProperties: false properties: delta: - oneOf: - - type: string - - $ref: '#/components/schemas/ToolCallDelta' + $ref: '#/components/schemas/ContentDelta' event_type: $ref: '#/components/schemas/ChatCompletionResponseEventType' logprobs: @@ -523,42 +529,21 @@ components: type: object Checkpoint: description: Checkpoint created during training runs - CodeInterpreterToolDefinition: + CompletionInputType: additionalProperties: false properties: - enable_inline_code_execution: - default: true - type: boolean - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' type: - const: code_interpreter - default: code_interpreter + const: completion_input + default: completion_input type: string required: - type - - enable_inline_code_execution type: object CompletionMessage: additionalProperties: false properties: content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' role: const: assistant default: assistant @@ -579,14 +564,7 @@ components: additionalProperties: false properties: content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' logprobs: additionalProperties: false properties: @@ -597,45 +575,7 @@ components: model_id: type: string response_format: - oneOf: - - additionalProperties: false - properties: - json_schema: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - type: - const: json_schema - default: json_schema - type: string - required: - - type - - json_schema - type: object - - additionalProperties: false - properties: - bnf: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - type: - const: grammar - default: grammar - type: string - required: - - type - - bnf - type: object + $ref: '#/components/schemas/ResponseFormat' sampling_params: $ref: '#/components/schemas/SamplingParams' stream: @@ -675,6 +615,11 @@ components: - delta title: streamed completion response. type: object + ContentDelta: + oneOf: + - $ref: '#/components/schemas/TextDelta' + - $ref: '#/components/schemas/ImageDelta' + - $ref: '#/components/schemas/ToolCallDelta' CreateAgentRequest: additionalProperties: false properties: @@ -686,22 +631,32 @@ components: CreateAgentSessionRequest: additionalProperties: false properties: - agent_id: - type: string session_name: type: string required: - - agent_id - session_name type: object CreateAgentTurnRequest: additionalProperties: false properties: - agent_id: - type: string - attachments: + documents: items: - $ref: '#/components/schemas/Attachment' + additionalProperties: false + properties: + content: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - items: + $ref: '#/components/schemas/InterleavedContentItem' + type: array + - $ref: '#/components/schemas/URL' + mime_type: + type: string + required: + - content + - mime_type + type: object type: array messages: items: @@ -709,13 +664,13 @@ components: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/ToolResponseMessage' type: array - session_id: - type: string stream: type: boolean + toolgroups: + items: + $ref: '#/components/schemas/AgentTool' + type: array required: - - agent_id - - session_id - messages type: object DPOAlignmentConfig: @@ -735,102 +690,37 @@ components: - epsilon - gamma type: object + DataConfig: + additionalProperties: false + properties: + batch_size: + type: integer + data_format: + $ref: '#/components/schemas/DatasetFormat' + dataset_id: + type: string + packed: + default: false + type: boolean + shuffle: + type: boolean + train_on_input: + default: false + type: boolean + validation_dataset_id: + type: string + required: + - dataset_id + - batch_size + - shuffle + - data_format + type: object Dataset: additionalProperties: false properties: dataset_schema: additionalProperties: - oneOf: - - additionalProperties: false - properties: - type: - const: string - default: string - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: number - default: number - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: boolean - default: boolean - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: array - default: array - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: object - default: object - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: json - default: json - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: union - default: union - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: chat_completion_input - default: chat_completion_input - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: completion_input - default: completion_input - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: agent_turn_input - default: agent_turn_input - type: string - required: - - type - type: object + $ref: '#/components/schemas/ParamType' type: object identifier: type: string @@ -862,60 +752,47 @@ components: - url - metadata type: object - DeleteAgentsRequest: - additionalProperties: false - properties: - agent_id: - type: string - required: - - agent_id - type: object - DeleteAgentsSessionRequest: + DatasetFormat: + enum: + - instruct + - dialog + type: string + DefaultRAGQueryGeneratorConfig: additionalProperties: false properties: - agent_id: + separator: + default: ' ' type: string - session_id: + type: + const: default + default: default type: string required: - - agent_id - - session_id + - type + - separator type: object - DoraFinetuningConfig: + EfficiencyConfig: additionalProperties: false properties: - alpha: - type: integer - apply_lora_to_mlp: + enable_activation_checkpointing: + default: false type: boolean - apply_lora_to_output: + enable_activation_offloading: + default: false + type: boolean + fsdp_cpu_offload: + default: false + type: boolean + memory_efficient_fsdp_wrap: + default: false type: boolean - lora_attn_modules: - items: - type: string - type: array - rank: - type: integer - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha type: object EmbeddingsRequest: additionalProperties: false properties: contents: items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' type: array model_id: type: string @@ -1016,125 +893,61 @@ components: oneOf: - $ref: '#/components/schemas/BenchmarkEvalTaskConfig' - $ref: '#/components/schemas/AppEvalTaskConfig' - task_id: - type: string required: - - task_id - input_rows - scoring_functions - task_config type: object - FinetuningAlgorithm: - enum: - - full - - lora - - qlora - - dora - type: string - FunctionCallToolDefinition: + GreedySamplingStrategy: additionalProperties: false properties: - description: + type: + const: greedy + default: greedy type: string - function_name: - type: string - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - parameters: - additionalProperties: - $ref: '#/components/schemas/ToolParamDefinition' - type: object - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: function_call - default: function_call + required: + - type + type: object + HealthInfo: + additionalProperties: false + properties: + status: type: string required: - - type - - function_name - - description - - parameters - type: object - GetAgentsSessionRequest: - additionalProperties: false - properties: - turn_ids: - items: - type: string - type: array - type: object - GetSpanTreeRequest: - additionalProperties: false - properties: - attributes_to_return: - items: - type: string - type: array + - status type: object - GraphMemoryBank: + ImageContentItem: additionalProperties: false properties: - identifier: - type: string - memory_bank_type: - const: graph - default: graph - type: string - provider_id: - type: string - provider_resource_id: - type: string + image: + additionalProperties: false + properties: + data: + contentEncoding: base64 + type: string + url: + $ref: '#/components/schemas/URL' + type: object type: - const: memory_bank - default: memory_bank + const: image + default: image type: string required: - - identifier - - provider_resource_id - - provider_id - type - - memory_bank_type + - image type: object - GraphMemoryBankParams: + ImageDelta: additionalProperties: false properties: - memory_bank_type: - const: graph - default: graph + image: + contentEncoding: base64 type: string - required: - - memory_bank_type - type: object - HealthInfo: - additionalProperties: false - properties: - status: + type: + const: image + default: image type: string required: - - status - type: object - ImageMedia: - additionalProperties: false - properties: - image: - oneOf: - - additionalProperties: false - properties: - format: - type: string - format_description: - type: string - title: This class represents an image object. To create - type: object - - $ref: '#/components/schemas/URL' - required: + - type - image type: object InferenceStep: @@ -1162,131 +975,261 @@ components: - step_type - model_response type: object - InsertDocumentsRequest: + InsertChunksRequest: additionalProperties: false properties: - bank_id: - type: string - documents: + chunks: items: - $ref: '#/components/schemas/MemoryBankDocument' + additionalProperties: false + properties: + content: + $ref: '#/components/schemas/InterleavedContent' + metadata: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + required: + - content + - metadata + type: object type: array ttl_seconds: type: integer + vector_db_id: + type: string required: - - bank_id - - documents + - vector_db_id + - chunks type: object - Job: + InsertRequest: additionalProperties: false properties: - job_id: + chunk_size_in_tokens: + type: integer + documents: + items: + $ref: '#/components/schemas/RAGDocument' + type: array + vector_db_id: type: string required: - - job_id + - documents + - vector_db_id + - chunk_size_in_tokens + type: object + InterleavedContent: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - items: + $ref: '#/components/schemas/InterleavedContentItem' + type: array + InterleavedContentItem: + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + InvokeToolRequest: + additionalProperties: false + properties: + kwargs: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + tool_name: + type: string + required: + - tool_name + - kwargs type: object - JobCancelRequest: + Job: additionalProperties: false properties: job_id: type: string - task_id: - type: string required: - - task_id - job_id type: object JobStatus: enum: - completed - in_progress + - failed + - scheduled type: string - KeyValueMemoryBank: + JsonType: additionalProperties: false properties: - identifier: - type: string - memory_bank_type: - const: keyvalue - default: keyvalue - type: string - provider_id: - type: string - provider_resource_id: - type: string type: - const: memory_bank - default: memory_bank + const: json + default: json type: string required: - - identifier - - provider_resource_id - - provider_id - type - - memory_bank_type type: object - KeyValueMemoryBankParams: + LLMAsJudgeScoringFnParams: additionalProperties: false properties: - memory_bank_type: - const: keyvalue - default: keyvalue + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + judge_model: + type: string + judge_score_regexes: + items: + type: string + type: array + prompt_template: + type: string + type: + const: llm_as_judge + default: llm_as_judge type: string required: - - memory_bank_type + - type + - judge_model type: object - KeywordMemoryBank: + LLMRAGQueryGeneratorConfig: additionalProperties: false properties: - identifier: - type: string - memory_bank_type: - const: keyword - default: keyword - type: string - provider_id: + model: type: string - provider_resource_id: + template: type: string type: - const: memory_bank - default: memory_bank + const: llm + default: llm type: string required: - - identifier - - provider_resource_id - - provider_id - type - - memory_bank_type + - model + - template type: object - KeywordMemoryBankParams: + ListDatasetsResponse: additionalProperties: false properties: - memory_bank_type: - const: keyword - default: keyword - type: string + data: + items: + $ref: '#/components/schemas/Dataset' + type: array required: - - memory_bank_type + - data type: object - LLMAsJudgeScoringFnParams: + ListEvalTasksResponse: additionalProperties: false properties: - judge_model: - type: string - judge_score_regexes: + data: items: - type: string + $ref: '#/components/schemas/EvalTask' type: array - prompt_template: - type: string - type: - const: llm_as_judge - default: llm_as_judge - type: string required: - - type - - judge_model + - data + type: object + ListModelsResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/Model' + type: array + required: + - data + type: object + ListPostTrainingJobsResponse: + additionalProperties: false + properties: + data: + items: + additionalProperties: false + properties: + job_uuid: + type: string + required: + - job_uuid + type: object + type: array + required: + - data + type: object + ListProvidersResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + type: array + required: + - data + type: object + ListRoutesResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/RouteInfo' + type: array + required: + - data + type: object + ListScoringFunctionsResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + type: array + required: + - data + type: object + ListShieldsResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/Shield' + type: array + required: + - data + type: object + ListToolGroupsResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + type: array + required: + - data + type: object + ListToolsResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/Tool' + type: array + required: + - data + type: object + ListVectorDBsResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/VectorDB' + type: array + required: + - data type: object LogEventRequest: additionalProperties: false @@ -1324,67 +1267,36 @@ components: items: type: string type: array + quantize_base: + default: false + type: boolean rank: type: integer + type: + const: LoRA + default: LoRA + type: string + use_dora: + default: false + type: boolean required: + - type - lora_attn_modules - apply_lora_to_mlp - apply_lora_to_output - rank - alpha type: object - MemoryBankDocument: + MemoryRetrievalStep: additionalProperties: false properties: - content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - - $ref: '#/components/schemas/URL' - document_id: + completed_at: + format: date-time type: string - metadata: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - mime_type: - type: string - required: - - document_id - - content - - metadata - type: object - MemoryRetrievalStep: - additionalProperties: false - properties: - completed_at: - format: date-time - type: string - inserted_context: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - memory_bank_ids: - items: - type: string - type: array - started_at: - format: date-time + inserted_context: + $ref: '#/components/schemas/InterleavedContent' + started_at: + format: date-time type: string step_id: type: string @@ -1394,142 +1306,21 @@ components: type: string turn_id: type: string + vector_db_ids: + type: string required: - turn_id - step_id - step_type - - memory_bank_ids + - vector_db_ids - inserted_context type: object - MemoryToolDefinition: - additionalProperties: false - properties: - input_shields: - items: - type: string - type: array - max_chunks: - default: 10 - type: integer - max_tokens_in_context: - default: 4096 - type: integer - memory_bank_configs: - items: - oneOf: - - additionalProperties: false - properties: - bank_id: - type: string - type: - const: vector - default: vector - type: string - required: - - bank_id - - type - type: object - - additionalProperties: false - properties: - bank_id: - type: string - keys: - items: - type: string - type: array - type: - const: keyvalue - default: keyvalue - type: string - required: - - bank_id - - type - - keys - type: object - - additionalProperties: false - properties: - bank_id: - type: string - type: - const: keyword - default: keyword - type: string - required: - - bank_id - - type - type: object - - additionalProperties: false - properties: - bank_id: - type: string - entities: - items: - type: string - type: array - type: - const: graph - default: graph - type: string - required: - - bank_id - - type - - entities - type: object - type: array - output_shields: - items: - type: string - type: array - query_generator_config: - oneOf: - - additionalProperties: false - properties: - sep: - default: ' ' - type: string - type: - const: default - default: default - type: string - required: - - type - - sep - type: object - - additionalProperties: false - properties: - model: - type: string - template: - type: string - type: - const: llm - default: llm - type: string - required: - - type - - model - - template - type: object - - additionalProperties: false - properties: - type: - const: custom - default: custom - type: string - required: - - type - type: object - type: - const: memory - default: memory - type: string - required: - - type - - memory_bank_configs - - query_generator_config - - max_tokens_in_context - - max_chunks - type: object + Message: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/CompletionMessage' MetricEvent: additionalProperties: false properties: @@ -1584,6 +1375,9 @@ components: - type: array - type: object type: object + model_type: + $ref: '#/components/schemas/ModelType' + default: llm provider_id: type: string provider_resource_id: @@ -1598,6 +1392,7 @@ components: - provider_id - type - metadata + - model_type type: object ModelCandidate: additionalProperties: false @@ -1617,27 +1412,54 @@ components: - model - sampling_params type: object + ModelType: + enum: + - llm + - embedding + type: string + NumberType: + additionalProperties: false + properties: + type: + const: number + default: number + type: string + required: + - type + type: object + ObjectType: + additionalProperties: false + properties: + type: + const: object + default: object + type: string + required: + - type + type: object OptimizerConfig: additionalProperties: false properties: lr: type: number - lr_min: - type: number + num_warmup_steps: + type: integer optimizer_type: - enum: - - adam - - adamw - - sgd - type: string + $ref: '#/components/schemas/OptimizerType' weight_decay: type: number required: - optimizer_type - lr - - lr_min - weight_decay + - num_warmup_steps type: object + OptimizerType: + enum: + - adam + - adamw + - sgd + type: string PaginatedRowsResult: additionalProperties: false properties: @@ -1660,26 +1482,18 @@ components: - rows - total_count type: object - PhotogenToolDefinition: - additionalProperties: false - properties: - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: photogen - default: photogen - type: string - required: - - type - type: object + 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' PostTrainingJob: additionalProperties: false properties: @@ -1702,27 +1516,6 @@ components: - checkpoints title: Artifacts of a finetuning job. type: object - PostTrainingJobLogStream: - additionalProperties: false - properties: - job_uuid: - type: string - log_lines: - items: - type: string - type: array - required: - - job_uuid - - log_lines - title: Stream of logs from a finetuning job. - type: object - PostTrainingJobStatus: - enum: - - running - - completed - - failed - - scheduled - type: string PostTrainingJobStatusResponse: additionalProperties: false properties: @@ -1751,7 +1544,7 @@ components: format: date-time type: string status: - $ref: '#/components/schemas/PostTrainingJobStatus' + $ref: '#/components/schemas/JobStatus' required: - job_uuid - status @@ -1761,14 +1554,10 @@ components: PreferenceOptimizeRequest: additionalProperties: false properties: - algorithm: - $ref: '#/components/schemas/RLHFAlgorithm' algorithm_config: $ref: '#/components/schemas/DPOAlignmentConfig' - dataset_id: - type: string finetuned_model: - $ref: '#/components/schemas/URL' + type: string hyperparam_search_config: additionalProperties: oneOf: @@ -1789,20 +1578,12 @@ components: - type: array - type: object type: object - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' training_config: $ref: '#/components/schemas/TrainingConfig' - validation_dataset_id: - type: string required: - job_uuid - finetuned_model - - dataset_id - - validation_dataset_id - - algorithm - algorithm_config - - optimizer_config - training_config - hyperparam_search_config - logger_config @@ -1810,67 +1591,36 @@ components: ProviderInfo: additionalProperties: false properties: + api: + type: string provider_id: type: string provider_type: type: string required: + - api - provider_id - provider_type type: object - QLoraFinetuningConfig: + QATFinetuningConfig: additionalProperties: false properties: - alpha: - type: integer - apply_lora_to_mlp: - type: boolean - apply_lora_to_output: - type: boolean - lora_attn_modules: - items: - type: string - type: array - rank: + group_size: type: integer - required: - - lora_attn_modules - - apply_lora_to_mlp - - apply_lora_to_output - - rank - - alpha - type: object - QueryCondition: - additionalProperties: false - properties: - key: + quantizer_name: + type: string + type: + const: QAT + default: QAT type: string - op: - $ref: '#/components/schemas/QueryConditionOp' - value: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object required: - - key - - op - - value + - type + - quantizer_name + - group_size type: object - QueryConditionOp: - enum: - - eq - - ne - - gt - - lt - type: string - QueryDocumentsRequest: + QueryChunksRequest: additionalProperties: false properties: - bank_id: - type: string params: additionalProperties: oneOf: @@ -1881,19 +1631,14 @@ components: - type: object type: object query: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' + vector_db_id: + type: string required: - - bank_id + - vector_db_id - query type: object - QueryDocumentsResponse: + QueryChunksResponse: additionalProperties: false properties: chunks: @@ -1901,22 +1646,19 @@ components: additionalProperties: false properties: content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - document_id: - type: string - token_count: - type: integer + $ref: '#/components/schemas/InterleavedContent' + metadata: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object required: - content - - token_count - - document_id + - metadata type: object type: array scores: @@ -1927,155 +1669,158 @@ components: - chunks - scores type: object - QuerySpansRequest: + QueryCondition: additionalProperties: false properties: - attribute_filters: - items: - $ref: '#/components/schemas/QueryCondition' - type: array - attributes_to_return: - items: - type: string - type: array - max_depth: - type: integer + key: + type: string + op: + $ref: '#/components/schemas/QueryConditionOp' + value: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object required: - - attribute_filters - - attributes_to_return - type: object - QueryTracesRequest: - additionalProperties: false - properties: - attribute_filters: - items: - $ref: '#/components/schemas/QueryCondition' - type: array - limit: - type: integer - offset: - type: integer - order_by: - items: - type: string - type: array + - key + - op + - value type: object - RLHFAlgorithm: + QueryConditionOp: enum: - - dpo + - eq + - ne + - gt + - lt type: string - RegexParserScoringFnParams: + QueryRequest: additionalProperties: false properties: - parsing_regexes: + content: + $ref: '#/components/schemas/InterleavedContent' + query_config: + $ref: '#/components/schemas/RAGQueryConfig' + vector_db_ids: items: type: string type: array - type: - const: regex_parser - default: regex_parser - type: string required: - - type + - content + - vector_db_ids type: object - RegisterDatasetRequest: + QuerySpanTreeResponse: additionalProperties: false properties: - dataset_id: - type: string - dataset_schema: + data: + additionalProperties: + $ref: '#/components/schemas/SpanWithStatus' + type: object + required: + - data + type: object + QuerySpansResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/Span' + type: array + required: + - data + type: object + QueryTracesResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/Trace' + type: array + required: + - data + type: object + RAGDocument: + additionalProperties: false + properties: + content: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - items: + $ref: '#/components/schemas/InterleavedContentItem' + type: array + - $ref: '#/components/schemas/URL' + document_id: + type: string + metadata: additionalProperties: oneOf: - - additionalProperties: false - properties: - type: - const: string - default: string - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: number - default: number - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: boolean - default: boolean - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: array - default: array - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: object - default: object - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: json - default: json - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: union - default: union - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: chat_completion_input - default: chat_completion_input - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: completion_input - default: completion_input - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: agent_turn_input - default: agent_turn_input - type: string - required: - - type - type: object + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + mime_type: + type: string + required: + - document_id + - content + - metadata + type: object + RAGQueryConfig: + additionalProperties: false + properties: + max_chunks: + default: 5 + type: integer + max_tokens_in_context: + default: 4096 + type: integer + query_generator_config: + $ref: '#/components/schemas/RAGQueryGeneratorConfig' + required: + - query_generator_config + - max_tokens_in_context + - max_chunks + type: object + RAGQueryGeneratorConfig: + oneOf: + - $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig' + - $ref: '#/components/schemas/LLMRAGQueryGeneratorConfig' + RAGQueryResult: + additionalProperties: false + properties: + content: + $ref: '#/components/schemas/InterleavedContent' + type: object + RegexParserScoringFnParams: + additionalProperties: false + properties: + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + parsing_regexes: + items: + type: string + type: array + type: + const: regex_parser + default: regex_parser + type: string + required: + - type + type: object + RegisterDatasetRequest: + additionalProperties: false + properties: + dataset_id: + type: string + dataset_schema: + additionalProperties: + $ref: '#/components/schemas/ParamType' type: object metadata: additionalProperties: @@ -2126,25 +1871,6 @@ components: - dataset_id - scoring_functions type: object - RegisterMemoryBankRequest: - additionalProperties: false - properties: - memory_bank_id: - type: string - params: - oneOf: - - $ref: '#/components/schemas/VectorMemoryBankParams' - - $ref: '#/components/schemas/KeyValueMemoryBankParams' - - $ref: '#/components/schemas/KeywordMemoryBankParams' - - $ref: '#/components/schemas/GraphMemoryBankParams' - provider_id: - type: string - provider_memory_bank_id: - type: string - required: - - memory_bank_id - - params - type: object RegisterModelRequest: additionalProperties: false properties: @@ -2159,6 +1885,8 @@ components: type: object model_id: type: string + model_type: + $ref: '#/components/schemas/ModelType' provider_id: type: string provider_model_id: @@ -2175,102 +1903,13 @@ components: oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' provider_id: type: string provider_scoring_fn_id: type: string return_type: - oneOf: - - additionalProperties: false - properties: - type: - const: string - default: string - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: number - default: number - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: boolean - default: boolean - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: array - default: array - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: object - default: object - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: json - default: json - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: union - default: union - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: chat_completion_input - default: chat_completion_input - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: completion_input - default: completion_input - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: agent_turn_input - default: agent_turn_input - type: string - required: - - type - type: object + $ref: '#/components/schemas/ParamType' scoring_fn_id: type: string required: @@ -2299,30 +1938,10 @@ components: required: - shield_id type: object - RestAPIExecutionConfig: + RegisterToolGroupRequest: additionalProperties: false properties: - body: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - headers: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - method: - $ref: '#/components/schemas/RestAPIMethod' - params: + args: additionalProperties: oneOf: - type: boolean @@ -2331,19 +1950,73 @@ components: - type: array - type: object type: object - url: + mcp_endpoint: $ref: '#/components/schemas/URL' + provider_id: + type: string + toolgroup_id: + type: string required: - - url - - method + - toolgroup_id + - provider_id type: object - RestAPIMethod: - enum: - - GET - - POST - - PUT - - DELETE - type: string + RegisterVectorDbRequest: + additionalProperties: false + properties: + embedding_dimension: + type: integer + embedding_model: + type: string + provider_id: + type: string + provider_vector_db_id: + type: string + vector_db_id: + type: string + required: + - vector_db_id + - embedding_model + type: object + ResponseFormat: + oneOf: + - additionalProperties: false + properties: + json_schema: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + type: + const: json_schema + default: json_schema + type: string + required: + - type + - json_schema + type: object + - additionalProperties: false + properties: + bnf: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + type: + const: grammar + default: grammar + type: string + required: + - type + - bnf + type: object RouteInfo: additionalProperties: false properties: @@ -2367,10 +2040,7 @@ components: oneOf: - $ref: '#/components/schemas/BenchmarkEvalTaskConfig' - $ref: '#/components/schemas/AppEvalTaskConfig' - task_id: - type: string required: - - task_id - task_config type: object RunShieldRequest: @@ -2378,11 +2048,7 @@ components: properties: messages: items: - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' + $ref: '#/components/schemas/Message' type: array params: additionalProperties: @@ -2436,26 +2102,13 @@ components: default: 1.0 type: number strategy: - $ref: '#/components/schemas/SamplingStrategy' - default: greedy - temperature: - default: 0.0 - type: number - top_k: - default: 0 - type: integer - top_p: - default: 0.95 - type: number + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' required: - strategy type: object - SamplingStrategy: - enum: - - greedy - - top_p - - top_k - type: string SaveSpansToDatasetRequest: additionalProperties: false properties: @@ -2489,6 +2142,7 @@ components: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' type: object required: - dataset_id @@ -2527,6 +2181,7 @@ components: - oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' type: object required: - input_rows @@ -2562,181 +2217,55 @@ components: oneOf: - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' provider_id: type: string provider_resource_id: type: string return_type: - oneOf: - - additionalProperties: false - properties: - type: - const: string - default: string - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: number - default: number - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: boolean - default: boolean - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: array - default: array - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: object - default: object - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: json - default: json - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: union - default: union - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: chat_completion_input - default: chat_completion_input - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: completion_input - default: completion_input - type: string - required: - - type - type: object - - additionalProperties: false - properties: - type: - const: agent_turn_input - default: agent_turn_input - type: string - required: - - type - type: object - type: - const: scoring_function - default: scoring_function - type: string - required: - - identifier - - provider_resource_id - - provider_id - - type - - metadata - - return_type - type: object - ScoringResult: - additionalProperties: false - properties: - aggregated_results: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - score_rows: - items: - additionalProperties: - oneOf: - - type: boolean - - type: number - - type: string - - type: array - - type: object + $ref: '#/components/schemas/ParamType' + type: + const: scoring_function + default: scoring_function + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - metadata + - return_type + type: object + ScoringResult: + additionalProperties: false + properties: + aggregated_results: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + score_rows: + items: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object type: object type: array required: - score_rows - aggregated_results type: object - SearchToolDefinition: - additionalProperties: false - properties: - api_key: - type: string - engine: - default: brave - enum: - - bing - - brave - - tavily - type: string - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: brave_search - default: brave_search - type: string - required: - - type - - api_key - - engine - type: object Session: additionalProperties: false properties: - memory_bank: - oneOf: - - $ref: '#/components/schemas/VectorMemoryBank' - - $ref: '#/components/schemas/KeyValueMemoryBank' - - $ref: '#/components/schemas/KeywordMemoryBank' - - $ref: '#/components/schemas/GraphMemoryBank' session_id: type: string session_name: @@ -2873,7 +2402,7 @@ components: - ok - error type: string - SpanWithChildren: + SpanWithStatus: additionalProperties: false properties: attributes: @@ -2885,10 +2414,6 @@ components: - type: array - type: object type: object - children: - items: - $ref: '#/components/schemas/SpanWithChildren' - type: array end_time: format: date-time type: string @@ -2910,7 +2435,6 @@ components: - trace_id - name - start_time - - children type: object StopReason: enum: @@ -2918,6 +2442,16 @@ components: - end_of_message - out_of_tokens type: string + StringType: + additionalProperties: false + properties: + type: + const: string + default: string + type: string + required: + - type + type: object StructuredLogEvent: additionalProperties: false properties: @@ -2955,14 +2489,11 @@ components: SupervisedFineTuneRequest: additionalProperties: false properties: - algorithm: - $ref: '#/components/schemas/FinetuningAlgorithm' algorithm_config: oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' - - $ref: '#/components/schemas/QLoraFinetuningConfig' - - $ref: '#/components/schemas/DoraFinetuningConfig' - dataset_id: + - $ref: '#/components/schemas/QATFinetuningConfig' + checkpoint_dir: type: string hyperparam_search_config: additionalProperties: @@ -2986,34 +2517,21 @@ components: type: object model: type: string - optimizer_config: - $ref: '#/components/schemas/OptimizerConfig' training_config: $ref: '#/components/schemas/TrainingConfig' - validation_dataset_id: - type: string required: - job_uuid - - model - - dataset_id - - validation_dataset_id - - algorithm - - algorithm_config - - optimizer_config - training_config - hyperparam_search_config - logger_config + - model type: object SyntheticDataGenerateRequest: additionalProperties: false properties: dialogs: items: - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolResponseMessage' - - $ref: '#/components/schemas/CompletionMessage' + $ref: '#/components/schemas/Message' type: array filtering_function: enum: @@ -3063,14 +2581,7 @@ components: additionalProperties: false properties: content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' role: const: system default: system @@ -3079,6 +2590,32 @@ components: - role - content type: object + TextContentItem: + additionalProperties: false + properties: + text: + type: string + type: + const: text + default: text + type: string + required: + - type + - text + type: object + TextDelta: + additionalProperties: false + properties: + text: + type: string + type: + const: text + default: text + type: string + required: + - type + - text + type: object TokenLogProbs: additionalProperties: false properties: @@ -3089,6 +2626,48 @@ components: required: - logprobs_by_token type: object + Tool: + additionalProperties: false + properties: + description: + type: string + identifier: + type: string + metadata: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + parameters: + items: + $ref: '#/components/schemas/ToolParameter' + type: array + provider_id: + type: string + provider_resource_id: + type: string + tool_host: + $ref: '#/components/schemas/ToolHost' + toolgroup_id: + type: string + type: + const: tool + default: tool + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - toolgroup_id + - tool_host + - description + - parameters + type: object ToolCall: additionalProperties: false properties: @@ -3128,28 +2707,56 @@ components: ToolCallDelta: additionalProperties: false properties: - content: + parse_status: + $ref: '#/components/schemas/ToolCallParseStatus' + tool_call: oneOf: - type: string - $ref: '#/components/schemas/ToolCall' - parse_status: - $ref: '#/components/schemas/ToolCallParseStatus' + type: + const: tool_call + default: tool_call + type: string required: - - content + - type + - tool_call - parse_status type: object ToolCallParseStatus: enum: - started - in_progress - - failure - - success + - failed + - succeeded type: string ToolChoice: enum: - auto - required type: string + ToolDef: + additionalProperties: false + properties: + description: + type: string + metadata: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + name: + type: string + parameters: + items: + $ref: '#/components/schemas/ToolParameter' + type: array + required: + - name + type: object ToolDefinition: additionalProperties: false properties: @@ -3198,6 +2805,54 @@ components: - tool_calls - tool_responses type: object + ToolGroup: + additionalProperties: false + properties: + args: + additionalProperties: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + identifier: + type: string + mcp_endpoint: + $ref: '#/components/schemas/URL' + provider_id: + type: string + provider_resource_id: + type: string + type: + const: tool_group + default: tool_group + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + type: object + ToolHost: + enum: + - distribution + - client + - model_context_protocol + type: string + ToolInvocationResult: + additionalProperties: false + properties: + content: + $ref: '#/components/schemas/InterleavedContent' + error_code: + type: integer + error_message: + type: string + required: + - content + type: object ToolParamDefinition: additionalProperties: false properties: @@ -3218,6 +2873,31 @@ components: required: - param_type type: object + ToolParameter: + additionalProperties: false + properties: + default: + oneOf: + - type: boolean + - type: number + - type: string + - type: array + - type: object + description: + type: string + name: + type: string + parameter_type: + type: string + required: + default: true + type: boolean + required: + - name + - parameter_type + - description + - required + type: object ToolPromptFormat: description: "`json` --\n Refers to the json format for calling tools.\n\ \ The json format takes the form like\n {\n \"type\": \"function\"\ @@ -3240,17 +2920,10 @@ components: call_id: type: string content: + $ref: '#/components/schemas/InterleavedContent' + tool_name: oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array - tool_name: - oneOf: - - $ref: '#/components/schemas/BuiltinTool' + - $ref: '#/components/schemas/BuiltinTool' - type: string required: - call_id @@ -3263,17 +2936,10 @@ components: call_id: type: string content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' role: - const: ipython - default: ipython + const: tool + default: tool type: string tool_name: oneOf: @@ -3285,6 +2951,34 @@ components: - tool_name - content type: object + TopKSamplingStrategy: + additionalProperties: false + properties: + top_k: + type: integer + type: + const: top_k + default: top_k + type: string + required: + - type + - top_k + type: object + TopPSamplingStrategy: + additionalProperties: false + properties: + temperature: + type: number + top_p: + default: 0.95 + type: number + type: + const: top_p + default: top_p + type: string + required: + - type + type: object Trace: additionalProperties: false properties: @@ -3306,28 +3000,30 @@ components: TrainingConfig: additionalProperties: false properties: - batch_size: + data_config: + $ref: '#/components/schemas/DataConfig' + dtype: + default: bf16 + type: string + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + gradient_accumulation_steps: type: integer - enable_activation_checkpointing: - type: boolean - fsdp_cpu_offload: - type: boolean - memory_efficient_fsdp_wrap: - type: boolean - n_epochs: + max_steps_per_epoch: type: integer - n_iters: + max_validation_steps: type: integer - shuffle: - type: boolean + n_epochs: + type: integer + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' required: - n_epochs - - batch_size - - shuffle - - n_iters - - enable_activation_checkpointing - - memory_efficient_fsdp_wrap - - fsdp_cpu_offload + - max_steps_per_epoch + - gradient_accumulation_steps + - max_validation_steps + - data_config + - optimizer_config type: object Turn: additionalProperties: false @@ -3343,7 +3039,22 @@ components: type: array output_attachments: items: - $ref: '#/components/schemas/Attachment' + additionalProperties: false + properties: + content: + oneOf: + - type: string + - $ref: '#/components/schemas/InterleavedContentItem' + - items: + $ref: '#/components/schemas/InterleavedContentItem' + type: array + - $ref: '#/components/schemas/URL' + mime_type: + type: string + required: + - content + - mime_type + type: object type: array output_message: $ref: '#/components/schemas/CompletionMessage' @@ -3373,32 +3084,22 @@ components: title: A single turn in an interaction with an Agentic System. type: object URL: - format: uri - pattern: ^(https?://|file://|data:) - type: string - UnregisterDatasetRequest: additionalProperties: false properties: - dataset_id: + uri: type: string required: - - dataset_id + - uri type: object - UnregisterMemoryBankRequest: + UnionType: additionalProperties: false properties: - memory_bank_id: - type: string - required: - - memory_bank_id - type: object - UnregisterModelRequest: - additionalProperties: false - properties: - model_id: + type: + const: union + default: union type: string required: - - model_id + - type type: object UnstructuredLogEvent: additionalProperties: false @@ -3439,23 +3140,9 @@ components: additionalProperties: false properties: content: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' context: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - - items: - oneOf: - - type: string - - $ref: '#/components/schemas/ImageMedia' - type: array + $ref: '#/components/schemas/InterleavedContent' role: const: user default: user @@ -3464,55 +3151,38 @@ components: - role - content type: object - VectorMemoryBank: + VectorDB: additionalProperties: false properties: - chunk_size_in_tokens: + embedding_dimension: type: integer embedding_model: type: string identifier: type: string - memory_bank_type: - const: vector - default: vector - type: string - overlap_size_in_tokens: - type: integer provider_id: type: string provider_resource_id: type: string type: - const: memory_bank - default: memory_bank + const: vector_db + default: vector_db type: string required: - identifier - provider_resource_id - provider_id - type - - memory_bank_type - embedding_model - - chunk_size_in_tokens + - embedding_dimension type: object - VectorMemoryBankParams: + VersionInfo: additionalProperties: false properties: - chunk_size_in_tokens: - type: integer - embedding_model: - type: string - memory_bank_type: - const: vector - default: vector + version: type: string - overlap_size_in_tokens: - type: integer required: - - memory_bank_type - - embedding_model - - chunk_size_in_tokens + - version type: object ViolationLevel: enum: @@ -3520,45 +3190,440 @@ components: - warn - error type: string - WolframAlphaToolDefinition: - additionalProperties: false - properties: - api_key: - type: string - input_shields: - items: - type: string - type: array - output_shields: - items: - type: string - type: array - remote_execution: - $ref: '#/components/schemas/RestAPIExecutionConfig' - type: - const: wolfram_alpha - default: wolfram_alpha - type: string - required: - - type - - api_key - type: object info: description: "This is the specification of the Llama Stack that provides\n \ \ a set of endpoints and their corresponding interfaces that are tailored\ \ to\n best leverage Llama Models." title: Llama Stack Specification - version: alpha + version: v1 jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema openapi: 3.1.0 paths: - /alpha/agents/create: + /v1/agents: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AgentCreateResponse' + description: OK + tags: + - Agents + /v1/agents/{agent_id}: + delete: + parameters: + - in: path + name: agent_id + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + description: OK + tags: + - Agents + /v1/agents/{agent_id}/session: + post: + parameters: + - in: path + name: agent_id + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentSessionRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AgentSessionCreateResponse' + description: OK + tags: + - Agents + /v1/agents/{agent_id}/session/{session_id}: + delete: + parameters: + - in: path + name: session_id + required: true + schema: + type: string + - in: path + name: agent_id + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + description: OK + tags: + - Agents + get: + parameters: + - in: path + name: session_id + required: true + schema: + type: string + - in: path + name: agent_id + required: true + schema: + type: string + - in: query + name: turn_ids + required: false + schema: + items: + type: string + type: array + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Session' + description: OK + tags: + - Agents + /v1/agents/{agent_id}/session/{session_id}/turn: + post: + parameters: + - in: path + name: agent_id + required: true + schema: + type: string + - in: path + name: session_id + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAgentTurnRequest' + required: true + responses: + '200': + content: + text/event-stream: + schema: + oneOf: + - $ref: '#/components/schemas/Turn' + - $ref: '#/components/schemas/AgentTurnResponseStreamChunk' + description: A single turn in an interaction with an Agentic System. **OR** + streamed agent turn completion response. + tags: + - Agents + /v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}: + get: + parameters: + - in: path + name: agent_id + required: true + schema: + type: string + - in: path + name: session_id + required: true + schema: + type: string + - in: path + name: turn_id + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + description: OK + tags: + - Agents + /v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: + get: + parameters: + - in: path + name: agent_id + required: true + schema: + type: string + - in: path + name: session_id + required: true + schema: + type: string + - in: path + name: turn_id + required: true + schema: + type: string + - in: path + name: step_id + required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AgentStepResponse' + description: OK + tags: + - Agents + /v1/batch-inference/chat-completion: + post: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchChatCompletionRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchChatCompletionResponse' + description: OK + tags: + - BatchInference (Coming Soon) + /v1/batch-inference/completion: + post: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchCompletionRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BatchCompletionResponse' + description: OK + tags: + - BatchInference (Coming Soon) + /v1/datasetio/rows: + get: + parameters: + - in: query + name: dataset_id + required: true + schema: + type: string + - in: query + name: rows_in_page + required: true + schema: + type: integer + - in: query + name: page_token + required: false + schema: + type: string + - in: query + name: filter_condition + required: false + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRowsResult' + description: OK + tags: + - DatasetIO + post: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3566,24 +3631,52 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateAgentRequest' + $ref: '#/components/schemas/AppendRowsRequest' required: true + responses: + '200': + description: OK + tags: + - DatasetIO + /v1/datasets: + get: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AgentCreateResponse' + $ref: '#/components/schemas/ListDatasetsResponse' description: OK tags: - - Agents - /alpha/agents/delete: + - Datasets post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3591,45 +3684,110 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeleteAgentsRequest' + $ref: '#/components/schemas/RegisterDatasetRequest' required: true responses: '200': description: OK tags: - - Agents - /alpha/agents/session/create: - post: + - Datasets + /v1/datasets/{dataset_id}: + delete: parameters: + - in: path + name: dataset_id + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentSessionRequest' + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + description: OK + tags: + - Datasets + get: + parameters: + - in: path + name: dataset_id required: true + schema: + type: string + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AgentSessionCreateResponse' + oneOf: + - $ref: '#/components/schemas/Dataset' description: OK tags: - - Agents - /alpha/agents/session/delete: + - Datasets + /v1/eval-tasks: + get: + parameters: + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListEvalTasksResponse' + description: OK + tags: + - EvalTasks post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3637,30 +3795,64 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeleteAgentsSessionRequest' + $ref: '#/components/schemas/RegisterEvalTaskRequest' required: true responses: '200': description: OK tags: - - Agents - /alpha/agents/session/get: - post: + - EvalTasks + /v1/eval-tasks/{eval_task_id}: + get: parameters: - - in: query - name: agent_id + - in: path + name: eval_task_id required: true schema: type: string - - in: query - name: session_id + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/EvalTask' + description: OK + tags: + - EvalTasks + /v1/eval/tasks/{task_id}/evaluations: + post: + parameters: + - in: path + name: task_id required: true schema: type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3668,106 +3860,172 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GetAgentsSessionRequest' + $ref: '#/components/schemas/EvaluateRowsRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Session' + $ref: '#/components/schemas/EvaluateResponse' description: OK tags: - - Agents - /alpha/agents/step/get: - get: + - Eval + /v1/eval/tasks/{task_id}/jobs: + post: parameters: - - in: query - name: agent_id + - in: path + name: task_id required: true schema: type: string - - in: query - name: session_id - required: true + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false schema: type: string - - in: query - name: turn_id + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunEvalRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Job' + description: OK + tags: + - Eval + /v1/eval/tasks/{task_id}/jobs/{job_id}: + delete: + parameters: + - in: path + name: task_id required: true schema: type: string - - in: query - name: step_id + - in: path + name: job_id required: true schema: type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AgentStepResponse' description: OK tags: - - Agents - /alpha/agents/turn/create: - post: + - Eval + get: parameters: + - in: path + name: task_id + required: true + schema: + type: string + - in: path + name: job_id + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentTurnRequest' - required: true responses: '200': content: - text/event-stream: + application/json: schema: oneOf: - - $ref: '#/components/schemas/Turn' - - $ref: '#/components/schemas/AgentTurnResponseStreamChunk' - description: A single turn in an interaction with an Agentic System. **OR** - streamed agent turn completion response. + - $ref: '#/components/schemas/JobStatus' + description: OK tags: - - Agents - /alpha/agents/turn/get: + - Eval + /v1/eval/tasks/{task_id}/jobs/{job_id}/result: get: parameters: - - in: query - name: agent_id + - in: path + name: job_id required: true schema: type: string - - in: query - name: session_id + - in: path + name: task_id required: true schema: type: string - - in: query - name: turn_id - required: true + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version + required: false schema: type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluateResponse' + description: OK + tags: + - Eval + /v1/health: + get: + parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3776,17 +4034,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Turn' + $ref: '#/components/schemas/HealthInfo' description: OK tags: - - Agents - /alpha/batch-inference/chat-completion: + - Inspect + /v1/inference/chat-completion: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3794,24 +4059,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BatchChatCompletionRequest' + $ref: '#/components/schemas/ChatCompletionRequest' required: true responses: '200': content: - application/json: + text/event-stream: schema: - $ref: '#/components/schemas/BatchChatCompletionResponse' - description: OK + oneOf: + - $ref: '#/components/schemas/ChatCompletionResponse' + - $ref: '#/components/schemas/ChatCompletionResponseStreamChunk' + description: Chat completion response. **OR** SSE-stream of these events. tags: - - BatchInference (Coming Soon) - /alpha/batch-inference/completion: + - Inference + /v1/inference/completion: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3819,24 +4093,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BatchCompletionRequest' + $ref: '#/components/schemas/CompletionRequest' required: true responses: '200': content: - application/json: + text/event-stream: schema: - $ref: '#/components/schemas/BatchCompletionResponse' - description: OK + oneOf: + - $ref: '#/components/schemas/CompletionResponse' + - $ref: '#/components/schemas/CompletionResponseStreamChunk' + description: Completion response. **OR** streamed completion response. tags: - - BatchInference (Coming Soon) - /alpha/datasetio/append-rows: + - Inference + /v1/inference/embeddings: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3844,40 +4127,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppendRowsRequest' + $ref: '#/components/schemas/EmbeddingsRequest' required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EmbeddingsResponse' description: OK tags: - - DatasetIO - /alpha/datasetio/get-rows-paginated: + - Inference + /v1/inspect/providers: get: parameters: - - in: query - name: dataset_id - required: true - schema: - type: string - - in: query - name: rows_in_page - required: true - schema: - type: integer - - in: query - name: page_token - required: false - schema: - type: string - - in: query - name: filter_condition + - description: JSON-encoded provider data which will be made available to the + adapter servicing the API + in: header + name: X-LlamaStack-Provider-Data required: false schema: type: string - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3886,22 +4160,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaginatedRowsResult' + $ref: '#/components/schemas/ListProvidersResponse' description: OK tags: - - DatasetIO - /alpha/datasets/get: + - Inspect + /v1/inspect/routes: get: parameters: - - in: query - name: dataset_id - required: true - schema: - type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3910,37 +4186,49 @@ paths: content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/ListRoutesResponse' description: OK tags: - - Datasets - /alpha/datasets/list: + - Inspect + /v1/models: get: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string responses: '200': content: - application/jsonl: + application/json: schema: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/ListModelsResponse' description: OK tags: - - Datasets - /alpha/datasets/register: + - Models post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3948,46 +4236,62 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RegisterDatasetRequest' + $ref: '#/components/schemas/RegisterModelRequest' required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Model' description: OK tags: - - Datasets - /alpha/datasets/unregister: - post: + - Models + /v1/models/{model_id}: + delete: parameters: + - in: path + name: model_id + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UnregisterDatasetRequest' - required: true responses: '200': description: OK tags: - - Datasets - /alpha/eval-tasks/get: + - Models get: parameters: - - in: query - name: name + - in: path + name: model_id required: true schema: type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -3997,82 +4301,56 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/EvalTask' + - $ref: '#/components/schemas/Model' description: OK tags: - - EvalTasks - /alpha/eval-tasks/list: + - Models + /v1/post-training/job/artifacts: get: parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData - required: false + - in: query + name: job_uuid + required: true schema: type: string - responses: - '200': - content: - application/jsonl: - schema: - $ref: '#/components/schemas/EvalTask' - description: OK - tags: - - EvalTasks - /alpha/eval-tasks/register: - post: - parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterEvalTaskRequest' - required: true - responses: - '200': - description: OK - tags: - - EvalTasks - /alpha/eval/evaluate-rows: - post: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluateRowsRequest' - required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/EvaluateResponse' + oneOf: + - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' description: OK tags: - - Eval - /alpha/eval/job/cancel: + - PostTraining (Coming Soon) + /v1/post-training/job/cancel: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4080,30 +4358,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/JobCancelRequest' + $ref: '#/components/schemas/CancelTrainingJobRequest' required: true responses: '200': description: OK tags: - - Eval - /alpha/eval/job/result: + - PostTraining (Coming Soon) + /v1/post-training/job/status: get: parameters: - in: query - name: task_id - required: true - schema: - type: string - - in: query - name: job_id + name: job_uuid required: true schema: type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4112,27 +4392,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EvaluateResponse' + oneOf: + - $ref: '#/components/schemas/PostTrainingJobStatusResponse' description: OK tags: - - Eval - /alpha/eval/job/status: + - PostTraining (Coming Soon) + /v1/post-training/jobs: get: parameters: - - in: query - name: task_id - required: true - schema: - type: string - - in: query - name: job_id - required: true - schema: - type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4141,18 +4419,24 @@ paths: content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/JobStatus' + $ref: '#/components/schemas/ListPostTrainingJobsResponse' description: OK tags: - - Eval - /alpha/eval/run-eval: + - PostTraining (Coming Soon) + /v1/post-training/preference-optimize: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4160,43 +4444,63 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RunEvalRequest' + $ref: '#/components/schemas/PreferenceOptimizeRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Job' + $ref: '#/components/schemas/PostTrainingJob' description: OK tags: - - Eval - /alpha/health: - get: + - PostTraining (Coming Soon) + /v1/post-training/supervised-fine-tune: + post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SupervisedFineTuneRequest' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/HealthInfo' + $ref: '#/components/schemas/PostTrainingJob' description: OK tags: - - Inspect - /alpha/inference/chat-completion: + - PostTraining (Coming Soon) + /v1/safety/run-shield: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4204,53 +4508,56 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChatCompletionRequest' + $ref: '#/components/schemas/RunShieldRequest' required: true responses: '200': content: - text/event-stream: + application/json: schema: - oneOf: - - $ref: '#/components/schemas/ChatCompletionResponse' - - $ref: '#/components/schemas/ChatCompletionResponseStreamChunk' - description: Chat completion response. **OR** SSE-stream of these events. + $ref: '#/components/schemas/RunShieldResponse' + description: OK tags: - - Inference - /alpha/inference/completion: - post: + - Safety + /v1/scoring-functions: + get: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompletionRequest' - required: true responses: '200': content: - text/event-stream: + application/json: schema: - oneOf: - - $ref: '#/components/schemas/CompletionResponse' - - $ref: '#/components/schemas/CompletionResponseStreamChunk' - description: Completion response. **OR** streamed completion response. + $ref: '#/components/schemas/ListScoringFunctionsResponse' + description: OK tags: - - Inference - /alpha/inference/embeddings: + - ScoringFunctions post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4258,76 +4565,59 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EmbeddingsRequest' + $ref: '#/components/schemas/RegisterScoringFunctionRequest' required: true responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/EmbeddingsResponse' description: OK tags: - - Inference - /alpha/memory-banks/get: + - ScoringFunctions + /v1/scoring-functions/{scoring_fn_id}: get: parameters: - - in: query - name: memory_bank_id + - in: path + name: scoring_fn_id required: true schema: type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data required: false schema: type: string - responses: - '200': - content: - application/json: - schema: - oneOf: - - oneOf: - - $ref: '#/components/schemas/VectorMemoryBank' - - $ref: '#/components/schemas/KeyValueMemoryBank' - - $ref: '#/components/schemas/KeywordMemoryBank' - - $ref: '#/components/schemas/GraphMemoryBank' - description: OK - tags: - - MemoryBanks - /alpha/memory-banks/list: - get: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Client-Version required: false schema: type: string responses: '200': content: - application/jsonl: + application/json: schema: oneOf: - - $ref: '#/components/schemas/VectorMemoryBank' - - $ref: '#/components/schemas/KeyValueMemoryBank' - - $ref: '#/components/schemas/KeywordMemoryBank' - - $ref: '#/components/schemas/GraphMemoryBank' + - $ref: '#/components/schemas/ScoringFn' description: OK tags: - - MemoryBanks - /alpha/memory-banks/register: + - ScoringFunctions + /v1/scoring/score: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4335,20 +4625,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RegisterMemoryBankRequest' + $ref: '#/components/schemas/ScoreRequest' required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreResponse' description: OK tags: - - MemoryBanks - /alpha/memory-banks/unregister: + - Scoring + /v1/scoring/score-batch: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4356,41 +4657,56 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnregisterMemoryBankRequest' + $ref: '#/components/schemas/ScoreBatchRequest' required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreBatchResponse' description: OK tags: - - MemoryBanks - /alpha/memory/insert: - post: + - Scoring + /v1/shields: + get: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InsertDocumentsRequest' - required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListShieldsResponse' description: OK tags: - - Memory - /alpha/memory/query: + - Shields post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4398,21 +4714,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/QueryDocumentsRequest' + $ref: '#/components/schemas/RegisterShieldRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/QueryDocumentsResponse' + $ref: '#/components/schemas/Shield' description: OK tags: - - Memory - /alpha/models/get: + - Shields + /v1/shields/{identifier}: get: parameters: - - in: query + - in: path name: identifier required: true schema: @@ -4420,7 +4736,14 @@ paths: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4430,36 +4753,24 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/Model' + - $ref: '#/components/schemas/Shield' description: OK tags: - - Models - /alpha/models/list: - get: + - Shields + /v1/synthetic-data-generation/generate: + post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data required: false schema: type: string - responses: - '200': - content: - application/jsonl: - schema: - $ref: '#/components/schemas/Model' - description: OK - tags: - - Models - /alpha/models/register: - post: - parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4467,24 +4778,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RegisterModelRequest' + $ref: '#/components/schemas/SyntheticDataGenerateRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Model' + $ref: '#/components/schemas/SyntheticDataGenerationResponse' description: OK tags: - - Models - /alpha/models/unregister: + - SyntheticDataGeneration (Coming Soon) + /v1/telemetry/events: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4492,25 +4810,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnregisterModelRequest' + $ref: '#/components/schemas/LogEventRequest' required: true responses: '200': description: OK tags: - - Models - /alpha/post-training/job/artifacts: + - Telemetry + /v1/telemetry/spans: get: parameters: - in: query - name: job_uuid + name: attribute_filters required: true schema: - type: string + items: + $ref: '#/components/schemas/QueryCondition' + type: array + - in: query + name: attributes_to_return + required: true + schema: + items: + type: string + type: array + - in: query + name: max_depth + required: false + schema: + type: integer - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4519,17 +4858,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' + $ref: '#/components/schemas/QuerySpansResponse' description: OK tags: - - PostTraining (Coming Soon) - /alpha/post-training/job/cancel: + - Telemetry + /v1/telemetry/spans/export: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4537,25 +4883,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CancelTrainingJobRequest' + $ref: '#/components/schemas/SaveSpansToDatasetRequest' required: true responses: '200': description: OK tags: - - PostTraining (Coming Soon) - /alpha/post-training/job/logs: + - Telemetry + /v1/telemetry/spans/{span_id}/tree: get: parameters: - - in: query - name: job_uuid + - in: path + name: span_id required: true schema: type: string + - in: query + name: attributes_to_return + required: false + schema: + items: + type: string + type: array + - in: query + name: max_depth + required: false + schema: + type: integer - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4564,22 +4929,48 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobLogStream' + $ref: '#/components/schemas/QuerySpanTreeResponse' description: OK tags: - - PostTraining (Coming Soon) - /alpha/post-training/job/status: + - Telemetry + /v1/telemetry/traces: get: parameters: - in: query - name: job_uuid - required: true + name: attribute_filters + required: false schema: - type: string + items: + $ref: '#/components/schemas/QueryCondition' + type: array + - in: query + name: limit + required: false + schema: + type: integer + - in: query + name: offset + required: false + schema: + type: integer + - in: query + name: order_by + required: false + schema: + items: + type: string + type: array - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4588,61 +4979,91 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJobStatusResponse' + $ref: '#/components/schemas/QueryTracesResponse' description: OK tags: - - PostTraining (Coming Soon) - /alpha/post-training/jobs: + - Telemetry + /v1/telemetry/traces/{trace_id}: get: parameters: + - in: path + name: trace_id + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string responses: '200': content: - application/jsonl: + application/json: schema: - $ref: '#/components/schemas/PostTrainingJob' + $ref: '#/components/schemas/Trace' description: OK tags: - - PostTraining (Coming Soon) - /alpha/post-training/preference-optimize: - post: + - Telemetry + /v1/telemetry/traces/{trace_id}/spans/{span_id}: + get: parameters: + - in: path + name: trace_id + required: true + schema: + type: string + - in: path + name: span_id + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PreferenceOptimizeRequest' - required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJob' + $ref: '#/components/schemas/Span' description: OK tags: - - PostTraining (Coming Soon) - /alpha/post-training/supervised-fine-tune: + - Telemetry + /v1/tool-runtime/invoke: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4650,68 +5071,68 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SupervisedFineTuneRequest' + $ref: '#/components/schemas/InvokeToolRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PostTrainingJob' + $ref: '#/components/schemas/ToolInvocationResult' description: OK + summary: Run a tool with the given arguments tags: - - PostTraining (Coming Soon) - /alpha/providers/list: + - ToolRuntime + /v1/tool-runtime/list-tools: get: parameters: - - description: JSON-encoded provider data which will be made available to the - adapter servicing the API - in: header - name: X-LlamaStack-ProviderData + - in: query + name: tool_group_id required: false schema: type: string - responses: - '200': - content: - application/json: - schema: - additionalProperties: - $ref: '#/components/schemas/ProviderInfo' - type: object - description: OK - tags: - - Inspect - /alpha/routes/list: - get: - parameters: + - in: query + name: mcp_endpoint + required: false + schema: + $ref: '#/components/schemas/URL' - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string responses: '200': content: - application/json: + application/jsonl: schema: - additionalProperties: - items: - $ref: '#/components/schemas/RouteInfo' - type: array - type: object + $ref: '#/components/schemas/ToolDef' description: OK tags: - - Inspect - /alpha/safety/run-shield: + - ToolRuntime + /v1/tool-runtime/rag-tool/insert: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4719,68 +5140,87 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RunShieldRequest' + $ref: '#/components/schemas/InsertRequest' required: true responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RunShieldResponse' description: OK + summary: Index documents so they can be used by the RAG system tags: - - Safety - /alpha/scoring-functions/get: - get: + - ToolRuntime + /v1/tool-runtime/rag-tool/query: + post: parameters: - - in: query - name: scoring_fn_id - required: true - schema: - type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryRequest' + required: true responses: '200': content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/ScoringFn' + $ref: '#/components/schemas/RAGQueryResult' description: OK + summary: Query the RAG system for context; typically invoked by the agent tags: - - ScoringFunctions - /alpha/scoring-functions/list: + - ToolRuntime + /v1/toolgroups: get: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string responses: '200': content: - application/jsonl: + application/json: schema: - $ref: '#/components/schemas/ScoringFn' + $ref: '#/components/schemas/ListToolGroupsResponse' description: OK + summary: List tool groups with optional provider tags: - - ScoringFunctions - /alpha/scoring-functions/register: + - ToolGroups post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4788,75 +5228,91 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RegisterScoringFunctionRequest' + $ref: '#/components/schemas/RegisterToolGroupRequest' required: true responses: '200': description: OK + summary: Register a tool group tags: - - ScoringFunctions - /alpha/scoring/score: - post: + - ToolGroups + /v1/toolgroups/{toolgroup_id}: + delete: parameters: + - in: path + name: toolgroup_id + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreRequest' - required: true responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreResponse' description: OK + summary: Unregister a tool group tags: - - Scoring - /alpha/scoring/score-batch: - post: + - ToolGroups + get: parameters: + - in: path + name: toolgroup_id + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ScoreBatchRequest' - required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ScoreBatchResponse' + $ref: '#/components/schemas/ToolGroup' description: OK tags: - - Scoring - /alpha/shields/get: + - ToolGroups + /v1/tools: get: parameters: - in: query - name: identifier - required: true + name: toolgroup_id + required: false schema: type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4865,62 +5321,81 @@ paths: content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/Shield' + $ref: '#/components/schemas/ListToolsResponse' description: OK + summary: List tools with optional tool group tags: - - Shields - /alpha/shields/list: + - ToolGroups + /v1/tools/{tool_name}: get: parameters: + - in: path + name: tool_name + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string responses: '200': content: - application/jsonl: + application/json: schema: - $ref: '#/components/schemas/Shield' + $ref: '#/components/schemas/Tool' description: OK tags: - - Shields - /alpha/shields/register: - post: + - ToolGroups + /v1/vector-dbs: + get: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterShieldRequest' - required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Shield' + $ref: '#/components/schemas/ListVectorDBsResponse' description: OK tags: - - Shields - /alpha/synthetic-data-generation/generate: + - VectorDBs post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -4928,80 +5403,89 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SyntheticDataGenerateRequest' + $ref: '#/components/schemas/RegisterVectorDbRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SyntheticDataGenerationResponse' + $ref: '#/components/schemas/VectorDB' description: OK tags: - - SyntheticDataGeneration (Coming Soon) - /alpha/telemetry/get-span-tree: - post: + - VectorDBs + /v1/vector-dbs/{vector_db_id}: + delete: parameters: - - in: query - name: span_id + - in: path + name: vector_db_id required: true schema: type: string - - in: query - name: max_depth - required: false - schema: - type: integer - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetSpanTreeRequest' - required: true responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/SpanWithChildren' description: OK tags: - - Telemetry - /alpha/telemetry/log-event: - post: + - VectorDBs + get: parameters: + - in: path + name: vector_db_id + required: true + schema: + type: string - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LogEventRequest' - required: true responses: '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/VectorDB' description: OK tags: - - Telemetry - /alpha/telemetry/query-spans: + - VectorDBs + /v1/vector-io/insert: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -5009,24 +5493,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/QuerySpansRequest' + $ref: '#/components/schemas/InsertChunksRequest' required: true responses: '200': - content: - application/jsonl: - schema: - $ref: '#/components/schemas/Span' description: OK tags: - - Telemetry - /alpha/telemetry/query-traces: + - VectorIO + /v1/vector-io/query: post: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string @@ -5034,38 +5521,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/QueryTracesRequest' + $ref: '#/components/schemas/QueryChunksRequest' required: true responses: '200': content: - application/jsonl: + application/json: schema: - $ref: '#/components/schemas/Trace' + $ref: '#/components/schemas/QueryChunksResponse' description: OK tags: - - Telemetry - /alpha/telemetry/save-spans-to-dataset: - post: + - VectorIO + /v1/version: + get: parameters: - description: JSON-encoded provider data which will be made available to the adapter servicing the API in: header - name: X-LlamaStack-ProviderData + name: X-LlamaStack-Provider-Data + required: false + schema: + type: string + - description: Version of the client making the request. This is used to ensure + that the client and server are compatible. + in: header + name: X-LlamaStack-Client-Version required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SaveSpansToDatasetRequest' - required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/VersionInfo' description: OK tags: - - Telemetry + - Inspect servers: - url: http://any-hosted-llama-stack.com tags: @@ -5082,6 +5574,11 @@ tags: - description: name: AgentStepResponse +- description: + name: AgentTool +- description: + name: AgentTurnInputType - description: 'Streamed agent execution response. @@ -5109,14 +5606,20 @@ tags: /> name: AgentTurnResponseTurnStartPayload - name: Agents +- description: + name: AggregationFunctionType - description: name: AppEvalTaskConfig - description: name: AppendRowsRequest -- description: - name: Attachment +- description: + name: ArrayType +- description: + name: BasicScoringFnParams - description: name: BatchChatCompletionRequest @@ -5133,11 +5636,16 @@ tags: - description: name: BenchmarkEvalTaskConfig +- description: + name: BooleanType - description: name: BuiltinTool - description: name: CancelTrainingJobRequest +- description: + name: ChatCompletionInputType - description: name: ChatCompletionRequest @@ -5166,9 +5674,9 @@ tags: ' name: Checkpoint -- description: - name: CodeInterpreterToolDefinition + name: CompletionInputType - description: name: CompletionMessage @@ -5186,6 +5694,8 @@ tags: ' name: CompletionResponseStreamChunk +- description: + name: ContentDelta - description: name: CreateAgentRequest @@ -5198,19 +5708,20 @@ tags: - description: name: DPOAlignmentConfig +- description: + name: DataConfig - description: name: Dataset +- description: + name: DatasetFormat - name: DatasetIO - name: Datasets -- description: - name: DeleteAgentsRequest -- description: - name: DeleteAgentsSessionRequest -- description: - name: DoraFinetuningConfig + name: EfficiencyConfig - description: name: EmbeddingsRequest @@ -5227,57 +5738,79 @@ tags: - description: name: EvaluateRowsRequest -- description: - name: FinetuningAlgorithm -- description: - name: FunctionCallToolDefinition -- description: - name: GetAgentsSessionRequest -- description: - name: GetSpanTreeRequest -- description: - name: GraphMemoryBank -- description: - name: GraphMemoryBankParams + name: GreedySamplingStrategy - description: name: HealthInfo -- description: - name: ImageMedia +- description: + name: ImageContentItem +- description: + name: ImageDelta - name: Inference - description: name: InferenceStep -- description: - name: InsertDocumentsRequest + name: InsertChunksRequest +- description: + name: InsertRequest - name: Inspect +- description: + name: InterleavedContent +- description: + name: InterleavedContentItem +- description: + name: InvokeToolRequest - description: name: Job -- description: - name: JobCancelRequest - description: name: JobStatus -- description: + name: JsonType +- description: - name: KeyValueMemoryBank -- description: - name: KeyValueMemoryBankParams -- description: - name: KeywordMemoryBank -- description: - name: KeywordMemoryBankParams -- description: - name: LLMAsJudgeScoringFnParams + name: ListModelsResponse +- description: + name: ListPostTrainingJobsResponse +- description: + name: ListProvidersResponse +- description: + name: ListRoutesResponse +- description: + name: ListScoringFunctionsResponse +- description: + name: ListShieldsResponse +- description: + name: ListToolGroupsResponse +- description: + name: ListToolsResponse +- description: + name: ListVectorDBsResponse - description: name: LogEventRequest @@ -5286,33 +5819,34 @@ tags: - description: name: LoraFinetuningConfig -- name: Memory -- description: - name: MemoryBankDocument -- name: MemoryBanks - description: name: MemoryRetrievalStep -- description: - name: MemoryToolDefinition +- description: + name: Message - description: name: MetricEvent - description: name: Model - description: name: ModelCandidate +- description: + name: ModelType - name: Models +- description: + name: NumberType +- description: + name: ObjectType - description: name: OptimizerConfig +- description: + name: OptimizerType - description: name: PaginatedRowsResult -- description: - name: PhotogenToolDefinition +- description: + name: ParamType - name: PostTraining (Coming Soon) - description: @@ -5323,14 +5857,6 @@ tags: ' name: PostTrainingJobArtifactsResponse -- description: 'Stream of logs from a finetuning job. - - - ' - name: PostTrainingJobLogStream -- description: - name: PostTrainingJobStatus - description: 'Status of a finetuning job. @@ -5342,28 +5868,40 @@ tags: name: PreferenceOptimizeRequest - description: name: ProviderInfo -- description: + name: QATFinetuningConfig +- description: - name: QLoraFinetuningConfig + name: QueryChunksRequest +- description: + name: QueryChunksResponse - description: name: QueryCondition - description: name: QueryConditionOp -- description: + name: QueryRequest +- description: - name: QueryDocumentsRequest -- description: - name: QueryDocumentsResponse -- description: - name: QuerySpansRequest -- description: + name: RAGDocument +- description: + name: RAGQueryConfig +- description: - name: QueryTracesRequest -- description: - name: RLHFAlgorithm + name: RAGQueryGeneratorConfig +- description: + name: RAGQueryResult - description: name: RegexParserScoringFnParams @@ -5373,9 +5911,6 @@ tags: - description: name: RegisterEvalTaskRequest -- description: - name: RegisterMemoryBankRequest - description: name: RegisterModelRequest @@ -5385,11 +5920,14 @@ tags: - description: name: RegisterShieldRequest -- description: - name: RestAPIExecutionConfig -- description: - name: RestAPIMethod + name: RegisterToolGroupRequest +- description: + name: RegisterVectorDbRequest +- description: + name: ResponseFormat - description: name: RouteInfo - description: @@ -5406,9 +5944,6 @@ tags: name: SafetyViolation - description: name: SamplingParams -- description: - name: SamplingStrategy - description: name: SaveSpansToDatasetRequest @@ -5428,9 +5963,6 @@ tags: - name: ScoringFunctions - description: name: ScoringResult -- description: - name: SearchToolDefinition - description: 'A single session of an interaction with an Agentic System. @@ -5453,11 +5985,12 @@ tags: name: SpanStartPayload - description: name: SpanStatus -- description: - name: SpanWithChildren +- description: + name: SpanWithStatus - description: name: StopReason +- description: + name: StringType - description: name: StructuredLogEvent @@ -5478,8 +6011,15 @@ tags: - description: name: SystemMessage - name: Telemetry +- description: + name: TextContentItem +- description: + name: TextDelta - description: name: TokenLogProbs +- description: + name: Tool - description: name: ToolCall - description: @@ -5489,14 +6029,26 @@ tags: name: ToolCallParseStatus - description: name: ToolChoice +- description: + name: ToolDef - description: name: ToolDefinition - description: name: ToolExecutionStep +- description: + name: ToolGroup +- name: ToolGroups +- description: + name: ToolHost +- description: + name: ToolInvocationResult - description: name: ToolParamDefinition +- description: + name: ToolParameter - description: "This Enum refers to the prompt format for calling custom / zero shot\ \ tools\n\n`json` --\n Refers to the json format for calling tools.\n The\ \ json format takes the form like\n {\n \"type\": \"function\",\n \ @@ -5513,6 +6065,13 @@ tags: - description: name: ToolResponseMessage +- name: ToolRuntime +- description: + name: TopKSamplingStrategy +- description: + name: TopPSamplingStrategy - description: name: Trace - description: @@ -5524,31 +6083,21 @@ tags: name: Turn - description: name: URL -- description: - name: UnregisterDatasetRequest -- description: - name: UnregisterMemoryBankRequest -- description: - name: UnregisterModelRequest +- description: + name: UnionType - description: name: UnstructuredLogEvent - description: name: UserMessage -- description: - name: VectorMemoryBank -- description: - name: VectorMemoryBankParams +- description: + name: VectorDB +- name: VectorDBs +- name: VectorIO +- description: + name: VersionInfo - description: name: ViolationLevel -- description: - name: WolframAlphaToolDefinition x-tagGroups: - name: Operations tags: @@ -5560,8 +6109,6 @@ x-tagGroups: - EvalTasks - Inference - Inspect - - Memory - - MemoryBanks - Models - PostTraining (Coming Soon) - Safety @@ -5570,6 +6117,10 @@ x-tagGroups: - Shields - SyntheticDataGeneration (Coming Soon) - Telemetry + - ToolGroups + - ToolRuntime + - VectorDBs + - VectorIO - name: Types tags: - AgentCandidate @@ -5577,6 +6128,8 @@ x-tagGroups: - AgentCreateResponse - AgentSessionCreateResponse - AgentStepResponse + - AgentTool + - AgentTurnInputType - AgentTurnResponseEvent - AgentTurnResponseStepCompletePayload - AgentTurnResponseStepProgressPayload @@ -5584,101 +6137,120 @@ x-tagGroups: - AgentTurnResponseStreamChunk - AgentTurnResponseTurnCompletePayload - AgentTurnResponseTurnStartPayload + - AggregationFunctionType - AppEvalTaskConfig - AppendRowsRequest - - Attachment + - ArrayType + - BasicScoringFnParams - BatchChatCompletionRequest - BatchChatCompletionResponse - BatchCompletionRequest - BatchCompletionResponse - BenchmarkEvalTaskConfig + - BooleanType - BuiltinTool - CancelTrainingJobRequest + - ChatCompletionInputType - ChatCompletionRequest - ChatCompletionResponse - ChatCompletionResponseEvent - ChatCompletionResponseEventType - ChatCompletionResponseStreamChunk - Checkpoint - - CodeInterpreterToolDefinition + - CompletionInputType - CompletionMessage - CompletionRequest - CompletionResponse - CompletionResponseStreamChunk + - ContentDelta - CreateAgentRequest - CreateAgentSessionRequest - CreateAgentTurnRequest - DPOAlignmentConfig + - DataConfig - Dataset - - DeleteAgentsRequest - - DeleteAgentsSessionRequest - - DoraFinetuningConfig + - DatasetFormat + - DefaultRAGQueryGeneratorConfig + - EfficiencyConfig - EmbeddingsRequest - EmbeddingsResponse - EvalTask - EvaluateResponse - EvaluateRowsRequest - - FinetuningAlgorithm - - FunctionCallToolDefinition - - GetAgentsSessionRequest - - GetSpanTreeRequest - - GraphMemoryBank - - GraphMemoryBankParams + - GreedySamplingStrategy - HealthInfo - - ImageMedia + - ImageContentItem + - ImageDelta - InferenceStep - - InsertDocumentsRequest + - InsertChunksRequest + - InsertRequest + - InterleavedContent + - InterleavedContentItem + - InvokeToolRequest - Job - - JobCancelRequest - JobStatus - - KeyValueMemoryBank - - KeyValueMemoryBankParams - - KeywordMemoryBank - - KeywordMemoryBankParams + - JsonType - LLMAsJudgeScoringFnParams + - LLMRAGQueryGeneratorConfig + - ListDatasetsResponse + - ListEvalTasksResponse + - ListModelsResponse + - ListPostTrainingJobsResponse + - ListProvidersResponse + - ListRoutesResponse + - ListScoringFunctionsResponse + - ListShieldsResponse + - ListToolGroupsResponse + - ListToolsResponse + - ListVectorDBsResponse - LogEventRequest - LogSeverity - LoraFinetuningConfig - - MemoryBankDocument - MemoryRetrievalStep - - MemoryToolDefinition + - Message - MetricEvent - Model - ModelCandidate + - ModelType + - NumberType + - ObjectType - OptimizerConfig + - OptimizerType - PaginatedRowsResult - - PhotogenToolDefinition + - ParamType - PostTrainingJob - PostTrainingJobArtifactsResponse - - PostTrainingJobLogStream - - PostTrainingJobStatus - PostTrainingJobStatusResponse - PreferenceOptimizeRequest - ProviderInfo - - QLoraFinetuningConfig + - QATFinetuningConfig + - QueryChunksRequest + - QueryChunksResponse - QueryCondition - QueryConditionOp - - QueryDocumentsRequest - - QueryDocumentsResponse - - QuerySpansRequest - - QueryTracesRequest - - RLHFAlgorithm + - QueryRequest + - QuerySpanTreeResponse + - QuerySpansResponse + - QueryTracesResponse + - RAGDocument + - RAGQueryConfig + - RAGQueryGeneratorConfig + - RAGQueryResult - RegexParserScoringFnParams - RegisterDatasetRequest - RegisterEvalTaskRequest - - RegisterMemoryBankRequest - RegisterModelRequest - RegisterScoringFunctionRequest - RegisterShieldRequest - - RestAPIExecutionConfig - - RestAPIMethod + - RegisterToolGroupRequest + - RegisterVectorDbRequest + - ResponseFormat - RouteInfo - RunEvalRequest - RunShieldRequest - RunShieldResponse - SafetyViolation - SamplingParams - - SamplingStrategy - SaveSpansToDatasetRequest - ScoreBatchRequest - ScoreBatchResponse @@ -5686,7 +6258,6 @@ x-tagGroups: - ScoreResponse - ScoringFn - ScoringResult - - SearchToolDefinition - Session - Shield - ShieldCallStep @@ -5694,34 +6265,42 @@ x-tagGroups: - SpanEndPayload - SpanStartPayload - SpanStatus - - SpanWithChildren + - SpanWithStatus - StopReason + - StringType - StructuredLogEvent - SupervisedFineTuneRequest - SyntheticDataGenerateRequest - SyntheticDataGenerationResponse - SystemMessage + - TextContentItem + - TextDelta - TokenLogProbs + - Tool - ToolCall - ToolCallDelta - ToolCallParseStatus - ToolChoice + - ToolDef - ToolDefinition - ToolExecutionStep + - ToolGroup + - ToolHost + - ToolInvocationResult - ToolParamDefinition + - ToolParameter - ToolPromptFormat - ToolResponse - ToolResponseMessage + - TopKSamplingStrategy + - TopPSamplingStrategy - Trace - TrainingConfig - Turn - URL - - UnregisterDatasetRequest - - UnregisterMemoryBankRequest - - UnregisterModelRequest + - UnionType - UnstructuredLogEvent - UserMessage - - VectorMemoryBank - - VectorMemoryBankParams + - VectorDB + - VersionInfo - ViolationLevel - - WolframAlphaToolDefinition