![]() |
![]()
| ![]() |
![]()
NAMEOpenAI::API::Response::Completion - encapsulate the response from the OpenAI Completion API. SYNOPSISThis module should not be used directly. It will be used by OpenAI::API::Request::Completion to encapsulate the response. DESCRIPTIONOpenAI::API::Response::Completion extends the OpenAI::API::Response superclass and is used to encapsulate the response from the OpenAI Completion API. ATTRIBUTESidThe unique identifier of the completion. objectThe type of the object, which is "text_completion" for this module. createdThe timestamp when the completion was created. modelThe name of the model used for the completion. choicesAn arrayref containing the completion choices. usageA hashref containing the tokens usage information. STRING OVERLOADThis 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. SEE ALSOOpenAI::API::Request::Completion, OpenAI::API::Response
|