Class OpenAiAutoConfiguration
java.lang.Object
org.springframework.ai.autoconfigure.openai.OpenAiAutoConfiguration
@AutoConfiguration(after=org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class)
@ConditionalOnClass(OpenAiApi.class)
@EnableConfigurationProperties({OpenAiConnectionProperties.class,OpenAiChatProperties.class,OpenAiEmbeddingProperties.class,OpenAiImageProperties.class})
public class OpenAiAutoConfiguration
extends Object
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionopenAiChatClient
(OpenAiConnectionProperties commonProperties, OpenAiChatProperties chatProperties, org.springframework.web.client.RestClient.Builder restClientBuilder, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext) openAiEmbeddingClient
(OpenAiConnectionProperties commonProperties, OpenAiEmbeddingProperties embeddingProperties, org.springframework.web.client.RestClient.Builder restClientBuilder) openAiImageClient
(OpenAiConnectionProperties commonProperties, OpenAiImageProperties imageProperties, org.springframework.web.client.RestClient.Builder restClientBuilder) springAiFunctionManager
(org.springframework.context.ApplicationContext context)
-
Field Details
-
OPEN_AI_API_KEY_MUST_BE_SET
- See Also:
-
OPEN_AI_BASE_URL_MUST_BE_SET
- See Also:
-
-
Constructor Details
-
OpenAiAutoConfiguration
public OpenAiAutoConfiguration()
-
-
Method Details
-
openAiChatClient
@Bean @ConditionalOnMissingBean public OpenAiChatClient openAiChatClient(OpenAiConnectionProperties commonProperties, OpenAiChatProperties chatProperties, org.springframework.web.client.RestClient.Builder restClientBuilder, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext) -
openAiEmbeddingClient
@Bean @ConditionalOnMissingBean public EmbeddingClient openAiEmbeddingClient(OpenAiConnectionProperties commonProperties, OpenAiEmbeddingProperties embeddingProperties, org.springframework.web.client.RestClient.Builder restClientBuilder) -
openAiImageClient
@Bean @ConditionalOnMissingBean public OpenAiImageClient openAiImageClient(OpenAiConnectionProperties commonProperties, OpenAiImageProperties imageProperties, org.springframework.web.client.RestClient.Builder restClientBuilder) -
springAiFunctionManager
@Bean @ConditionalOnMissingBean public FunctionCallbackContext springAiFunctionManager(org.springframework.context.ApplicationContext context)
-