AnthropicLLMAutoConfiguration
Auto-configuration class for Anthropic LLM integration in a Spring Boot application.
This class automatically configures the required beans for interacting with the Anthropic LLM when the appropriate configuration properties are set in the application. It specifically checks for the presence of the ai.koog.anthropic.enabled
and ai.koog.anthropic.api-key
properties.
Beans provided by this configuration:
AnthropicLLMClient: Configured client for interacting with the Anthropic API.
SingleLLMPromptExecutor: Prompt executor that utilizes the configured Anthropic client.
To enable this configuration, the ai.koog.anthropic.enabled
property must be set to true
and a valid ai.koog.anthropic.api-key
must be provided in the application's property files.
This configuration reads additional properties imported via spring.config.import
from the starter's application.properties file and binds them to the AnthropicKoogProperties.
Functions
Creates and initializes a SingleLLMPromptExecutor instance using an AnthropicLLMClient. The executor is configured with a retrying client derived from the provided AnthropicLLMClient.
Creates an AnthropicLLMClient bean configured with application properties.