Companion

object Companion

Functions

Link copied to clipboard
@Contract(pure = true)
fun azureBuilder(): OpenAI.AzureBuilder

Instantiates a builder for an Azure OpenAI.

Link copied to clipboard
@Contract(pure = true)
fun builder(): OpenAI.Builder

Instantiates a builder for a default OpenAI instance. For Azure's OpenAI, use azureBuilder instead.

Link copied to clipboard
@Contract(pure = true)
fun createObjectMapper(): ObjectMapper

Returns an ObjectMapper instance with the default OpenAI adapters registered. This can be used to save conversations (and other data) to file.

Link copied to clipboard

Extension function to stream a chat completion using kotlin coroutines.

Link copied to clipboard

Extension function to stream a completion using kotlin coroutines.