KoogAutoConfiguration
KoogAutoConfiguration is a Spring Boot auto-configuration class that configures and provides beans for various LLM (Large Language Model) provider clients. It ensures that the beans are only created if the corresponding properties are defined in the application's configuration.
This configuration includes support for Anthropic, Google, Ollama, OpenAI, and OpenRouter providers. Each provider is configured with specific settings and logic encapsulated within a SingleLLMPromptExecutor instance backed by a respective client implementation.
Functions
Creates and configures a SingleLLMPromptExecutor using an AnthropicLLMClient. This is conditioned on the presence of an API key in the application properties.
Provides a SingleLLMPromptExecutor bean configured with a GoogleLLMClient using the settings from the given KoogProperties
. The bean is only created if the google.api-key
property is set.
Creates and configures a SingleLLMPromptExecutor instance using Ollama properties.
Provides a bean of type SingleLLMPromptExecutor configured for OpenAI interaction. The bean will only be instantiated if the property ai.koog.openai.api-key
is defined in the application properties.
Creates a SingleLLMPromptExecutor bean configured to use the OpenRouter LLM client.