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
- Since:
- 1.0.0
- Author:
- Christian Tzolov, Thomas Vitale
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionanthropicApi
(AnthropicConnectionProperties connectionProperties, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler) 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
(org.springframework.context.ApplicationContext context)
-
Constructor Details
-
AnthropicAutoConfiguration
public AnthropicAutoConfiguration()
-
-
Method Details
-
anthropicApi
@Bean @ConditionalOnMissingBean public AnthropicApi anthropicApi(AnthropicConnectionProperties connectionProperties, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, 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)
-