Package-level declarations

Types

Link copied to clipboard
class CompletionTokensDetails(val acceptedPredictionTokens: Int? = null, val audioTokens: Int? = null, val reasoningTokens: Int? = null, val rejectedPredictionTokens: Int? = null)
Link copied to clipboard

Represents the content of a message in the OpenAI chat completion API. Can be either a simple text message or a complex content consisting of multiple parts.

Link copied to clipboard
class JsonSchemaObject(val name: String, val description: String? = null, val schema: JsonObject? = null, val strict: Boolean? = null)

Structured Outputs configuration options, including a JSON Schema.

Link copied to clipboard
class OpenAIAudio(val data: String? = null, val expiresAt: Long? = null, val id: String, val transcript: String? = null)

Data about a previous audio response from the model.

Link copied to clipboard

Parameters for audio output.

Link copied to clipboard

Represents the supported audio output formats.

Link copied to clipboard

Represents the available voice options for audio output in OpenAI's system.

Link copied to clipboard

Base interface for LLM OpenAI API requests. Contains properties that are common across all supported LLM providers.

Link copied to clipboard

Base interface for all LLM OpenAI API responses. Contains properties that are common across different response types.

Link copied to clipboard

Represents a base interface for handling real-time streaming responses from OpenAI's LLM API. Provides a structure extending from the common attributes defined in OpenAIBaseLLMResponse. Used as a foundation for streaming response data models in OpenAI integrations.

Link copied to clipboard
class OpenAIChoice(val finishReason: String, val index: Int, val logprobs: OpenAIChoiceLogProbs? = null, val message: OpenAIMessage)

Chat completion choice

Link copied to clipboard

Represents a content part that can be used within OpenAI chat completion APIs. This is a sealed interface that defines various types of content components, like text, images, audio, and files, enabling diverse inputs and outputs in the API.

Link copied to clipboard
class OpenAIFunction(val name: String, val arguments: String)

Function call from an OpenAI model, containing the function name and arguments.

Link copied to clipboard
sealed interface OpenAIMessage

Represents a message in the OpenAI chat completion API.

Link copied to clipboard

Specifies the supported modalities for OpenAI API operations.

Link copied to clipboard

Expected response format from OpenAI's chat completion API. This interface defines different types of response formats that can be requested:

Link copied to clipboard

Static predicted output content, such as the content of a text file that is being regenerated.

Link copied to clipboard
class OpenAIStreamChoice(val delta: OpenAIStreamDelta, val finishReason: String? = null, val index: Int, val logprobs: OpenAIChoiceLogProbs? = null)
Link copied to clipboard
class OpenAIStreamDelta(val content: String? = null, val refusal: String? = null, val role: String? = null, val toolCalls: List<OpenAIToolCall>? = null)
Link copied to clipboard
class OpenAIStreamOptions(val includeUsage: Boolean? = null)

Options for streaming response.

Link copied to clipboard

Tool the model may call.

Link copied to clipboard
class OpenAIToolCall(val id: String, val function: OpenAIFunction)

Tool call generated by the OpenAI model.

Link copied to clipboard

Controls which (if any) tool is called by the model.

Link copied to clipboard
class OpenAIToolFunction(val name: String, val description: String? = null, val parameters: JsonObject? = null, val strict: Boolean? = null)
Link copied to clipboard
class OpenAIUsage(val promptTokens: Int? = null, val completionTokens: Int? = null, val totalTokens: Int? = null, val completionTokensDetails: CompletionTokensDetails? = null, val promptTokensDetails: PromptTokensDetails? = null)
Link copied to clipboard

Approximate location parameters for the search.

Link copied to clipboard
class OpenAIWebSearchOptions(val searchContextSize: String? = null, val userLocation: OpenAIUserLocation? = null)
Link copied to clipboard
Link copied to clipboard
class PromptTokensDetails(val audioTokens: Int? = null, val cachedTokens: Int? = null)
Link copied to clipboard

Constrains the amount of effort a reasoning-capable model spends on internal reasoning.

Link copied to clipboard

Service tier used to process a request.