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
Reduces repetition by penalizing tokens that have appeared in the text
Format specification for the model's output
Custom stop sequence that causes the model to stop generating further tokens
Configuration options for streaming responses
Controls randomness in output generation (higher = more random)
Controls how the model selects tools to use
How many most likely tokens to return at each position (max 20)
Functions
Creates chat completion parameters with custom settings.
Creates chat completion stream parameters with custom settings.
Creates a copy of these parameters with optional changes to specific properties.
Creates a ChatCompletionRequest from these parameters and the provided messages.
Creates file-in-the-middle (FIM) completion parameters with custom settings.
Creates file-in-the-middle (FIM) completion stream parameters with custom settings.