AzureBuilder

Functions

Link copied to clipboard

Sets the API key to use for requests. This is required.

Link copied to clipboard

Sets the azure api version

Link copied to clipboard

Sets the base URL to use for requests. This is useful for testing. This can also be used to use the Azure OpenAI API, though we recommend using azureBuilder instead for that. Defaults to https://api.openai.com.

Link copied to clipboard
@Contract(pure = true)
open override fun build(): OpenAI

Builds the OpenAI instance.

Link copied to clipboard
fun client(client: OkHttpClient): OpenAI.Builder

Sets the OkHttpClient used to make requests. Modify this if you want to change the timeout, add interceptors, add a proxy, etc.

Link copied to clipboard

Sets the azure model name

Link copied to clipboard
fun organization(organization: String?): OpenAI.Builder

If you belong to multiple organizations, you can specify which one to use. Defaults to your default organization configured in the OpenAI dashboard.