FIMCompletion Params
Parameters for configuring Fill-in-the-Middle (FIM) completion requests to DeepSeek models.
FIM allows the model to complete text where you provide both a prefix and a suffix, making it useful for code completion, text infilling, and template-based generation.
Example:
val params = fimCompletionParams {
temperature = 0.7
maxTokens = 200
suffix = "}" // The code should end with a closing bracket
}
val completion = client.fim(params, "function calculateArea(radius) {")
println(completion.choices.first().text)Types
Builder for creating FIMCompletionParams with standard (non-streaming) configuration.
Builder for creating FIMCompletionParams 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.
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.
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 FIMCompletionRequest from these parameters and the provided prompt.
Shortcut to fimCompletionParams, available on any existing DeepSeekParams.
Shortcut to fimCompletionStreamParams, available on any existing DeepSeekParams.