Skip to content

struct OpenAI::ChatCompletionChoice
inherits Struct #

A message response from the API

Included modules

JSON::Serializable

Constructors#

.new(index : Int32, message : ChatCompletionMessage, finish_reason : FinishReason, log_probs : LogProbs | Nil = nil)#

View source

.new(index : Int32, message : ChatCompletionMessage, finish_reason : OpenAI::FinishReason)#

View source

.new(pull : JSON::PullParser)#

View source

Methods#

#clone#

View source

#copy_with(index _index = @index, message _message = @message, finish_reason _finish_reason = @finish_reason, log_probs _log_probs = @log_probs)#

View source

#finish_reason : FinishReason#

#index : Int32#

#log_probs : LogProbs | ::Nil#

#message : ChatCompletionMessage#