Chat Completion Request
Represents the Chat Completion request
Constructors
Types
DSL for building a conversation history.
Builder for streaming chat completion requests.
DSL for building the multimodal content of a single UserMessage.
Properties
Sent as frequency_penalty, ignored by the API.
A list of messages comprising the conversation so far.
Sent as presence_penalty, ignored by the API.
How much reasoning the model spends before answering, while thinking mode is on. See ReasoningEffort.
An object specifying the format that the model must output. Setting to { "type": "json_object" } enables JSON Output, which guarantees the message the model generates is valid JSON.
Up to 16 sequences where the API will stop generating further tokens.
Options for streaming response. Only set this when you set stream: true.
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
Controls which (if any) tool is called by the model.
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.