![]() |
![]()
| ![]() |
![]()
NAMEOpenAI::API::Response::Chat - encapsulate the response from the OpenAI Chat API. SYNOPSISThis module should not be used directly. It will be used by OpenAI::API::Request::Chat to parse and encapsulate the response. DESCRIPTIONOpenAI::API::Response::Chat extends the OpenAI::API::Response superclass and is used to encapsulate the response from the OpenAI Chat API. ATTRIBUTESidThe unique identifier of the chat completion. objectThe type of the object, which is "chat.completion" for this module. createdThe timestamp when the chat completion was created. choicesAn arrayref containing the chat 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 content of the message in the first choice of the "choices" arrayref. SEE ALSOOpenAI::API::Request::Chat, OpenAI::API::Response
|