Skip to main content

Module openai_types

Module openai_types 

Source

Structs§

ChatCompletionChunk
OpenAI-compatible streaming chunk
ChatCompletionMessage
OpenAI-compatible message in a chat completion request
ChatCompletionRequest
OpenAI-compatible chat completion request
ChatCompletionResponse
OpenAI-compatible chat completion response
Choice
A single choice in a chat completion response
ChunkChoice
A single choice in a streaming chunk
Delta
Delta content in a streaming chunk
ErrorDetail
Error detail within an OpenAI error response
ErrorResponse
OpenAI-compatible error response
FunctionObject
A function definition within a tool
HealthResponse
Response for GET /health
JsonSchemaSpec
JSON schema specification within a response format request
ModelObject
A single model entry in the models list
ModelsResponse
Response for GET /v1/models
MultiplexProviderResult
Result from a single provider in a multiplex request
MultiplexResponse
Response for multiplex requests (multiple providers)
ResponseMessage
Message in a chat completion response
ToolCall
A tool call issued by the assistant
ToolCallFunction
Function call details within a tool call
ToolChoiceFunction
Function name within a specific tool choice
ToolChoiceSpecific
A specific tool choice forcing a particular function
ToolDefinition
A tool definition in the OpenAI format
Usage
Token usage statistics

Enums§

ModelField
A model field that can be either a single string or an array of strings
ResponseFormatRequest
OpenAI-compatible response format request
ToolChoice
Controls which tools the model may call