Class AnthropicChatAutoConfiguration

java.lang.Object
org.springframework.ai.model.anthropic.autoconfigure.AnthropicChatAutoConfiguration

@AutoConfiguration(after={org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration.class,ToolCallingAutoConfiguration.class,SpringAiRetryAutoConfiguration.class}) @EnableConfigurationProperties({AnthropicChatProperties.class,AnthropicConnectionProperties.class}) @ConditionalOnClass(AnthropicApi.class) @ConditionalOnProperty(name="spring.ai.model.chat", havingValue="anthropic", matchIfMissing=true) @Import(StringToToolChoiceConverter.class) public class AnthropicChatAutoConfiguration extends Object
Auto-configuration for Anthropic Chat Model.
Since:
1.0.0
Author:
Christian Tzolov, Thomas Vitale, Ilayaperumal Gopinathan, Hyoseop Song
  • Constructor Details

    • AnthropicChatAutoConfiguration

      public AnthropicChatAutoConfiguration()
  • Method Details

    • anthropicApi

      @Bean @ConditionalOnMissingBean public AnthropicApi anthropicApi(AnthropicConnectionProperties connectionProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.web.reactive.function.client.WebClient.Builder> webClientBuilderProvider, org.springframework.web.client.ResponseErrorHandler responseErrorHandler)
    • anthropicChatModel

      @Bean @ConditionalOnMissingBean public AnthropicChatModel anthropicChatModel(AnthropicApi anthropicApi, AnthropicChatProperties chatProperties, org.springframework.retry.support.RetryTemplate retryTemplate, ToolCallingManager toolCallingManager, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention, org.springframework.beans.factory.ObjectProvider<ToolExecutionEligibilityPredicate> anthropicToolExecutionEligibilityPredicate)