ChatCompletionResult

@Serializable
data class ChatCompletionResult(val id: String, val created: Long, val model: ModelId, val choices: List<ChatResultChoice>, val usage: ChatUsage? = null, val serviceTier: String? = null, val systemFingerprint: String? = null, val metadata: Map<String, String>? = null)

Completion result supporting custom calls without extending legacy sealed types.

Constructors

Link copied to clipboard
constructor(id: String, created: Long, model: ModelId, choices: List<ChatResultChoice>, usage: ChatUsage? = null, serviceTier: String? = null, systemFingerprint: String? = null, metadata: Map<String, String>? = null)

Properties

Link copied to clipboard

Generated choices.

Link copied to clipboard

Creation time in Unix seconds.

Link copied to clipboard
val id: String

Completion ID.

Link copied to clipboard
val metadata: Map<String, String>? = null

Metadata attached to a stored completion.

Link copied to clipboard

Model ID.

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

Effective processing tier.

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

Backend fingerprint.

Link copied to clipboard
val usage: ChatUsage? = null

Detailed token usage.