Chat Completion Params
Parameters for configuring chat completion requests to DeepSeek models.
This class encapsulates all the options available when sending chat completion requests, allowing fine-grained control over the model's behavior and output.
Example:
val params = chatCompletionParams {
model = ChatModel.DEEPSEEK_FLASH
temperature = 0.7
maxTokens = 1000
}
client.chat(params, messages)Types
Builder for creating ChatCompletionParams with standard (non-streaming) configuration.
Builder for creating ChatCompletionParams specifically configured for streaming responses.
Properties
Sent as frequency_penalty, ignored by the API.
The DeepSeek model to use for chat completion; defaults to ChatModel.DEEPSEEK_FLASH
Sent as presence_penalty, ignored by the API.
How much reasoning the model spends before answering, while thinking mode is on; defaults to the API's own high. See ReasoningEffort.
Format specification for the model's output
Custom stop sequences that cause the model to stop generating further tokens.
Configuration options for streaming responses
Controls randomness in output generation (higher = more random). Expected range: 0.0..2.0.
Controls how the model selects tools to use
How many most likely tokens to return at each position (max 20)
Functions
Shortcut to chatCompletionParams, available on any existing DeepSeekParams.
Shortcut to chatCompletionStreamParams, available on any existing DeepSeekParams.
Creates a copy of these parameters with optional changes to specific properties.
Creates a ChatCompletionRequest from these parameters and the provided messages.
Shortcut to fimCompletionParams, available on any existing DeepSeekParams.
Shortcut to fimCompletionStreamParams, available on any existing DeepSeekParams.