class

OpenAI::CreateCompletionResponseChoicesItem

Inherits JSON::Serializable < Reference < Object

Constructors

new(finish_reason : CreateCompletionResponseChoicesItemFinishReason = CreateCompletionResponseChoicesItemFinishReason::Stop, index : Int64 = 0, logprobs : CreateCompletionResponseChoicesItemLogprobs = nil, text : String = "")
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

finish_reason

The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, or content_filter if content was omitted due to a flag from our content filters.

Source
finish_reason=(finish_reason : CreateCompletionResponseChoicesItemFinishReason)

The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, or content_filter if content was omitted due to a flag from our content filters.

Source
index
Source
index=(index : Int64)
Source
logprobs
Source
logprobs=(logprobs : CreateCompletionResponseChoicesItemLogprobs)
Source
text
Source
text=(text : String)
Source