openAI

fun openAI(apiKey: String, configure: KoogAgentsConfig.OpenAIConfig.() -> Unit = {})(source)

Configures the OpenAI integration for the system using the provided API key and optional configuration.

Parameters

apiKey

The API key used to authenticate with the OpenAI service.

configure

A lambda function to customize the OpenAI configuration, such as setting base URLs, paths, or timeout settings. Defaults to an empty lambda.