FIMCompletion

@Serializable
class FIMCompletion(val id: String, val choices: List<FIMChoice>, val created: Long, val model: String, val systemFingerprint: String? = null, val object: String, val usage: Usage? = null)

Response payload of a Fill-In-the-Middle completion.

Streaming FIM endpoints emit a kotlinx.coroutines.flow.Flow of FIMCompletion chunks; all chunks from the same response share id and created. For non-streaming calls the single returned instance contains the full completion.

Constructors

Link copied to clipboard
constructor(id: String, choices: List<FIMChoice>, created: Long, model: String, systemFingerprint: String? = null, object: String, usage: Usage? = null)

Properties

Link copied to clipboard

Completion alternatives generated for the input prompt.

Link copied to clipboard

Unix timestamp (seconds) of when the completion was created.

Link copied to clipboard
val id: String

Unique identifier for the completion. Identical across all chunks of a streamed response.

Link copied to clipboard

Model that produced the completion.

Link copied to clipboard

Object type discriminator; always text_completion.

Link copied to clipboard

Backend configuration fingerprint, if the API returned one.

Link copied to clipboard
val usage: Usage?

Token usage statistics. Only populated on the final usage chunk when streamOptions.includeUsage is set for streaming requests.

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