ChatCompletionChunk

@Serializable
data class ChatCompletionChunk(val id: String, val created: Long, val model: ModelId, val choices: List<ChatChunk>, val usage: Usage? = null, val systemFingerprint: String? = null)

An object containing a response from the chat stream completion api.

documentation

Constructors

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

Properties

Link copied to clipboard
@SerialName(value = "choices")
val choices: List<ChatChunk>

A list of generated completions

Link copied to clipboard
@SerialName(value = "created")
val created: Long

The creation time in epoch milliseconds.

Link copied to clipboard
@SerialName(value = "id")
val id: String

A unique id assigned to this completion

Link copied to clipboard
@SerialName(value = "model")
val model: ModelId

The model used.

Link copied to clipboard
@SerialName(value = "system_fingerprint")
val systemFingerprint: String? = null

This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.

Link copied to clipboard
@SerialName(value = "usage")
val usage: Usage? = null

Text completion usage data.