Chat Response
data class ChatResponse(val id: String, val created: Long, val choices: List<ChatChoice>, val usage: ChatUsage)
The ChatResponse
contains all the data returned by the OpenAI Chat API. For most use cases, ChatResponse.get (passing 0 to the index argument) is all you need.
Functions
Link copied to clipboard
Shorthand for accessing the generated messages (shorthand for ChatResponse.choices).
Link copied to clipboard
Returns the time-zoned instant that the OpenAI Chat API sent this response. By default, this method uses the system's timezone.