1. Add README, LICENSE (MIT), .gitignore, Makefile, CHANGELOG 2. Add Version constant and User-Agent header to all requests 3. Rename SetStream to EnableStream (narrower API surface) 4. Fix FinishReason in CompletionStreamChoice to use typed *FinishReason 5. Type conversation entry Content as chat.Content instead of json.RawMessage 6. Graceful unknown type handling — UnknownEntry, UnknownEvent, UnknownChunk, UnknownMessage, UnknownAgentTool all return data instead of erroring on unrecognized discriminator values 7. Type agent tools with AgentTool sealed interface + UnmarshalAgentTool 8. Add pagination params to ListConversations and ListLibraries 9. Move openapi.yaml to docs/openapi.yaml
9507 lines
298 KiB
YAML
9507 lines
298 KiB
YAML
openapi: 3.1.0
|
||
info:
|
||
title: Mistral AI API
|
||
version: 1.0.0
|
||
description: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
|
||
paths:
|
||
/v1/models:
|
||
get:
|
||
summary: List Models
|
||
description: List all models available to the user.
|
||
operationId: list_models_v1_models_get
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModelList'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
- id: <model_id>
|
||
capabilities:
|
||
completion_chat: true
|
||
completion_fim: false
|
||
function_calling: false
|
||
fine_tuning: false
|
||
vision: false
|
||
classification: false
|
||
job: <job_id>
|
||
root: open-mistral-7b
|
||
object: model
|
||
created: 1756746619
|
||
owned_by: <owner_id>
|
||
name: null
|
||
description: null
|
||
max_context_length: 32768
|
||
aliases: []
|
||
deprecation: null
|
||
deprecation_replacement_model: null
|
||
default_model_temperature: null
|
||
TYPE: fine-tuned
|
||
archived: false
|
||
tags:
|
||
- models
|
||
/v1/models/{model_id}:
|
||
get:
|
||
summary: Retrieve Model
|
||
description: Retrieve information about a model.
|
||
operationId: retrieve_model_v1_models__model_id__get
|
||
parameters:
|
||
- name: model_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Model Id
|
||
example: ft:open-mistral-7b:587a6b29:20240514:7e773925
|
||
description: The ID of the model to retrieve.
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/BaseModelCard'
|
||
- $ref: '#/components/schemas/FTModelCard'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
base: '#/components/schemas/BaseModelCard'
|
||
fine-tuned: '#/components/schemas/FTModelCard'
|
||
title: Response Retrieve Model V1 Models Model Id Get
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: <your_model_id>
|
||
capabilities:
|
||
completion_chat: true
|
||
completion_fim: false
|
||
function_calling: false
|
||
fine_tuning: false
|
||
vision: false
|
||
classification: false
|
||
job: <job_id>
|
||
root: open-mistral-7b
|
||
object: model
|
||
created: 1756746619
|
||
owned_by: <owner_id>
|
||
name: null
|
||
description: null
|
||
max_context_length: 32768
|
||
aliases: []
|
||
deprecation: null
|
||
deprecation_replacement_model: null
|
||
default_model_temperature: null
|
||
TYPE: fine-tuned
|
||
archived: false
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- models
|
||
delete:
|
||
summary: Delete Model
|
||
description: Delete a fine-tuned model.
|
||
operationId: delete_model_v1_models__model_id__delete
|
||
parameters:
|
||
- name: model_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Model Id
|
||
example: ft:open-mistral-7b:587a6b29:20240514:7e773925
|
||
description: The ID of the model to delete.
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/DeleteModelOut'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: ft:open-mistral-7b:587a6b29:20240514:7e773925
|
||
object: model
|
||
deleted: true
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- models
|
||
/v1/conversations:
|
||
post:
|
||
summary: Create a conversation and append entries to it.
|
||
description: Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation.
|
||
operationId: agents_api_v1_conversations_start
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationRequest'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationResponse'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
get:
|
||
summary: List all created conversations.
|
||
description: Retrieve a list of conversation entities sorted by creation time.
|
||
operationId: agents_api_v1_conversations_list
|
||
parameters:
|
||
- name: page
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
default: 0
|
||
title: Page
|
||
- name: page_size
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
default: 100
|
||
title: Page Size
|
||
- name: metadata
|
||
in: query
|
||
required: false
|
||
content:
|
||
application/json:
|
||
schema:
|
||
anyOf:
|
||
- type: object
|
||
additionalProperties: true
|
||
- type: 'null'
|
||
title: Metadata
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ModelConversation'
|
||
- $ref: '#/components/schemas/AgentConversation'
|
||
title: Response V1 Conversations List
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
/v1/conversations/{conversation_id}:
|
||
get:
|
||
summary: Retrieve a conversation information.
|
||
description: Given a conversation_id retrieve a conversation entity with its attributes.
|
||
operationId: agents_api_v1_conversations_get
|
||
parameters:
|
||
- name: conversation_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: ID of the conversation from which we are fetching metadata.
|
||
title: Conversation Id
|
||
description: ID of the conversation from which we are fetching metadata.
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ModelConversation'
|
||
- $ref: '#/components/schemas/AgentConversation'
|
||
title: Response V1 Conversations Get
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
delete:
|
||
summary: Delete a conversation.
|
||
description: Delete a conversation given a conversation_id.
|
||
operationId: agents_api_v1_conversations_delete
|
||
parameters:
|
||
- name: conversation_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: ID of the conversation from which we are fetching metadata.
|
||
title: Conversation Id
|
||
description: ID of the conversation from which we are fetching metadata.
|
||
responses:
|
||
'204':
|
||
description: Successful Response
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
post:
|
||
summary: Append new entries to an existing conversation.
|
||
description: Run completion on the history of the conversation and the user entries. Return the new created entries.
|
||
operationId: agents_api_v1_conversations_append
|
||
parameters:
|
||
- name: conversation_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: ID of the conversation to which we append entries.
|
||
title: Conversation Id
|
||
description: ID of the conversation to which we append entries.
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationAppendRequest'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationResponse'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
/v1/conversations/{conversation_id}/history:
|
||
get:
|
||
summary: Retrieve all entries in a conversation.
|
||
description: Given a conversation_id retrieve all the entries belonging to that conversation. The entries are sorted in the order they were appended, those can be messages, connectors or function_call.
|
||
operationId: agents_api_v1_conversations_history
|
||
parameters:
|
||
- name: conversation_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: ID of the conversation from which we are fetching entries.
|
||
title: Conversation Id
|
||
description: ID of the conversation from which we are fetching entries.
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationHistory'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
/v1/conversations/{conversation_id}/messages:
|
||
get:
|
||
summary: Retrieve all messages in a conversation.
|
||
description: Given a conversation_id retrieve all the messages belonging to that conversation. This is similar to retrieving all entries except we filter the messages only.
|
||
operationId: agents_api_v1_conversations_messages
|
||
parameters:
|
||
- name: conversation_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: ID of the conversation from which we are fetching messages.
|
||
title: Conversation Id
|
||
description: ID of the conversation from which we are fetching messages.
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationMessages'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
/v1/conversations/{conversation_id}/restart:
|
||
post:
|
||
summary: Restart a conversation starting from a given entry.
|
||
description: Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.
|
||
operationId: agents_api_v1_conversations_restart
|
||
parameters:
|
||
- name: conversation_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: ID of the original conversation which is being restarted.
|
||
title: Conversation Id
|
||
description: ID of the original conversation which is being restarted.
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationRestartRequest'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationResponse'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
/v1/agents:
|
||
post:
|
||
summary: Create a agent that can be used within a conversation.
|
||
description: Create a new agent giving it instructions, tools, description. The agent is then available to be used as a regular assistant in a conversation or as part of an agent pool from which it can be used.
|
||
operationId: agents_api_v1_agents_create
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/AgentCreationRequest'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/Agent'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
get:
|
||
summary: List agent entities.
|
||
description: Retrieve a list of agent entities sorted by creation time.
|
||
operationId: agents_api_v1_agents_list
|
||
parameters:
|
||
- name: page
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
minimum: 0
|
||
description: Page number (0-indexed)
|
||
default: 0
|
||
title: Page
|
||
description: Page number (0-indexed)
|
||
- name: page_size
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
maximum: 1000
|
||
minimum: 1
|
||
description: Number of agents per page
|
||
default: 20
|
||
title: Page Size
|
||
description: Number of agents per page
|
||
- name: deployment_chat
|
||
in: query
|
||
required: false
|
||
schema:
|
||
anyOf:
|
||
- type: boolean
|
||
- type: 'null'
|
||
title: Deployment Chat
|
||
- name: sources
|
||
in: query
|
||
required: false
|
||
schema:
|
||
anyOf:
|
||
- type: array
|
||
items:
|
||
$ref: '#/components/schemas/RequestSource'
|
||
- type: 'null'
|
||
title: Sources
|
||
- name: name
|
||
in: query
|
||
required: false
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
description: Filter by agent name
|
||
title: Name
|
||
description: Filter by agent name
|
||
- name: search
|
||
in: query
|
||
required: false
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
description: Search agents by name or ID
|
||
title: Search
|
||
description: Search agents by name or ID
|
||
- name: id
|
||
in: query
|
||
required: false
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Id
|
||
- name: metadata
|
||
in: query
|
||
required: false
|
||
content:
|
||
application/json:
|
||
schema:
|
||
anyOf:
|
||
- type: object
|
||
additionalProperties: true
|
||
- type: 'null'
|
||
title: Metadata
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Agent'
|
||
title: Response V1 Agents List
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
/v1/agents/{agent_id}:
|
||
get:
|
||
summary: Retrieve an agent entity.
|
||
description: Given an agent, retrieve an agent entity with its attributes. The agent_version parameter can be an integer version number or a string alias.
|
||
operationId: agents_api_v1_agents_get
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
- name: agent_version
|
||
in: query
|
||
required: false
|
||
schema:
|
||
anyOf:
|
||
- type: integer
|
||
- type: string
|
||
- type: 'null'
|
||
title: Agent Version
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/Agent'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
patch:
|
||
summary: Update an agent entity.
|
||
description: Update an agent attributes and create a new version.
|
||
operationId: agents_api_v1_agents_update
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/AgentUpdateRequest'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/Agent'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
delete:
|
||
summary: Delete an agent entity.
|
||
operationId: agents_api_v1_agents_delete
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
responses:
|
||
'204':
|
||
description: Successful Response
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
/v1/agents/{agent_id}/version:
|
||
patch:
|
||
summary: Update an agent version.
|
||
description: Switch the version of an agent.
|
||
operationId: agents_api_v1_agents_update_version
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
- name: version
|
||
in: query
|
||
required: true
|
||
schema:
|
||
type: integer
|
||
title: Version
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/Agent'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
/v1/agents/{agent_id}/versions:
|
||
get:
|
||
summary: List all versions of an agent.
|
||
description: Retrieve all versions for a specific agent with full agent context. Supports pagination.
|
||
operationId: agents_api_v1_agents_list_versions
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
- name: page
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
minimum: 0
|
||
description: Page number (0-indexed)
|
||
default: 0
|
||
title: Page
|
||
description: Page number (0-indexed)
|
||
- name: page_size
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
maximum: 100
|
||
minimum: 1
|
||
description: Number of versions per page
|
||
default: 20
|
||
title: Page Size
|
||
description: Number of versions per page
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/Agent'
|
||
title: Response V1 Agents List Versions
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
/v1/agents/{agent_id}/versions/{version}:
|
||
get:
|
||
summary: Retrieve a specific version of an agent.
|
||
description: Get a specific agent version by version number.
|
||
operationId: agents_api_v1_agents_get_version
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
- name: version
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Version
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/Agent'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
/v1/agents/{agent_id}/aliases:
|
||
put:
|
||
summary: Create or update an agent version alias.
|
||
description: Create a new alias or update an existing alias to point to a specific version. Aliases are unique per agent and can be reassigned to different versions.
|
||
operationId: agents_api_v1_agents_create_or_update_alias
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
- name: alias
|
||
in: query
|
||
required: true
|
||
schema:
|
||
type: string
|
||
minLength: 1
|
||
maxLength: 64
|
||
pattern: ^[a-z]([a-z0-9_-]*[a-z0-9])?$
|
||
title: Alias
|
||
- name: version
|
||
in: query
|
||
required: true
|
||
schema:
|
||
type: integer
|
||
title: Version
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/AgentAliasResponse'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
get:
|
||
summary: List all aliases for an agent.
|
||
description: Retrieve all version aliases for a specific agent.
|
||
operationId: agents_api_v1_agents_list_version_aliases
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/AgentAliasResponse'
|
||
title: Response V1 Agents List Version Aliases
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
delete:
|
||
summary: Delete an agent version alias.
|
||
description: Delete an existing alias for an agent.
|
||
operationId: agents_api_v1_agents_delete_alias
|
||
parameters:
|
||
- name: agent_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
title: Agent Id
|
||
- name: alias
|
||
in: query
|
||
required: true
|
||
schema:
|
||
type: string
|
||
minLength: 1
|
||
maxLength: 64
|
||
pattern: ^[a-z]([a-z0-9_-]*[a-z0-9])?$
|
||
title: Alias
|
||
responses:
|
||
'204':
|
||
description: Successful Response
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.agents
|
||
/v1/conversations#stream:
|
||
post:
|
||
summary: Create a conversation and append entries to it.
|
||
description: Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation.
|
||
operationId: agents_api_v1_conversations_start_stream
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationStreamRequest'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
text/event-stream:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationEvents'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
/v1/conversations/{conversation_id}#stream:
|
||
post:
|
||
summary: Append new entries to an existing conversation.
|
||
description: Run completion on the history of the conversation and the user entries. Return the new created entries.
|
||
operationId: agents_api_v1_conversations_append_stream
|
||
parameters:
|
||
- name: conversation_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: ID of the conversation to which we append entries.
|
||
title: Conversation Id
|
||
description: ID of the conversation to which we append entries.
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationAppendStreamRequest'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
text/event-stream:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationEvents'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
/v1/conversations/{conversation_id}/restart#stream:
|
||
post:
|
||
summary: Restart a conversation starting from a given entry.
|
||
description: Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.
|
||
operationId: agents_api_v1_conversations_restart_stream
|
||
parameters:
|
||
- name: conversation_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: ID of the original conversation which is being restarted.
|
||
title: Conversation Id
|
||
description: ID of the original conversation which is being restarted.
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationRestartStreamRequest'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
text/event-stream:
|
||
schema:
|
||
$ref: '#/components/schemas/ConversationEvents'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.conversations
|
||
/v1/files:
|
||
post:
|
||
operationId: files_api_routes_upload_file
|
||
summary: Upload File
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/UploadFileOut'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: e85980c9-409e-4a46-9304-36588f6292b0
|
||
object: file
|
||
bytes: null
|
||
created_at: 1759500189
|
||
filename: example.file.jsonl
|
||
purpose: fine-tune
|
||
sample_type: instruct
|
||
source: upload
|
||
num_lines: 2
|
||
mimetype: application/jsonl
|
||
signature: d4821d2de1917341
|
||
description: 'Upload a file that can be used across various endpoints.
|
||
|
||
|
||
The size of individual files can be a maximum of 512 MB. The Fine-tuning API only supports .jsonl files.
|
||
|
||
|
||
Please contact us if you need to increase these storage limits.'
|
||
requestBody:
|
||
content:
|
||
multipart/form-data:
|
||
schema:
|
||
title: MultiPartBodyParams
|
||
type: object
|
||
properties:
|
||
purpose:
|
||
$ref: '#/components/schemas/FilePurpose'
|
||
file:
|
||
$ref: '#/components/schemas/File'
|
||
required:
|
||
- file
|
||
required: true
|
||
tags:
|
||
- files
|
||
get:
|
||
operationId: files_api_routes_list_files
|
||
summary: List Files
|
||
parameters:
|
||
- in: query
|
||
name: page
|
||
schema:
|
||
default: 0
|
||
title: Page
|
||
type: integer
|
||
required: false
|
||
- in: query
|
||
name: page_size
|
||
schema:
|
||
default: 100
|
||
title: Page Size
|
||
type: integer
|
||
required: false
|
||
- in: query
|
||
name: include_total
|
||
schema:
|
||
default: true
|
||
title: Include Total
|
||
type: boolean
|
||
required: false
|
||
- in: query
|
||
name: sample_type
|
||
schema:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/SampleType'
|
||
type: array
|
||
- type: 'null'
|
||
title: Sample Type
|
||
required: false
|
||
- in: query
|
||
name: source
|
||
schema:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/Source'
|
||
type: array
|
||
- type: 'null'
|
||
title: Source
|
||
required: false
|
||
- in: query
|
||
name: search
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Search
|
||
required: false
|
||
- in: query
|
||
name: purpose
|
||
schema:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/FilePurpose'
|
||
- type: 'null'
|
||
required: false
|
||
- in: query
|
||
name: mimetypes
|
||
schema:
|
||
anyOf:
|
||
- items:
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
title: Mimetypes
|
||
required: false
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ListFilesOut'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
data:
|
||
- id: <your_file_id>
|
||
object: file
|
||
bytes: null
|
||
created_at: 1759491994
|
||
filename: <your_file_name>
|
||
purpose: batch
|
||
sample_type: batch_result
|
||
source: mistral
|
||
num_lines: 2
|
||
mimetype: application/jsonl
|
||
signature: null
|
||
- id: <your_file_id>
|
||
object: file
|
||
bytes: null
|
||
created_at: 1759491994
|
||
filename: <your_file_name>
|
||
purpose: batch
|
||
sample_type: batch_result
|
||
source: mistral
|
||
num_lines: 2
|
||
mimetype: application/jsonl
|
||
signature: null
|
||
object: list
|
||
total: 2
|
||
description: Returns a list of files that belong to the user's organization.
|
||
tags:
|
||
- files
|
||
/v1/files/{file_id}:
|
||
get:
|
||
operationId: files_api_routes_retrieve_file
|
||
summary: Retrieve File
|
||
parameters:
|
||
- in: path
|
||
name: file_id
|
||
schema:
|
||
format: uuid
|
||
title: File Id
|
||
type: string
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/RetrieveFileOut'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: e85980c9-409e-4a46-9304-36588f6292b0
|
||
object: file
|
||
bytes: null
|
||
created_at: 1759500189
|
||
filename: example.file.jsonl
|
||
purpose: fine-tune
|
||
sample_type: instruct
|
||
source: upload
|
||
deleted: false
|
||
num_lines: 2
|
||
mimetype: application/jsonl
|
||
signature: d4821d2de1917341
|
||
description: Returns information about a specific file.
|
||
tags:
|
||
- files
|
||
delete:
|
||
operationId: files_api_routes_delete_file
|
||
summary: Delete File
|
||
parameters:
|
||
- in: path
|
||
name: file_id
|
||
schema:
|
||
format: uuid
|
||
title: File Id
|
||
type: string
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/DeleteFileOut'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: e85980c9-409e-4a46-9304-36588f6292b0
|
||
object: file
|
||
deleted: true
|
||
description: Delete a file.
|
||
tags:
|
||
- files
|
||
/v1/files/{file_id}/content:
|
||
get:
|
||
operationId: files_api_routes_download_file
|
||
summary: Download File
|
||
parameters:
|
||
- in: path
|
||
name: file_id
|
||
schema:
|
||
format: uuid
|
||
title: File Id
|
||
type: string
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/octet-stream:
|
||
schema:
|
||
type: string
|
||
format: binary
|
||
description: Download a file
|
||
tags:
|
||
- files
|
||
/v1/files/{file_id}/url:
|
||
get:
|
||
operationId: files_api_routes_get_signed_url
|
||
summary: Get Signed Url
|
||
parameters:
|
||
- in: path
|
||
name: file_id
|
||
schema:
|
||
format: uuid
|
||
title: File Id
|
||
type: string
|
||
required: true
|
||
- in: query
|
||
name: expiry
|
||
schema:
|
||
default: 24
|
||
description: Number of hours before the url becomes invalid. Defaults to 24h
|
||
title: Expiry
|
||
type: integer
|
||
required: false
|
||
description: Number of hours before the url becomes invalid. Defaults to 24h
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/FileSignedURL'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
url: https://mistralaifilesapiprodswe.blob.core.windows.net/fine-tune/.../.../e85980c9409e4a46930436588f6292b0.jsonl?se=2025-10-04T14%3A16%3A17Z&sp=r&sv=2025-01-05&sr=b&sig=...
|
||
tags:
|
||
- files
|
||
/v1/fine_tuning/jobs:
|
||
get:
|
||
operationId: jobs_api_routes_fine_tuning_get_fine_tuning_jobs
|
||
summary: Get Fine Tuning Jobs
|
||
parameters:
|
||
- in: query
|
||
name: page
|
||
schema:
|
||
default: 0
|
||
title: Page
|
||
type: integer
|
||
required: false
|
||
description: The page number of the results to be returned.
|
||
- in: query
|
||
name: page_size
|
||
schema:
|
||
default: 100
|
||
title: Page Size
|
||
type: integer
|
||
required: false
|
||
description: The number of items to return per page.
|
||
- in: query
|
||
name: model
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
required: false
|
||
description: The model name used for fine-tuning to filter on. When set, the other results are not displayed.
|
||
- in: query
|
||
name: created_after
|
||
schema:
|
||
anyOf:
|
||
- format: date-time
|
||
type: string
|
||
- type: 'null'
|
||
title: Created After
|
||
required: false
|
||
description: The date/time to filter on. When set, the results for previous creation times are not displayed.
|
||
- in: query
|
||
name: created_before
|
||
schema:
|
||
anyOf:
|
||
- format: date-time
|
||
type: string
|
||
- type: 'null'
|
||
title: Created Before
|
||
required: false
|
||
- in: query
|
||
name: created_by_me
|
||
schema:
|
||
default: false
|
||
title: Created By Me
|
||
type: boolean
|
||
required: false
|
||
description: When set, only return results for jobs created by the API caller. Other results are not displayed.
|
||
- in: query
|
||
name: status
|
||
schema:
|
||
anyOf:
|
||
- enum:
|
||
- QUEUED
|
||
- STARTED
|
||
- VALIDATING
|
||
- VALIDATED
|
||
- RUNNING
|
||
- FAILED_VALIDATION
|
||
- FAILED
|
||
- SUCCESS
|
||
- CANCELLED
|
||
- CANCELLATION_REQUESTED
|
||
type: string
|
||
- type: 'null'
|
||
title: Status
|
||
required: false
|
||
description: The current job state to filter on. When set, the other results are not displayed.
|
||
- in: query
|
||
name: wandb_project
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Wandb Project
|
||
required: false
|
||
description: The Weights and Biases project to filter on. When set, the other results are not displayed.
|
||
- in: query
|
||
name: wandb_name
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Wandb Name
|
||
required: false
|
||
description: The Weight and Biases run name to filter on. When set, the other results are not displayed.
|
||
- in: query
|
||
name: suffix
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Suffix
|
||
required: false
|
||
description: The model suffix to filter on. When set, the other results are not displayed.
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/JobsOut'
|
||
description: Get a list of fine-tuning jobs for your organization and user.
|
||
tags:
|
||
- deprecated.fine-tuning
|
||
post:
|
||
operationId: jobs_api_routes_fine_tuning_create_fine_tuning_job
|
||
summary: Create Fine Tuning Job
|
||
parameters:
|
||
- in: query
|
||
name: dry_run
|
||
schema:
|
||
anyOf:
|
||
- type: boolean
|
||
- type: 'null'
|
||
title: Dry Run
|
||
required: false
|
||
description: "* If `true` the job is not spawned, instead the query returns a handful of useful metadata\n for the user to perform sanity checks (see `LegacyJobMetadataOut` response).\n* Otherwise, the job is started and the query returns the job ID along with some of the\n input parameters (see `JobOut` response).\n"
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
anyOf:
|
||
- discriminator:
|
||
mapping:
|
||
classifier: '#/components/schemas/ClassifierJobOut'
|
||
completion: '#/components/schemas/CompletionJobOut'
|
||
propertyName: job_type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/CompletionJobOut'
|
||
- $ref: '#/components/schemas/ClassifierJobOut'
|
||
- $ref: '#/components/schemas/LegacyJobMetadataOut'
|
||
title: Response
|
||
description: Create a new fine-tuning job, it will be queued for processing.
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/JobIn'
|
||
required: true
|
||
tags:
|
||
- deprecated.fine-tuning
|
||
/v1/fine_tuning/jobs/{job_id}:
|
||
get:
|
||
operationId: jobs_api_routes_fine_tuning_get_fine_tuning_job
|
||
summary: Get Fine Tuning Job
|
||
parameters:
|
||
- in: path
|
||
name: job_id
|
||
schema:
|
||
format: uuid
|
||
title: Job Id
|
||
type: string
|
||
required: true
|
||
description: The ID of the job to analyse.
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
discriminator:
|
||
mapping:
|
||
classifier: '#/components/schemas/ClassifierDetailedJobOut'
|
||
completion: '#/components/schemas/CompletionDetailedJobOut'
|
||
propertyName: job_type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/CompletionDetailedJobOut'
|
||
- $ref: '#/components/schemas/ClassifierDetailedJobOut'
|
||
title: Response
|
||
description: Get a fine-tuned job details by its UUID.
|
||
tags:
|
||
- deprecated.fine-tuning
|
||
/v1/fine_tuning/jobs/{job_id}/cancel:
|
||
post:
|
||
operationId: jobs_api_routes_fine_tuning_cancel_fine_tuning_job
|
||
summary: Cancel Fine Tuning Job
|
||
parameters:
|
||
- in: path
|
||
name: job_id
|
||
schema:
|
||
format: uuid
|
||
title: Job Id
|
||
type: string
|
||
required: true
|
||
description: The ID of the job to cancel.
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
discriminator:
|
||
mapping:
|
||
classifier: '#/components/schemas/ClassifierDetailedJobOut'
|
||
completion: '#/components/schemas/CompletionDetailedJobOut'
|
||
propertyName: job_type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/CompletionDetailedJobOut'
|
||
- $ref: '#/components/schemas/ClassifierDetailedJobOut'
|
||
title: Response
|
||
description: Request the cancellation of a fine tuning job.
|
||
tags:
|
||
- deprecated.fine-tuning
|
||
/v1/fine_tuning/jobs/{job_id}/start:
|
||
post:
|
||
operationId: jobs_api_routes_fine_tuning_start_fine_tuning_job
|
||
summary: Start Fine Tuning Job
|
||
parameters:
|
||
- in: path
|
||
name: job_id
|
||
schema:
|
||
format: uuid
|
||
title: Job Id
|
||
type: string
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
discriminator:
|
||
mapping:
|
||
classifier: '#/components/schemas/ClassifierDetailedJobOut'
|
||
completion: '#/components/schemas/CompletionDetailedJobOut'
|
||
propertyName: job_type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/CompletionDetailedJobOut'
|
||
- $ref: '#/components/schemas/ClassifierDetailedJobOut'
|
||
title: Response
|
||
description: Request the start of a validated fine tuning job.
|
||
tags:
|
||
- deprecated.fine-tuning
|
||
/v1/fine_tuning/models/{model_id}:
|
||
patch:
|
||
operationId: jobs_api_routes_fine_tuning_update_fine_tuned_model
|
||
summary: Update Fine Tuned Model
|
||
parameters:
|
||
- in: path
|
||
name: model_id
|
||
schema:
|
||
title: Model Id
|
||
type: string
|
||
required: true
|
||
example: ft:open-mistral-7b:587a6b29:20240514:7e773925
|
||
description: The ID of the model to update.
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
discriminator:
|
||
mapping:
|
||
classifier: '#/components/schemas/ClassifierFTModelOut'
|
||
completion: '#/components/schemas/CompletionFTModelOut'
|
||
propertyName: model_type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/CompletionFTModelOut'
|
||
- $ref: '#/components/schemas/ClassifierFTModelOut'
|
||
title: Response
|
||
description: Update a model name or description.
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/UpdateFTModelIn'
|
||
required: true
|
||
tags:
|
||
- models
|
||
/v1/fine_tuning/models/{model_id}/archive:
|
||
post:
|
||
operationId: jobs_api_routes_fine_tuning_archive_fine_tuned_model
|
||
summary: Archive Fine Tuned Model
|
||
parameters:
|
||
- in: path
|
||
name: model_id
|
||
schema:
|
||
title: Model Id
|
||
type: string
|
||
required: true
|
||
example: ft:open-mistral-7b:587a6b29:20240514:7e773925
|
||
description: The ID of the model to archive.
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ArchiveFTModelOut'
|
||
description: Archive a fine-tuned model.
|
||
tags:
|
||
- models
|
||
delete:
|
||
operationId: jobs_api_routes_fine_tuning_unarchive_fine_tuned_model
|
||
summary: Unarchive Fine Tuned Model
|
||
parameters:
|
||
- in: path
|
||
name: model_id
|
||
schema:
|
||
title: Model Id
|
||
type: string
|
||
required: true
|
||
example: ft:open-mistral-7b:587a6b29:20240514:7e773925
|
||
description: The ID of the model to unarchive.
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/UnarchiveFTModelOut'
|
||
description: Un-archive a fine-tuned model.
|
||
tags:
|
||
- models
|
||
/v1/batch/jobs:
|
||
get:
|
||
operationId: jobs_api_routes_batch_get_batch_jobs
|
||
summary: Get Batch Jobs
|
||
parameters:
|
||
- in: query
|
||
name: page
|
||
schema:
|
||
default: 0
|
||
title: Page
|
||
type: integer
|
||
required: false
|
||
- in: query
|
||
name: page_size
|
||
schema:
|
||
default: 100
|
||
title: Page Size
|
||
type: integer
|
||
required: false
|
||
- in: query
|
||
name: model
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
required: false
|
||
- in: query
|
||
name: agent_id
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Agent Id
|
||
required: false
|
||
- in: query
|
||
name: metadata
|
||
schema:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Metadata
|
||
required: false
|
||
- in: query
|
||
name: created_after
|
||
schema:
|
||
anyOf:
|
||
- format: date-time
|
||
type: string
|
||
- type: 'null'
|
||
title: Created After
|
||
required: false
|
||
- in: query
|
||
name: created_by_me
|
||
schema:
|
||
default: false
|
||
title: Created By Me
|
||
type: boolean
|
||
required: false
|
||
- in: query
|
||
name: status
|
||
schema:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/BatchJobStatus'
|
||
type: array
|
||
- type: 'null'
|
||
title: Status
|
||
required: false
|
||
- in: query
|
||
name: order_by
|
||
schema:
|
||
default: -created
|
||
enum:
|
||
- created
|
||
- -created
|
||
title: Order By
|
||
type: string
|
||
required: false
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/BatchJobsOut'
|
||
description: Get a list of batch jobs for your organization and user.
|
||
tags:
|
||
- batch
|
||
post:
|
||
operationId: jobs_api_routes_batch_create_batch_job
|
||
summary: Create Batch Job
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/BatchJobOut'
|
||
description: Create a new batch job, it will be queued for processing.
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/BatchJobIn'
|
||
required: true
|
||
tags:
|
||
- batch
|
||
/v1/batch/jobs/{job_id}:
|
||
get:
|
||
operationId: jobs_api_routes_batch_get_batch_job
|
||
summary: Get Batch Job
|
||
parameters:
|
||
- in: path
|
||
name: job_id
|
||
schema:
|
||
format: uuid
|
||
title: Job Id
|
||
type: string
|
||
required: true
|
||
- in: query
|
||
name: inline
|
||
schema:
|
||
anyOf:
|
||
- type: boolean
|
||
- type: 'null'
|
||
title: Inline
|
||
required: false
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/BatchJobOut'
|
||
description: "Get a batch job details by its UUID.\n\nArgs:\n inline: If True, return results inline in the response."
|
||
tags:
|
||
- batch
|
||
/v1/batch/jobs/{job_id}/cancel:
|
||
post:
|
||
operationId: jobs_api_routes_batch_cancel_batch_job
|
||
summary: Cancel Batch Job
|
||
parameters:
|
||
- in: path
|
||
name: job_id
|
||
schema:
|
||
format: uuid
|
||
title: Job Id
|
||
type: string
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/BatchJobOut'
|
||
description: Request the cancellation of a batch job.
|
||
tags:
|
||
- batch
|
||
/v1/chat/completions:
|
||
post:
|
||
summary: Chat Completion
|
||
operationId: chat_completion_v1_chat_completions_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ChatCompletionRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ChatCompletionResponse'
|
||
text/event-stream:
|
||
schema:
|
||
$ref: '#/components/schemas/CompletionEvent'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- chat
|
||
/v1/fim/completions:
|
||
post:
|
||
summary: Fim Completion
|
||
operationId: fim_completion_v1_fim_completions_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/FIMCompletionRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/FIMCompletionResponse'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: 447e3e0d457e42e98248b5d2ef52a2a3
|
||
object: chat.completion
|
||
model: codestral-2508
|
||
usage:
|
||
prompt_tokens: 8
|
||
completion_tokens: 91
|
||
total_tokens: 99
|
||
created: 1759496862
|
||
choices:
|
||
- index: 0
|
||
message:
|
||
content: "add_numbers(a: int, b: int) -> int:\n \"\"\"\n You are given two integers `a` and `b`. Your task is to write a function that\n returns the sum of these two integers. The function should be implemented in a\n way that it can handle very large integers (up to 10^18). As a reminder, your\n code has to be in python\n \"\"\"\n"
|
||
tool_calls: null
|
||
prefix: false
|
||
role: assistant
|
||
finish_reason: stop
|
||
text/event-stream:
|
||
schema:
|
||
$ref: '#/components/schemas/CompletionEvent'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
description: FIM completion.
|
||
tags:
|
||
- fim
|
||
/v1/agents/completions:
|
||
post:
|
||
summary: Agents Completion
|
||
operationId: agents_completion_v1_agents_completions_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/AgentsCompletionRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ChatCompletionResponse'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: cf79f7daaee244b1a0ae5c7b1444424a
|
||
object: chat.completion
|
||
model: mistral-medium-latest
|
||
usage:
|
||
prompt_tokens: 24
|
||
completion_tokens: 27
|
||
total_tokens: 51
|
||
prompt_audio_seconds: {}
|
||
created: 1759500534
|
||
choices:
|
||
- index: 0
|
||
message:
|
||
content: Arrr, the scallywag Claude Monet be the finest French painter to ever splash colors on a canvas, savvy?
|
||
tool_calls: null
|
||
prefix: false
|
||
role: assistant
|
||
finish_reason: stop
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- agents
|
||
/v1/embeddings:
|
||
post:
|
||
summary: Embeddings
|
||
description: Embeddings
|
||
operationId: embeddings_v1_embeddings_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/EmbeddingRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/EmbeddingResponse'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
data:
|
||
- embedding:
|
||
- -0.016632080078125
|
||
- 0.0701904296875
|
||
- 0.03143310546875
|
||
- 0.01309967041015625
|
||
- 0.0202789306640625
|
||
index: 0
|
||
object: embedding
|
||
- embedding:
|
||
- -0.0230560302734375
|
||
- 0.039337158203125
|
||
- 0.0521240234375
|
||
- -0.0184783935546875
|
||
- 0.034271240234375
|
||
index: 1
|
||
object: embedding
|
||
model: mistral-embed
|
||
object: list
|
||
usage:
|
||
prompt_tokens: 15
|
||
completion_tokens: 0
|
||
total_tokens: 15
|
||
prompt_audio_seconds: null
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- embeddings
|
||
/v1/moderations:
|
||
post:
|
||
summary: Moderations
|
||
operationId: moderations_v1_moderations_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ClassificationRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModerationResponse'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: 4d71ae510af942108ef7344f903e2b88
|
||
model: mistral-moderation-latest
|
||
results:
|
||
- categories:
|
||
sexual: false
|
||
hate_and_discrimination: false
|
||
violence_and_threats: false
|
||
dangerous_and_criminal_content: false
|
||
selfharm: false
|
||
health: false
|
||
financial: false
|
||
law: false
|
||
pii: false
|
||
category_scores:
|
||
sexual: 0.0011335690505802631
|
||
hate_and_discrimination: 0.0030753696337342262
|
||
violence_and_threats: 0.0003569706459529698
|
||
dangerous_and_criminal_content: 0.002251847181469202
|
||
selfharm: 0.00017952796770259738
|
||
health: 0.0002780309587251395
|
||
financial: 8.481103577651083e-05
|
||
law: 4.539786823443137e-05
|
||
pii: 0.0023967307060956955
|
||
- categories:
|
||
sexual: false
|
||
hate_and_discrimination: false
|
||
violence_and_threats: false
|
||
dangerous_and_criminal_content: false
|
||
selfharm: false
|
||
health: false
|
||
financial: false
|
||
law: false
|
||
pii: false
|
||
category_scores:
|
||
sexual: 0.000626334105618298
|
||
hate_and_discrimination: 0.0013670255430042744
|
||
violence_and_threats: 0.0002611903182696551
|
||
dangerous_and_criminal_content: 0.0030753696337342262
|
||
selfharm: 0.00010889690747717395
|
||
health: 0.00015843621804378927
|
||
financial: 0.000191104321856983
|
||
law: 4.006369272246957e-05
|
||
pii: 0.0035936026833951473
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- classifiers
|
||
/v1/chat/moderations:
|
||
post:
|
||
summary: Chat Moderations
|
||
operationId: chat_moderations_v1_chat_moderations_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ChatModerationRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ModerationResponse'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
id: 352bce1a55814127a3b0bc4fb8f02a35
|
||
model: mistral-moderation-latest
|
||
results:
|
||
- categories:
|
||
sexual: false
|
||
hate_and_discrimination: false
|
||
violence_and_threats: false
|
||
dangerous_and_criminal_content: false
|
||
selfharm: false
|
||
health: false
|
||
financial: false
|
||
law: false
|
||
pii: false
|
||
category_scores:
|
||
sexual: 0.0010322310263291001
|
||
hate_and_discrimination: 0.001597845577634871
|
||
violence_and_threats: 0.00020342698553577065
|
||
dangerous_and_criminal_content: 0.0029810327105224133
|
||
selfharm: 0.00017952796770259738
|
||
health: 0.0002959570847451687
|
||
financial: 7.9673009167891e-05
|
||
law: 4.539786823443137e-05
|
||
pii: 0.004198795650154352
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- classifiers
|
||
/v1/ocr:
|
||
post:
|
||
summary: OCR
|
||
operationId: ocr_v1_ocr_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/OCRRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/OCRResponse'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
pages:
|
||
- index: 1
|
||
markdown: '# LEVERAGING UNLABELED DATA TO PREDICT OUT-OF-DISTRIBUTION PERFORMANCE
|
||
|
||
Saurabh Garg*<br> Carnegie Mellon University<br> sgarg2@andrew.cmu.edu<br> Sivaraman Balakrishnan<br> Carnegie Mellon University<br> sbalakri@andrew.cmu.edu<br> Zachary C. Lipton<br> Carnegie Mellon University<br> zlipton@andrew.cmu.edu
|
||
|
||
## Behnam Neyshabur
|
||
|
||
Google Research, Blueshift team<br> neyshabur@google.com
|
||
|
||
Hanie Sedghi<br> Google Research, Brain team<br> hsedghi@google.com
|
||
|
||
#### Abstract
|
||
|
||
Real-world machine learning deployments are characterized by mismatches between the source (training) and target (test) distributions that may cause performance drops. In this work, we investigate methods for predicting the target domain accuracy using only labeled source data and unlabeled target data. We propose Average Thresholded Confidence (ATC), a practical method that learns a threshold on the model''s confidence, predicting accuracy as the fraction of unlabeled examples for which model confidence exceeds that threshold. ATC outperforms previous methods across several model architectures, types of distribution shifts (e.g., due to synthetic corruptions, dataset reproduction, or novel subpopulations), and datasets (WILDS, ImageNet, BREEDS, CIFAR, and MNIST). In our experiments, ATC estimates target performance $2-4 \times$ more accurately than prior methods. We also explore the theoretical foundations of the problem, proving that, in general, identifying the accuracy is just as hard as identifying the optimal predictor and thus, the efficacy of any method rests upon (perhaps unstated) assumptions on the nature of the shift. Finally, analyzing our method on some toy distributions, we provide insights concerning when it works ${ }^{1}$.
|
||
|
||
## 1 INTRODUCTION
|
||
|
||
Machine learning models deployed in the real world typically encounter examples from previously unseen distributions. While the IID assumption enables us to evaluate models using held-out data from the source distribution (from which training data is sampled), this estimate is no longer valid in presence of a distribution shift. Moreover, under such shifts, model accuracy tends to degrade (Szegedy et al., 2014; Recht et al., 2019; Koh et al., 2021). Commonly, the only data available to the practitioner are a labeled training set (source) and unlabeled deployment-time data which makes the problem more difficult. In this setting, detecting shifts in the distribution of covariates is known to be possible (but difficult) in theory (Ramdas et al., 2015), and in practice (Rabanser et al., 2018). However, producing an optimal predictor using only labeled source and unlabeled target data is well-known to be impossible absent further assumptions (Ben-David et al., 2010; Lipton et al., 2018).
|
||
|
||
Two vital questions that remain are: (i) the precise conditions under which we can estimate a classifier''s target-domain accuracy; and (ii) which methods are most practically useful. To begin, the straightforward way to assess the performance of a model under distribution shift would be to collect labeled (target domain) examples and then to evaluate the model on that data. However, collecting fresh labeled data from the target distribution is prohibitively expensive and time-consuming, especially if the target distribution is non-stationary. Hence, instead of using labeled data, we aim to use unlabeled data from the target distribution, that is comparatively abundant, to predict model performance. Note that in this work, our focus is not to improve performance on the target but, rather, to estimate the accuracy on the target for a given classifier.
|
||
|
||
[^0]: Work done in part while Saurabh Garg was interning at Google ${ }^{1}$ Code is available at [https://github.com/saurabhgarg1996/ATC_code](https://github.com/saurabhgarg1996/ATC_code).
|
||
|
||
'
|
||
images: []
|
||
dimensions:
|
||
dpi: 200
|
||
height: 2200
|
||
width: 1700
|
||
- index: 2
|
||
markdown: '
|
||
|
||
Figure 1: Illustration of our proposed method ATC. Left: using source domain validation data, we identify a threshold on a score (e.g. negative entropy) computed on model confidence such that fraction of examples above the threshold matches the validation set accuracy. ATC estimates accuracy on unlabeled target data as the fraction of examples with the score above the threshold. Interestingly, this threshold yields accurate estimates on a wide set of target distributions resulting from natural and synthetic shifts. Right: Efficacy of ATC over previously proposed approaches on our testbed with a post-hoc calibrated model. To obtain errors on the same scale, we rescale all errors with Average Confidence (AC) error. Lower estimation error is better. See Table 1 for exact numbers and comparison on various types of distribution shift. See Sec. 5 for details on our testbed.
|
||
|
||
Recently, numerous methods have been proposed for this purpose (Deng & Zheng, 2021; Chen et al., 2021b; Jiang et al., 2021; Deng et al., 2021; Guillory et al., 2021). These methods either require calibration on the target domain to yield consistent estimates (Jiang et al., 2021; Guillory et al., 2021) or additional labeled data from several target domains to learn a linear regression function on a distributional distance that then predicts model performance (Deng et al., 2021; Deng & Zheng, 2021; Guillory et al., 2021). However, methods that require calibration on the target domain typically yield poor estimates since deep models trained and calibrated on source data are not, in general, calibrated on a (previously unseen) target domain (Ovadia et al., 2019). Besides, methods that leverage labeled data from target domains rely on the fact that unseen target domains exhibit strong linear correlation with seen target domains on the underlying distance measure and, hence, can be rendered ineffective when such target domains with labeled data are unavailable (in Sec. 5.1 we demonstrate such a failure on a real-world distribution shift problem). Therefore, throughout the paper, we assume access to labeled source data and only unlabeled data from target domain(s).
|
||
|
||
In this work, we first show that absent assumptions on the source classifier or the nature of the shift, no method of estimating accuracy will work generally (even in non-contrived settings). To estimate accuracy on target domain perfectly, we highlight that even given perfect knowledge of the labeled source distribution (i.e., $p_{s}(x, y)$ ) and unlabeled target distribution (i.e., $p_{t}(x)$ ), we need restrictions on the nature of the shift such that we can uniquely identify the target conditional $p_{t}(y \mid x)$. Thus, in general, identifying the accuracy of the classifier is as hard as identifying the optimal predictor.
|
||
|
||
Second, motivated by the superiority of methods that use maximum softmax probability (or logit) of a model for Out-Of-Distribution (OOD) detection (Hendrycks & Gimpel, 2016; Hendrycks et al., 2019), we propose a simple method that leverages softmax probability to predict model performance. Our method, Average Thresholded Confidence (ATC), learns a threshold on a score (e.g., maximum confidence or negative entropy) of model confidence on validation source data and predicts target domain accuracy as the fraction of unlabeled target points that receive a score above that threshold. ATC selects a threshold on validation source data such that the fraction of source examples that receive the score above the threshold match the accuracy of those examples. Our primary contribution in ATC is the proposal of obtaining the threshold and observing its efficacy on (practical) accuracy estimation. Importantly, our work takes a step forward in positively answering the question raised in Deng & Zheng (2021); Deng et al. (2021) about a practical strategy to select a threshold that enables accuracy prediction with thresholded model confidence.
|
||
|
||
'
|
||
images:
|
||
- id: img-0.jpeg
|
||
top_left_x: 292
|
||
top_left_y: 217
|
||
bottom_right_x: 1405
|
||
bottom_right_y: 649
|
||
image_base64: '...'
|
||
dimensions:
|
||
dpi: 200
|
||
height: 2200
|
||
width: 1700
|
||
- index: 3
|
||
markdown: '...'
|
||
images: []
|
||
dimensions: {}
|
||
- index: 27
|
||
markdown: '
|
||
|
||
Figure 9: Scatter plot of predicted accuracy versus (true) OOD accuracy for vision datasets except MNIST with a ResNet50 model. Results reported by aggregating MAE numbers over 4 different seeds.
|
||
|
||
'
|
||
images:
|
||
- id: img-8.jpeg
|
||
top_left_x: 290
|
||
top_left_y: 226
|
||
bottom_right_x: 1405
|
||
bottom_right_y: 1834
|
||
image_base64: '...'
|
||
dimensions:
|
||
dpi: 200
|
||
height: 2200
|
||
width: 1700
|
||
- index: 28
|
||
markdown: '| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 6.60 | 5.74 | 9.88 | 6.89 | 7.25 | 6.07 | 4.77 | 3.21 | 3.02 | 2.99 | 2.85 | | | | (0.35) | (0.30) | (0.16) | (0.13) | (0.15) | (0.16) | (0.13) | (0.49) | (0.40) | (0.37) | (0.29) | | | Synthetic | 12.33 | 10.20 | 16.50 | 11.91 | 13.87 | 11.08 | 6.55 | 4.65 | 4.25 | 4.21 | 3.87 | | | | (0.51) | (0.48) | (0.26) | (0.17) | (0.18) | (0.17) | (0.35) | (0.55) | (0.55) | (0.55) | (0.75) | | CIFAR100 | Synthetic | 13.69 | 11.51 | 23.61 | 13.10 | 14.60 | 10.14 | 9.85 | 5.50 | 4.75 | 4.72 | 4.94 | | | | (0.55) | (0.41) | (1.16) | (0.80) | (0.77) | (0.64) | (0.57) | (0.70) | (0.73) | (0.74) | (0.74) | | ImageNet200 | Natural | 12.37 | 8.19 | 22.07 | 8.61 | 15.17 | 7.81 | 5.13 | 4.37 | 2.04 | 3.79 | 1.45 | | | | (0.25) | (0.33) | (0.08) | (0.25) | (0.11) | (0.29) | (0.08) | (0.39) | (0.24) | (0.30) | (0.27) | | | Synthetic | 19.86 | 12.94 | 32.44 | 13.35 | 25.02 | 12.38 | 5.41 | 5.93 | 3.09 | 5.00 | 2.68 | | | | (1.38) | (1.81) | (1.00) | (1.30) | (1.10) | (1.38) | (0.89) | (1.38) | (0.87) | (1.28) | (0.45) | | ImageNet | Natural | 7.77 | 6.50 | 18.13 | 6.02 | 8.13 | 5.76 | 6.23 | 3.88 | 2.17 | 2.06 | 0.80 | | | | (0.27) | (0.33) | (0.23) | (0.34) | (0.27) | (0.37) | (0.41) | (0.53) | (0.62) | (0.54) | (0.44) | | | Synthetic | 13.39 | 10.12 | 24.62 | 8.51 | 13.55 | 7.90 | 6.32 | 3.34 | 2.53 | 2.61 | 4.89 | | | | (0.53) | (0.63) | (0.64) | (0.71) | (0.61) | (0.72) | (0.33) | (0.53) | (0.36) | (0.33) | (0.83) | | FMoW-WILDS | Natural | 5.53 | 4.31 | 33.53 | 12.84 | 5.94 | 4.45 | 5.74 | 3.06 | 2.70 | 3.02 | 2.72 | | | | (0.33) | (0.63) | (0.13) | (12.06) | (0.36) | (0.77) | (0.55) | (0.36) | (0.54) | (0.35) | (0.44) | | RxRx1-WILDS | Natural | 5.80 | 5.72 | 7.90 | 4.84 | 5.98 | 5.98 | 6.03 | 4.66 | 4.56 | 4.41 | 4.47 | | | | (0.17) | (0.15) | (0.24) | (0.09) | (0.15) | (0.13) | (0.08) | (0.38) | (0.38) | (0.31) | (0.26) | | Amazon-WILDS | Natural | 2.40 | 2.29 | 8.01 | 2.38 | 2.40 | 2.28 | 17.87 | 1.65 | 1.62 | 1.60 | 1.59 | | | | (0.08) | (0.09) | (0.53) | (0.17) | (0.09) | (0.09) | (0.18) | (0.06) | (0.05) | (0.14) | (0.15) | | CivilCom.-WILDS | Natural | 12.64 | 10.80 | 16.76 | 11.03 | 13.31 | 10.99 | 16.65 | | 7.14 | | | | | | (0.52) | (0.48) | (0.53) | (0.49) | (0.52) | (0.49) | (0.25) | | (0.41) | | | | MNIST | Natural | 18.48 | 15.99 | 21.17 | 14.81 | 20.19 | 14.56 | 24.42 | 5.02 | 2.40 | 3.14 | 3.50 | | | | (0.45) | (1.53) | (0.24) | (3.89) | (0.23) | (3.47) | (0.41) | (0.44) | (1.83) | (0.49) | (0.17) | | ENTITY-13 | Same | 16.23 | 11.14 | 24.97 | 10.88 | 19.08 | 10.47 | 10.71 | 5.39 | 3.88 | 4.58 | 4.19 | | | | (0.77) | (0.65) | (0.70) | (0.77) | (0.65) | (0.72) | (0.74) | (0.92) | (0.61) | (0.85) | (0.16) | | | Novel | 28.53 | 22.02 | 38.33 | 21.64 | 32.43 | 21.22 | 20.61 | 13.58 | 10.28 | 12.25 | 6.63 | | | | (0.82) | (0.68) | (0.75) | (0.86) | (0.69) | (0.80) | (0.60) | (1.15) | (1.34) | (1.21) | (0.93) | | ENTITY-30 | Same | 18.59 | 14.46 | 28.82 | 14.30 | 21.63 | 13.46 | 12.92 | 9.12 | 7.75 | 8.15 | 7.64 | | | | (0.51) | (0.52) | (0.43) | (0.71) | (0.37) | (0.59) | (0.14) | (0.62) | (0.72) | (0.68) | (0.88) | | | Novel | 32.34 | 26.85 | 44.02 | 26.27 | 36.82 | 25.42 | 23.16 | 17.75 | 14.30 | 15.60 | 10.57 | | | | (0.60) | (0.58) | (0.56) | (0.79) | (0.47) | (0.68) | (0.12) | (0.76) | (0.85) | (0.86) | (0.86) | | NONLIVING-26 | Same | 18.66 | 17.17 | 26.39 | 16.14 | 19.86 | 15.58 | 16.63 | 10.87 | 10.24 | 10.07 | 10.26 | | | | (0.76) | (0.74) | (0.82) | (0.81) | (0.67) | (0.76) | (0.45) | (0.98) | (0.83) | (0.92) | (1.18) | | | Novel | 33.43 | 31.53 | 41.66 | 29.87 | 35.13 | 29.31 | 29.56 | 21.70 | 20.12 | 19.08 | 18.26 | | | | (0.67) | (0.65) | (0.67) | (0.71) | (0.54) | (0.64) | (0.21) | (0.86) | (0.75) | (0.82) | (1.12) | | LIVING-17 | Same | 12.63 | 11.05 | 18.32 | 10.46 | 14.43 | 10.14 | 9.87 | 4.57 | 3.95 | 3.81 | 4.21 | | | | (1.25) | (1.20) | (1.01) | (1.12) | (1.11) | (1.16) | (0.61) | (0.71) | (0.48) | (0.22) | (0.53) | | | Novel | 29.03 | 26.96 | 35.67 | 26.11 | 31.73 | 25.73 | 23.53 | 16.15 | 14.49 | 12.97 | 11.39 | | | | (1.44) | (1.38) | (1.09) | (1.27) | (1.19) | (1.35) | (0.52) | (1.36) | (1.46) | (1.52) | (1.72) |
|
||
|
||
Table 3: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift. ''Same'' refers to same subpopulation shifts and ''Novel'' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. For language datasets, we use DistilBERT-base-uncased, for vision dataset we report results with DenseNet model with the exception of MNIST where we use FCN. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn''t alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\cdot)$ ) denote standard deviation values.
|
||
|
||
'
|
||
images: []
|
||
dimensions:
|
||
dpi: 200
|
||
height: 2200
|
||
width: 1700
|
||
- index: 29
|
||
markdown: '| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 7.14 | 6.20 | 10.25 | 7.06 | 7.68 | 6.35 | 5.74 | 4.02 | 3.85 | 3.76 | 3.38 | | | | (0.14) | (0.11) | (0.31) | (0.33) | (0.28) | (0.27) | (0.25) | (0.38) | (0.30) | (0.33) | (0.32) | | | Synthetic | 12.62 | 10.75 | 16.50 | 11.91 | 13.93 | 11.20 | 7.97 | 5.66 | 5.03 | 4.87 | 3.63 | | | | (0.76) | (0.71) | (0.28) | (0.24) | (0.29) | (0.28) | (0.13) | (0.64) | (0.71) | (0.71) | (0.62) | | CIFAR100 | Synthetic | 12.77 | 12.34 | 16.89 | 12.73 | 11.18 | 9.63 | 12.00 | 5.61 | 5.55 | 5.65 | 5.76 | | | | (0.43) | (0.68) | (0.20) | (2.59) | (0.35) | (1.25) | (0.48) | (0.51) | (0.55) | (0.35) | (0.27) | | ImageNet200 | Natural | 12.63 | 7.99 | 23.08 | 7.22 | 15.40 | 6.33 | 5.00 | 4.60 | 1.80 | 4.06 | 1.38 | | | | (0.59) | (0.47) | (0.31) | (0.22) | (0.42) | (0.24) | (0.36) | (0.63) | (0.17) | (0.69) | (0.29) | | | Synthetic | 20.17 | 11.74 | 33.69 | 9.51 | 25.49 | 8.61 | 4.19 | 5.37 | 2.78 | 4.53 | 3.58 | | | | (0.74) | (0.80) | (0.73) | (0.51) | (0.66) | (0.50) | (0.14) | (0.88) | (0.23) | (0.79) | (0.33) | | ImageNet | Natural | 8.09 | 6.42 | 21.66 | 5.91 | 8.53 | 5.21 | 5.90 | 3.93 | 1.89 | 2.45 | 0.73 | | | | (0.25) | (0.28) | (0.38) | (0.22) | (0.26) | (0.25) | (0.44) | (0.26) | (0.21) | (0.16) | (0.10) | | | Synthetic | 13.93 | 9.90 | 28.05 | 7.56 | 13.82 | 6.19 | 6.70 | 3.33 | 2.55 | 2.12 | 5.06 | | | | (0.14) | (0.23) | (0.39) | (0.13) | (0.31) | (0.07) | (0.52) | (0.25) | (0.25) | (0.31) | (0.27) | | FMoW-WILDS | Natural | 5.15 | 3.55 | 34.64 | 5.03 | 5.58 | 3.46 | 5.08 | 2.59 | 2.33 | 2.52 | 2.22 | | | | (0.19) | (0.41) | (0.22) | (0.29) | (0.17) | (0.37) | (0.46) | (0.32) | (0.28) | (0.25) | (0.30) | | RxRx1-WILDS | Natural | 6.17 | 6.11 | 21.05 | 5.21 | 6.54 | 6.27 | 6.82 | 5.30 | 5.20 | 5.19 | 5.63 | | | | (0.20) | (0.24) | (0.31) | (0.18) | (0.21) | (0.20) | (0.31) | (0.30) | (0.44) | (0.43) | (0.55) | | Entity-13 | Same | 18.32 | 14.38 | 27.79 | 13.56 | 20.50 | 13.22 | 16.09 | 9.35 | 7.50 | 7.80 | 6.94 | | | | (0.29) | (0.53) | (1.18) | (0.58) | (0.47) | (0.58) | (0.84) | (0.79) | (0.65) | (0.62) | (0.71) | | | Novel | 28.82 | 24.03 | 38.97 | 22.96 | 31.66 | 22.61 | 25.26 | 17.11 | 13.96 | 14.75 | 9.94 | | | | (0.30) | (0.55) | (1.32) | (0.59) | (0.54) | (0.58) | (1.08) | (0.93) | (0.64) | (0.78) | | | Entity-30 | Same | 16.91 | 14.61 | 26.84 | 14.37 | 18.60 | 13.11 | 13.74 | 8.54 | 7.94 | 7.77 | 8.04 | | | | (1.33) | (1.11) | (2.15) | (1.34) | (1.69) | (1.30) | (1.07) | (1.47) | (1.38) | (1.44) | (1.51) | | | Novel | 28.66 | 25.83 | 39.21 | 25.03 | 30.95 | 23.73 | 23.15 | 15.57 | 13.24 | 12.44 | 11.05 | | | | (1.16) | (0.88) | (2.03) | (1.11) | (1.64) | (1.11) | (0.51) | (1.44) | (1.15) | (1.26) | (1.13) | | NonLIVING-26 | Same | 17.43 | 15.95 | 27.70 | 15.40 | 18.06 | 14.58 | 16.99 | 10.79 | 10.13 | 10.05 | 10.29 | | | | (0.90) | (0.86) | (0.90) | (0.69) | (1.00) | (0.78) | (1.25) | (0.62) | (0.32) | (0.46) | (0.79) | | | Novel | 29.51 | 27.75 | 40.02 | 26.77 | 30.36 | 25.93 | 27.70 | 19.64 | 17.75 | 16.90 | 15.69 | | | | (0.86) | (0.82) | (0.76) | (0.82) | (0.95) | (0.80) | (1.42) | (0.68) | (0.53) | (0.60) | (0.83) | | LIVING-17 | Same | 14.28 | 12.21 | 23.46 | 11.16 | 15.22 | 10.78 | 10.49 | 4.92 | 4.23 | 4.19 | 4.73 | | | | (0.96) | (0.93) | (1.16) | (0.90) | (0.96) | (0.99) | (0.97) | (0.57) | (0.42) | (0.35) | (0.24) | | | Novel | 28.91 | 26.35 | 38.62 | 24.91 | 30.32 | 24.52 | 22.49 | 15.42 | 13.02 | 12.29 | 10.34 | | | | (0.66) | (0.73) | (1.01) | (0.61) | (0.59) | (0.74) | (0.85) | (0.59) | (0.53) | (0.73) | (0.62) |
|
||
|
||
Table 4: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift for ResNet model. ''Same'' refers to same subpopulation shifts and ''Novel'' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn''t alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\cdot)$ ) denote standard deviation values.
|
||
|
||
'
|
||
images: []
|
||
dimensions:
|
||
dpi: 200
|
||
height: 2200
|
||
width: 1700
|
||
model: mistral-ocr-2503-completion
|
||
usage_info:
|
||
pages_processed: 29
|
||
doc_size_bytes: null
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- ocr
|
||
/v1/classifications:
|
||
post:
|
||
summary: Classifications
|
||
operationId: classifications_v1_classifications_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ClassificationRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ClassificationResponse'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- classifiers
|
||
/v1/chat/classifications:
|
||
post:
|
||
summary: Chat Classifications
|
||
operationId: chat_classifications_v1_chat_classifications_post
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ChatClassificationRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ClassificationResponse'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- classifiers
|
||
/v1/audio/transcriptions:
|
||
post:
|
||
summary: Create Transcription
|
||
operationId: audio_api_v1_transcriptions_post
|
||
requestBody:
|
||
content:
|
||
multipart/form-data:
|
||
schema:
|
||
$ref: '#/components/schemas/AudioTranscriptionRequest'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/TranscriptionResponse'
|
||
examples:
|
||
userExample:
|
||
value:
|
||
model: voxtral-mini-2507
|
||
text: 'This week, I traveled to Chicago to deliver my final farewell address to the nation, following in the tradition of presidents before me. It was an opportunity to say thank you. Whether we''ve seen eye to eye or rarely agreed at all, my conversations with you, the American people, in living rooms, in schools, at farms and on factory floors, at diners and on distant military outposts, All these conversations are what have kept me honest, kept me inspired, and kept me going. Every day, I learned from you. You made me a better President, and you made me a better man.
|
||
|
||
Over the course of these eight years, I''ve seen the goodness, the resilience, and the hope of the American people. I''ve seen neighbors looking out for each other as we rescued our economy from the worst crisis of our lifetimes. I''ve hugged cancer survivors who finally know the security of affordable health care. I''ve seen communities like Joplin rebuild from disaster, and cities like Boston show the world that no terrorist will ever break the American spirit. I''ve seen the hopeful faces of young graduates and our newest military officers. I''ve mourned with grieving families searching for answers. And I found grace in a Charleston church. I''ve seen our scientists help a paralyzed man regain his sense of touch, and our wounded warriors walk again. I''ve seen our doctors and volunteers rebuild after earthquakes and stop pandemics in their tracks. I''ve learned from students who are building robots and curing diseases, and who will change the world in ways we can''t even imagine. I''ve seen the youngest of children remind us of our obligations to care for our refugees, to work in peace, and above all, to look out for each other.
|
||
|
||
That''s what''s possible when we come together in the slow, hard, sometimes frustrating, but always vital work of self-government. But we can''t take our democracy for granted. All of us, regardless of party, should throw ourselves into the work of citizenship. Not just when there is an election. Not just when our own narrow interest is at stake. But over the full span of a lifetime. If you''re tired of arguing with strangers on the Internet, try to talk with one in real life. If something needs fixing, lace up your shoes and do some organizing. If you''re disappointed by your elected officials, then grab a clipboard, get some signatures, and run for office yourself.
|
||
|
||
Our success depends on our participation, regardless of which way the pendulum of power swings. It falls on each of us to be guardians of our democracy, to embrace the joyous task we''ve been given to continually try to improve this great nation of ours. Because for all our outward differences, we all share the same proud title – citizen.
|
||
|
||
It has been the honor of my life to serve you as President. Eight years later, I am even more optimistic about our country''s promise. And I look forward to working along your side as a citizen for all my days that remain.
|
||
|
||
Thanks, everybody. God bless you. And God bless the United States of America.
|
||
|
||
'
|
||
language: en
|
||
segments: []
|
||
usage:
|
||
prompt_audio_seconds: 203
|
||
prompt_tokens: 4
|
||
total_tokens: 3264
|
||
completion_tokens: 635
|
||
tags:
|
||
- audio.transcriptions
|
||
/v1/audio/transcriptions#stream:
|
||
post:
|
||
summary: Create Streaming Transcription (SSE)
|
||
operationId: audio_api_v1_transcriptions_post_stream
|
||
requestBody:
|
||
content:
|
||
multipart/form-data:
|
||
schema:
|
||
$ref: '#/components/schemas/AudioTranscriptionRequestStream'
|
||
required: true
|
||
responses:
|
||
'200':
|
||
description: Stream of transcription events
|
||
content:
|
||
text/event-stream:
|
||
schema:
|
||
$ref: '#/components/schemas/TranscriptionStreamEvents'
|
||
tags:
|
||
- audio.transcriptions
|
||
/v1/libraries:
|
||
get:
|
||
summary: List all libraries you have access to.
|
||
description: List all libraries that you have created or have been shared with you.
|
||
operationId: libraries_list_v1
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ListLibraryOut'
|
||
tags:
|
||
- beta.libraries
|
||
post:
|
||
summary: Create a new Library.
|
||
description: Create a new Library, you will be marked as the owner and only you will have the possibility to share it with others. When first created this will only be accessible by you.
|
||
operationId: libraries_create_v1
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/LibraryIn'
|
||
required: true
|
||
responses:
|
||
'201':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/LibraryOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries
|
||
/v1/libraries/{library_id}:
|
||
get:
|
||
summary: Detailed information about a specific Library.
|
||
description: Given a library id, details information about that Library.
|
||
operationId: libraries_get_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/LibraryOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries
|
||
delete:
|
||
summary: Delete a library and all of it's document.
|
||
description: Given a library id, deletes it together with all documents that have been uploaded to that library.
|
||
operationId: libraries_delete_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/LibraryOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries
|
||
put:
|
||
summary: Update a library.
|
||
description: Given a library id, you can update the name and description.
|
||
operationId: libraries_update_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/LibraryInUpdate'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/LibraryOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries
|
||
/v1/libraries/{library_id}/documents:
|
||
get:
|
||
summary: List documents in a given library.
|
||
description: Given a library, lists the document that have been uploaded to that library.
|
||
operationId: libraries_documents_list_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: search
|
||
in: query
|
||
required: false
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Search
|
||
- name: page_size
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
maximum: 100
|
||
minimum: 1
|
||
default: 100
|
||
title: Page Size
|
||
- name: page
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: integer
|
||
minimum: 0
|
||
default: 0
|
||
title: Page
|
||
- name: filters_attributes
|
||
in: query
|
||
required: false
|
||
schema:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Filters Attributes
|
||
- name: sort_by
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: string
|
||
default: created_at
|
||
title: Sort By
|
||
- name: sort_order
|
||
in: query
|
||
required: false
|
||
schema:
|
||
type: string
|
||
default: desc
|
||
title: Sort Order
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ListDocumentOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
post:
|
||
summary: Upload a new document.
|
||
description: Given a library, upload a new document to that library. It is queued for processing, it status will change it has been processed. The processing has to be completed in order be discoverable for the library search
|
||
operationId: libraries_documents_upload_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
multipart/form-data:
|
||
schema:
|
||
title: DocumentUpload
|
||
type: object
|
||
properties:
|
||
file:
|
||
$ref: '#/components/schemas/File'
|
||
required:
|
||
- file
|
||
tags:
|
||
- beta.libraries.documents
|
||
responses:
|
||
'201':
|
||
description: Upload successful, returns the created document information's.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/DocumentOut'
|
||
'200':
|
||
description: A document with the same hash was found in this library. Returns the existing document.
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/DocumentOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
/v1/libraries/{library_id}/documents/{document_id}:
|
||
get:
|
||
summary: Retrieve the metadata of a specific document.
|
||
description: Given a library and a document in this library, you can retrieve the metadata of that document.
|
||
operationId: libraries_documents_get_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: document_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/DocumentOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
put:
|
||
summary: Update the metadata of a specific document.
|
||
description: Given a library and a document in that library, update the name of that document.
|
||
operationId: libraries_documents_update_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: document_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/DocumentUpdateIn'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/DocumentOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
delete:
|
||
summary: Delete a document.
|
||
description: Given a library and a document in that library, delete that document. The document will be deleted from the library and the search index.
|
||
operationId: libraries_documents_delete_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: document_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
responses:
|
||
'204':
|
||
description: Successful Response
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
/v1/libraries/{library_id}/documents/{document_id}/text_content:
|
||
get:
|
||
summary: Retrieve the text content of a specific document.
|
||
description: Given a library and a document in that library, you can retrieve the text content of that document if it exists. For documents like pdf, docx and pptx the text content results from our processing using Mistral OCR.
|
||
operationId: libraries_documents_get_text_content_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: document_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/DocumentTextContent'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
/v1/libraries/{library_id}/documents/{document_id}/status:
|
||
get:
|
||
summary: Retrieve the processing status of a specific document.
|
||
description: Given a library and a document in that library, retrieve the processing status of that document.
|
||
operationId: libraries_documents_get_status_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: document_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ProcessingStatusOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
/v1/libraries/{library_id}/documents/{document_id}/signed-url:
|
||
get:
|
||
summary: Retrieve the signed URL of a specific document.
|
||
description: Given a library and a document in that library, retrieve the signed URL of a specific document.The url will expire after 30 minutes and can be accessed by anyone with the link.
|
||
operationId: libraries_documents_get_signed_url_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: document_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: string
|
||
title: Response Libraries Documents Get Signed Url V1
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
/v1/libraries/{library_id}/documents/{document_id}/extracted-text-signed-url:
|
||
get:
|
||
summary: Retrieve the signed URL of text extracted from a given document.
|
||
description: Given a library and a document in that library, retrieve the signed URL of text extracted. For documents that are sent to the OCR this returns the result of the OCR queries.
|
||
operationId: libraries_documents_get_extracted_text_signed_url_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: document_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: string
|
||
title: Response Libraries Documents Get Extracted Text Signed Url V1
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
/v1/libraries/{library_id}/documents/{document_id}/reprocess:
|
||
post:
|
||
summary: Reprocess a document.
|
||
description: Given a library and a document in that library, reprocess that document, it will be billed again.
|
||
operationId: libraries_documents_reprocess_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
- name: document_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
responses:
|
||
'204':
|
||
description: Successful Response
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.documents
|
||
/v1/libraries/{library_id}/share:
|
||
get:
|
||
summary: List all of the access to this library.
|
||
description: Given a library, list all of the Entity that have access and to what level.
|
||
operationId: libraries_share_list_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/ListSharingOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.accesses
|
||
put:
|
||
summary: Create or update an access level.
|
||
description: Given a library id, you can create or update the access level of an entity. You have to be owner of the library to share a library. An owner cannot change their own role. A library cannot be shared outside of the organization.
|
||
operationId: libraries_share_create_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SharingIn'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SharingOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.accesses
|
||
delete:
|
||
summary: Delete an access level.
|
||
description: Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours.
|
||
operationId: libraries_share_delete_v1
|
||
parameters:
|
||
- name: library_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SharingDelete'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/SharingOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
tags:
|
||
- beta.libraries.accesses
|
||
components:
|
||
schemas:
|
||
BaseModelCard:
|
||
properties:
|
||
id:
|
||
type: string
|
||
title: Id
|
||
object:
|
||
type: string
|
||
title: Object
|
||
default: model
|
||
created:
|
||
type: integer
|
||
title: Created
|
||
owned_by:
|
||
type: string
|
||
title: Owned By
|
||
default: mistralai
|
||
capabilities:
|
||
$ref: '#/components/schemas/ModelCapabilities'
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
max_context_length:
|
||
type: integer
|
||
title: Max Context Length
|
||
default: 32768
|
||
aliases:
|
||
items:
|
||
type: string
|
||
type: array
|
||
title: Aliases
|
||
default: []
|
||
deprecation:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Deprecation
|
||
deprecation_replacement_model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Deprecation Replacement Model
|
||
default_model_temperature:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Default Model Temperature
|
||
type:
|
||
type: string
|
||
const: base
|
||
title: Type
|
||
default: base
|
||
type: object
|
||
required:
|
||
- id
|
||
- capabilities
|
||
title: BaseModelCard
|
||
DeleteModelOut:
|
||
properties:
|
||
id:
|
||
type: string
|
||
title: Id
|
||
description: The ID of the deleted model.
|
||
examples:
|
||
- ft:open-mistral-7b:587a6b29:20240514:7e773925
|
||
object:
|
||
type: string
|
||
title: Object
|
||
default: model
|
||
description: The object type that was deleted
|
||
deleted:
|
||
type: boolean
|
||
title: Deleted
|
||
default: true
|
||
description: The deletion status
|
||
examples:
|
||
- true
|
||
type: object
|
||
required:
|
||
- id
|
||
title: DeleteModelOut
|
||
FTModelCard:
|
||
properties:
|
||
id:
|
||
type: string
|
||
title: Id
|
||
object:
|
||
type: string
|
||
title: Object
|
||
default: model
|
||
created:
|
||
type: integer
|
||
title: Created
|
||
owned_by:
|
||
type: string
|
||
title: Owned By
|
||
default: mistralai
|
||
capabilities:
|
||
$ref: '#/components/schemas/ModelCapabilities'
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
max_context_length:
|
||
type: integer
|
||
title: Max Context Length
|
||
default: 32768
|
||
aliases:
|
||
items:
|
||
type: string
|
||
type: array
|
||
title: Aliases
|
||
default: []
|
||
deprecation:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Deprecation
|
||
deprecation_replacement_model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Deprecation Replacement Model
|
||
default_model_temperature:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Default Model Temperature
|
||
type:
|
||
type: string
|
||
const: fine-tuned
|
||
title: Type
|
||
default: fine-tuned
|
||
job:
|
||
type: string
|
||
title: Job
|
||
root:
|
||
type: string
|
||
title: Root
|
||
archived:
|
||
type: boolean
|
||
title: Archived
|
||
default: false
|
||
type: object
|
||
required:
|
||
- id
|
||
- capabilities
|
||
- job
|
||
- root
|
||
title: FTModelCard
|
||
description: Extra fields for fine-tuned models.
|
||
HTTPValidationError:
|
||
properties:
|
||
detail:
|
||
items:
|
||
$ref: '#/components/schemas/ValidationError'
|
||
type: array
|
||
title: Detail
|
||
type: object
|
||
title: HTTPValidationError
|
||
ModelCapabilities:
|
||
properties:
|
||
completion_chat:
|
||
type: boolean
|
||
title: Completion Chat
|
||
default: false
|
||
function_calling:
|
||
type: boolean
|
||
title: Function Calling
|
||
default: false
|
||
completion_fim:
|
||
type: boolean
|
||
title: Completion Fim
|
||
default: false
|
||
fine_tuning:
|
||
type: boolean
|
||
title: Fine Tuning
|
||
default: false
|
||
vision:
|
||
type: boolean
|
||
title: Vision
|
||
default: false
|
||
ocr:
|
||
type: boolean
|
||
title: Ocr
|
||
default: false
|
||
classification:
|
||
type: boolean
|
||
title: Classification
|
||
default: false
|
||
moderation:
|
||
type: boolean
|
||
title: Moderation
|
||
default: false
|
||
audio:
|
||
type: boolean
|
||
title: Audio
|
||
default: false
|
||
audio_transcription:
|
||
type: boolean
|
||
title: Audio Transcription
|
||
default: false
|
||
type: object
|
||
title: ModelCapabilities
|
||
ModelList:
|
||
properties:
|
||
object:
|
||
type: string
|
||
title: Object
|
||
default: list
|
||
data:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/BaseModelCard'
|
||
- $ref: '#/components/schemas/FTModelCard'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
base: '#/components/schemas/BaseModelCard'
|
||
fine-tuned: '#/components/schemas/FTModelCard'
|
||
type: array
|
||
title: Data
|
||
type: object
|
||
title: ModelList
|
||
ValidationError:
|
||
properties:
|
||
loc:
|
||
items:
|
||
anyOf:
|
||
- type: string
|
||
- type: integer
|
||
type: array
|
||
title: Location
|
||
msg:
|
||
type: string
|
||
title: Message
|
||
type:
|
||
type: string
|
||
title: Error Type
|
||
type: object
|
||
required:
|
||
- loc
|
||
- msg
|
||
- type
|
||
title: ValidationError
|
||
Agent:
|
||
properties:
|
||
instructions:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Instructions
|
||
description: Instruction prompt the model will follow during the conversation.
|
||
tools:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/FunctionTool'
|
||
- $ref: '#/components/schemas/WebSearchTool'
|
||
- $ref: '#/components/schemas/WebSearchPremiumTool'
|
||
- $ref: '#/components/schemas/CodeInterpreterTool'
|
||
- $ref: '#/components/schemas/ImageGenerationTool'
|
||
- $ref: '#/components/schemas/DocumentLibraryTool'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
code_interpreter: '#/components/schemas/CodeInterpreterTool'
|
||
document_library: '#/components/schemas/DocumentLibraryTool'
|
||
function: '#/components/schemas/FunctionTool'
|
||
image_generation: '#/components/schemas/ImageGenerationTool'
|
||
web_search: '#/components/schemas/WebSearchTool'
|
||
web_search_premium: '#/components/schemas/WebSearchPremiumTool'
|
||
type: array
|
||
title: Tools
|
||
description: List of tools which are available to the model during the conversation.
|
||
completion_args:
|
||
$ref: '#/components/schemas/CompletionArgs'
|
||
description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request.
|
||
guardrails:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/GuardrailConfig'
|
||
type: array
|
||
- type: 'null'
|
||
title: Guardrails
|
||
model:
|
||
type: string
|
||
title: Model
|
||
name:
|
||
type: string
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
handoffs:
|
||
anyOf:
|
||
- items:
|
||
type: string
|
||
type: array
|
||
minItems: 1
|
||
- type: 'null'
|
||
title: Handoffs
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MetadataDict'
|
||
- type: 'null'
|
||
object:
|
||
type: string
|
||
const: agent
|
||
title: Object
|
||
default: agent
|
||
id:
|
||
type: string
|
||
title: Id
|
||
version:
|
||
type: integer
|
||
title: Version
|
||
versions:
|
||
items:
|
||
type: integer
|
||
type: array
|
||
title: Versions
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
updated_at:
|
||
type: string
|
||
format: date-time
|
||
title: Updated At
|
||
deployment_chat:
|
||
type: boolean
|
||
title: Deployment Chat
|
||
source:
|
||
type: string
|
||
title: Source
|
||
version_message:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Version Message
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- model
|
||
- name
|
||
- id
|
||
- version
|
||
- versions
|
||
- created_at
|
||
- updated_at
|
||
- deployment_chat
|
||
- source
|
||
title: Agent
|
||
AgentAliasResponse:
|
||
properties:
|
||
alias:
|
||
type: string
|
||
title: Alias
|
||
version:
|
||
type: integer
|
||
title: Version
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
updated_at:
|
||
type: string
|
||
format: date-time
|
||
title: Updated At
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- alias
|
||
- version
|
||
- created_at
|
||
- updated_at
|
||
title: AgentAliasResponse
|
||
AgentConversation:
|
||
properties:
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description: Name given to the conversation.
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
description: Description of the what the conversation is about.
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MetadataDict'
|
||
- type: 'null'
|
||
description: Custom metadata for the conversation.
|
||
object:
|
||
type: string
|
||
const: conversation
|
||
title: Object
|
||
default: conversation
|
||
id:
|
||
type: string
|
||
title: Id
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
updated_at:
|
||
type: string
|
||
format: date-time
|
||
title: Updated At
|
||
agent_id:
|
||
type: string
|
||
title: Agent Id
|
||
agent_version:
|
||
anyOf:
|
||
- type: string
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Agent Version
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- id
|
||
- created_at
|
||
- updated_at
|
||
- agent_id
|
||
title: AgentConversation
|
||
AgentCreationRequest:
|
||
properties:
|
||
instructions:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Instructions
|
||
description: Instruction prompt the model will follow during the conversation.
|
||
tools:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/FunctionTool'
|
||
- $ref: '#/components/schemas/WebSearchTool'
|
||
- $ref: '#/components/schemas/WebSearchPremiumTool'
|
||
- $ref: '#/components/schemas/CodeInterpreterTool'
|
||
- $ref: '#/components/schemas/ImageGenerationTool'
|
||
- $ref: '#/components/schemas/DocumentLibraryTool'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
code_interpreter: '#/components/schemas/CodeInterpreterTool'
|
||
document_library: '#/components/schemas/DocumentLibraryTool'
|
||
function: '#/components/schemas/FunctionTool'
|
||
image_generation: '#/components/schemas/ImageGenerationTool'
|
||
web_search: '#/components/schemas/WebSearchTool'
|
||
web_search_premium: '#/components/schemas/WebSearchPremiumTool'
|
||
type: array
|
||
title: Tools
|
||
description: List of tools which are available to the model during the conversation.
|
||
completion_args:
|
||
$ref: '#/components/schemas/CompletionArgs'
|
||
description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request.
|
||
guardrails:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/GuardrailConfig'
|
||
type: array
|
||
- type: 'null'
|
||
title: Guardrails
|
||
model:
|
||
type: string
|
||
title: Model
|
||
name:
|
||
type: string
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
handoffs:
|
||
anyOf:
|
||
- items:
|
||
type: string
|
||
type: array
|
||
minItems: 1
|
||
- type: 'null'
|
||
title: Handoffs
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MetadataDict'
|
||
- type: 'null'
|
||
version_message:
|
||
anyOf:
|
||
- type: string
|
||
maxLength: 500
|
||
- type: 'null'
|
||
title: Version Message
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- model
|
||
- name
|
||
title: AgentCreationRequest
|
||
AgentHandoffEntry:
|
||
properties:
|
||
object:
|
||
type: string
|
||
const: entry
|
||
title: Object
|
||
default: entry
|
||
type:
|
||
type: string
|
||
const: agent.handoff
|
||
title: Type
|
||
default: agent.handoff
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
completed_at:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Completed At
|
||
id:
|
||
type: string
|
||
title: Id
|
||
previous_agent_id:
|
||
type: string
|
||
title: Previous Agent Id
|
||
previous_agent_name:
|
||
type: string
|
||
title: Previous Agent Name
|
||
next_agent_id:
|
||
type: string
|
||
title: Next Agent Id
|
||
next_agent_name:
|
||
type: string
|
||
title: Next Agent Name
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- previous_agent_id
|
||
- previous_agent_name
|
||
- next_agent_id
|
||
- next_agent_name
|
||
title: AgentHandoffEntry
|
||
AgentUpdateRequest:
|
||
properties:
|
||
instructions:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Instructions
|
||
description: Instruction prompt the model will follow during the conversation.
|
||
tools:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/FunctionTool'
|
||
- $ref: '#/components/schemas/WebSearchTool'
|
||
- $ref: '#/components/schemas/WebSearchPremiumTool'
|
||
- $ref: '#/components/schemas/CodeInterpreterTool'
|
||
- $ref: '#/components/schemas/ImageGenerationTool'
|
||
- $ref: '#/components/schemas/DocumentLibraryTool'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
code_interpreter: '#/components/schemas/CodeInterpreterTool'
|
||
document_library: '#/components/schemas/DocumentLibraryTool'
|
||
function: '#/components/schemas/FunctionTool'
|
||
image_generation: '#/components/schemas/ImageGenerationTool'
|
||
web_search: '#/components/schemas/WebSearchTool'
|
||
web_search_premium: '#/components/schemas/WebSearchPremiumTool'
|
||
type: array
|
||
title: Tools
|
||
description: List of tools which are available to the model during the conversation.
|
||
completion_args:
|
||
$ref: '#/components/schemas/CompletionArgs'
|
||
description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request.
|
||
guardrails:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/GuardrailConfig'
|
||
type: array
|
||
- type: 'null'
|
||
title: Guardrails
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
handoffs:
|
||
anyOf:
|
||
- items:
|
||
type: string
|
||
type: array
|
||
minItems: 1
|
||
- type: 'null'
|
||
title: Handoffs
|
||
deployment_chat:
|
||
anyOf:
|
||
- type: boolean
|
||
- type: 'null'
|
||
title: Deployment Chat
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MetadataDict'
|
||
- type: 'null'
|
||
version_message:
|
||
anyOf:
|
||
- type: string
|
||
maxLength: 500
|
||
- type: 'null'
|
||
title: Version Message
|
||
additionalProperties: false
|
||
type: object
|
||
title: AgentUpdateRequest
|
||
BuiltInConnectors:
|
||
type: string
|
||
enum:
|
||
- web_search
|
||
- web_search_premium
|
||
- code_interpreter
|
||
- image_generation
|
||
- document_library
|
||
title: BuiltInConnectors
|
||
CodeInterpreterTool:
|
||
properties:
|
||
tool_configuration:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ToolConfiguration'
|
||
- type: 'null'
|
||
type:
|
||
type: string
|
||
enum:
|
||
- code_interpreter
|
||
title: Type
|
||
default: code_interpreter
|
||
additionalProperties: false
|
||
type: object
|
||
title: CodeInterpreterTool
|
||
CompletionArgs:
|
||
properties:
|
||
stop:
|
||
$ref: '#/components/schemas/CompletionArgsStop'
|
||
presence_penalty:
|
||
anyOf:
|
||
- type: number
|
||
maximum: 2
|
||
minimum: -2
|
||
- type: 'null'
|
||
title: Presence Penalty
|
||
frequency_penalty:
|
||
anyOf:
|
||
- type: number
|
||
maximum: 2
|
||
minimum: -2
|
||
- type: 'null'
|
||
title: Frequency Penalty
|
||
temperature:
|
||
anyOf:
|
||
- type: number
|
||
maximum: 1
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Temperature
|
||
top_p:
|
||
anyOf:
|
||
- type: number
|
||
maximum: 1
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Top P
|
||
max_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Max Tokens
|
||
random_seed:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Random Seed
|
||
prediction:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/Prediction'
|
||
- type: 'null'
|
||
response_format:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ResponseFormat'
|
||
- type: 'null'
|
||
tool_choice:
|
||
$ref: '#/components/schemas/ToolChoiceEnum'
|
||
default: auto
|
||
additionalProperties: false
|
||
type: object
|
||
title: CompletionArgs
|
||
description: White-listed arguments from the completion API
|
||
ConversationAppendRequest:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ConversationAppendRequestBase'
|
||
- type: object
|
||
properties:
|
||
stream:
|
||
type: boolean
|
||
enum:
|
||
- false
|
||
default: false
|
||
ConversationHistory:
|
||
properties:
|
||
object:
|
||
type: string
|
||
const: conversation.history
|
||
title: Object
|
||
default: conversation.history
|
||
conversation_id:
|
||
type: string
|
||
title: Conversation Id
|
||
entries:
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MessageInputEntry'
|
||
- $ref: '#/components/schemas/MessageOutputEntry'
|
||
- $ref: '#/components/schemas/FunctionResultEntry'
|
||
- $ref: '#/components/schemas/FunctionCallEntry'
|
||
- $ref: '#/components/schemas/ToolExecutionEntry'
|
||
- $ref: '#/components/schemas/AgentHandoffEntry'
|
||
type: array
|
||
title: Entries
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- conversation_id
|
||
- entries
|
||
title: ConversationHistory
|
||
description: Retrieve all entries in a conversation.
|
||
ConversationMessages:
|
||
properties:
|
||
object:
|
||
type: string
|
||
const: conversation.messages
|
||
title: Object
|
||
default: conversation.messages
|
||
conversation_id:
|
||
type: string
|
||
title: Conversation Id
|
||
messages:
|
||
$ref: '#/components/schemas/MessageEntries'
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- conversation_id
|
||
- messages
|
||
title: ConversationMessages
|
||
description: Similar to the conversation history but only keep the messages
|
||
ConversationRestartRequest:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ConversationRestartRequestBase'
|
||
- type: object
|
||
properties:
|
||
stream:
|
||
type: boolean
|
||
enum:
|
||
- false
|
||
default: false
|
||
ConversationThinkChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: thinking
|
||
title: Type
|
||
default: thinking
|
||
thinking:
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/TextChunk'
|
||
- $ref: '#/components/schemas/ToolReferenceChunk'
|
||
type: array
|
||
title: Thinking
|
||
closed:
|
||
type: boolean
|
||
title: Closed
|
||
default: true
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- thinking
|
||
title: ConversationThinkChunk
|
||
DocumentLibraryTool:
|
||
properties:
|
||
tool_configuration:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ToolConfiguration'
|
||
- type: 'null'
|
||
type:
|
||
type: string
|
||
enum:
|
||
- document_library
|
||
title: Type
|
||
default: document_library
|
||
library_ids:
|
||
items:
|
||
type: string
|
||
type: array
|
||
minItems: 1
|
||
title: Library Ids
|
||
description: Ids of the library in which to search.
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- library_ids
|
||
title: DocumentLibraryTool
|
||
DocumentURLChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: document_url
|
||
title: Type
|
||
default: document_url
|
||
document_url:
|
||
type: string
|
||
title: Document Url
|
||
document_name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Document Name
|
||
description: The filename of the document
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- document_url
|
||
title: DocumentURLChunk
|
||
Function:
|
||
properties:
|
||
name:
|
||
type: string
|
||
title: Name
|
||
description:
|
||
type: string
|
||
title: Description
|
||
default: ''
|
||
strict:
|
||
type: boolean
|
||
title: Strict
|
||
default: false
|
||
parameters:
|
||
additionalProperties: true
|
||
type: object
|
||
title: Parameters
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- name
|
||
- parameters
|
||
title: Function
|
||
FunctionCallEntry:
|
||
properties:
|
||
object:
|
||
type: string
|
||
const: entry
|
||
title: Object
|
||
default: entry
|
||
type:
|
||
type: string
|
||
const: function.call
|
||
title: Type
|
||
default: function.call
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
completed_at:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Completed At
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Agent Id
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
id:
|
||
type: string
|
||
title: Id
|
||
tool_call_id:
|
||
type: string
|
||
title: Tool Call Id
|
||
name:
|
||
type: string
|
||
title: Name
|
||
arguments:
|
||
$ref: '#/components/schemas/FunctionCallEntryArguments'
|
||
confirmation_status:
|
||
anyOf:
|
||
- type: string
|
||
enum:
|
||
- pending
|
||
- allowed
|
||
- denied
|
||
- type: 'null'
|
||
title: Confirmation Status
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- tool_call_id
|
||
- name
|
||
- arguments
|
||
title: FunctionCallEntry
|
||
FunctionResultEntry:
|
||
properties:
|
||
object:
|
||
type: string
|
||
const: entry
|
||
title: Object
|
||
default: entry
|
||
type:
|
||
type: string
|
||
const: function.result
|
||
title: Type
|
||
default: function.result
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
completed_at:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Completed At
|
||
id:
|
||
type: string
|
||
title: Id
|
||
tool_call_id:
|
||
type: string
|
||
title: Tool Call Id
|
||
result:
|
||
type: string
|
||
title: Result
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- tool_call_id
|
||
- result
|
||
title: FunctionResultEntry
|
||
FunctionTool:
|
||
properties:
|
||
type:
|
||
type: string
|
||
enum:
|
||
- function
|
||
title: Type
|
||
default: function
|
||
function:
|
||
$ref: '#/components/schemas/Function'
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- function
|
||
title: FunctionTool
|
||
GuardrailConfig:
|
||
properties:
|
||
block_on_error:
|
||
type: boolean
|
||
title: Block On Error
|
||
description: If true, return HTTP 403 and block request in the event of a server-side error
|
||
default: false
|
||
moderation_llm_v1:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ModerationLLMV1Config'
|
||
- type: 'null'
|
||
type: object
|
||
required:
|
||
- moderation_llm_v1
|
||
title: GuardrailConfig
|
||
ImageDetail:
|
||
type: string
|
||
enum:
|
||
- low
|
||
- auto
|
||
- high
|
||
title: ImageDetail
|
||
ImageGenerationTool:
|
||
properties:
|
||
tool_configuration:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ToolConfiguration'
|
||
- type: 'null'
|
||
type:
|
||
type: string
|
||
enum:
|
||
- image_generation
|
||
title: Type
|
||
default: image_generation
|
||
additionalProperties: false
|
||
type: object
|
||
title: ImageGenerationTool
|
||
ImageURL:
|
||
properties:
|
||
url:
|
||
type: string
|
||
title: Url
|
||
detail:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ImageDetail'
|
||
- type: 'null'
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- url
|
||
title: ImageURL
|
||
ImageURLChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: image_url
|
||
title: Type
|
||
default: image_url
|
||
image_url:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ImageURL'
|
||
- type: string
|
||
title: Image Url
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- image_url
|
||
title: ImageURLChunk
|
||
description: '{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0'
|
||
JsonSchema:
|
||
properties:
|
||
name:
|
||
type: string
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
schema:
|
||
additionalProperties: true
|
||
type: object
|
||
title: Schema
|
||
x-speakeasy-name-override: schema_definition
|
||
strict:
|
||
type: boolean
|
||
title: Strict
|
||
default: false
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- name
|
||
- schema
|
||
title: JsonSchema
|
||
MessageInputEntry:
|
||
properties:
|
||
object:
|
||
type: string
|
||
const: entry
|
||
title: Object
|
||
default: entry
|
||
type:
|
||
type: string
|
||
const: message.input
|
||
title: Type
|
||
default: message.input
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
completed_at:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Completed At
|
||
id:
|
||
type: string
|
||
title: Id
|
||
role:
|
||
type: string
|
||
enum:
|
||
- assistant
|
||
- user
|
||
title: Role
|
||
content:
|
||
anyOf:
|
||
- type: string
|
||
- $ref: '#/components/schemas/MessageInputContentChunks'
|
||
title: Content
|
||
prefix:
|
||
type: boolean
|
||
title: Prefix
|
||
default: false
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- role
|
||
- content
|
||
title: MessageInputEntry
|
||
description: Representation of an input message inside the conversation.
|
||
MessageOutputEntry:
|
||
properties:
|
||
object:
|
||
type: string
|
||
const: entry
|
||
title: Object
|
||
default: entry
|
||
type:
|
||
type: string
|
||
const: message.output
|
||
title: Type
|
||
default: message.output
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
completed_at:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Completed At
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Agent Id
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
id:
|
||
type: string
|
||
title: Id
|
||
role:
|
||
type: string
|
||
const: assistant
|
||
title: Role
|
||
default: assistant
|
||
content:
|
||
anyOf:
|
||
- type: string
|
||
- $ref: '#/components/schemas/MessageOutputContentChunks'
|
||
title: Content
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- content
|
||
title: MessageOutputEntry
|
||
MetadataDict:
|
||
additionalProperties: true
|
||
type: object
|
||
title: MetadataDict
|
||
description: Custom type for metadata with embedded validation.
|
||
ModelConversation:
|
||
properties:
|
||
instructions:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Instructions
|
||
description: Instruction prompt the model will follow during the conversation.
|
||
tools:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/FunctionTool'
|
||
- $ref: '#/components/schemas/WebSearchTool'
|
||
- $ref: '#/components/schemas/WebSearchPremiumTool'
|
||
- $ref: '#/components/schemas/CodeInterpreterTool'
|
||
- $ref: '#/components/schemas/ImageGenerationTool'
|
||
- $ref: '#/components/schemas/DocumentLibraryTool'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
code_interpreter: '#/components/schemas/CodeInterpreterTool'
|
||
document_library: '#/components/schemas/DocumentLibraryTool'
|
||
function: '#/components/schemas/FunctionTool'
|
||
image_generation: '#/components/schemas/ImageGenerationTool'
|
||
web_search: '#/components/schemas/WebSearchTool'
|
||
web_search_premium: '#/components/schemas/WebSearchPremiumTool'
|
||
type: array
|
||
title: Tools
|
||
description: List of tools which are available to the model during the conversation.
|
||
completion_args:
|
||
$ref: '#/components/schemas/CompletionArgs'
|
||
description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request.
|
||
guardrails:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/GuardrailConfig'
|
||
type: array
|
||
- type: 'null'
|
||
title: Guardrails
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description: Name given to the conversation.
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
description: Description of the what the conversation is about.
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MetadataDict'
|
||
- type: 'null'
|
||
description: Custom metadata for the conversation.
|
||
object:
|
||
type: string
|
||
const: conversation
|
||
title: Object
|
||
default: conversation
|
||
id:
|
||
type: string
|
||
title: Id
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
updated_at:
|
||
type: string
|
||
format: date-time
|
||
title: Updated At
|
||
model:
|
||
type: string
|
||
title: Model
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- id
|
||
- created_at
|
||
- updated_at
|
||
- model
|
||
title: ModelConversation
|
||
ModerationLLMV1Action:
|
||
type: string
|
||
enum:
|
||
- none
|
||
- block
|
||
title: ModerationLLMV1Action
|
||
ModerationLLMV1CategoryThresholds:
|
||
properties:
|
||
sexual:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Sexual
|
||
hate_and_discrimination:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Hate And Discrimination
|
||
violence_and_threats:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Violence And Threats
|
||
dangerous_and_criminal_content:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Dangerous And Criminal Content
|
||
selfharm:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Selfharm
|
||
health:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Health
|
||
financial:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Financial
|
||
law:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Law
|
||
pii:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Pii
|
||
type: object
|
||
title: ModerationLLMV1CategoryThresholds
|
||
ModerationLLMV1Config:
|
||
properties:
|
||
model_name:
|
||
type: string
|
||
title: Model Name
|
||
description: Override model name. Should be omitted in general.
|
||
default: mistral-moderation-2411
|
||
custom_category_thresholds:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ModerationLLMV1CategoryThresholds'
|
||
- type: 'null'
|
||
description: Override default thresholds for specific categories.
|
||
ignore_other_categories:
|
||
type: boolean
|
||
title: Ignore Other Categories
|
||
description: If true, only evaluate categories in custom_category_thresholds; others are ignored.
|
||
default: false
|
||
action:
|
||
$ref: '#/components/schemas/ModerationLLMV1Action'
|
||
description: Action to take if any score is above the threshold for any category.
|
||
default: none
|
||
type: object
|
||
title: ModerationLLMV1Config
|
||
Prediction:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: content
|
||
title: Type
|
||
default: content
|
||
content:
|
||
type: string
|
||
title: Content
|
||
default: ''
|
||
additionalProperties: false
|
||
type: object
|
||
title: Prediction
|
||
description: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.
|
||
RequestSource:
|
||
type: string
|
||
title: RequestSource
|
||
enum:
|
||
- api
|
||
- playground
|
||
- agent_builder_v1
|
||
ResponseFormat:
|
||
properties:
|
||
type:
|
||
$ref: '#/components/schemas/ResponseFormats'
|
||
default: text
|
||
json_schema:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/JsonSchema'
|
||
- type: 'null'
|
||
additionalProperties: false
|
||
type: object
|
||
title: ResponseFormat
|
||
description: 'Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.'
|
||
examples:
|
||
- type: text
|
||
- type: json_object
|
||
- type: json_schema
|
||
json_schema:
|
||
schema:
|
||
properties:
|
||
name:
|
||
title: Name
|
||
type: string
|
||
authors:
|
||
items:
|
||
type: string
|
||
title: Authors
|
||
type: array
|
||
required:
|
||
- name
|
||
- authors
|
||
title: Book
|
||
type: object
|
||
additionalProperties: false
|
||
name: book
|
||
strict: true
|
||
ResponseFormats:
|
||
type: string
|
||
enum:
|
||
- text
|
||
- json_object
|
||
- json_schema
|
||
title: ResponseFormats
|
||
TextChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: text
|
||
title: Type
|
||
default: text
|
||
text:
|
||
type: string
|
||
title: Text
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- text
|
||
title: TextChunk
|
||
ToolCallConfirmation:
|
||
properties:
|
||
tool_call_id:
|
||
type: string
|
||
title: Tool Call Id
|
||
confirmation:
|
||
type: string
|
||
enum:
|
||
- allow
|
||
- deny
|
||
title: Confirmation
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- tool_call_id
|
||
- confirmation
|
||
title: ToolCallConfirmation
|
||
ToolChoiceEnum:
|
||
type: string
|
||
enum:
|
||
- auto
|
||
- none
|
||
- any
|
||
- required
|
||
title: ToolChoiceEnum
|
||
ToolConfiguration:
|
||
properties:
|
||
exclude:
|
||
anyOf:
|
||
- items:
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
title: Exclude
|
||
include:
|
||
anyOf:
|
||
- items:
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
title: Include
|
||
requires_confirmation:
|
||
anyOf:
|
||
- items:
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
title: Requires Confirmation
|
||
additionalProperties: false
|
||
type: object
|
||
title: ToolConfiguration
|
||
ToolExecutionEntry:
|
||
properties:
|
||
object:
|
||
type: string
|
||
const: entry
|
||
title: Object
|
||
default: entry
|
||
type:
|
||
type: string
|
||
const: tool.execution
|
||
title: Type
|
||
default: tool.execution
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
completed_at:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Completed At
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Agent Id
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
id:
|
||
type: string
|
||
title: Id
|
||
name:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/BuiltInConnectors'
|
||
- type: string
|
||
title: Name
|
||
arguments:
|
||
type: string
|
||
title: Arguments
|
||
info:
|
||
$ref: '#/components/schemas/ToolExecutionInfo'
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- name
|
||
- arguments
|
||
title: ToolExecutionEntry
|
||
ToolFileChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: tool_file
|
||
title: Type
|
||
default: tool_file
|
||
tool:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/BuiltInConnectors'
|
||
- type: string
|
||
title: Tool
|
||
file_id:
|
||
type: string
|
||
title: File Id
|
||
file_name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: File Name
|
||
file_type:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: File Type
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- tool
|
||
- file_id
|
||
title: ToolFileChunk
|
||
ToolReferenceChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: tool_reference
|
||
title: Type
|
||
default: tool_reference
|
||
tool:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/BuiltInConnectors'
|
||
- type: string
|
||
title: Tool
|
||
title:
|
||
type: string
|
||
title: Title
|
||
url:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Url
|
||
favicon:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Favicon
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- tool
|
||
- title
|
||
title: ToolReferenceChunk
|
||
WebSearchPremiumTool:
|
||
properties:
|
||
tool_configuration:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ToolConfiguration'
|
||
- type: 'null'
|
||
type:
|
||
type: string
|
||
enum:
|
||
- web_search_premium
|
||
title: Type
|
||
default: web_search_premium
|
||
additionalProperties: false
|
||
type: object
|
||
title: WebSearchPremiumTool
|
||
WebSearchTool:
|
||
properties:
|
||
tool_configuration:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ToolConfiguration'
|
||
- type: 'null'
|
||
type:
|
||
type: string
|
||
enum:
|
||
- web_search
|
||
title: Type
|
||
default: web_search
|
||
additionalProperties: false
|
||
type: object
|
||
title: WebSearchTool
|
||
ConversationUsageInfo:
|
||
additionalProperties: false
|
||
properties:
|
||
prompt_tokens:
|
||
default: 0
|
||
title: Prompt Tokens
|
||
type: integer
|
||
completion_tokens:
|
||
default: 0
|
||
title: Completion Tokens
|
||
type: integer
|
||
total_tokens:
|
||
default: 0
|
||
title: Total Tokens
|
||
type: integer
|
||
connector_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
default: null
|
||
title: Connector Tokens
|
||
connectors:
|
||
anyOf:
|
||
- additionalProperties:
|
||
type: integer
|
||
type: object
|
||
- type: 'null'
|
||
default: null
|
||
title: Connectors
|
||
title: ConversationUsageInfo
|
||
type: object
|
||
ConversationResponse:
|
||
additionalProperties: false
|
||
description: The response after appending new entries to the conversation.
|
||
properties:
|
||
object:
|
||
const: conversation.response
|
||
default: conversation.response
|
||
title: Object
|
||
type: string
|
||
conversation_id:
|
||
title: Conversation Id
|
||
type: string
|
||
outputs:
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MessageOutputEntry'
|
||
- $ref: '#/components/schemas/ToolExecutionEntry'
|
||
- $ref: '#/components/schemas/FunctionCallEntry'
|
||
- $ref: '#/components/schemas/AgentHandoffEntry'
|
||
title: Outputs
|
||
type: array
|
||
usage:
|
||
$ref: '#/components/schemas/ConversationUsageInfo'
|
||
guardrails:
|
||
anyOf:
|
||
- items:
|
||
type: object
|
||
type: array
|
||
- type: 'null'
|
||
default: null
|
||
title: Guardrails
|
||
required:
|
||
- conversation_id
|
||
- outputs
|
||
- usage
|
||
title: ConversationResponse
|
||
type: object
|
||
ConversationRequest:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ConversationRequestBase'
|
||
- type: object
|
||
properties:
|
||
stream:
|
||
type: boolean
|
||
enum:
|
||
- false
|
||
default: false
|
||
AgentHandoffDoneEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: agent.handoff.done
|
||
default: agent.handoff.done
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
output_index:
|
||
default: 0
|
||
title: Output Index
|
||
type: integer
|
||
id:
|
||
title: Id
|
||
type: string
|
||
next_agent_id:
|
||
title: Next Agent Id
|
||
type: string
|
||
next_agent_name:
|
||
title: Next Agent Name
|
||
type: string
|
||
required:
|
||
- id
|
||
- next_agent_id
|
||
- next_agent_name
|
||
title: AgentHandoffDoneEvent
|
||
type: object
|
||
AgentHandoffStartedEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: agent.handoff.started
|
||
default: agent.handoff.started
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
output_index:
|
||
default: 0
|
||
title: Output Index
|
||
type: integer
|
||
id:
|
||
title: Id
|
||
type: string
|
||
previous_agent_id:
|
||
title: Previous Agent Id
|
||
type: string
|
||
previous_agent_name:
|
||
title: Previous Agent Name
|
||
type: string
|
||
required:
|
||
- id
|
||
- previous_agent_id
|
||
- previous_agent_name
|
||
title: AgentHandoffStartedEvent
|
||
type: object
|
||
FunctionCallEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: function.call.delta
|
||
default: function.call.delta
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
output_index:
|
||
default: 0
|
||
title: Output Index
|
||
type: integer
|
||
id:
|
||
title: Id
|
||
type: string
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Model
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Agent Id
|
||
name:
|
||
title: Name
|
||
type: string
|
||
tool_call_id:
|
||
title: Tool Call Id
|
||
type: string
|
||
arguments:
|
||
title: Arguments
|
||
type: string
|
||
confirmation_status:
|
||
anyOf:
|
||
- enum:
|
||
- pending
|
||
- allowed
|
||
- denied
|
||
type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Confirmation Status
|
||
required:
|
||
- id
|
||
- name
|
||
- tool_call_id
|
||
- arguments
|
||
title: FunctionCallEvent
|
||
type: object
|
||
MessageOutputEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: message.output.delta
|
||
default: message.output.delta
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
output_index:
|
||
default: 0
|
||
title: Output Index
|
||
type: integer
|
||
id:
|
||
title: Id
|
||
type: string
|
||
content_index:
|
||
default: 0
|
||
title: Content Index
|
||
type: integer
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Model
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Agent Id
|
||
role:
|
||
const: assistant
|
||
default: assistant
|
||
title: Role
|
||
type: string
|
||
content:
|
||
anyOf:
|
||
- type: string
|
||
- $ref: '#/components/schemas/OutputContentChunks'
|
||
title: Content
|
||
required:
|
||
- id
|
||
- content
|
||
title: MessageOutputEvent
|
||
type: object
|
||
ResponseDoneEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: conversation.response.done
|
||
default: conversation.response.done
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
usage:
|
||
$ref: '#/components/schemas/ConversationUsageInfo'
|
||
required:
|
||
- usage
|
||
title: ResponseDoneEvent
|
||
type: object
|
||
ResponseErrorEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: conversation.response.error
|
||
default: conversation.response.error
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
message:
|
||
title: Message
|
||
type: string
|
||
code:
|
||
title: Code
|
||
type: integer
|
||
required:
|
||
- message
|
||
- code
|
||
title: ResponseErrorEvent
|
||
type: object
|
||
ResponseStartedEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: conversation.response.started
|
||
default: conversation.response.started
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
conversation_id:
|
||
title: Conversation Id
|
||
type: string
|
||
required:
|
||
- conversation_id
|
||
title: ResponseStartedEvent
|
||
type: object
|
||
SSETypes:
|
||
description: Server side events sent when streaming a conversation response.
|
||
enum:
|
||
- conversation.response.started
|
||
- conversation.response.done
|
||
- conversation.response.error
|
||
- message.output.delta
|
||
- tool.execution.started
|
||
- tool.execution.delta
|
||
- tool.execution.done
|
||
- agent.handoff.started
|
||
- agent.handoff.done
|
||
- function.call.delta
|
||
title: SSETypes
|
||
type: string
|
||
ToolExecutionDeltaEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: tool.execution.delta
|
||
default: tool.execution.delta
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
output_index:
|
||
default: 0
|
||
title: Output Index
|
||
type: integer
|
||
id:
|
||
title: Id
|
||
type: string
|
||
name:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/BuiltInConnectors'
|
||
- type: string
|
||
title: Name
|
||
arguments:
|
||
title: Arguments
|
||
type: string
|
||
required:
|
||
- id
|
||
- name
|
||
- arguments
|
||
title: ToolExecutionDeltaEvent
|
||
type: object
|
||
ToolExecutionDoneEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: tool.execution.done
|
||
default: tool.execution.done
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
output_index:
|
||
default: 0
|
||
title: Output Index
|
||
type: integer
|
||
id:
|
||
title: Id
|
||
type: string
|
||
name:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/BuiltInConnectors'
|
||
- type: string
|
||
title: Name
|
||
info:
|
||
$ref: '#/components/schemas/ToolExecutionInfo'
|
||
required:
|
||
- id
|
||
- name
|
||
title: ToolExecutionDoneEvent
|
||
type: object
|
||
ToolExecutionStartedEvent:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: tool.execution.started
|
||
default: tool.execution.started
|
||
title: Type
|
||
type: string
|
||
created_at:
|
||
format: date-time
|
||
title: Created At
|
||
type: string
|
||
output_index:
|
||
default: 0
|
||
title: Output Index
|
||
type: integer
|
||
id:
|
||
title: Id
|
||
type: string
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Model
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Agent Id
|
||
name:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/BuiltInConnectors'
|
||
- type: string
|
||
title: Name
|
||
arguments:
|
||
title: Arguments
|
||
type: string
|
||
required:
|
||
- id
|
||
- name
|
||
- arguments
|
||
title: ToolExecutionStartedEvent
|
||
type: object
|
||
ConversationEvents:
|
||
properties:
|
||
event:
|
||
$ref: '#/components/schemas/SSETypes'
|
||
data:
|
||
discriminator:
|
||
mapping:
|
||
agent.handoff.done: '#/components/schemas/AgentHandoffDoneEvent'
|
||
agent.handoff.started: '#/components/schemas/AgentHandoffStartedEvent'
|
||
conversation.response.done: '#/components/schemas/ResponseDoneEvent'
|
||
conversation.response.error: '#/components/schemas/ResponseErrorEvent'
|
||
conversation.response.started: '#/components/schemas/ResponseStartedEvent'
|
||
function.call.delta: '#/components/schemas/FunctionCallEvent'
|
||
message.output.delta: '#/components/schemas/MessageOutputEvent'
|
||
tool.execution.delta: '#/components/schemas/ToolExecutionDeltaEvent'
|
||
tool.execution.done: '#/components/schemas/ToolExecutionDoneEvent'
|
||
tool.execution.started: '#/components/schemas/ToolExecutionStartedEvent'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/ResponseStartedEvent'
|
||
- $ref: '#/components/schemas/ResponseDoneEvent'
|
||
- $ref: '#/components/schemas/ResponseErrorEvent'
|
||
- $ref: '#/components/schemas/ToolExecutionStartedEvent'
|
||
- $ref: '#/components/schemas/ToolExecutionDeltaEvent'
|
||
- $ref: '#/components/schemas/ToolExecutionDoneEvent'
|
||
- $ref: '#/components/schemas/MessageOutputEvent'
|
||
- $ref: '#/components/schemas/FunctionCallEvent'
|
||
- $ref: '#/components/schemas/AgentHandoffStartedEvent'
|
||
- $ref: '#/components/schemas/AgentHandoffDoneEvent'
|
||
title: Data
|
||
required:
|
||
- event
|
||
- data
|
||
title: ConversationEvents
|
||
type: object
|
||
MessageInputContentChunks:
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/TextChunk'
|
||
- $ref: '#/components/schemas/ImageURLChunk'
|
||
- $ref: '#/components/schemas/ToolFileChunk'
|
||
- $ref: '#/components/schemas/DocumentURLChunk'
|
||
- $ref: '#/components/schemas/ConversationThinkChunk'
|
||
type: array
|
||
title: MessageInputContentChunks
|
||
MessageOutputContentChunks:
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/TextChunk'
|
||
- $ref: '#/components/schemas/ImageURLChunk'
|
||
- $ref: '#/components/schemas/ToolFileChunk'
|
||
- $ref: '#/components/schemas/DocumentURLChunk'
|
||
- $ref: '#/components/schemas/ConversationThinkChunk'
|
||
- $ref: '#/components/schemas/ToolReferenceChunk'
|
||
type: array
|
||
title: MessageOutputContentChunks
|
||
OutputContentChunks:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/TextChunk'
|
||
- $ref: '#/components/schemas/ImageURLChunk'
|
||
- $ref: '#/components/schemas/ToolFileChunk'
|
||
- $ref: '#/components/schemas/DocumentURLChunk'
|
||
- $ref: '#/components/schemas/ConversationThinkChunk'
|
||
- $ref: '#/components/schemas/ToolReferenceChunk'
|
||
title: OutputContentChunks
|
||
MessageEntries:
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MessageInputEntry'
|
||
- $ref: '#/components/schemas/MessageOutputEntry'
|
||
type: array
|
||
title: MessageEntries
|
||
InputEntries:
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MessageInputEntry'
|
||
- $ref: '#/components/schemas/MessageOutputEntry'
|
||
- $ref: '#/components/schemas/FunctionResultEntry'
|
||
- $ref: '#/components/schemas/FunctionCallEntry'
|
||
- $ref: '#/components/schemas/ToolExecutionEntry'
|
||
- $ref: '#/components/schemas/AgentHandoffEntry'
|
||
type: array
|
||
title: InputEntries
|
||
CompletionArgsStop:
|
||
anyOf:
|
||
- type: string
|
||
- items:
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
title: CompletionArgsStop
|
||
FunctionCallEntryArguments:
|
||
anyOf:
|
||
- type: object
|
||
additionalProperties: true
|
||
- type: string
|
||
title: FunctionCallEntryArguments
|
||
ConversationInputs:
|
||
anyOf:
|
||
- type: string
|
||
- $ref: '#/components/schemas/InputEntries'
|
||
title: ConversationInputs
|
||
ToolExecutionInfo:
|
||
type: object
|
||
additionalProperties: true
|
||
title: ToolExecutionInfo
|
||
ConversationRequestBase:
|
||
properties:
|
||
inputs:
|
||
$ref: '#/components/schemas/ConversationInputs'
|
||
stream:
|
||
anyOf:
|
||
- type: boolean
|
||
- type: 'null'
|
||
default: null
|
||
title: Stream
|
||
store:
|
||
anyOf:
|
||
- type: boolean
|
||
- type: 'null'
|
||
default: null
|
||
title: Store
|
||
handoff_execution:
|
||
anyOf:
|
||
- enum:
|
||
- client
|
||
- server
|
||
type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Handoff Execution
|
||
instructions:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Instructions
|
||
tools:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/FunctionTool'
|
||
- $ref: '#/components/schemas/WebSearchTool'
|
||
- $ref: '#/components/schemas/WebSearchPremiumTool'
|
||
- $ref: '#/components/schemas/CodeInterpreterTool'
|
||
- $ref: '#/components/schemas/ImageGenerationTool'
|
||
- $ref: '#/components/schemas/DocumentLibraryTool'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
code_interpreter: '#/components/schemas/CodeInterpreterTool'
|
||
document_library: '#/components/schemas/DocumentLibraryTool'
|
||
function: '#/components/schemas/FunctionTool'
|
||
image_generation: '#/components/schemas/ImageGenerationTool'
|
||
web_search: '#/components/schemas/WebSearchTool'
|
||
web_search_premium: '#/components/schemas/WebSearchPremiumTool'
|
||
type: array
|
||
title: Tools
|
||
description: List of tools which are available to the model during the conversation.
|
||
completion_args:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/CompletionArgs'
|
||
- type: 'null'
|
||
default: null
|
||
guardrails:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/GuardrailConfig'
|
||
type: array
|
||
- type: 'null'
|
||
default: null
|
||
title: Guardrails
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Description
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MetadataDict'
|
||
- type: 'null'
|
||
default: null
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Agent Id
|
||
agent_version:
|
||
anyOf:
|
||
- type: string
|
||
- type: integer
|
||
- type: 'null'
|
||
default: null
|
||
title: Agent Version
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Model
|
||
required:
|
||
- inputs
|
||
title: ConversationRequest
|
||
type: object
|
||
ConversationStreamRequest:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ConversationRequestBase'
|
||
- type: object
|
||
properties:
|
||
stream:
|
||
type: boolean
|
||
enum:
|
||
- true
|
||
default: true
|
||
ConversationAppendRequestBase:
|
||
properties:
|
||
inputs:
|
||
$ref: '#/components/schemas/ConversationInputs'
|
||
stream:
|
||
type: boolean
|
||
title: Stream
|
||
description: Whether to stream back partial progress. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.
|
||
default: false
|
||
store:
|
||
type: boolean
|
||
title: Store
|
||
description: Whether to store the results into our servers or not.
|
||
default: true
|
||
handoff_execution:
|
||
type: string
|
||
enum:
|
||
- client
|
||
- server
|
||
title: Handoff Execution
|
||
default: server
|
||
completion_args:
|
||
$ref: '#/components/schemas/CompletionArgs'
|
||
description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request.
|
||
tool_confirmations:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/ToolCallConfirmation'
|
||
type: array
|
||
- type: 'null'
|
||
title: Tool Confirmations
|
||
additionalProperties: false
|
||
type: object
|
||
title: ConversationAppendRequest
|
||
ConversationAppendStreamRequest:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ConversationAppendRequestBase'
|
||
- type: object
|
||
properties:
|
||
stream:
|
||
type: boolean
|
||
enum:
|
||
- true
|
||
default: true
|
||
ConversationRestartRequestBase:
|
||
properties:
|
||
inputs:
|
||
$ref: '#/components/schemas/ConversationInputs'
|
||
stream:
|
||
type: boolean
|
||
title: Stream
|
||
description: Whether to stream back partial progress. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.
|
||
default: false
|
||
store:
|
||
type: boolean
|
||
title: Store
|
||
description: Whether to store the results into our servers or not.
|
||
default: true
|
||
handoff_execution:
|
||
type: string
|
||
enum:
|
||
- client
|
||
- server
|
||
title: Handoff Execution
|
||
default: server
|
||
completion_args:
|
||
$ref: '#/components/schemas/CompletionArgs'
|
||
description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request.
|
||
guardrails:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/GuardrailConfig'
|
||
type: array
|
||
- type: 'null'
|
||
title: Guardrails
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MetadataDict'
|
||
- type: 'null'
|
||
description: Custom metadata for the conversation.
|
||
from_entry_id:
|
||
type: string
|
||
title: From Entry Id
|
||
agent_version:
|
||
anyOf:
|
||
- type: string
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Agent Version
|
||
description: Specific version of the agent to use when restarting. If not provided, uses the current version.
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- from_entry_id
|
||
title: ConversationRestartRequest
|
||
description: Request to restart a new conversation from a given entry in the conversation.
|
||
ConversationRestartStreamRequest:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ConversationRestartRequestBase'
|
||
- type: object
|
||
properties:
|
||
stream:
|
||
type: boolean
|
||
enum:
|
||
- true
|
||
default: true
|
||
FilePurpose:
|
||
title: FilePurpose
|
||
type: string
|
||
enum:
|
||
- fine-tune
|
||
- batch
|
||
- ocr
|
||
SampleType:
|
||
title: SampleType
|
||
type: string
|
||
enum:
|
||
- pretrain
|
||
- instruct
|
||
- batch_request
|
||
- batch_result
|
||
- batch_error
|
||
Source:
|
||
enum:
|
||
- upload
|
||
- repository
|
||
- mistral
|
||
title: Source
|
||
type: string
|
||
UploadFileOut:
|
||
properties:
|
||
id:
|
||
format: uuid
|
||
title: Id
|
||
type: string
|
||
description: The unique identifier of the file.
|
||
examples:
|
||
- 497f6eca-6276-4993-bfeb-53cbbbba6f09
|
||
object:
|
||
title: Object
|
||
type: string
|
||
description: The object type, which is always "file".
|
||
examples:
|
||
- file
|
||
bytes:
|
||
title: Bytes
|
||
type: integer
|
||
description: The size of the file, in bytes.
|
||
examples:
|
||
- 13000
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) of the event.
|
||
examples:
|
||
- 1716963433
|
||
filename:
|
||
title: Filename
|
||
type: string
|
||
description: The name of the uploaded file.
|
||
examples:
|
||
- files_upload.jsonl
|
||
purpose:
|
||
$ref: '#/components/schemas/FilePurpose'
|
||
description: The intended purpose of the uploaded file, currently supports fine-tuning (`fine-tune`), OCR (`ocr`), Audio/Transcription (`audio`) and batch inference (`batch`).
|
||
examples:
|
||
- fine-tune
|
||
- ocr
|
||
- batch
|
||
- audio
|
||
sample_type:
|
||
$ref: '#/components/schemas/SampleType'
|
||
num_lines:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Num Lines
|
||
mimetype:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Mimetype
|
||
source:
|
||
$ref: '#/components/schemas/Source'
|
||
signature:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Signature
|
||
required:
|
||
- id
|
||
- object
|
||
- bytes
|
||
- created_at
|
||
- filename
|
||
- purpose
|
||
- sample_type
|
||
- source
|
||
title: UploadFileOut
|
||
type: object
|
||
FileSchema:
|
||
properties:
|
||
id:
|
||
format: uuid
|
||
title: Id
|
||
type: string
|
||
description: The unique identifier of the file.
|
||
examples:
|
||
- 497f6eca-6276-4993-bfeb-53cbbbba6f09
|
||
object:
|
||
title: Object
|
||
type: string
|
||
description: The object type, which is always "file".
|
||
examples:
|
||
- file
|
||
bytes:
|
||
title: Bytes
|
||
type: integer
|
||
description: The size of the file, in bytes.
|
||
examples:
|
||
- 13000
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) of the event.
|
||
examples:
|
||
- 1716963433
|
||
filename:
|
||
title: Filename
|
||
type: string
|
||
description: The name of the uploaded file.
|
||
examples:
|
||
- files_upload.jsonl
|
||
purpose:
|
||
$ref: '#/components/schemas/FilePurpose'
|
||
description: The intended purpose of the uploaded file, currently supports fine-tuning (`fine-tune`), OCR (`ocr`), Audio/Transcription (`audio`) and batch inference (`batch`).
|
||
examples:
|
||
- fine-tune
|
||
- ocr
|
||
- batch
|
||
- audio
|
||
sample_type:
|
||
$ref: '#/components/schemas/SampleType'
|
||
num_lines:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Num Lines
|
||
mimetype:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Mimetype
|
||
source:
|
||
$ref: '#/components/schemas/Source'
|
||
signature:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Signature
|
||
required:
|
||
- id
|
||
- object
|
||
- bytes
|
||
- created_at
|
||
- filename
|
||
- purpose
|
||
- sample_type
|
||
- source
|
||
title: FileSchema
|
||
type: object
|
||
ListFilesOut:
|
||
properties:
|
||
data:
|
||
items:
|
||
$ref: '#/components/schemas/FileSchema'
|
||
title: Data
|
||
type: array
|
||
object:
|
||
title: Object
|
||
type: string
|
||
total:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Total
|
||
required:
|
||
- data
|
||
- object
|
||
title: ListFilesOut
|
||
type: object
|
||
RetrieveFileOut:
|
||
properties:
|
||
id:
|
||
format: uuid
|
||
title: Id
|
||
type: string
|
||
description: The unique identifier of the file.
|
||
examples:
|
||
- 497f6eca-6276-4993-bfeb-53cbbbba6f09
|
||
object:
|
||
title: Object
|
||
type: string
|
||
description: The object type, which is always "file".
|
||
examples:
|
||
- file
|
||
bytes:
|
||
title: Bytes
|
||
type: integer
|
||
description: The size of the file, in bytes.
|
||
examples:
|
||
- 13000
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) of the event.
|
||
examples:
|
||
- 1716963433
|
||
filename:
|
||
title: Filename
|
||
type: string
|
||
description: The name of the uploaded file.
|
||
examples:
|
||
- files_upload.jsonl
|
||
purpose:
|
||
$ref: '#/components/schemas/FilePurpose'
|
||
description: The intended purpose of the uploaded file, currently supports fine-tuning (`fine-tune`), OCR (`ocr`), Audio/Transcription (`audio`) and batch inference (`batch`).
|
||
examples:
|
||
- fine-tune
|
||
- ocr
|
||
- batch
|
||
- audio
|
||
sample_type:
|
||
$ref: '#/components/schemas/SampleType'
|
||
num_lines:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Num Lines
|
||
mimetype:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Mimetype
|
||
source:
|
||
$ref: '#/components/schemas/Source'
|
||
signature:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Signature
|
||
deleted:
|
||
title: Deleted
|
||
type: boolean
|
||
required:
|
||
- id
|
||
- object
|
||
- bytes
|
||
- created_at
|
||
- filename
|
||
- purpose
|
||
- sample_type
|
||
- source
|
||
- deleted
|
||
title: RetrieveFileOut
|
||
type: object
|
||
DeleteFileOut:
|
||
properties:
|
||
id:
|
||
format: uuid
|
||
title: Id
|
||
type: string
|
||
description: The ID of the deleted file.
|
||
examples:
|
||
- 497f6eca-6276-4993-bfeb-53cbbbba6f09
|
||
object:
|
||
title: Object
|
||
type: string
|
||
description: The object type that was deleted
|
||
examples:
|
||
- file
|
||
deleted:
|
||
title: Deleted
|
||
type: boolean
|
||
description: The deletion status.
|
||
examples:
|
||
- false
|
||
required:
|
||
- id
|
||
- object
|
||
- deleted
|
||
title: DeleteFileOut
|
||
type: object
|
||
FileSignedURL:
|
||
properties:
|
||
url:
|
||
title: Url
|
||
type: string
|
||
required:
|
||
- url
|
||
title: FileSignedURL
|
||
type: object
|
||
FineTuneableModelType:
|
||
enum:
|
||
- completion
|
||
- classifier
|
||
title: FineTuneableModelType
|
||
type: string
|
||
ClassifierJobOut:
|
||
properties:
|
||
id:
|
||
format: uuid
|
||
title: Id
|
||
type: string
|
||
description: The ID of the job.
|
||
auto_start:
|
||
title: Auto Start
|
||
type: boolean
|
||
model:
|
||
title: Model
|
||
type: string
|
||
status:
|
||
enum:
|
||
- QUEUED
|
||
- STARTED
|
||
- VALIDATING
|
||
- VALIDATED
|
||
- RUNNING
|
||
- FAILED_VALIDATION
|
||
- FAILED
|
||
- SUCCESS
|
||
- CANCELLED
|
||
- CANCELLATION_REQUESTED
|
||
title: Status
|
||
type: string
|
||
description: The current status of the fine-tuning job.
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) for when the fine-tuning job was created.
|
||
modified_at:
|
||
title: Modified At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) for when the fine-tuning job was last modified.
|
||
training_files:
|
||
items:
|
||
format: uuid
|
||
type: string
|
||
title: Training Files
|
||
type: array
|
||
description: A list containing the IDs of uploaded files that contain training data.
|
||
validation_files:
|
||
anyOf:
|
||
- items:
|
||
format: uuid
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
default: []
|
||
title: Validation Files
|
||
description: A list containing the IDs of uploaded files that contain validation data.
|
||
object:
|
||
const: job
|
||
default: job
|
||
title: Object
|
||
type: string
|
||
description: The object type of the fine-tuning job.
|
||
fine_tuned_model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Fine Tuned Model
|
||
description: The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.
|
||
suffix:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Suffix
|
||
description: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.
|
||
integrations:
|
||
anyOf:
|
||
- items:
|
||
discriminator:
|
||
mapping:
|
||
wandb: '#/components/schemas/WandbIntegrationOut'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/WandbIntegrationOut'
|
||
type: array
|
||
- type: 'null'
|
||
title: Integrations
|
||
description: A list of integrations enabled for your fine-tuning job.
|
||
trained_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Trained Tokens
|
||
description: Total number of tokens trained.
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/JobMetadataOut'
|
||
- type: 'null'
|
||
job_type:
|
||
const: classifier
|
||
default: classifier
|
||
title: Job Type
|
||
type: string
|
||
description: The type of job (`FT` for fine-tuning).
|
||
hyperparameters:
|
||
$ref: '#/components/schemas/ClassifierTrainingParameters'
|
||
required:
|
||
- id
|
||
- auto_start
|
||
- model
|
||
- status
|
||
- created_at
|
||
- modified_at
|
||
- training_files
|
||
- hyperparameters
|
||
title: ClassifierJobOut
|
||
type: object
|
||
ClassifierTrainingParameters:
|
||
properties:
|
||
training_steps:
|
||
anyOf:
|
||
- minimum: 1
|
||
type: integer
|
||
- type: 'null'
|
||
title: Training Steps
|
||
learning_rate:
|
||
default: 0.0001
|
||
maximum: 1
|
||
minimum: 1.0e-08
|
||
title: Learning Rate
|
||
type: number
|
||
weight_decay:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.1
|
||
title: Weight Decay
|
||
warmup_fraction:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.05
|
||
title: Warmup Fraction
|
||
epochs:
|
||
anyOf:
|
||
- exclusiveMinimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
title: Epochs
|
||
seq_len:
|
||
anyOf:
|
||
- minimum: 100
|
||
type: integer
|
||
- type: 'null'
|
||
title: Seq Len
|
||
title: ClassifierTrainingParameters
|
||
type: object
|
||
CompletionJobOut:
|
||
properties:
|
||
id:
|
||
format: uuid
|
||
title: Id
|
||
type: string
|
||
description: The ID of the job.
|
||
auto_start:
|
||
title: Auto Start
|
||
type: boolean
|
||
model:
|
||
title: Model
|
||
type: string
|
||
status:
|
||
enum:
|
||
- QUEUED
|
||
- STARTED
|
||
- VALIDATING
|
||
- VALIDATED
|
||
- RUNNING
|
||
- FAILED_VALIDATION
|
||
- FAILED
|
||
- SUCCESS
|
||
- CANCELLED
|
||
- CANCELLATION_REQUESTED
|
||
title: Status
|
||
type: string
|
||
description: The current status of the fine-tuning job.
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) for when the fine-tuning job was created.
|
||
modified_at:
|
||
title: Modified At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) for when the fine-tuning job was last modified.
|
||
training_files:
|
||
items:
|
||
format: uuid
|
||
type: string
|
||
title: Training Files
|
||
type: array
|
||
description: A list containing the IDs of uploaded files that contain training data.
|
||
validation_files:
|
||
anyOf:
|
||
- items:
|
||
format: uuid
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
default: []
|
||
title: Validation Files
|
||
description: A list containing the IDs of uploaded files that contain validation data.
|
||
object:
|
||
const: job
|
||
default: job
|
||
title: Object
|
||
type: string
|
||
description: The object type of the fine-tuning job.
|
||
fine_tuned_model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Fine Tuned Model
|
||
description: The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.
|
||
suffix:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Suffix
|
||
description: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.
|
||
integrations:
|
||
anyOf:
|
||
- items:
|
||
discriminator:
|
||
mapping:
|
||
wandb: '#/components/schemas/WandbIntegrationOut'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/WandbIntegrationOut'
|
||
type: array
|
||
- type: 'null'
|
||
title: Integrations
|
||
description: A list of integrations enabled for your fine-tuning job.
|
||
trained_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Trained Tokens
|
||
description: Total number of tokens trained.
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/JobMetadataOut'
|
||
- type: 'null'
|
||
job_type:
|
||
const: completion
|
||
default: completion
|
||
title: Job Type
|
||
type: string
|
||
description: The type of job (`FT` for fine-tuning).
|
||
hyperparameters:
|
||
$ref: '#/components/schemas/CompletionTrainingParameters'
|
||
repositories:
|
||
default: []
|
||
items:
|
||
discriminator:
|
||
mapping:
|
||
github: '#/components/schemas/GithubRepositoryOut'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/GithubRepositoryOut'
|
||
title: Repositories
|
||
type: array
|
||
required:
|
||
- id
|
||
- auto_start
|
||
- model
|
||
- status
|
||
- created_at
|
||
- modified_at
|
||
- training_files
|
||
- hyperparameters
|
||
title: CompletionJobOut
|
||
type: object
|
||
CompletionTrainingParameters:
|
||
properties:
|
||
training_steps:
|
||
anyOf:
|
||
- minimum: 1
|
||
type: integer
|
||
- type: 'null'
|
||
title: Training Steps
|
||
learning_rate:
|
||
default: 0.0001
|
||
maximum: 1
|
||
minimum: 1.0e-08
|
||
title: Learning Rate
|
||
type: number
|
||
weight_decay:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.1
|
||
title: Weight Decay
|
||
warmup_fraction:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.05
|
||
title: Warmup Fraction
|
||
epochs:
|
||
anyOf:
|
||
- exclusiveMinimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
title: Epochs
|
||
seq_len:
|
||
anyOf:
|
||
- minimum: 100
|
||
type: integer
|
||
- type: 'null'
|
||
title: Seq Len
|
||
fim_ratio:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.9
|
||
title: Fim Ratio
|
||
title: CompletionTrainingParameters
|
||
type: object
|
||
GithubRepositoryOut:
|
||
properties:
|
||
type:
|
||
const: github
|
||
default: github
|
||
title: Type
|
||
type: string
|
||
name:
|
||
title: Name
|
||
type: string
|
||
owner:
|
||
title: Owner
|
||
type: string
|
||
ref:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Ref
|
||
weight:
|
||
default: 1.0
|
||
exclusiveMinimum: 0
|
||
title: Weight
|
||
type: number
|
||
commit_id:
|
||
maxLength: 40
|
||
minLength: 40
|
||
title: Commit Id
|
||
type: string
|
||
required:
|
||
- name
|
||
- owner
|
||
- commit_id
|
||
title: GithubRepositoryOut
|
||
type: object
|
||
JobMetadataOut:
|
||
properties:
|
||
expected_duration_seconds:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Expected Duration Seconds
|
||
cost:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Cost
|
||
cost_currency:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Cost Currency
|
||
train_tokens_per_step:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Train Tokens Per Step
|
||
train_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Train Tokens
|
||
data_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Data Tokens
|
||
estimated_start_time:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Estimated Start Time
|
||
title: JobMetadataOut
|
||
type: object
|
||
JobsOut:
|
||
properties:
|
||
data:
|
||
default: []
|
||
items:
|
||
discriminator:
|
||
mapping:
|
||
classifier: '#/components/schemas/ClassifierJobOut'
|
||
completion: '#/components/schemas/CompletionJobOut'
|
||
propertyName: job_type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/CompletionJobOut'
|
||
- $ref: '#/components/schemas/ClassifierJobOut'
|
||
title: Data
|
||
type: array
|
||
object:
|
||
const: list
|
||
default: list
|
||
title: Object
|
||
type: string
|
||
total:
|
||
title: Total
|
||
type: integer
|
||
required:
|
||
- total
|
||
title: JobsOut
|
||
type: object
|
||
WandbIntegrationOut:
|
||
properties:
|
||
type:
|
||
const: wandb
|
||
default: wandb
|
||
title: Type
|
||
type: string
|
||
project:
|
||
title: Project
|
||
type: string
|
||
description: The name of the project that the new run will be created under.
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description: A display name to set for the run. If not set, will use the job ID as the name.
|
||
run_name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Run Name
|
||
url:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Url
|
||
required:
|
||
- project
|
||
title: WandbIntegrationOut
|
||
type: object
|
||
LegacyJobMetadataOut:
|
||
properties:
|
||
expected_duration_seconds:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Expected Duration Seconds
|
||
description: The approximated time (in seconds) for the fine-tuning process to complete.
|
||
examples:
|
||
- 220
|
||
cost:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Cost
|
||
description: The cost of the fine-tuning job.
|
||
examples:
|
||
- 10
|
||
cost_currency:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Cost Currency
|
||
description: The currency used for the fine-tuning job cost.
|
||
examples:
|
||
- EUR
|
||
train_tokens_per_step:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Train Tokens Per Step
|
||
description: The number of tokens consumed by one training step.
|
||
examples:
|
||
- 131072
|
||
train_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Train Tokens
|
||
description: The total number of tokens used during the fine-tuning process.
|
||
examples:
|
||
- 1310720
|
||
data_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Data Tokens
|
||
description: The total number of tokens in the training dataset.
|
||
examples:
|
||
- 305375
|
||
estimated_start_time:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Estimated Start Time
|
||
deprecated:
|
||
default: true
|
||
title: Deprecated
|
||
type: boolean
|
||
details:
|
||
title: Details
|
||
type: string
|
||
epochs:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Epochs
|
||
description: The number of complete passes through the entire training dataset.
|
||
examples:
|
||
- 4.2922
|
||
training_steps:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Training Steps
|
||
description: The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset.
|
||
examples:
|
||
- 10
|
||
object:
|
||
const: job.metadata
|
||
default: job.metadata
|
||
title: Object
|
||
type: string
|
||
required:
|
||
- details
|
||
title: LegacyJobMetadataOut
|
||
type: object
|
||
ClassifierTargetIn:
|
||
properties:
|
||
name:
|
||
title: Name
|
||
type: string
|
||
labels:
|
||
items:
|
||
type: string
|
||
title: Labels
|
||
type: array
|
||
weight:
|
||
default: 1.0
|
||
minimum: 0
|
||
title: Weight
|
||
type: number
|
||
loss_function:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/FTClassifierLossFunction'
|
||
- type: 'null'
|
||
required:
|
||
- name
|
||
- labels
|
||
title: ClassifierTargetIn
|
||
type: object
|
||
ClassifierTrainingParametersIn:
|
||
properties:
|
||
training_steps:
|
||
anyOf:
|
||
- minimum: 1
|
||
type: integer
|
||
- type: 'null'
|
||
title: Training Steps
|
||
description: The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset.
|
||
learning_rate:
|
||
default: 0.0001
|
||
maximum: 1
|
||
minimum: 1.0e-08
|
||
title: Learning Rate
|
||
type: number
|
||
description: A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process.
|
||
weight_decay:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.1
|
||
title: Weight Decay
|
||
description: (Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large.
|
||
warmup_fraction:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.05
|
||
title: Warmup Fraction
|
||
description: (Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune)
|
||
epochs:
|
||
anyOf:
|
||
- exclusiveMinimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
title: Epochs
|
||
seq_len:
|
||
anyOf:
|
||
- minimum: 100
|
||
type: integer
|
||
- type: 'null'
|
||
title: Seq Len
|
||
title: ClassifierTrainingParametersIn
|
||
type: object
|
||
description: The fine-tuning hyperparameter settings used in a classifier fine-tune job.
|
||
CompletionTrainingParametersIn:
|
||
properties:
|
||
training_steps:
|
||
anyOf:
|
||
- minimum: 1
|
||
type: integer
|
||
- type: 'null'
|
||
title: Training Steps
|
||
description: The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset.
|
||
learning_rate:
|
||
default: 0.0001
|
||
maximum: 1
|
||
minimum: 1.0e-08
|
||
title: Learning Rate
|
||
type: number
|
||
description: A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process.
|
||
weight_decay:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.1
|
||
title: Weight Decay
|
||
description: (Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large.
|
||
warmup_fraction:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.05
|
||
title: Warmup Fraction
|
||
description: (Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune)
|
||
epochs:
|
||
anyOf:
|
||
- exclusiveMinimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
title: Epochs
|
||
seq_len:
|
||
anyOf:
|
||
- minimum: 100
|
||
type: integer
|
||
- type: 'null'
|
||
title: Seq Len
|
||
fim_ratio:
|
||
anyOf:
|
||
- maximum: 1
|
||
minimum: 0
|
||
type: number
|
||
- type: 'null'
|
||
default: 0.9
|
||
title: Fim Ratio
|
||
title: CompletionTrainingParametersIn
|
||
type: object
|
||
description: The fine-tuning hyperparameter settings used in a fine-tune job.
|
||
FTClassifierLossFunction:
|
||
enum:
|
||
- single_class
|
||
- multi_class
|
||
title: FTClassifierLossFunction
|
||
type: string
|
||
GithubRepositoryIn:
|
||
properties:
|
||
type:
|
||
const: github
|
||
default: github
|
||
title: Type
|
||
type: string
|
||
name:
|
||
title: Name
|
||
type: string
|
||
owner:
|
||
title: Owner
|
||
type: string
|
||
ref:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Ref
|
||
weight:
|
||
default: 1.0
|
||
exclusiveMinimum: 0
|
||
title: Weight
|
||
type: number
|
||
token:
|
||
title: Token
|
||
type: string
|
||
required:
|
||
- name
|
||
- owner
|
||
- token
|
||
title: GithubRepositoryIn
|
||
type: object
|
||
JobIn:
|
||
properties:
|
||
model:
|
||
title: Model
|
||
type: string
|
||
training_files:
|
||
default: []
|
||
items:
|
||
$ref: '#/components/schemas/TrainingFile'
|
||
title: Training Files
|
||
type: array
|
||
validation_files:
|
||
anyOf:
|
||
- items:
|
||
format: uuid
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
title: Validation Files
|
||
description: A list containing the IDs of uploaded files that contain validation data. If you provide these files, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in `checkpoints` when getting the status of a running fine-tuning job. The same data should not be present in both train and validation files.
|
||
suffix:
|
||
anyOf:
|
||
- maxLength: 18
|
||
type: string
|
||
- type: 'null'
|
||
title: Suffix
|
||
description: A string that will be added to your fine-tuning model name. For example, a suffix of "my-great-model" would produce a model name like `ft:open-mistral-7b:my-great-model:xxx...`
|
||
integrations:
|
||
anyOf:
|
||
- items:
|
||
discriminator:
|
||
mapping:
|
||
wandb: '#/components/schemas/WandbIntegration'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/WandbIntegration'
|
||
type: array
|
||
- type: 'null'
|
||
title: Integrations
|
||
description: A list of integrations to enable for your fine-tuning job.
|
||
auto_start:
|
||
description: This field will be required in a future release.
|
||
title: Auto Start
|
||
type: boolean
|
||
invalid_sample_skip_percentage:
|
||
default: 0
|
||
maximum: 0.5
|
||
minimum: 0
|
||
title: Invalid Sample Skip Percentage
|
||
type: number
|
||
job_type:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/FineTuneableModelType'
|
||
- type: 'null'
|
||
hyperparameters:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/CompletionTrainingParametersIn'
|
||
- $ref: '#/components/schemas/ClassifierTrainingParametersIn'
|
||
title: Hyperparameters
|
||
repositories:
|
||
anyOf:
|
||
- items:
|
||
discriminator:
|
||
mapping:
|
||
github: '#/components/schemas/GithubRepositoryIn'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/GithubRepositoryIn'
|
||
type: array
|
||
- type: 'null'
|
||
title: Repositories
|
||
classifier_targets:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/ClassifierTargetIn'
|
||
type: array
|
||
- type: 'null'
|
||
title: Classifier Targets
|
||
required:
|
||
- model
|
||
- hyperparameters
|
||
title: JobIn
|
||
type: object
|
||
TrainingFile:
|
||
properties:
|
||
file_id:
|
||
format: uuid
|
||
title: File Id
|
||
type: string
|
||
weight:
|
||
default: 1.0
|
||
exclusiveMinimum: 0
|
||
title: Weight
|
||
type: number
|
||
required:
|
||
- file_id
|
||
title: TrainingFile
|
||
type: object
|
||
WandbIntegration:
|
||
properties:
|
||
type:
|
||
const: wandb
|
||
default: wandb
|
||
title: Type
|
||
type: string
|
||
project:
|
||
title: Project
|
||
type: string
|
||
description: The name of the project that the new run will be created under.
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description: A display name to set for the run. If not set, will use the job ID as the name.
|
||
api_key:
|
||
maxLength: 40
|
||
minLength: 40
|
||
title: Api Key
|
||
type: string
|
||
description: The WandB API key to use for authentication.
|
||
run_name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Run Name
|
||
required:
|
||
- project
|
||
- api_key
|
||
title: WandbIntegration
|
||
type: object
|
||
CheckpointOut:
|
||
properties:
|
||
metrics:
|
||
$ref: '#/components/schemas/MetricOut'
|
||
step_number:
|
||
title: Step Number
|
||
type: integer
|
||
description: The step number that the checkpoint was created at.
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) for when the checkpoint was created.
|
||
examples:
|
||
- 1716963433
|
||
required:
|
||
- metrics
|
||
- step_number
|
||
- created_at
|
||
title: CheckpointOut
|
||
type: object
|
||
ClassifierDetailedJobOut:
|
||
properties:
|
||
id:
|
||
format: uuid
|
||
title: Id
|
||
type: string
|
||
auto_start:
|
||
title: Auto Start
|
||
type: boolean
|
||
model:
|
||
title: Model
|
||
type: string
|
||
status:
|
||
enum:
|
||
- QUEUED
|
||
- STARTED
|
||
- VALIDATING
|
||
- VALIDATED
|
||
- RUNNING
|
||
- FAILED_VALIDATION
|
||
- FAILED
|
||
- SUCCESS
|
||
- CANCELLED
|
||
- CANCELLATION_REQUESTED
|
||
title: Status
|
||
type: string
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
modified_at:
|
||
title: Modified At
|
||
type: integer
|
||
training_files:
|
||
items:
|
||
format: uuid
|
||
type: string
|
||
title: Training Files
|
||
type: array
|
||
validation_files:
|
||
anyOf:
|
||
- items:
|
||
format: uuid
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
default: []
|
||
title: Validation Files
|
||
object:
|
||
const: job
|
||
default: job
|
||
title: Object
|
||
type: string
|
||
fine_tuned_model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Fine Tuned Model
|
||
suffix:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Suffix
|
||
integrations:
|
||
anyOf:
|
||
- items:
|
||
discriminator:
|
||
mapping:
|
||
wandb: '#/components/schemas/WandbIntegrationOut'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/WandbIntegrationOut'
|
||
type: array
|
||
- type: 'null'
|
||
title: Integrations
|
||
trained_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Trained Tokens
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/JobMetadataOut'
|
||
- type: 'null'
|
||
job_type:
|
||
const: classifier
|
||
default: classifier
|
||
title: Job Type
|
||
type: string
|
||
hyperparameters:
|
||
$ref: '#/components/schemas/ClassifierTrainingParameters'
|
||
events:
|
||
default: []
|
||
items:
|
||
$ref: '#/components/schemas/EventOut'
|
||
title: Events
|
||
type: array
|
||
description: Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here.
|
||
checkpoints:
|
||
default: []
|
||
items:
|
||
$ref: '#/components/schemas/CheckpointOut'
|
||
title: Checkpoints
|
||
type: array
|
||
classifier_targets:
|
||
items:
|
||
$ref: '#/components/schemas/ClassifierTargetOut'
|
||
title: Classifier Targets
|
||
type: array
|
||
required:
|
||
- id
|
||
- auto_start
|
||
- model
|
||
- status
|
||
- created_at
|
||
- modified_at
|
||
- training_files
|
||
- hyperparameters
|
||
- classifier_targets
|
||
title: ClassifierDetailedJobOut
|
||
type: object
|
||
ClassifierTargetOut:
|
||
properties:
|
||
name:
|
||
title: Name
|
||
type: string
|
||
labels:
|
||
items:
|
||
type: string
|
||
title: Labels
|
||
type: array
|
||
weight:
|
||
title: Weight
|
||
type: number
|
||
loss_function:
|
||
$ref: '#/components/schemas/FTClassifierLossFunction'
|
||
required:
|
||
- name
|
||
- labels
|
||
- weight
|
||
- loss_function
|
||
title: ClassifierTargetOut
|
||
type: object
|
||
CompletionDetailedJobOut:
|
||
properties:
|
||
id:
|
||
format: uuid
|
||
title: Id
|
||
type: string
|
||
auto_start:
|
||
title: Auto Start
|
||
type: boolean
|
||
model:
|
||
title: Model
|
||
type: string
|
||
status:
|
||
enum:
|
||
- QUEUED
|
||
- STARTED
|
||
- VALIDATING
|
||
- VALIDATED
|
||
- RUNNING
|
||
- FAILED_VALIDATION
|
||
- FAILED
|
||
- SUCCESS
|
||
- CANCELLED
|
||
- CANCELLATION_REQUESTED
|
||
title: Status
|
||
type: string
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
modified_at:
|
||
title: Modified At
|
||
type: integer
|
||
training_files:
|
||
items:
|
||
format: uuid
|
||
type: string
|
||
title: Training Files
|
||
type: array
|
||
validation_files:
|
||
anyOf:
|
||
- items:
|
||
format: uuid
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
default: []
|
||
title: Validation Files
|
||
object:
|
||
const: job
|
||
default: job
|
||
title: Object
|
||
type: string
|
||
fine_tuned_model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Fine Tuned Model
|
||
suffix:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Suffix
|
||
integrations:
|
||
anyOf:
|
||
- items:
|
||
discriminator:
|
||
mapping:
|
||
wandb: '#/components/schemas/WandbIntegrationOut'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/WandbIntegrationOut'
|
||
type: array
|
||
- type: 'null'
|
||
title: Integrations
|
||
trained_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Trained Tokens
|
||
metadata:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/JobMetadataOut'
|
||
- type: 'null'
|
||
job_type:
|
||
const: completion
|
||
default: completion
|
||
title: Job Type
|
||
type: string
|
||
hyperparameters:
|
||
$ref: '#/components/schemas/CompletionTrainingParameters'
|
||
repositories:
|
||
default: []
|
||
items:
|
||
discriminator:
|
||
mapping:
|
||
github: '#/components/schemas/GithubRepositoryOut'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/GithubRepositoryOut'
|
||
title: Repositories
|
||
type: array
|
||
events:
|
||
default: []
|
||
items:
|
||
$ref: '#/components/schemas/EventOut'
|
||
title: Events
|
||
type: array
|
||
description: Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here.
|
||
checkpoints:
|
||
default: []
|
||
items:
|
||
$ref: '#/components/schemas/CheckpointOut'
|
||
title: Checkpoints
|
||
type: array
|
||
required:
|
||
- id
|
||
- auto_start
|
||
- model
|
||
- status
|
||
- created_at
|
||
- modified_at
|
||
- training_files
|
||
- hyperparameters
|
||
title: CompletionDetailedJobOut
|
||
type: object
|
||
EventOut:
|
||
properties:
|
||
name:
|
||
title: Name
|
||
type: string
|
||
description: The name of the event.
|
||
data:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Data
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
description: The UNIX timestamp (in seconds) of the event.
|
||
required:
|
||
- name
|
||
- created_at
|
||
title: EventOut
|
||
type: object
|
||
MetricOut:
|
||
properties:
|
||
train_loss:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Train Loss
|
||
valid_loss:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Valid Loss
|
||
valid_mean_token_accuracy:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Valid Mean Token Accuracy
|
||
title: MetricOut
|
||
type: object
|
||
description: Metrics at the step number during the fine-tuning job. Use these metrics to assess if the training is going smoothly (loss should decrease, token accuracy should increase).
|
||
ClassifierFTModelOut:
|
||
properties:
|
||
id:
|
||
title: Id
|
||
type: string
|
||
object:
|
||
const: model
|
||
default: model
|
||
title: Object
|
||
type: string
|
||
created:
|
||
title: Created
|
||
type: integer
|
||
owned_by:
|
||
title: Owned By
|
||
type: string
|
||
workspace_id:
|
||
title: Workspace Id
|
||
type: string
|
||
root:
|
||
title: Root
|
||
type: string
|
||
root_version:
|
||
title: Root Version
|
||
type: string
|
||
archived:
|
||
title: Archived
|
||
type: boolean
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
capabilities:
|
||
$ref: '#/components/schemas/FTModelCapabilitiesOut'
|
||
max_context_length:
|
||
default: 32768
|
||
title: Max Context Length
|
||
type: integer
|
||
aliases:
|
||
default: []
|
||
items:
|
||
type: string
|
||
title: Aliases
|
||
type: array
|
||
job:
|
||
format: uuid
|
||
title: Job
|
||
type: string
|
||
classifier_targets:
|
||
items:
|
||
$ref: '#/components/schemas/ClassifierTargetOut'
|
||
title: Classifier Targets
|
||
type: array
|
||
model_type:
|
||
const: classifier
|
||
default: classifier
|
||
title: Model Type
|
||
type: string
|
||
required:
|
||
- id
|
||
- created
|
||
- owned_by
|
||
- workspace_id
|
||
- root
|
||
- root_version
|
||
- archived
|
||
- capabilities
|
||
- job
|
||
- classifier_targets
|
||
title: ClassifierFTModelOut
|
||
type: object
|
||
CompletionFTModelOut:
|
||
properties:
|
||
id:
|
||
title: Id
|
||
type: string
|
||
object:
|
||
const: model
|
||
default: model
|
||
title: Object
|
||
type: string
|
||
created:
|
||
title: Created
|
||
type: integer
|
||
owned_by:
|
||
title: Owned By
|
||
type: string
|
||
workspace_id:
|
||
title: Workspace Id
|
||
type: string
|
||
root:
|
||
title: Root
|
||
type: string
|
||
root_version:
|
||
title: Root Version
|
||
type: string
|
||
archived:
|
||
title: Archived
|
||
type: boolean
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
capabilities:
|
||
$ref: '#/components/schemas/FTModelCapabilitiesOut'
|
||
max_context_length:
|
||
default: 32768
|
||
title: Max Context Length
|
||
type: integer
|
||
aliases:
|
||
default: []
|
||
items:
|
||
type: string
|
||
title: Aliases
|
||
type: array
|
||
job:
|
||
format: uuid
|
||
title: Job
|
||
type: string
|
||
model_type:
|
||
const: completion
|
||
default: completion
|
||
title: Model Type
|
||
type: string
|
||
required:
|
||
- id
|
||
- created
|
||
- owned_by
|
||
- workspace_id
|
||
- root
|
||
- root_version
|
||
- archived
|
||
- capabilities
|
||
- job
|
||
title: CompletionFTModelOut
|
||
type: object
|
||
FTModelCapabilitiesOut:
|
||
properties:
|
||
completion_chat:
|
||
default: true
|
||
title: Completion Chat
|
||
type: boolean
|
||
completion_fim:
|
||
default: false
|
||
title: Completion Fim
|
||
type: boolean
|
||
function_calling:
|
||
default: false
|
||
title: Function Calling
|
||
type: boolean
|
||
fine_tuning:
|
||
default: false
|
||
title: Fine Tuning
|
||
type: boolean
|
||
classification:
|
||
default: false
|
||
title: Classification
|
||
type: boolean
|
||
title: FTModelCapabilitiesOut
|
||
type: object
|
||
UpdateFTModelIn:
|
||
properties:
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
title: UpdateFTModelIn
|
||
type: object
|
||
ArchiveFTModelOut:
|
||
properties:
|
||
id:
|
||
title: Id
|
||
type: string
|
||
object:
|
||
const: model
|
||
default: model
|
||
title: Object
|
||
type: string
|
||
archived:
|
||
default: true
|
||
title: Archived
|
||
type: boolean
|
||
required:
|
||
- id
|
||
title: ArchiveFTModelOut
|
||
type: object
|
||
UnarchiveFTModelOut:
|
||
properties:
|
||
id:
|
||
title: Id
|
||
type: string
|
||
object:
|
||
const: model
|
||
default: model
|
||
title: Object
|
||
type: string
|
||
archived:
|
||
default: false
|
||
title: Archived
|
||
type: boolean
|
||
required:
|
||
- id
|
||
title: UnarchiveFTModelOut
|
||
type: object
|
||
BatchJobStatus:
|
||
enum:
|
||
- QUEUED
|
||
- RUNNING
|
||
- SUCCESS
|
||
- FAILED
|
||
- TIMEOUT_EXCEEDED
|
||
- CANCELLATION_REQUESTED
|
||
- CANCELLED
|
||
title: BatchJobStatus
|
||
type: string
|
||
BatchError:
|
||
properties:
|
||
message:
|
||
title: Message
|
||
type: string
|
||
count:
|
||
default: 1
|
||
title: Count
|
||
type: integer
|
||
required:
|
||
- message
|
||
title: BatchError
|
||
type: object
|
||
BatchJobOut:
|
||
properties:
|
||
id:
|
||
title: Id
|
||
type: string
|
||
object:
|
||
const: batch
|
||
default: batch
|
||
title: Object
|
||
type: string
|
||
input_files:
|
||
items:
|
||
format: uuid
|
||
type: string
|
||
title: Input Files
|
||
type: array
|
||
metadata:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Metadata
|
||
endpoint:
|
||
title: Endpoint
|
||
type: string
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Agent Id
|
||
output_file:
|
||
anyOf:
|
||
- format: uuid
|
||
type: string
|
||
- type: 'null'
|
||
title: Output File
|
||
error_file:
|
||
anyOf:
|
||
- format: uuid
|
||
type: string
|
||
- type: 'null'
|
||
title: Error File
|
||
errors:
|
||
items:
|
||
$ref: '#/components/schemas/BatchError'
|
||
title: Errors
|
||
type: array
|
||
outputs:
|
||
anyOf:
|
||
- items:
|
||
additionalProperties: true
|
||
type: object
|
||
type: array
|
||
- type: 'null'
|
||
title: Outputs
|
||
status:
|
||
$ref: '#/components/schemas/BatchJobStatus'
|
||
created_at:
|
||
title: Created At
|
||
type: integer
|
||
total_requests:
|
||
title: Total Requests
|
||
type: integer
|
||
completed_requests:
|
||
title: Completed Requests
|
||
type: integer
|
||
succeeded_requests:
|
||
title: Succeeded Requests
|
||
type: integer
|
||
failed_requests:
|
||
title: Failed Requests
|
||
type: integer
|
||
started_at:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Started At
|
||
completed_at:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Completed At
|
||
required:
|
||
- id
|
||
- input_files
|
||
- endpoint
|
||
- errors
|
||
- status
|
||
- created_at
|
||
- total_requests
|
||
- completed_requests
|
||
- succeeded_requests
|
||
- failed_requests
|
||
title: BatchJobOut
|
||
type: object
|
||
BatchJobsOut:
|
||
properties:
|
||
data:
|
||
default: []
|
||
items:
|
||
$ref: '#/components/schemas/BatchJobOut'
|
||
title: Data
|
||
type: array
|
||
object:
|
||
const: list
|
||
default: list
|
||
title: Object
|
||
type: string
|
||
total:
|
||
title: Total
|
||
type: integer
|
||
required:
|
||
- total
|
||
title: BatchJobsOut
|
||
type: object
|
||
ApiEndpoint:
|
||
title: ApiEndpoint
|
||
type: string
|
||
enum:
|
||
- /v1/chat/completions
|
||
- /v1/embeddings
|
||
- /v1/fim/completions
|
||
- /v1/moderations
|
||
- /v1/chat/moderations
|
||
- /v1/ocr
|
||
- /v1/classifications
|
||
- /v1/chat/classifications
|
||
- /v1/conversations
|
||
- /v1/audio/transcriptions
|
||
BatchJobIn:
|
||
properties:
|
||
input_files:
|
||
anyOf:
|
||
- items:
|
||
format: uuid
|
||
type: string
|
||
type: array
|
||
- type: 'null'
|
||
title: Input Files
|
||
description: 'The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a "body" field. An example of such file is the following: ```json {"custom_id": "0", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French cheese?"}]}} {"custom_id": "1", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French wine?"}]}} ```'
|
||
requests:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/BatchRequest'
|
||
maxItems: 10000
|
||
type: array
|
||
- type: 'null'
|
||
title: Requests
|
||
endpoint:
|
||
$ref: '#/components/schemas/ApiEndpoint'
|
||
description: The endpoint to be used for batch inference.
|
||
examples:
|
||
- /v1/chat/completions
|
||
- /v1/embeddings
|
||
- /v1/fim/completions
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
description: The model to be used for batch inference.
|
||
examples:
|
||
- mistral-small-latest
|
||
- mistral-medium-latest
|
||
agent_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Agent Id
|
||
description: In case you want to use a specific agent from the **deprecated** agents api for batch inference, you can specify the agent ID here.
|
||
metadata:
|
||
anyOf:
|
||
- additionalProperties:
|
||
maxLength: 512
|
||
minLength: 1
|
||
type: string
|
||
propertyNames:
|
||
maxLength: 32
|
||
minLength: 1
|
||
type: object
|
||
- type: 'null'
|
||
title: Metadata
|
||
description: The metadata of your choice to be associated with the batch inference job.
|
||
timeout_hours:
|
||
default: 24
|
||
title: Timeout Hours
|
||
type: integer
|
||
description: The timeout in hours for the batch inference job.
|
||
required:
|
||
- endpoint
|
||
title: BatchJobIn
|
||
type: object
|
||
BatchRequest:
|
||
properties:
|
||
custom_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Custom Id
|
||
body:
|
||
additionalProperties: true
|
||
title: Body
|
||
type: object
|
||
required:
|
||
- body
|
||
title: BatchRequest
|
||
type: object
|
||
AssistantMessage:
|
||
properties:
|
||
role:
|
||
type: string
|
||
const: assistant
|
||
title: Role
|
||
default: assistant
|
||
content:
|
||
title: Content
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
- items:
|
||
$ref: '#/components/schemas/ContentChunk'
|
||
type: array
|
||
tool_calls:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/ToolCall'
|
||
type: array
|
||
- type: 'null'
|
||
title: Tool Calls
|
||
prefix:
|
||
type: boolean
|
||
title: Prefix
|
||
default: false
|
||
description: Set this to `true` when adding an assistant message as prefix to condition the model response. The role of the prefix message is to force the model to start its answer by the content of the message.
|
||
additionalProperties: false
|
||
type: object
|
||
title: AssistantMessage
|
||
AudioChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: input_audio
|
||
title: Type
|
||
default: input_audio
|
||
input_audio:
|
||
anyOf:
|
||
- type: string
|
||
- type: string
|
||
format: binary
|
||
title: Input Audio
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- input_audio
|
||
title: AudioChunk
|
||
ChatCompletionRequest:
|
||
properties:
|
||
model:
|
||
title: Model
|
||
type: string
|
||
description: ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.
|
||
examples:
|
||
- mistral-large-latest
|
||
temperature:
|
||
anyOf:
|
||
- type: number
|
||
maximum: 1.5
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Temperature
|
||
description: What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.
|
||
top_p:
|
||
type: number
|
||
maximum: 1
|
||
minimum: 0
|
||
title: Top P
|
||
default: 1.0
|
||
description: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
|
||
max_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Max Tokens
|
||
description: The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.
|
||
stream:
|
||
type: boolean
|
||
title: Stream
|
||
default: false
|
||
description: 'Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.'
|
||
stop:
|
||
anyOf:
|
||
- type: string
|
||
- items:
|
||
type: string
|
||
type: array
|
||
title: Stop
|
||
description: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
|
||
random_seed:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Random Seed
|
||
description: The seed to use for random sampling. If set, different calls will generate deterministic results.
|
||
metadata:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Metadata
|
||
messages:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/SystemMessage'
|
||
- $ref: '#/components/schemas/UserMessage'
|
||
- $ref: '#/components/schemas/AssistantMessage'
|
||
- $ref: '#/components/schemas/ToolMessage'
|
||
discriminator:
|
||
propertyName: role
|
||
mapping:
|
||
assistant: '#/components/schemas/AssistantMessage'
|
||
system: '#/components/schemas/SystemMessage'
|
||
tool: '#/components/schemas/ToolMessage'
|
||
user: '#/components/schemas/UserMessage'
|
||
type: array
|
||
title: Messages
|
||
description: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
|
||
examples:
|
||
- - role: user
|
||
content: Who is the best French painter? Answer in one short sentence.
|
||
response_format:
|
||
$ref: '#/components/schemas/ResponseFormat'
|
||
tools:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/Tool'
|
||
type: array
|
||
- type: 'null'
|
||
title: Tools
|
||
description: A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
|
||
tool_choice:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ToolChoice'
|
||
- $ref: '#/components/schemas/ToolChoiceEnum'
|
||
title: Tool Choice
|
||
default: auto
|
||
description: 'Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.'
|
||
presence_penalty:
|
||
type: number
|
||
maximum: 2
|
||
minimum: -2
|
||
title: Presence Penalty
|
||
default: 0.0
|
||
description: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.
|
||
frequency_penalty:
|
||
type: number
|
||
maximum: 2
|
||
minimum: -2
|
||
title: Frequency Penalty
|
||
default: 0.0
|
||
description: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.
|
||
n:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 1
|
||
- type: 'null'
|
||
title: N
|
||
description: Number of completions to return for each request, input tokens are only billed once.
|
||
prediction:
|
||
$ref: '#/components/schemas/Prediction'
|
||
default:
|
||
type: content
|
||
content: ''
|
||
description: Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-quality results.
|
||
parallel_tool_calls:
|
||
type: boolean
|
||
title: Parallel Tool Calls
|
||
default: true
|
||
description: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.
|
||
prompt_mode:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MistralPromptMode'
|
||
- type: 'null'
|
||
description: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
|
||
safe_prompt:
|
||
type: boolean
|
||
description: Whether to inject a safety prompt before all conversations.
|
||
default: false
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- messages
|
||
- model
|
||
title: ChatCompletionRequest
|
||
ChatModerationRequest:
|
||
properties:
|
||
input:
|
||
anyOf:
|
||
- items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/SystemMessage'
|
||
- $ref: '#/components/schemas/UserMessage'
|
||
- $ref: '#/components/schemas/AssistantMessage'
|
||
- $ref: '#/components/schemas/ToolMessage'
|
||
discriminator:
|
||
propertyName: role
|
||
mapping:
|
||
assistant: '#/components/schemas/AssistantMessage'
|
||
system: '#/components/schemas/SystemMessage'
|
||
tool: '#/components/schemas/ToolMessage'
|
||
user: '#/components/schemas/UserMessage'
|
||
type: array
|
||
- items:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/SystemMessage'
|
||
- $ref: '#/components/schemas/UserMessage'
|
||
- $ref: '#/components/schemas/AssistantMessage'
|
||
- $ref: '#/components/schemas/ToolMessage'
|
||
discriminator:
|
||
propertyName: role
|
||
mapping:
|
||
assistant: '#/components/schemas/AssistantMessage'
|
||
system: '#/components/schemas/SystemMessage'
|
||
tool: '#/components/schemas/ToolMessage'
|
||
user: '#/components/schemas/UserMessage'
|
||
type: array
|
||
type: array
|
||
title: Input
|
||
description: Chat to classify
|
||
model:
|
||
title: Model
|
||
type: string
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- input
|
||
- model
|
||
title: ChatModerationRequest
|
||
ClassificationRequest:
|
||
properties:
|
||
model:
|
||
title: Model
|
||
type: string
|
||
examples:
|
||
- mistral-moderation-latest
|
||
description: ID of the model to use.
|
||
metadata:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Metadata
|
||
input:
|
||
anyOf:
|
||
- type: string
|
||
- items:
|
||
type: string
|
||
type: array
|
||
title: Input
|
||
description: Text to classify.
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- input
|
||
- model
|
||
title: ClassificationRequest
|
||
EmbeddingDtype:
|
||
type: string
|
||
enum:
|
||
- float
|
||
- int8
|
||
- uint8
|
||
- binary
|
||
- ubinary
|
||
title: EmbeddingDtype
|
||
EmbeddingRequest:
|
||
properties:
|
||
model:
|
||
title: Model
|
||
description: ID of the model to use.
|
||
type: string
|
||
example: mistral-embed
|
||
metadata:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Metadata
|
||
input:
|
||
anyOf:
|
||
- type: string
|
||
- items:
|
||
type: string
|
||
type: array
|
||
title: Input
|
||
example:
|
||
- Embed this sentence.
|
||
- As well as this one.
|
||
description: Text to embed.
|
||
output_dimension:
|
||
anyOf:
|
||
- type: integer
|
||
exclusiveMinimum: 0
|
||
- type: 'null'
|
||
title: Output Dimension
|
||
description: The dimension of the output embeddings when feature available. If not provided, a default output dimension will be used.
|
||
output_dtype:
|
||
$ref: '#/components/schemas/EmbeddingDtype'
|
||
description: The data type of the output embeddings when feature available. If not provided, a default output data type will be used.
|
||
default: float
|
||
encoding_format:
|
||
$ref: '#/components/schemas/EncodingFormat'
|
||
description: The format of embeddings in the response.
|
||
default: float
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- input
|
||
- model
|
||
title: EmbeddingRequest
|
||
EncodingFormat:
|
||
type: string
|
||
enum:
|
||
- float
|
||
- base64
|
||
title: EncodingFormat
|
||
FIMCompletionRequest:
|
||
properties:
|
||
model:
|
||
title: Model
|
||
default: codestral-2404
|
||
type: string
|
||
description: ID of the model with FIM to use.
|
||
examples:
|
||
- codestral-latest
|
||
temperature:
|
||
anyOf:
|
||
- type: number
|
||
maximum: 1.5
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Temperature
|
||
description: What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.
|
||
top_p:
|
||
type: number
|
||
maximum: 1
|
||
minimum: 0
|
||
title: Top P
|
||
default: 1.0
|
||
description: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
|
||
max_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Max Tokens
|
||
description: The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.
|
||
stream:
|
||
type: boolean
|
||
title: Stream
|
||
default: false
|
||
description: 'Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.'
|
||
stop:
|
||
anyOf:
|
||
- type: string
|
||
- items:
|
||
type: string
|
||
type: array
|
||
title: Stop
|
||
description: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
|
||
random_seed:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Random Seed
|
||
description: The seed to use for random sampling. If set, different calls will generate deterministic results.
|
||
metadata:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Metadata
|
||
prompt:
|
||
type: string
|
||
title: Prompt
|
||
description: The text/code to complete.
|
||
examples:
|
||
- def
|
||
suffix:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Suffix
|
||
default: ''
|
||
description: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.
|
||
examples:
|
||
- return a+b
|
||
min_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Min Tokens
|
||
description: The minimum number of tokens to generate in the completion.
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- prompt
|
||
- model
|
||
title: FIMCompletionRequest
|
||
FileChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: file
|
||
title: Type
|
||
default: file
|
||
file_id:
|
||
type: string
|
||
format: uuid
|
||
title: File Id
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- file_id
|
||
title: FileChunk
|
||
FunctionCall:
|
||
properties:
|
||
name:
|
||
type: string
|
||
title: Name
|
||
arguments:
|
||
title: Arguments
|
||
anyOf:
|
||
- type: object
|
||
additionalProperties: true
|
||
- type: string
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- name
|
||
- arguments
|
||
title: FunctionCall
|
||
FunctionName:
|
||
properties:
|
||
name:
|
||
type: string
|
||
title: Name
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- name
|
||
title: FunctionName
|
||
description: this restriction of `Function` is used to select a specific function to call
|
||
InstructRequest:
|
||
properties:
|
||
messages:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/SystemMessage'
|
||
- $ref: '#/components/schemas/UserMessage'
|
||
- $ref: '#/components/schemas/AssistantMessage'
|
||
- $ref: '#/components/schemas/ToolMessage'
|
||
discriminator:
|
||
propertyName: role
|
||
mapping:
|
||
assistant: '#/components/schemas/AssistantMessage'
|
||
system: '#/components/schemas/SystemMessage'
|
||
tool: '#/components/schemas/ToolMessage'
|
||
user: '#/components/schemas/UserMessage'
|
||
type: array
|
||
title: Messages
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- messages
|
||
title: InstructRequest
|
||
MistralPromptMode:
|
||
type: string
|
||
title: MistralPromptMode
|
||
description: 'Available options to the prompt_mode argument on the chat completion endpoint.
|
||
|
||
Values represent high-level intent. Assignment to actual SPs is handled internally.
|
||
|
||
System prompt may include knowledge cutoff date, model capabilities, tone to use, safety guidelines, etc.'
|
||
enum:
|
||
- reasoning
|
||
OCRImageObject:
|
||
properties:
|
||
id:
|
||
type: string
|
||
title: Id
|
||
description: Image ID for extracted image in a page
|
||
top_left_x:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Top Left X
|
||
description: X coordinate of top-left corner of the extracted image
|
||
top_left_y:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Top Left Y
|
||
description: Y coordinate of top-left corner of the extracted image
|
||
bottom_right_x:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Bottom Right X
|
||
description: X coordinate of bottom-right corner of the extracted image
|
||
bottom_right_y:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Bottom Right Y
|
||
description: Y coordinate of bottom-right corner of the extracted image
|
||
image_base64:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Image Base64
|
||
description: Base64 string of the extracted image
|
||
image_annotation:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Image Annotation
|
||
description: Annotation of the extracted image in json str
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- id
|
||
- top_left_x
|
||
- top_left_y
|
||
- bottom_right_x
|
||
- bottom_right_y
|
||
title: OCRImageObject
|
||
OCRPageDimensions:
|
||
properties:
|
||
dpi:
|
||
type: integer
|
||
minimum: 0
|
||
title: Dpi
|
||
description: Dots per inch of the page-image
|
||
height:
|
||
type: integer
|
||
minimum: 0
|
||
title: Height
|
||
description: Height of the image in pixels
|
||
width:
|
||
type: integer
|
||
minimum: 0
|
||
title: Width
|
||
description: Width of the image in pixels
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- dpi
|
||
- height
|
||
- width
|
||
title: OCRPageDimensions
|
||
OCRPageObject:
|
||
properties:
|
||
index:
|
||
type: integer
|
||
minimum: 0
|
||
title: Index
|
||
description: The page index in a pdf document starting from 0
|
||
markdown:
|
||
type: string
|
||
title: Markdown
|
||
description: The markdown string response of the page
|
||
images:
|
||
items:
|
||
$ref: '#/components/schemas/OCRImageObject'
|
||
type: array
|
||
title: Images
|
||
description: List of all extracted images in the page
|
||
tables:
|
||
items:
|
||
$ref: '#/components/schemas/OCRTableObject'
|
||
type: array
|
||
title: Tables
|
||
description: List of all extracted tables in the page
|
||
hyperlinks:
|
||
items:
|
||
type: string
|
||
type: array
|
||
title: Hyperlinks
|
||
description: List of all hyperlinks in the page
|
||
header:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Header
|
||
description: Header of the page
|
||
footer:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Footer
|
||
description: Footer of the page
|
||
dimensions:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/OCRPageDimensions'
|
||
- type: 'null'
|
||
description: The dimensions of the PDF Page's screenshot image
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- index
|
||
- markdown
|
||
- images
|
||
- dimensions
|
||
title: OCRPageObject
|
||
OCRRequest:
|
||
properties:
|
||
model:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Model
|
||
id:
|
||
type: string
|
||
title: Id
|
||
document:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/FileChunk'
|
||
- $ref: '#/components/schemas/DocumentURLChunk'
|
||
- $ref: '#/components/schemas/ImageURLChunk'
|
||
title: Document
|
||
description: Document to run OCR on
|
||
pages:
|
||
anyOf:
|
||
- items:
|
||
type: integer
|
||
type: array
|
||
- type: 'null'
|
||
title: Pages
|
||
description: 'Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0'
|
||
include_image_base64:
|
||
anyOf:
|
||
- type: boolean
|
||
- type: 'null'
|
||
title: Include Image Base64
|
||
description: Include image URLs in response
|
||
image_limit:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Image Limit
|
||
description: Max images to extract
|
||
image_min_size:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Image Min Size
|
||
description: Minimum height and width of image to extract
|
||
bbox_annotation_format:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ResponseFormat'
|
||
- type: 'null'
|
||
description: Structured output class for extracting useful information from each extracted bounding box / image from document. Only json_schema is valid for this field
|
||
document_annotation_format:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ResponseFormat'
|
||
- type: 'null'
|
||
description: Structured output class for extracting useful information from the entire document. Only json_schema is valid for this field
|
||
document_annotation_prompt:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Document Annotation Prompt
|
||
description: Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided.
|
||
table_format:
|
||
anyOf:
|
||
- type: string
|
||
enum:
|
||
- markdown
|
||
- html
|
||
- type: 'null'
|
||
title: Table Format
|
||
extract_header:
|
||
type: boolean
|
||
title: Extract Header
|
||
default: false
|
||
extract_footer:
|
||
type: boolean
|
||
title: Extract Footer
|
||
default: false
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- document
|
||
- model
|
||
title: OCRRequest
|
||
OCRResponse:
|
||
properties:
|
||
pages:
|
||
items:
|
||
$ref: '#/components/schemas/OCRPageObject'
|
||
type: array
|
||
title: Pages
|
||
description: List of OCR info for pages.
|
||
model:
|
||
type: string
|
||
title: Model
|
||
description: The model used to generate the OCR.
|
||
document_annotation:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Document Annotation
|
||
description: Formatted response in the request_format if provided in json str
|
||
usage_info:
|
||
$ref: '#/components/schemas/OCRUsageInfo'
|
||
description: Usage info for the OCR request.
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- pages
|
||
- model
|
||
- usage_info
|
||
title: OCRResponse
|
||
OCRTableObject:
|
||
properties:
|
||
id:
|
||
type: string
|
||
title: Id
|
||
description: Table ID for extracted table in a page
|
||
content:
|
||
type: string
|
||
title: Content
|
||
description: Content of the table in the given format
|
||
format:
|
||
type: string
|
||
enum:
|
||
- markdown
|
||
- html
|
||
title: Format
|
||
description: Format of the table
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- id
|
||
- content
|
||
- format
|
||
title: OCRTableObject
|
||
OCRUsageInfo:
|
||
properties:
|
||
pages_processed:
|
||
type: integer
|
||
minimum: 0
|
||
title: Pages Processed
|
||
description: Number of pages processed
|
||
doc_size_bytes:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Doc Size Bytes
|
||
description: Document size in bytes
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- pages_processed
|
||
title: OCRUsageInfo
|
||
ReferenceChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: reference
|
||
title: Type
|
||
default: reference
|
||
reference_ids:
|
||
items:
|
||
type: integer
|
||
type: array
|
||
title: Reference Ids
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- reference_ids
|
||
title: ReferenceChunk
|
||
SystemMessage:
|
||
properties:
|
||
role:
|
||
type: string
|
||
const: system
|
||
title: Role
|
||
default: system
|
||
content:
|
||
title: Content
|
||
anyOf:
|
||
- type: string
|
||
- items:
|
||
$ref: '#/components/schemas/SystemMessageContentChunks'
|
||
type: array
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- content
|
||
title: SystemMessage
|
||
ThinkChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: thinking
|
||
title: Type
|
||
default: thinking
|
||
thinking:
|
||
items:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ReferenceChunk'
|
||
- $ref: '#/components/schemas/TextChunk'
|
||
type: array
|
||
title: Thinking
|
||
closed:
|
||
type: boolean
|
||
title: Closed
|
||
description: Whether the thinking chunk is closed or not. Currently only used for prefixing.
|
||
default: true
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- thinking
|
||
title: ThinkChunk
|
||
Tool:
|
||
properties:
|
||
type:
|
||
$ref: '#/components/schemas/ToolTypes'
|
||
default: function
|
||
function:
|
||
$ref: '#/components/schemas/Function'
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- function
|
||
title: Tool
|
||
ToolCall:
|
||
properties:
|
||
id:
|
||
type: string
|
||
title: Id
|
||
default: 'null'
|
||
type:
|
||
$ref: '#/components/schemas/ToolTypes'
|
||
default: function
|
||
function:
|
||
$ref: '#/components/schemas/FunctionCall'
|
||
index:
|
||
type: integer
|
||
title: Index
|
||
default: 0
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- function
|
||
title: ToolCall
|
||
ToolChoice:
|
||
properties:
|
||
type:
|
||
$ref: '#/components/schemas/ToolTypes'
|
||
default: function
|
||
function:
|
||
$ref: '#/components/schemas/FunctionName'
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- function
|
||
title: ToolChoice
|
||
description: ToolChoice is either a ToolChoiceEnum or a ToolChoice
|
||
ToolMessage:
|
||
properties:
|
||
role:
|
||
type: string
|
||
const: tool
|
||
title: Role
|
||
default: tool
|
||
content:
|
||
title: Content
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
- items:
|
||
$ref: '#/components/schemas/ContentChunk'
|
||
type: array
|
||
tool_call_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Tool Call Id
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- content
|
||
title: ToolMessage
|
||
ToolTypes:
|
||
type: string
|
||
enum:
|
||
- function
|
||
title: ToolTypes
|
||
TranscriptionResponse:
|
||
properties:
|
||
model:
|
||
type: string
|
||
title: Model
|
||
text:
|
||
type: string
|
||
title: Text
|
||
language:
|
||
anyOf:
|
||
- type: string
|
||
pattern: ^\w{2}$
|
||
- type: 'null'
|
||
title: Language
|
||
segments:
|
||
items:
|
||
$ref: '#/components/schemas/TranscriptionSegmentChunk'
|
||
type: array
|
||
title: Segments
|
||
usage:
|
||
$ref: '#/components/schemas/UsageInfo'
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- model
|
||
- text
|
||
- language
|
||
- usage
|
||
title: TranscriptionResponse
|
||
TranscriptionSegmentChunk:
|
||
properties:
|
||
type:
|
||
type: string
|
||
const: transcription_segment
|
||
title: Type
|
||
default: transcription_segment
|
||
text:
|
||
type: string
|
||
title: Text
|
||
start:
|
||
type: number
|
||
title: Start
|
||
end:
|
||
type: number
|
||
title: End
|
||
score:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
title: Score
|
||
speaker_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Speaker Id
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- text
|
||
- start
|
||
- end
|
||
title: TranscriptionSegmentChunk
|
||
UsageInfo:
|
||
properties:
|
||
prompt_tokens:
|
||
type: integer
|
||
title: Prompt Tokens
|
||
default: 0
|
||
completion_tokens:
|
||
title: Completion Tokens
|
||
default: 0
|
||
type: integer
|
||
total_tokens:
|
||
type: integer
|
||
title: Total Tokens
|
||
default: 0
|
||
prompt_audio_seconds:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Prompt Audio Seconds
|
||
additionalProperties: false
|
||
type: object
|
||
title: UsageInfo
|
||
required:
|
||
- prompt_tokens
|
||
- completion_tokens
|
||
- total_tokens
|
||
UserMessage:
|
||
properties:
|
||
role:
|
||
type: string
|
||
const: user
|
||
title: Role
|
||
default: user
|
||
content:
|
||
title: Content
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
- items:
|
||
$ref: '#/components/schemas/ContentChunk'
|
||
type: array
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- content
|
||
title: UserMessage
|
||
File:
|
||
type: string
|
||
format: binary
|
||
title: File
|
||
description: "The File object (not file name) to be uploaded.\n To upload a file and specify a custom file name you should format your request as such:\n ```bash\n file=@path/to/your/file.jsonl;filename=custom_name.jsonl\n ```\n Otherwise, you can just keep the original file name:\n ```bash\n file=@path/to/your/file.jsonl\n ```"
|
||
TimestampGranularity:
|
||
type: string
|
||
enum:
|
||
- segment
|
||
- word
|
||
title: TimestampGranularity
|
||
AudioTranscriptionRequest:
|
||
properties:
|
||
model:
|
||
title: Model
|
||
type: string
|
||
description: ID of the model to be used.
|
||
examples:
|
||
- voxtral-mini-latest
|
||
- voxtral-mini-2507
|
||
file:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/File'
|
||
- type: 'null'
|
||
default: null
|
||
title: File
|
||
file_url:
|
||
anyOf:
|
||
- format: uri
|
||
maxLength: 2083
|
||
minLength: 1
|
||
type: string
|
||
- type: 'null'
|
||
default: null
|
||
description: Url of a file to be transcribed
|
||
title: File Url
|
||
file_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
description: ID of a file uploaded to /v1/files
|
||
title: File Id
|
||
language:
|
||
anyOf:
|
||
- pattern: ^\w{2}$
|
||
type: string
|
||
- type: 'null'
|
||
default: null
|
||
description: Language of the audio, e.g. 'en'. Providing the language can boost accuracy.
|
||
title: Language
|
||
temperature:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
default: null
|
||
title: Temperature
|
||
stream:
|
||
const: false
|
||
default: false
|
||
title: Stream
|
||
type: boolean
|
||
diarize:
|
||
default: false
|
||
title: Diarize
|
||
type: boolean
|
||
context_bias:
|
||
default: []
|
||
items:
|
||
pattern: ^[^,\s]+$
|
||
type: string
|
||
title: Context Bias
|
||
type: array
|
||
timestamp_granularities:
|
||
description: Granularities of timestamps to include in the response.
|
||
items:
|
||
$ref: '#/components/schemas/TimestampGranularity'
|
||
title: Timestamp Granularities
|
||
type: array
|
||
required:
|
||
- model
|
||
title: AudioTranscriptionRequest
|
||
type: object
|
||
AudioTranscriptionRequestStream:
|
||
properties:
|
||
model:
|
||
title: Model
|
||
type: string
|
||
file:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/File'
|
||
- type: 'null'
|
||
default: null
|
||
title: File
|
||
file_url:
|
||
anyOf:
|
||
- format: uri
|
||
maxLength: 2083
|
||
minLength: 1
|
||
type: string
|
||
- type: 'null'
|
||
default: null
|
||
description: Url of a file to be transcribed
|
||
title: File Url
|
||
file_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
description: ID of a file uploaded to /v1/files
|
||
title: File Id
|
||
language:
|
||
anyOf:
|
||
- pattern: ^\w{2}$
|
||
type: string
|
||
- type: 'null'
|
||
default: null
|
||
description: Language of the audio, e.g. 'en'. Providing the language can boost accuracy.
|
||
title: Language
|
||
temperature:
|
||
anyOf:
|
||
- type: number
|
||
- type: 'null'
|
||
default: null
|
||
title: Temperature
|
||
stream:
|
||
const: true
|
||
default: true
|
||
title: Stream
|
||
type: boolean
|
||
diarize:
|
||
default: false
|
||
title: Diarize
|
||
type: boolean
|
||
context_bias:
|
||
default: []
|
||
items:
|
||
pattern: ^[^,\s]+$
|
||
type: string
|
||
title: Context Bias
|
||
type: array
|
||
timestamp_granularities:
|
||
description: Granularities of timestamps to include in the response.
|
||
items:
|
||
$ref: '#/components/schemas/TimestampGranularity'
|
||
title: Timestamp Granularities
|
||
type: array
|
||
required:
|
||
- model
|
||
title: AudioTranscriptionRequestStream
|
||
type: object
|
||
TranscriptionStreamLanguage:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: transcription.language
|
||
default: transcription.language
|
||
title: Type
|
||
type: string
|
||
audio_language:
|
||
pattern: ^\w{2}$
|
||
title: Audio Language
|
||
type: string
|
||
required:
|
||
- audio_language
|
||
title: TranscriptionStreamLanguage
|
||
type: object
|
||
TranscriptionStreamSegmentDelta:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: transcription.segment
|
||
default: transcription.segment
|
||
title: Type
|
||
type: string
|
||
text:
|
||
title: Text
|
||
type: string
|
||
start:
|
||
title: Start
|
||
type: number
|
||
end:
|
||
title: End
|
||
type: number
|
||
speaker_id:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
default: null
|
||
title: Speaker Id
|
||
required:
|
||
- text
|
||
- start
|
||
- end
|
||
title: TranscriptionStreamSegmentDelta
|
||
type: object
|
||
TranscriptionStreamTextDelta:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: transcription.text.delta
|
||
default: transcription.text.delta
|
||
title: Type
|
||
type: string
|
||
text:
|
||
title: Text
|
||
type: string
|
||
required:
|
||
- text
|
||
title: TranscriptionStreamTextDelta
|
||
type: object
|
||
TranscriptionStreamDone:
|
||
additionalProperties: false
|
||
properties:
|
||
model:
|
||
title: Model
|
||
type: string
|
||
text:
|
||
title: Text
|
||
type: string
|
||
language:
|
||
anyOf:
|
||
- pattern: ^\w{2}$
|
||
type: string
|
||
- type: 'null'
|
||
title: Language
|
||
segments:
|
||
items:
|
||
$ref: '#/components/schemas/TranscriptionSegmentChunk'
|
||
title: Segments
|
||
type: array
|
||
usage:
|
||
$ref: '#/components/schemas/UsageInfo'
|
||
type:
|
||
const: transcription.done
|
||
default: transcription.done
|
||
title: Type
|
||
type: string
|
||
required:
|
||
- model
|
||
- text
|
||
- language
|
||
- usage
|
||
title: TranscriptionStreamDone
|
||
type: object
|
||
TranscriptionStreamEvents:
|
||
additionalProperties: false
|
||
properties:
|
||
event:
|
||
$ref: '#/components/schemas/TranscriptionStreamEventTypes'
|
||
data:
|
||
discriminator:
|
||
mapping:
|
||
transcription.done: '#/components/schemas/TranscriptionStreamDone'
|
||
transcription.language: '#/components/schemas/TranscriptionStreamLanguage'
|
||
transcription.segment: '#/components/schemas/TranscriptionStreamSegmentDelta'
|
||
transcription.text.delta: '#/components/schemas/TranscriptionStreamTextDelta'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/TranscriptionStreamTextDelta'
|
||
- $ref: '#/components/schemas/TranscriptionStreamLanguage'
|
||
- $ref: '#/components/schemas/TranscriptionStreamSegmentDelta'
|
||
- $ref: '#/components/schemas/TranscriptionStreamDone'
|
||
title: Data
|
||
required:
|
||
- event
|
||
- data
|
||
title: TranscriptionStreamEvents
|
||
type: object
|
||
TranscriptionStreamEventTypes:
|
||
enum:
|
||
- transcription.language
|
||
- transcription.segment
|
||
- transcription.text.delta
|
||
- transcription.done
|
||
title: TranscriptionStreamEventTypes
|
||
type: string
|
||
RealtimeTranscriptionClientMessage:
|
||
discriminator:
|
||
mapping:
|
||
input_audio.append: '#/components/schemas/RealtimeTranscriptionInputAudioAppend'
|
||
input_audio.end: '#/components/schemas/RealtimeTranscriptionInputAudioEnd'
|
||
input_audio.flush: '#/components/schemas/RealtimeTranscriptionInputAudioFlush'
|
||
session.update: '#/components/schemas/RealtimeTranscriptionSessionUpdateMessage'
|
||
propertyName: type
|
||
oneOf:
|
||
- $ref: '#/components/schemas/RealtimeTranscriptionSessionUpdateMessage'
|
||
- $ref: '#/components/schemas/RealtimeTranscriptionInputAudioAppend'
|
||
- $ref: '#/components/schemas/RealtimeTranscriptionInputAudioFlush'
|
||
- $ref: '#/components/schemas/RealtimeTranscriptionInputAudioEnd'
|
||
title: RealtimeTranscriptionClientMessage
|
||
AudioEncoding:
|
||
enum:
|
||
- pcm_s16le
|
||
- pcm_s32le
|
||
- pcm_f16le
|
||
- pcm_f32le
|
||
- pcm_mulaw
|
||
- pcm_alaw
|
||
title: AudioEncoding
|
||
type: string
|
||
AudioFormat:
|
||
additionalProperties: false
|
||
properties:
|
||
encoding:
|
||
$ref: '#/components/schemas/AudioEncoding'
|
||
sample_rate:
|
||
maximum: 96000
|
||
minimum: 8000
|
||
title: Sample Rate
|
||
type: integer
|
||
required:
|
||
- encoding
|
||
- sample_rate
|
||
title: AudioFormat
|
||
type: object
|
||
RealtimeTranscriptionInputAudioAppend:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: input_audio.append
|
||
default: input_audio.append
|
||
title: Type
|
||
type: string
|
||
audio:
|
||
description: 'Base64-encoded raw PCM bytes matching the current audio_format. Max decoded size: 262144 bytes.'
|
||
format: base64
|
||
title: Audio
|
||
type: string
|
||
required:
|
||
- audio
|
||
title: RealtimeTranscriptionInputAudioAppend
|
||
type: object
|
||
RealtimeTranscriptionInputAudioEnd:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: input_audio.end
|
||
default: input_audio.end
|
||
title: Type
|
||
type: string
|
||
title: RealtimeTranscriptionInputAudioEnd
|
||
type: object
|
||
RealtimeTranscriptionInputAudioFlush:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: input_audio.flush
|
||
default: input_audio.flush
|
||
title: Type
|
||
type: string
|
||
title: RealtimeTranscriptionInputAudioFlush
|
||
type: object
|
||
RealtimeTranscriptionSessionUpdateMessage:
|
||
additionalProperties: false
|
||
properties:
|
||
type:
|
||
const: session.update
|
||
default: session.update
|
||
title: Type
|
||
type: string
|
||
session:
|
||
$ref: '#/components/schemas/RealtimeTranscriptionSessionUpdatePayload'
|
||
required:
|
||
- session
|
||
title: RealtimeTranscriptionSessionUpdateMessage
|
||
type: object
|
||
RealtimeTranscriptionSessionUpdatePayload:
|
||
additionalProperties: false
|
||
properties:
|
||
audio_format:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/AudioFormat'
|
||
- type: 'null'
|
||
default: null
|
||
description: Set before sending audio. Audio format updates are rejected after audio starts.
|
||
target_streaming_delay_ms:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
default: null
|
||
description: Set before sending audio. Streaming delay updates are rejected after audio starts.
|
||
title: Target Streaming Delay Ms
|
||
title: RealtimeTranscriptionSessionUpdatePayload
|
||
type: object
|
||
AgentsCompletionRequest:
|
||
properties:
|
||
max_tokens:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Max Tokens
|
||
description: The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.
|
||
stream:
|
||
type: boolean
|
||
title: Stream
|
||
default: false
|
||
description: 'Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.'
|
||
stop:
|
||
anyOf:
|
||
- type: string
|
||
- items:
|
||
type: string
|
||
type: array
|
||
title: Stop
|
||
description: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
|
||
random_seed:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 0
|
||
- type: 'null'
|
||
title: Random Seed
|
||
description: The seed to use for random sampling. If set, different calls will generate deterministic results.
|
||
metadata:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Metadata
|
||
messages:
|
||
items:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/SystemMessage'
|
||
- $ref: '#/components/schemas/UserMessage'
|
||
- $ref: '#/components/schemas/AssistantMessage'
|
||
- $ref: '#/components/schemas/ToolMessage'
|
||
discriminator:
|
||
propertyName: role
|
||
mapping:
|
||
assistant: '#/components/schemas/AssistantMessage'
|
||
system: '#/components/schemas/SystemMessage'
|
||
tool: '#/components/schemas/ToolMessage'
|
||
user: '#/components/schemas/UserMessage'
|
||
type: array
|
||
title: Messages
|
||
description: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
|
||
examples:
|
||
- - role: user
|
||
content: Who is the best French painter? Answer in one short sentence.
|
||
response_format:
|
||
$ref: '#/components/schemas/ResponseFormat'
|
||
tools:
|
||
anyOf:
|
||
- items:
|
||
$ref: '#/components/schemas/Tool'
|
||
type: array
|
||
- type: 'null'
|
||
title: Tools
|
||
tool_choice:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/ToolChoice'
|
||
- $ref: '#/components/schemas/ToolChoiceEnum'
|
||
title: Tool Choice
|
||
default: auto
|
||
presence_penalty:
|
||
type: number
|
||
maximum: 2
|
||
minimum: -2
|
||
title: Presence Penalty
|
||
default: 0.0
|
||
description: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.
|
||
frequency_penalty:
|
||
type: number
|
||
maximum: 2
|
||
minimum: -2
|
||
title: Frequency Penalty
|
||
default: 0.0
|
||
description: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.
|
||
n:
|
||
anyOf:
|
||
- type: integer
|
||
minimum: 1
|
||
- type: 'null'
|
||
title: N
|
||
description: Number of completions to return for each request, input tokens are only billed once.
|
||
prediction:
|
||
$ref: '#/components/schemas/Prediction'
|
||
default:
|
||
type: content
|
||
content: ''
|
||
description: Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-quality results.
|
||
parallel_tool_calls:
|
||
type: boolean
|
||
title: Parallel Tool Calls
|
||
default: true
|
||
prompt_mode:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/MistralPromptMode'
|
||
- type: 'null'
|
||
description: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
|
||
agent_id:
|
||
type: string
|
||
description: The ID of the agent to use for this completion.
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- messages
|
||
- agent_id
|
||
title: AgentsCompletionRequest
|
||
ChatClassificationRequest:
|
||
properties:
|
||
model:
|
||
title: Model
|
||
type: string
|
||
input:
|
||
$ref: '#/components/schemas/ChatClassificationRequestInputs'
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- input
|
||
- model
|
||
title: ChatClassificationRequest
|
||
ChatClassificationRequestInputs:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/InstructRequest'
|
||
- items:
|
||
$ref: '#/components/schemas/InstructRequest'
|
||
type: array
|
||
title: ChatClassificationRequestInputs
|
||
description: Chat to classify
|
||
ClassificationResponse:
|
||
type: object
|
||
title: ClassificationResponse
|
||
properties:
|
||
id:
|
||
type: string
|
||
example: mod-e5cc70bb28c444948073e77776eb30ef
|
||
model:
|
||
type: string
|
||
results:
|
||
type: array
|
||
items:
|
||
type: object
|
||
title: ClassificationTargetResult
|
||
additionalProperties:
|
||
$ref: '#/components/schemas/ClassificationTargetResult'
|
||
required:
|
||
- id
|
||
- model
|
||
- results
|
||
ClassificationTargetResult:
|
||
type: object
|
||
title: ClassificationTargetResult
|
||
properties:
|
||
scores:
|
||
type: object
|
||
title: ClassifierTargetResultScores
|
||
additionalProperties:
|
||
type: number
|
||
required:
|
||
- scores
|
||
ContentChunk:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/TextChunk'
|
||
- $ref: '#/components/schemas/ImageURLChunk'
|
||
- $ref: '#/components/schemas/DocumentURLChunk'
|
||
- $ref: '#/components/schemas/ReferenceChunk'
|
||
- $ref: '#/components/schemas/FileChunk'
|
||
- $ref: '#/components/schemas/ThinkChunk'
|
||
- $ref: '#/components/schemas/AudioChunk'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
image_url: '#/components/schemas/ImageURLChunk'
|
||
document_url: '#/components/schemas/DocumentURLChunk'
|
||
text: '#/components/schemas/TextChunk'
|
||
reference: '#/components/schemas/ReferenceChunk'
|
||
file: '#/components/schemas/FileChunk'
|
||
thinking: '#/components/schemas/ThinkChunk'
|
||
input_audio: '#/components/schemas/AudioChunk'
|
||
title: ContentChunk
|
||
ModerationResponse:
|
||
type: object
|
||
title: ModerationResponse
|
||
properties:
|
||
id:
|
||
type: string
|
||
example: mod-e5cc70bb28c444948073e77776eb30ef
|
||
model:
|
||
type: string
|
||
results:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/ModerationObject'
|
||
required:
|
||
- id
|
||
- model
|
||
- results
|
||
ModerationObject:
|
||
type: object
|
||
title: ModerationObject
|
||
properties:
|
||
categories:
|
||
description: Moderation result thresholds
|
||
type: object
|
||
additionalProperties:
|
||
type: boolean
|
||
category_scores:
|
||
description: Moderation result
|
||
type: object
|
||
additionalProperties:
|
||
type: number
|
||
SystemMessageContentChunks:
|
||
oneOf:
|
||
- $ref: '#/components/schemas/TextChunk'
|
||
- $ref: '#/components/schemas/ThinkChunk'
|
||
discriminator:
|
||
propertyName: type
|
||
mapping:
|
||
text: '#/components/schemas/TextChunk'
|
||
thinking: '#/components/schemas/ThinkChunk'
|
||
title: SystemMessageContentChunks
|
||
DocumentOut:
|
||
properties:
|
||
id:
|
||
type: string
|
||
format: uuid
|
||
title: Id
|
||
library_id:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
hash:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Hash
|
||
mime_type:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Mime Type
|
||
extension:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Extension
|
||
size:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Size
|
||
name:
|
||
type: string
|
||
title: Name
|
||
summary:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Summary
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
last_processed_at:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Last Processed At
|
||
number_of_pages:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Number Of Pages
|
||
process_status:
|
||
$ref: '#/components/schemas/ProcessStatus'
|
||
uploaded_by_id:
|
||
anyOf:
|
||
- type: string
|
||
format: uuid
|
||
- type: 'null'
|
||
title: Uploaded By Id
|
||
uploaded_by_type:
|
||
type: string
|
||
tokens_processing_main_content:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Tokens Processing Main Content
|
||
tokens_processing_summary:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Tokens Processing Summary
|
||
url:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Url
|
||
attributes:
|
||
anyOf:
|
||
- additionalProperties: true
|
||
type: object
|
||
- type: 'null'
|
||
title: Attributes
|
||
processing_status:
|
||
type: string
|
||
title: Processing Status
|
||
readOnly: true
|
||
tokens_processing_total:
|
||
type: integer
|
||
title: Tokens Processing Total
|
||
readOnly: true
|
||
type: object
|
||
required:
|
||
- id
|
||
- library_id
|
||
- hash
|
||
- mime_type
|
||
- extension
|
||
- size
|
||
- name
|
||
- created_at
|
||
- process_status
|
||
- uploaded_by_id
|
||
- uploaded_by_type
|
||
- processing_status
|
||
- tokens_processing_total
|
||
title: DocumentOut
|
||
DocumentTextContent:
|
||
properties:
|
||
text:
|
||
type: string
|
||
title: Text
|
||
type: object
|
||
required:
|
||
- text
|
||
title: DocumentTextContent
|
||
DocumentUpdateIn:
|
||
properties:
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
attributes:
|
||
anyOf:
|
||
- additionalProperties:
|
||
anyOf:
|
||
- type: boolean
|
||
- type: string
|
||
- type: integer
|
||
- type: number
|
||
- type: string
|
||
format: date-time
|
||
- items:
|
||
type: string
|
||
type: array
|
||
- items:
|
||
type: integer
|
||
type: array
|
||
- items:
|
||
type: number
|
||
type: array
|
||
- items:
|
||
type: boolean
|
||
type: array
|
||
type: object
|
||
- type: 'null'
|
||
title: Attributes
|
||
type: object
|
||
title: DocumentUpdateIn
|
||
LibraryIn:
|
||
properties:
|
||
name:
|
||
type: string
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
chunk_size:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Chunk Size
|
||
type: object
|
||
required:
|
||
- name
|
||
title: LibraryIn
|
||
LibraryInUpdate:
|
||
properties:
|
||
name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Name
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
type: object
|
||
title: LibraryInUpdate
|
||
LibraryOut:
|
||
properties:
|
||
id:
|
||
type: string
|
||
format: uuid
|
||
title: Id
|
||
name:
|
||
type: string
|
||
title: Name
|
||
created_at:
|
||
type: string
|
||
format: date-time
|
||
title: Created At
|
||
updated_at:
|
||
type: string
|
||
format: date-time
|
||
title: Updated At
|
||
owner_id:
|
||
anyOf:
|
||
- type: string
|
||
format: uuid
|
||
- type: 'null'
|
||
title: Owner Id
|
||
owner_type:
|
||
type: string
|
||
total_size:
|
||
type: integer
|
||
title: Total Size
|
||
nb_documents:
|
||
type: integer
|
||
title: Nb Documents
|
||
chunk_size:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Chunk Size
|
||
emoji:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Emoji
|
||
description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Description
|
||
generated_description:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Generated Description
|
||
explicit_user_members_count:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Explicit User Members Count
|
||
explicit_workspace_members_count:
|
||
anyOf:
|
||
- type: integer
|
||
- type: 'null'
|
||
title: Explicit Workspace Members Count
|
||
org_sharing_role:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
generated_name:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
description: Generated Name
|
||
type: object
|
||
required:
|
||
- id
|
||
- name
|
||
- created_at
|
||
- updated_at
|
||
- owner_id
|
||
- owner_type
|
||
- total_size
|
||
- nb_documents
|
||
- chunk_size
|
||
title: LibraryOut
|
||
ListDocumentOut:
|
||
properties:
|
||
pagination:
|
||
$ref: '#/components/schemas/PaginationInfo'
|
||
data:
|
||
items:
|
||
$ref: '#/components/schemas/DocumentOut'
|
||
type: array
|
||
title: Data
|
||
type: object
|
||
required:
|
||
- pagination
|
||
- data
|
||
title: ListDocumentOut
|
||
ListLibraryOut:
|
||
properties:
|
||
data:
|
||
items:
|
||
$ref: '#/components/schemas/LibraryOut'
|
||
type: array
|
||
title: Data
|
||
type: object
|
||
required:
|
||
- data
|
||
title: ListLibraryOut
|
||
ListSharingOut:
|
||
properties:
|
||
data:
|
||
items:
|
||
$ref: '#/components/schemas/SharingOut'
|
||
type: array
|
||
title: Data
|
||
type: object
|
||
required:
|
||
- data
|
||
title: ListSharingOut
|
||
PaginationInfo:
|
||
properties:
|
||
total_items:
|
||
type: integer
|
||
title: Total Items
|
||
total_pages:
|
||
type: integer
|
||
title: Total Pages
|
||
current_page:
|
||
type: integer
|
||
title: Current Page
|
||
page_size:
|
||
type: integer
|
||
title: Page Size
|
||
has_more:
|
||
type: boolean
|
||
title: Has More
|
||
type: object
|
||
required:
|
||
- total_items
|
||
- total_pages
|
||
- current_page
|
||
- page_size
|
||
- has_more
|
||
title: PaginationInfo
|
||
ProcessStatus:
|
||
type: string
|
||
enum:
|
||
- self_managed
|
||
- missing_content
|
||
- noop
|
||
- done
|
||
- todo
|
||
- in_progress
|
||
- error
|
||
- waiting_for_capacity
|
||
title: ProcessStatus
|
||
ProcessingStatusOut:
|
||
properties:
|
||
document_id:
|
||
type: string
|
||
format: uuid
|
||
title: Document Id
|
||
process_status:
|
||
$ref: '#/components/schemas/ProcessStatus'
|
||
processing_status:
|
||
type: string
|
||
title: Processing Status
|
||
readOnly: true
|
||
type: object
|
||
required:
|
||
- document_id
|
||
- process_status
|
||
- processing_status
|
||
title: ProcessingStatusOut
|
||
ShareEnum:
|
||
type: string
|
||
enum:
|
||
- Viewer
|
||
- Editor
|
||
title: ShareEnum
|
||
x-speakeasy-unknown-values: allow
|
||
SharingDelete:
|
||
properties:
|
||
org_id:
|
||
anyOf:
|
||
- type: string
|
||
format: uuid
|
||
- type: 'null'
|
||
title: Org Id
|
||
share_with_uuid:
|
||
type: string
|
||
format: uuid
|
||
description: The id of the entity (user, workspace or organization) to share with
|
||
share_with_type:
|
||
$ref: '#/components/schemas/EntityType'
|
||
type: object
|
||
title: SharingDelete
|
||
required:
|
||
- share_with_uuid
|
||
- share_with_type
|
||
- level
|
||
SharingIn:
|
||
properties:
|
||
org_id:
|
||
anyOf:
|
||
- type: string
|
||
format: uuid
|
||
- type: 'null'
|
||
title: Org Id
|
||
level:
|
||
$ref: '#/components/schemas/ShareEnum'
|
||
share_with_uuid:
|
||
type: string
|
||
format: uuid
|
||
description: The id of the entity (user, workspace or organization) to share with
|
||
share_with_type:
|
||
$ref: '#/components/schemas/EntityType'
|
||
type: object
|
||
title: SharingIn
|
||
required:
|
||
- share_with_uuid
|
||
- share_with_type
|
||
- level
|
||
SharingOut:
|
||
properties:
|
||
library_id:
|
||
type: string
|
||
format: uuid
|
||
title: Library Id
|
||
user_id:
|
||
anyOf:
|
||
- type: string
|
||
format: uuid
|
||
- type: 'null'
|
||
title: User Id
|
||
org_id:
|
||
type: string
|
||
format: uuid
|
||
title: Org Id
|
||
role:
|
||
type: string
|
||
share_with_type:
|
||
type: string
|
||
share_with_uuid:
|
||
anyOf:
|
||
- type: string
|
||
format: uuid
|
||
- type: 'null'
|
||
title: Share With Uuid
|
||
type: object
|
||
required:
|
||
- library_id
|
||
- org_id
|
||
- role
|
||
- share_with_type
|
||
- share_with_uuid
|
||
title: SharingOut
|
||
EntityType:
|
||
type: string
|
||
title: EntityType
|
||
description: The type of entity, used to share a library.
|
||
enum:
|
||
- User
|
||
- Workspace
|
||
- Org
|
||
x-speakeasy-unknown-values: allow
|
||
CompletionEvent:
|
||
title: CompletionEvent
|
||
type: object
|
||
required:
|
||
- data
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/CompletionChunk'
|
||
CompletionChunk:
|
||
title: CompletionChunk
|
||
type: object
|
||
required:
|
||
- id
|
||
- model
|
||
- choices
|
||
properties:
|
||
id:
|
||
type: string
|
||
object:
|
||
type: string
|
||
created:
|
||
type: integer
|
||
model:
|
||
type: string
|
||
usage:
|
||
$ref: '#/components/schemas/UsageInfo'
|
||
choices:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/CompletionResponseStreamChoice'
|
||
CompletionResponseStreamChoice:
|
||
title: CompletionResponseStreamChoice
|
||
type: object
|
||
required:
|
||
- index
|
||
- delta
|
||
- finish_reason
|
||
properties:
|
||
index:
|
||
type: integer
|
||
delta:
|
||
$ref: '#/components/schemas/DeltaMessage'
|
||
finish_reason:
|
||
type:
|
||
- string
|
||
- 'null'
|
||
enum:
|
||
- stop
|
||
- length
|
||
- error
|
||
- tool_calls
|
||
- null
|
||
ResponseBase:
|
||
type: object
|
||
title: ResponseBase
|
||
properties:
|
||
id:
|
||
type: string
|
||
example: cmpl-e5cc70bb28c444948073e77776eb30ef
|
||
object:
|
||
type: string
|
||
example: chat.completion
|
||
model:
|
||
type: string
|
||
example: mistral-small-latest
|
||
usage:
|
||
$ref: '#/components/schemas/UsageInfo'
|
||
ChatCompletionChoice:
|
||
title: ChatCompletionChoice
|
||
type: object
|
||
required:
|
||
- index
|
||
- finish_reason
|
||
- message
|
||
properties:
|
||
index:
|
||
type: integer
|
||
example: 0
|
||
message:
|
||
$ref: '#/components/schemas/AssistantMessage'
|
||
finish_reason:
|
||
type: string
|
||
enum:
|
||
- stop
|
||
- length
|
||
- model_length
|
||
- error
|
||
- tool_calls
|
||
example: stop
|
||
DeltaMessage:
|
||
title: DeltaMessage
|
||
type: object
|
||
properties:
|
||
role:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
content:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
- items:
|
||
$ref: '#/components/schemas/ContentChunk'
|
||
type: array
|
||
tool_calls:
|
||
anyOf:
|
||
- type: 'null'
|
||
- type: array
|
||
items:
|
||
$ref: '#/components/schemas/ToolCall'
|
||
ChatCompletionResponseBase:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ResponseBase'
|
||
- type: object
|
||
title: ChatCompletionResponseBase
|
||
properties:
|
||
created:
|
||
type: integer
|
||
example: 1702256327
|
||
ChatCompletionResponse:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ChatCompletionResponseBase'
|
||
- type: object
|
||
title: ChatCompletionResponse
|
||
properties:
|
||
choices:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/ChatCompletionChoice'
|
||
required:
|
||
- id
|
||
- object
|
||
- data
|
||
- model
|
||
- usage
|
||
- created
|
||
- choices
|
||
FIMCompletionResponse:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ChatCompletionResponse'
|
||
- type: object
|
||
properties:
|
||
model:
|
||
type: string
|
||
example: codestral-latest
|
||
EmbeddingResponseData:
|
||
title: EmbeddingResponseData
|
||
type: object
|
||
properties:
|
||
object:
|
||
type: string
|
||
example: embedding
|
||
embedding:
|
||
type: array
|
||
items:
|
||
type: number
|
||
example:
|
||
- 0.1
|
||
- 0.2
|
||
- 0.3
|
||
index:
|
||
type: integer
|
||
example: 0
|
||
examples:
|
||
- object: embedding
|
||
embedding:
|
||
- 0.1
|
||
- 0.2
|
||
- 0.3
|
||
index: 0
|
||
- object: embedding
|
||
embedding:
|
||
- 0.4
|
||
- 0.5
|
||
- 0.6
|
||
index: 1
|
||
EmbeddingResponse:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ResponseBase'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
type: array
|
||
items:
|
||
$ref: '#/components/schemas/EmbeddingResponseData'
|
||
required:
|
||
- id
|
||
- object
|
||
- data
|
||
- model
|
||
- usage
|
||
securitySchemes:
|
||
ApiKey:
|
||
type: http
|
||
scheme: bearer
|
||
tags:
|
||
- name: chat
|
||
x-displayName: Chat
|
||
description: Chat Completion API.
|
||
- name: fim
|
||
x-displayName: FIM
|
||
description: Fill-in-the-middle API.
|
||
- name: agents
|
||
x-displayName: Agents
|
||
description: Agents API.
|
||
- name: embeddings
|
||
x-displayName: Embeddings
|
||
description: Embeddings API.
|
||
- name: classifiers
|
||
x-displayName: Classifiers
|
||
description: Classifiers API.
|
||
- name: files
|
||
x-displayName: Files
|
||
description: Files API
|
||
- name: deprecated.fine-tuning
|
||
x-displayName: (deprecated) Fine Tuning
|
||
description: (deprecated) Fine-tuning API
|
||
- name: models
|
||
x-displayName: Models
|
||
description: Model Management API
|
||
- name: batch
|
||
x-displayName: Batch
|
||
description: Batch API
|
||
- name: ocr
|
||
x-displayName: OCR API
|
||
description: OCR API
|
||
- name: audio.transcriptions
|
||
x-displayName: Transcriptions API
|
||
description: API for audio transcription.
|
||
- name: beta.agents
|
||
x-displayName: (beta) Agents API
|
||
description: (beta) Agents API
|
||
- name: beta.conversations
|
||
x-displayName: (beta) Conversations API
|
||
description: (beta) Conversations API
|
||
- name: beta.libraries
|
||
x-displayName: (beta) Libraries API - Main
|
||
description: (beta) Libraries API to create and manage libraries - index your documents to enhance agent capabilities.
|
||
- name: beta.libraries.documents
|
||
x-displayName: (beta) Libraries API - Documents
|
||
description: (beta) Libraries API - manage documents in a library.
|
||
- name: beta.libraries.accesses
|
||
x-displayName: (beta) Libraries API - Access
|
||
description: (beta) Libraries API - manage access to a library.
|
||
security:
|
||
- ApiKey: []
|
||
servers:
|
||
- url: https://api.mistral.ai
|
||
description: Production server |