Class QianFanAutoConfiguration
java.lang.Object
org.springframework.ai.autoconfigure.qianfan.QianFanAutoConfiguration
@AutoConfiguration(after={org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,SpringAiRetryAutoConfiguration.class})
@ConditionalOnClass(QianFanApi.class)
@EnableConfigurationProperties({QianFanConnectionProperties.class,QianFanChatProperties.class,QianFanEmbeddingProperties.class,QianFanImageProperties.class})
public class QianFanAutoConfiguration
extends Object
Auto-configuration
for QianFan Chat, Embedding, and Image
Models.- Author:
- Geng Rong
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionqianFanChatModel
(QianFanConnectionProperties commonProperties, QianFanChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) qianFanEmbeddingModel
(QianFanConnectionProperties commonProperties, QianFanEmbeddingProperties embeddingProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<EmbeddingModelObservationConvention> observationConvention) qianFanImageModel
(QianFanConnectionProperties commonProperties, QianFanImageProperties imageProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ImageModelObservationConvention> observationConvention) springAiFunctionManager
(org.springframework.context.ApplicationContext context)
-
Constructor Details
-
QianFanAutoConfiguration
public QianFanAutoConfiguration()
-
-
Method Details
-
qianFanChatModel
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.qianfan.chat", name="enabled", havingValue="true", matchIfMissing=true) public QianFanChatModel qianFanChatModel(QianFanConnectionProperties commonProperties, QianFanChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
qianFanEmbeddingModel
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.qianfan.embedding", name="enabled", havingValue="true", matchIfMissing=true) public QianFanEmbeddingModel qianFanEmbeddingModel(QianFanConnectionProperties commonProperties, QianFanEmbeddingProperties embeddingProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<EmbeddingModelObservationConvention> observationConvention) -
qianFanImageModel
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.qianfan.image", name="enabled", havingValue="true", matchIfMissing=true) public QianFanImageModel qianFanImageModel(QianFanConnectionProperties commonProperties, QianFanImageProperties imageProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ImageModelObservationConvention> observationConvention) -
springAiFunctionManager
@Bean @ConditionalOnMissingBean public FunctionCallbackContext springAiFunctionManager(org.springframework.context.ApplicationContext context)
-