Package-level declarations
Types
The OpenAI API returns a list of CompletionChoice
. Each choice has a generated message (CompletionChoice.text) and a finish reason (CompletionChoice.finishReason). For most use cases, you only need the generated text.
The OpenAI API returns a list of CompletionChoice
. Each choice has a generated message (CompletionChoice.text) and a finish reason (CompletionChoice.finishReason). For most use cases, you only need the generated text.
Holds the configurable options that can be sent to the OpenAI Completions API. For most use cases, you only need to set model and prompt. For more detailed descriptions for each option, refer to the Completions Wiki.
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.
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.
Holds how many tokens that were used by your API request. Use these tokens to calculate how much money you have spent on each request.
Functions
Creates a CompletionRequest using the CompletionRequest.Builder using Kotlin DSL.