LLMConfig

inner class LLMConfig(source)

Configuration class for managing various Language Learning Model (LLM) providers and their settings. This class allows integration with different LLM services such as OpenAI, Anthropic, Google, OpenRouter, DeepSeek, and Ollama. Users can also define fallback configurations and custom LLM clients.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
inner class FallbackLLMConfig

Configuration class for defining a fallback Large Language Model (LLM) setup.

Functions

Link copied to clipboard
fun addClient(provider: LLMProvider, client: LLMClient)

Adds a custom Large Language Model (LLM) client to the configuration.

Link copied to clipboard
fun anthropic(apiKey: String, configure: KoogAgentsConfig.AnthropicConfig.() -> Unit = {})

Configures the Anthropic API client with the specified API key and additional settings.

Link copied to clipboard
fun deepSeek(apiKey: String, configure: KoogAgentsConfig.DeepSeekConfig.() -> Unit = {})

Configures and initializes the DeepSeek API with the provided API key and optional configuration.

Link copied to clipboard

Configures fallback settings for the LLM (Large Language Model) configuration. This is used to define a fallback provider and model in case primary configurations are unavailable.

Link copied to clipboard
fun google(apiKey: String, configure: KoogAgentsConfig.GoogleConfig.() -> Unit = {})

Configures the Google client for the application.

Link copied to clipboard
fun ollama(configure: KoogAgentsConfig.OllamaConfig.() -> Unit = {})

Configures the Ollama integration using the provided configuration block. This method allows customization of settings for communicating with the Ollama service.

Link copied to clipboard
fun openAI(apiKey: String, configure: KoogAgentsConfig.OpenAIConfig.() -> Unit = {})

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

Link copied to clipboard
fun openRouter(apiKey: String, configure: KoogAgentsConfig.OpenRouterConfig.() -> Unit = {})

Configures and initializes the OpenRouter API with the provided API key and optional configuration.