Class OpenAiImageAutoConfiguration
java.lang.Object
org.springframework.ai.model.openai.autoconfigure.OpenAiImageAutoConfiguration
@AutoConfiguration(after={org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration.class,SpringAiRetryAutoConfiguration.class})
@ConditionalOnClass(OpenAiApi.class)
@ConditionalOnProperty(name="spring.ai.model.image",
havingValue="openai",
matchIfMissing=true)
@EnableConfigurationProperties({OpenAiConnectionProperties.class,OpenAiImageProperties.class})
@ImportAutoConfiguration(classes={SpringAiRetryAutoConfiguration.class,org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration.class})
public class OpenAiImageAutoConfiguration
extends Object
Image
Auto-configuration
for OpenAI.- Author:
- Christian Tzolov, Stefan Vassilev, Thomas Vitale, Ilayaperumal Gopinathan, lambochen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionopenAiImageModel
(OpenAiConnectionProperties commonProperties, OpenAiImageProperties 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)
-
Constructor Details
-
OpenAiImageAutoConfiguration
public OpenAiImageAutoConfiguration()
-
-
Method Details
-
openAiImageModel
@Bean @ConditionalOnMissingBean public OpenAiImageModel openAiImageModel(OpenAiConnectionProperties commonProperties, OpenAiImageProperties 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)
-