NAME
OpenAI::API::Response::Completion - encapsulate the response from the OpenAI Completion API.
SYNOPSIS
This module should not be used directly. It will be used by OpenAI::API::Request::Completion to encapsulate the response.
DESCRIPTION
OpenAI::API::Response::Completion extends the OpenAI::API::Response superclass and is used to encapsulate the response from the OpenAI Completion API.
ATTRIBUTES
id
The unique identifier of the completion.
object
The type of the object, which is "text_completion" for this module.
created
The timestamp when the completion was created.
model
The name of the model used for the completion.
choices
An arrayref containing the completion choices.
usage
A hashref containing the tokens usage information.
STRING OVERLOAD
This module uses overload to provide string representation for the response object. When the object is used as a string, it will automatically return the text of the first choice in the choices
arrayref.