You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc
+23Lines changed: 23 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,29 @@ dependencies {
110
110
111
111
TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file.
112
112
113
+
The Azure OpenAI Chat Client is created using the link:https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClientBuilder.java[OpenAIClientBuilder] provided by the Azure SDK. Spring AI allows to customize the builder by providing link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/azure/openai/AzureOpenAIClientBuilderCustomizer.java[AzureOpenAIClientBuilderCustomizer] beans.
114
+
115
+
A customizer might be used for example to change the default response timeout:
116
+
117
+
[source,java]
118
+
----
119
+
@Configuration
120
+
public class AzureOpenAiConfig {
121
+
122
+
@Bean
123
+
public OpenAIClientBuilderCustomizer responseTimeoutCustomizer() {
124
+
return openAiClientBuilder -> {
125
+
HttpClientOptions clientOptions = new HttpClientOptions()
0 commit comments