FIMCompletionRequest

@Serializable
class FIMCompletionRequest

Represents the FIM (Fill-In-the-Middle) Completion request

Types

Link copied to clipboard
class Builder

Builder for non-streaming FIM completion requests.

Link copied to clipboard

Builder for streaming FIM completion requests.

Properties

Link copied to clipboard

Echo back the prompt in addition to the completion

Link copied to clipboard

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

Link copied to clipboard

Include the log probabilities on the logprobs most likely output tokens, as well the chosen tokens. For example, if logprobs is 20, the API will return a list of the 20 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response.

Link copied to clipboard

The maximum number of tokens that can be generated in the completion.

Link copied to clipboard

ID of the model to use.

Link copied to clipboard

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

Link copied to clipboard

The prompt to generate completions for.

Link copied to clipboard

Up to 16 sequences where the API will stop generating further tokens.

Link copied to clipboard

Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: DONE message.

Link copied to clipboard

Options for streaming response. Only set this when you set stream: true.

Link copied to clipboard

The suffix that comes after a completion of inserted text.

Link copied to clipboard

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Link copied to clipboard
val topP: Double?

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String