AnthropicLLMAutoConfiguration

@AutoConfiguration
@PropertySource(value = ["classpath:/META-INF/config/koog/anthropic-llm.properties"])
@EnableConfigurationProperties(value = [AnthropicKoogProperties::class])
class AnthropicLLMAutoConfiguration(properties: AnthropicKoogProperties)(source)

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:

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.

Constructors

Link copied to clipboard
constructor(properties: AnthropicKoogProperties)

Functions

Link copied to clipboard

Creates and initializes a SingleLLMPromptExecutor instance using an AnthropicLLMClient. The executor is configured with a retrying client derived from the provided AnthropicLLMClient.

Link copied to clipboard
@Bean
@ConditionalOnProperty(prefix = "ai.koog.anthropic", name = ["enabled"], havingValue = "true")
fun anthropicLLMClient(): AnthropicLLMClient

Creates an AnthropicLLMClient bean configured with application properties.