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("function calculateArea(radius) {", params)
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
Reduces repetition by penalizing tokens that have appeared in the text
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)
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 FIMCompletionRequest from these parameters and the provided prompt.
Creates file-in-the-middle (FIM) completion parameters with custom settings.
Creates file-in-the-middle (FIM) completion stream parameters with custom settings.