OpenAIChatCompletionResponse

class OpenAIChatCompletionResponse(val choices: List<OpenAIChoice>, val created: Long, val id: String, val model: String, val serviceTier: String? = null, val systemFingerprint: String? = null, val objectType: String, val usage: OpenAIUsage? = null) : OpenAIBaseLLMResponse(source)

Represents the response from the OpenAI chat completion API.

Constructors

Link copied to clipboard
constructor(choices: List<OpenAIChoice>, created: Long, id: String, model: String, serviceTier: String? = null, systemFingerprint: String? = null, objectType: String, usage: OpenAIUsage? = null)

Properties

Link copied to clipboard

A list of chat completion choices. Can be more than one if n is greater than 1.

Link copied to clipboard
open override val created: Long

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

Link copied to clipboard
open override val id: String

A unique identifier for the chat completion.

Link copied to clipboard
open override val model: String

The model used for the chat completion.

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

The object type, which is always chat.completion.

Link copied to clipboard
val serviceTier: String? = null

Specifies the processing type used for serving the request.

Link copied to clipboard

This fingerprint represents the backend configuration that the model runs with.

Link copied to clipboard
val usage: OpenAIUsage? = null

Usage statistics for the completion request.