Class AnthropicAutoConfiguration

java.lang.Object
org.springframework.ai.autoconfigure.anthropic.AnthropicAutoConfiguration

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

    • AnthropicAutoConfiguration

      public AnthropicAutoConfiguration()
  • 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, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention)
    • springAiFunctionManager

      @Bean @ConditionalOnMissingBean public FunctionCallbackContext springAiFunctionManager(org.springframework.context.ApplicationContext context)