Class AzureOpenAiAutoConfiguration
java.lang.Object
org.springframework.ai.autoconfigure.azure.openai.AzureOpenAiAutoConfiguration
@AutoConfiguration
@ConditionalOnClass({com.azure.ai.openai.OpenAIClientBuilder.class,AzureOpenAiChatModel.class})
@EnableConfigurationProperties({AzureOpenAiChatProperties.class,AzureOpenAiEmbeddingProperties.class,AzureOpenAiConnectionProperties.class,AzureOpenAiImageOptionsProperties.class,AzureOpenAiAudioTranscriptionProperties.class})
public class AzureOpenAiAutoConfiguration
extends Object
- Author:
- Piotr Olaszewski, Soby Chacko
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionazureOpenAiAudioTranscriptionModel
(com.azure.ai.openai.OpenAIClientBuilder openAIClient, AzureOpenAiAudioTranscriptionProperties audioProperties) azureOpenAiChatModel
(com.azure.ai.openai.OpenAIClientBuilder openAIClientBuilder, AzureOpenAiChatProperties chatProperties, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) azureOpenAiEmbeddingModel
(com.azure.ai.openai.OpenAIClientBuilder openAIClient, AzureOpenAiEmbeddingProperties embeddingProperties, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<EmbeddingModelObservationConvention> observationConvention) azureOpenAiImageClient
(com.azure.ai.openai.OpenAIClientBuilder openAIClientBuilder, AzureOpenAiImageOptionsProperties imageProperties) com.azure.ai.openai.OpenAIClientBuilder
openAIClientBuilder
(AzureOpenAiConnectionProperties connectionProperties) com.azure.ai.openai.OpenAIClientBuilder
openAIClientWithTokenCredential
(AzureOpenAiConnectionProperties connectionProperties, com.azure.core.credential.TokenCredential tokenCredential) springAiFunctionManager
(org.springframework.context.ApplicationContext context)
-
Constructor Details
-
AzureOpenAiAutoConfiguration
public AzureOpenAiAutoConfiguration()
-
-
Method Details
-
openAIClientBuilder
@Bean @ConditionalOnMissingBean public com.azure.ai.openai.OpenAIClientBuilder openAIClientBuilder(AzureOpenAiConnectionProperties connectionProperties) -
openAIClientWithTokenCredential
@Bean @ConditionalOnMissingBean @ConditionalOnBean(com.azure.core.credential.TokenCredential.class) public com.azure.ai.openai.OpenAIClientBuilder openAIClientWithTokenCredential(AzureOpenAiConnectionProperties connectionProperties, com.azure.core.credential.TokenCredential tokenCredential) -
azureOpenAiChatModel
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.azure.openai.chat", name="enabled", havingValue="true", matchIfMissing=true) public AzureOpenAiChatModel azureOpenAiChatModel(com.azure.ai.openai.OpenAIClientBuilder openAIClientBuilder, AzureOpenAiChatProperties chatProperties, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) -
azureOpenAiEmbeddingModel
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.azure.openai.embedding", name="enabled", havingValue="true", matchIfMissing=true) public AzureOpenAiEmbeddingModel azureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClientBuilder openAIClient, AzureOpenAiEmbeddingProperties embeddingProperties, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<EmbeddingModelObservationConvention> observationConvention) -
springAiFunctionManager
@Bean @ConditionalOnMissingBean public FunctionCallbackContext springAiFunctionManager(org.springframework.context.ApplicationContext context) -
azureOpenAiImageClient
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.azure.openai.image", name="enabled", havingValue="true", matchIfMissing=true) public AzureOpenAiImageModel azureOpenAiImageClient(com.azure.ai.openai.OpenAIClientBuilder openAIClientBuilder, AzureOpenAiImageOptionsProperties imageProperties) -
azureOpenAiAudioTranscriptionModel
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.azure.openai.audio.transcription", name="enabled", havingValue="true", matchIfMissing=true) public AzureOpenAiAudioTranscriptionModel azureOpenAiAudioTranscriptionModel(com.azure.ai.openai.OpenAIClientBuilder openAIClient, AzureOpenAiAudioTranscriptionProperties audioProperties)
-