Class AnthropicChatAutoConfiguration
java.lang.Object
org.springframework.ai.model.anthropic.autoconfigure.AnthropicChatAutoConfiguration
@AutoConfiguration(after={org.springframework.boot.restclient.autoconfigure.RestClientAutoConfiguration.class,org.springframework.boot.webclient.autoconfigure.WebClientAutoConfiguration.class,org.springframework.ai.model.tool.autoconfigure.ToolCallingAutoConfiguration.class,org.springframework.ai.retry.autoconfigure.SpringAiRetryAutoConfiguration.class})
@EnableConfigurationProperties({AnthropicChatProperties.class,AnthropicConnectionProperties.class})
@ConditionalOnClass(org.springframework.ai.anthropic.api.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, Yanming Zhou
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.ai.anthropic.api.AnthropicApianthropicApi(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.beans.factory.ObjectProvider<org.springframework.web.client.ResponseErrorHandler> responseErrorHandler) org.springframework.ai.anthropic.AnthropicChatModelanthropicChatModel(org.springframework.ai.anthropic.api.AnthropicApi anthropicApi, AnthropicChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.core.retry.RetryTemplate> retryTemplate, org.springframework.ai.model.tool.ToolCallingManager toolCallingManager, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.chat.observation.ChatModelObservationConvention> observationConvention, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.model.tool.ToolExecutionEligibilityPredicate> anthropicToolExecutionEligibilityPredicate)
-
Constructor Details
-
AnthropicChatAutoConfiguration
public AnthropicChatAutoConfiguration()
-
-
Method Details
-
anthropicApi
@Bean @ConditionalOnMissingBean public org.springframework.ai.anthropic.api.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.beans.factory.ObjectProvider<org.springframework.web.client.ResponseErrorHandler> responseErrorHandler) -
anthropicChatModel
@Bean @ConditionalOnMissingBean public org.springframework.ai.anthropic.AnthropicChatModel anthropicChatModel(org.springframework.ai.anthropic.api.AnthropicApi anthropicApi, AnthropicChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.core.retry.RetryTemplate> retryTemplate, org.springframework.ai.model.tool.ToolCallingManager toolCallingManager, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.chat.observation.ChatModelObservationConvention> observationConvention, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.model.tool.ToolExecutionEligibilityPredicate> anthropicToolExecutionEligibilityPredicate)
-