Class QianFanAutoConfiguration
java.lang.Object
org.springframework.ai.autoconfigure.qianfan.QianFanAutoConfiguration
@AutoConfiguration(after={org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,SpringAiRetryAutoConfiguration.class})
@ConditionalOnClass(org.springframework.ai.qianfan.api.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
Constructors -
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<org.springframework.ai.chat.observation.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<org.springframework.ai.embedding.observation.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<org.springframework.ai.image.observation.ImageModelObservationConvention> observationConvention) org.springframework.ai.model.function.FunctionCallbackResolverspringAiFunctionManager(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<org.springframework.ai.chat.observation.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<org.springframework.ai.embedding.observation.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<org.springframework.ai.image.observation.ImageModelObservationConvention> observationConvention) -
springAiFunctionManager
@Bean @ConditionalOnMissingBean public org.springframework.ai.model.function.FunctionCallbackResolver springAiFunctionManager(org.springframework.context.ApplicationContext context)
-