Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).
Constructors
new(id :
String = "", choices :
Array(
CreateCompletionResponseChoicesItem) = [] of
CreateCompletionResponseChoicesItem, created :
Int64 = 0, model :
String = "", system_fingerprint :
String |
Nil = nil, object :
CreateCompletionResponseObject =
CreateCompletionResponseObject::TextCompletion, usage :
CompletionUsage |
Nil = nil)
SourceInstance methods
choices
The list of completion choices the model generated for the input prompt.
Sourcechoices=(choices :
Array(
CreateCompletionResponseChoicesItem))
The list of completion choices the model generated for the input prompt.
Sourcecreated
The Unix timestamp (in seconds) of when the completion was created.
Sourcecreated=(created :
Int64)
The Unix timestamp (in seconds) of when the completion was created.
Sourceid
A unique identifier for the completion.
SourceA unique identifier for the completion.
Sourcemodel
The model used for completion.
SourceThe model used for completion.
Sourceobject
The object type, which is always "text_completion"
Sourceobject=(object : CreateCompletionResponseObject)
The object type, which is always "text_completion"
Sourcesystem_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.
Sourcesystem_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.
Sourceusage=(usage : CompletionUsage | Nil)
Source