class

OpenAI::CreateChatCompletionResponse

Inherits JSON::Serializable < Reference < Object

Represents a chat completion response returned by model, based on the provided input.

Constructors

new(id : String = "", choices : Array(CreateChatCompletionResponseChoicesItem) = [] of CreateChatCompletionResponseChoicesItem, created : Int64 = 0, model : String = "", service_tier : ServiceTier | Nil = nil, system_fingerprint : String | Nil = nil, object : CreateChatCompletionResponseObject = CreateChatCompletionResponseObject::ChatCompletion, usage : CompletionUsage | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

choices

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

Source
choices=(choices : Array(CreateChatCompletionResponseChoicesItem))

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

Source
created

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

Source
created=(created : Int64)

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

Source
id

A unique identifier for the chat completion.

Source
id=(id : String)

A unique identifier for the chat completion.

Source
model

The model used for the chat completion.

Source
model=(model : String)

The model used for the chat completion.

Source
object

The object type, which is always chat.completion.

Source
object=(object : CreateChatCompletionResponseObject)

The object type, which is always chat.completion.

Source
service_tier
Source
service_tier=(service_tier : ServiceTier | Nil)
Source
system_fingerprint

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.

Source
system_fingerprint=(system_fingerprint : String | Nil)

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.

Source
usage
Source
usage=(usage : CompletionUsage | Nil)
Source