From 3f9d6b1e2965472acf9b4db917303c8b8ccc3489 Mon Sep 17 00:00:00 2001 From: Sujin Kim <108571492+cowboysj@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:00:05 +0900 Subject: [PATCH 1/6] docs : correct typo from "what it" to "what is" in bedrock-cohere.adoc --- .../modules/ROOT/pages/api/chat/bedrock/bedrock-cohere.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/bedrock/bedrock-cohere.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/bedrock/bedrock-cohere.adoc index c4345a46c4e..d0f47e7e6df 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/bedrock/bedrock-cohere.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/bedrock/bedrock-cohere.adoc @@ -229,7 +229,7 @@ CohereChatBedrockApi cohereChatApi = new CohereChatBedrockApi( Duration.ofMillis(1000L)); var request = CohereChatRequest - .builder("What is the capital of Bulgaria and what is the size? What it the national anthem?") + .builder("What is the capital of Bulgaria and what is the size? What is the national anthem?") .withStream(false) .withTemperature(0.5f) .withTopP(0.8f) From 077492b13e0e49f6bb0c3541c5bc28c2c13558d7 Mon Sep 17 00:00:00 2001 From: Sujin Kim <108571492+cowboysj@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:01:52 +0900 Subject: [PATCH 2/6] docs : correct typo "1st" and "supporetd" in anthropic-chat-function --- .../ROOT/pages/api/chat/functions/anthropic-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/anthropic-chat-functions.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/anthropic-chat-functions.adoc index 937bb16d23c..6dbf2439138 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/anthropic-chat-functions.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/anthropic-chat-functions.adoc @@ -1,6 +1,6 @@ = Anthropic Function Calling -TIP: Starting of Jul 1th, 2024, streaming function calling and Tool use is supporetd. +TIP: Starting of Jul 1st, 2024, streaming function calling and Tool use is supported. You can register custom Java functions with the `AnthropicChatModel` and have the Anthropic models intelligently choose to output a JSON object containing arguments to call one or many of the registered functions. This allows you to connect the LLM capabilities with external tools and APIs. From 85fe2fa13c2ccdcdbfd7d567873328116eaf5fc9 Mon Sep 17 00:00:00 2001 From: Sujin Kim <108571492+cowboysj@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:04:13 +0900 Subject: [PATCH 3/6] docs : correct typo from "can some" and "can can" in azure-open-ai-chat-function.adoc --- .../api/chat/functions/azure-open-ai-chat-functions.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/azure-open-ai-chat-functions.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/azure-open-ai-chat-functions.adoc index 6c4d38b120a..a078e9f9c7b 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/azure-open-ai-chat-functions.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/azure-open-ai-chat-functions.adoc @@ -40,7 +40,7 @@ To support the response of the chatbot, we will register our own function that t When the response to the prompt to the model needs to answer a question such as `"What’s the weather like in Boston?"` the AI model will invoke the client providing the location value as an argument to be passed to the function. This RPC-like data is passed as JSON. -Our function can some SaaS based weather service API and returns the weather response back to the model to complete the conversation. In this example we will use a simple implementation named `MockWeatherService` that hard codes the temperature for various locations. +Our function can have some SaaS based weather service API and returns the weather response back to the model to complete the conversation. In this example we will use a simple implementation named `MockWeatherService` that hard codes the temperature for various locations. The following `MockWeatherService.java` represents the weather service API: @@ -154,7 +154,7 @@ ChatResponse response = chatModel.call(new Prompt(List.of(userMessage), logger.info("Response: {}", response); ---- -// NOTE: You can can have multiple functions registered in your `ChatModel` but only those enabled in the prompt request will be considered for the function calling. +// NOTE: You can have multiple functions registered in your `ChatModel` but only those enabled in the prompt request will be considered for the function calling. Above user question will trigger 3 calls to `CurrentWeather` function (one for each city) and the final response will be something like this: From 8115405b6e75d8b3dedde8c9b9c983d066be45fb Mon Sep 17 00:00:00 2001 From: Sujin Kim <108571492+cowboysj@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:09:37 +0900 Subject: [PATCH 4/6] docs : correct typo from "opean" to "open" in azure-openai-chat.adoc --- .../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 64fc8ddda54..6a4b681b275 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 @@ -67,7 +67,7 @@ This is because in OpenAI there is no `Deployment Name`, only a `Model Name`. NOTE: The property `spring.ai.azure.openai.chat.options.model` has been renamed to `spring.ai.azure.openai.chat.options.deployment-name`. -NOTE: If you decide to connect to `OpenAI` instead of `Azure OpeanAI`, by setting the `spring.ai.azure.openai.openai-api-key=` property, +NOTE: If you decide to connect to `OpenAI` instead of `Azure OpenAI`, by setting the `spring.ai.azure.openai.openai-api-key=` property, then the `spring.ai.azure.openai.chat.options.deployment-name` is treathed as an link:https://platform.openai.com/docs/models[OpenAI model] name. ==== Access the OpenAI Model From 21f39aec65da2a1ef7c710556152e4a743b77eaf Mon Sep 17 00:00:00 2001 From: Sujin Kim <108571492+cowboysj@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:11:29 +0900 Subject: [PATCH 5/6] docs : correct typo from "Yur" to "Your" in azure-openai-chat.adoc --- .../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 6a4b681b275..a4c79ec850a 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 @@ -73,7 +73,7 @@ then the `spring.ai.azure.openai.chat.options.deployment-name` is treathed as an ==== Access the OpenAI Model You can configure the client to use directly `OpenAI` instead of the `Azure OpenAI` deployed models. -For this you need to set the `spring.ai.azure.openai.openai-api-key=` instead of `spring.ai.azure.openai.api-key=`. +For this you need to set the `spring.ai.azure.openai.openai-api-key=` instead of `spring.ai.azure.openai.api-key=`. === Add Repositories and BOM From 70af3cf23bf8cd54cdb960771a68b96ba79926ba Mon Sep 17 00:00:00 2001 From: Sujin Kim <108571492+cowboysj@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:13:40 +0900 Subject: [PATCH 6/6] docs : correct typo from "o" to "on" in vertexai-gemini-chat.adoc --- .../modules/ROOT/pages/api/chat/vertexai-gemini-chat.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/vertexai-gemini-chat.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/vertexai-gemini-chat.adoc index 616630a2073..09a01c83a6e 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/vertexai-gemini-chat.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/vertexai-gemini-chat.adoc @@ -130,7 +130,7 @@ Below is a simple code example extracted from https://github.com/spring-projects ---- byte[] data = new ClassPathResource("/vertex-test.png").getContentAsByteArray(); -var userMessage = new UserMessage("Explain what do you see o this picture?", +var userMessage = new UserMessage("Explain what do you see on this picture?", List.of(new Media(MimeTypeUtils.IMAGE_PNG, data))); ChatResponse response = chatModel.call(new Prompt(List.of(userMessage)));