ChatResponse

data class ChatResponse(val id: String, val objectType: String = "chat.completions", val created: Long, val model: String, val serviceTier: String? = null, val systemFingerprint: String? = null, val usage: Usage, val choices: List<Choice>)(source)

Represents a chat completion response from the OpenAI API.

See also

Constructors

Link copied to clipboard
constructor(id: String, objectType: String = "chat.completions", created: Long, model: String, serviceTier: String? = null, systemFingerprint: String? = null, usage: Usage, choices: List<Choice>)

Properties

Link copied to clipboard

A list of chat completion choices.

Link copied to clipboard

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

Link copied to clipboard
val id: String

A unique identifier for the chat completion.

Link copied to clipboard

The model used for the chat completion.

Link copied to clipboard

The object type, which is always "chat.completions".

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

The service tier used for processing the request.

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

A fingerprint representing the backend configuration.

Link copied to clipboard

Usage statistics for the completion request.