copy

fun copy(echo: Boolean? = this.echo, frequencyPenalty: Double? = this.frequencyPenalty, logprobs: Int? = this.logprobs, maxTokens: Int? = this.maxTokens, presencePenalty: Double? = this.presencePenalty, stop: StopReason? = this.stop, stream: Boolean? = this.stream, streamOptions: StreamOptions? = this.streamOptions, suffix: String? = this.suffix, temperature: Double? = this.temperature, topP: Double? = this.topP): FIMCompletionParams

Creates a copy of these parameters with optional changes to specific properties.

This is useful when you want to reuse a base configuration with slight modifications, such as changing from standard to streaming mode.

Example:

// Create a streaming version of existing parameters
val streamParams = regularParams.copy(stream = true)

Return

A new FIMCompletionParams instance with the specified changes

Parameters

echo

New echo setting, or existing value if not specified

frequencyPenalty

New frequency penalty value, or existing value if not specified

logprobs

New log probabilities count, or existing value if not specified

maxTokens

New maximum token count, or existing value if not specified

presencePenalty

New presence penalty value, or existing value if not specified

stop

New stop reason, or existing value if not specified

stream

New streaming setting, or existing value if not specified

streamOptions

New stream options, or existing value if not specified

suffix

New suffix text, or existing value if not specified

temperature

New temperature value, or existing value if not specified

topP

New top-p value, or existing value if not specified