ChatCompletionOptions

@Serializable
data class ChatCompletionOptions(val messages: List<ChatInputMessage>? = null, val tools: List<ChatTool>? = null, val toolChoice: ChatToolSelection? = null, val metadata: Map<String, String>? = null, val parallelToolCalls: Boolean? = null, val serviceTier: String? = null, val safetyIdentifier: String? = null, val promptCacheKey: String? = null, val promptCacheOptions: ChatPromptCacheOptions? = null, val verbosity: String? = null, val moderation: ChatModeration? = null, val modalities: List<String>? = null, val audio: ChatAudioConfig? = null, val prediction: ChatPrediction? = null, val streamOptions: ChatStreamOptions? = null)

Advanced fields whose types differ from the original Chat request contract.

Constructors

Link copied to clipboard
constructor(messages: List<ChatInputMessage>? = null, tools: List<ChatTool>? = null, toolChoice: ChatToolSelection? = null, metadata: Map<String, String>? = null, parallelToolCalls: Boolean? = null, serviceTier: String? = null, safetyIdentifier: String? = null, promptCacheKey: String? = null, promptCacheOptions: ChatPromptCacheOptions? = null, verbosity: String? = null, moderation: ChatModeration? = null, modalities: List<String>? = null, audio: ChatAudioConfig? = null, prediction: ChatPrediction? = null, streamOptions: ChatStreamOptions? = null)

Properties

Link copied to clipboard
@SerialName(value = "audio")
val audio: ChatAudioConfig? = null

Audio output voice and format.

Link copied to clipboard

Replaces request messages with richer multimodal messages.

Link copied to clipboard
@SerialName(value = "metadata")
val metadata: Map<String, String>? = null

Key-value metadata attached to a stored completion.

Link copied to clipboard
@SerialName(value = "modalities")
val modalities: List<String>? = null

Requested output modalities, such as text and audio.

Link copied to clipboard
@SerialName(value = "moderation")
val moderation: ChatModeration? = null

Moderation configuration.

Link copied to clipboard
@SerialName(value = "parallel_tool_calls")
val parallelToolCalls: Boolean? = null

Allow multiple tool calls in a single model turn.

Link copied to clipboard
@SerialName(value = "prediction")
val prediction: ChatPrediction? = null

Predicted output content that can reduce generation latency.

Link copied to clipboard
@SerialName(value = "prompt_cache_key")
val promptCacheKey: String? = null

Cache routing key for related prompts.

Link copied to clipboard
@SerialName(value = "prompt_cache_options")
val promptCacheOptions: ChatPromptCacheOptions? = null

Prompt caching behavior.

Link copied to clipboard
@SerialName(value = "safety_identifier")
val safetyIdentifier: String? = null

Stable end-user identifier used for abuse detection.

Link copied to clipboard
@SerialName(value = "service_tier")
val serviceTier: String? = null

Requested processing tier.

Link copied to clipboard
@SerialName(value = "stream_options")
val streamOptions: ChatStreamOptions? = null

Streaming usage and obfuscation settings.

Link copied to clipboard
@SerialName(value = "tool_choice")
val toolChoice: ChatToolSelection? = null

Replaces the original function-only tool choice.

Link copied to clipboard
val tools: List<ChatTool>? = null

Replaces request tools, allowing custom text tools.

Link copied to clipboard
@SerialName(value = "verbosity")
val verbosity: String? = null

Requested detail level in generated text.