From 2dc24766d84f92ba44a112dcd02e1b355d0d5335 Mon Sep 17 00:00:00 2001 From: Ricken Bazolo Date: Fri, 18 Oct 2024 10:09:17 +0200 Subject: [PATCH 1/3] Fixed broken link to test class in mistralai doc --- .../ROOT/pages/api/chat/functions/mistralai-chat-functions.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/mistralai-chat-functions.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/mistralai-chat-functions.adoc index cdbbc1f8ff5..a0bf2ed38c3 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/mistralai-chat-functions.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/mistralai-chat-functions.adoc @@ -110,7 +110,7 @@ It is a best practice to annotate the request object with information such that The link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/mistralai/tool/PaymentStatusBeanIT.java[PaymentStatusBeanIT.java] demonstrates this approach. -TIP: The Mistral AI link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/mistralai/tool/PaymentStatusBeanOpenAiIT[PaymentStatusBeanOpenAiIT] implements the same function using the OpenAI API. +TIP: The Mistral AI link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/mistralai/tool/PaymentStatusBeanOpenAiIT.java[PaymentStatusBeanOpenAiIT] implements the same function using the OpenAI API. Mistral AI is almost identical to OpenAI in this regard. ==== FunctionCallback Wrapper From 5b9421cd1c509b684147e58bd80cbd48793a706d Mon Sep 17 00:00:00 2001 From: Ricken Bazolo Date: Fri, 18 Oct 2024 10:55:29 +0200 Subject: [PATCH 2/3] fix azure openai doc --- .../antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc index 1ffabb41dd7..21cdd757c61 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc @@ -164,7 +164,7 @@ ChatResponse response = chatModel.call( new Prompt( "Generate the names of 5 famous pirates.", AzureOpenAiChatOptions.builder() - .withModel("gpt-4-o") + .withDeploymentName("gpt-4-o") .withTemperature(0.4) .build() )); @@ -194,7 +194,7 @@ Below is a code example excerpted from link:https://github.com/spring-projects/s ---- URL url = new URL("https://docs.spring.io/spring-ai/reference/_images/multimodal.test.png"); String response = ChatClient.create(chatModel).prompt() - .options(AzureOpenAiChatOptions.builder().withDeploymentName("gpt4o").build()) + .options(AzureOpenAiChatOptions.builder().withDeploymentName("gpt-4o").build()) .user(u -> u.text("Explain what do you see on this picture?").media(MimeTypeUtils.IMAGE_PNG, url)) .call() .content(); From 41ede1a4c4d585bb32a2a598f7b06fa50afb74b5 Mon Sep 17 00:00:00 2001 From: Ricken Bazolo Date: Fri, 18 Oct 2024 10:55:29 +0200 Subject: [PATCH 3/3] fix azure openai doc --- .../antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc index 21cdd757c61..a9309d5e4bc 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/azure-openai-chat.adoc @@ -164,7 +164,7 @@ ChatResponse response = chatModel.call( new Prompt( "Generate the names of 5 famous pirates.", AzureOpenAiChatOptions.builder() - .withDeploymentName("gpt-4-o") + .withDeploymentName("gpt-4o") .withTemperature(0.4) .build() ));