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_CHAT
temperature = 0.7
maxTokens = 1000
presencePenalty = 0.5
}
client.chat(params, messages)Types
Builder for creating ChatCompletionParams with standard (non-streaming) configuration.
Builder for creating ChatCompletionParams specifically configured for streaming responses.
Properties
Reduces repetition by penalizing tokens based on their frequency in the text. Expected range: -2.0..2.0.
Reduces repetition by penalizing tokens that have appeared in the text. Expected range: -2.0..2.0.
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.