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