We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a24e7b6 commit d8bab9cCopy full SHA for d8bab9c
spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc
@@ -631,9 +631,12 @@ OpenAiApi openAiApi = OpenAiApi.builder()
631
.apiKey(customApiKey)
632
.build();
633
634
-// Create a chat client with the custom OpenAiApi instance
635
-OpenAiChatClient chatClient = new OpenAiChatClient(openAiApi);
636
-
+// Create a chat model with the custom OpenAiApi instance
+OpenAiChatmodel chatModel = OpenAiChatModel.builder()
+ .openAiApi(openAiApi)
637
+ .build();
638
+// Build the ChatClient using the custom chat model
639
+ChatClient openAiChatClient = ChatClient.builder(chatModel).build();
640
----
641
642
This is useful when you need to:
0 commit comments