Class DashScopeImageAutoConfiguration
java.lang.Object
com.alibaba.cloud.ai.autoconfigure.dashscope.DashScopeImageAutoConfiguration
@AutoConfiguration(after={org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration.class,org.springframework.ai.retry.autoconfigure.SpringAiRetryAutoConfiguration.class})
@ConditionalOnClass(com.alibaba.cloud.ai.dashscope.api.DashScopeImageApi.class)
@ConditionalOnDashScopeEnabled
@ConditionalOnProperty(name="spring.ai.model.image",
havingValue="dashscope",
matchIfMissing=true)
@EnableConfigurationProperties({DashScopeConnectionProperties.class,DashScopeImageProperties.class})
@ImportAutoConfiguration(classes={org.springframework.ai.retry.autoconfigure.SpringAiRetryAutoConfiguration.class,org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration.class})
public class DashScopeImageAutoConfiguration
extends Object
- Author:
- yuluo, yuluo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondashScopeImageModel(DashScopeConnectionProperties commonProperties, DashScopeImageProperties 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)
-
Constructor Details
-
DashScopeImageAutoConfiguration
public DashScopeImageAutoConfiguration()
-
-
Method Details
-
dashScopeImageModel
@Bean @ConditionalOnMissingBean public DashScopeImageModel dashScopeImageModel(DashScopeConnectionProperties commonProperties, DashScopeImageProperties 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)
-