Docs: Fix typos in embedding documents

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
This commit is contained in:
Thomas Vitale
2024-04-28 21:51:01 +02:00
committed by Christian Tzolov
parent e5b224720a
commit 082c6f1f03
3 changed files with 9 additions and 9 deletions

View File

@@ -140,7 +140,7 @@ Read more about xref:api/chat/functions/mistralai-chat-functions.adoc[Mistral AI
== Sample Controller (Auto-configuration)
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-mistralai-spring-boot-starter` to your pom (or gradle) dependencies.
https://start.spring.io/[Create] a new Spring Boot project and add the `spring-ai-mistral-ai-spring-boot-starter` to your pom (or gradle) dependencies.
Add a `application.properties` file, under the `src/main/resources` directory, to enable and configure the OpenAi Chat client:
@@ -185,13 +185,13 @@ public class ChatController {
The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatClient.java[MistralAiChatClient] implements the `ChatClient` and `StreamingChatClient` and uses the <<low-level-api>> to connect to the MistralAI service.
Add the `spring-ai-mistralai` dependency to your project's Maven `pom.xml` file:
Add the `spring-ai-mistral-ai` dependency to your project's Maven `pom.xml` file:
[source, xml]
----
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-mistralai</artifactId>
<artifactId>spring-ai-mistral-ai</artifactId>
</dependency>
----
@@ -200,7 +200,7 @@ or to your Gradle `build.gradle` build file.
[source,groovy]
----
dependencies {
implementation 'org.springframework.ai:spring-ai-mistralai'
implementation 'org.springframework.ai:spring-ai-mistral-ai'
}
----

View File

@@ -155,12 +155,12 @@ public class EmbeddingController {
== Manual Configuration
If you are not using Spring Boot, you can manually configure the OpenAI Embedding Client.
For this add the `spring-ai-mistralai` dependency to your project's Maven `pom.xml` file:
For this add the `spring-ai-mistral-ai` dependency to your project's Maven `pom.xml` file:
[source, xml]
----
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-mistralai</artifactId>
<artifactId>spring-ai-mistral-ai</artifactId>
</dependency>
----
@@ -169,13 +169,13 @@ or to your Gradle `build.gradle` build file.
[source,groovy]
----
dependencies {
implementation 'org.springframework.ai:spring-ai-mistralai'
implementation 'org.springframework.ai:spring-ai-mistral-ai'
}
----
TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file.
NOTE: The `spring-ai-mistralai` dependency provides access also to the `MistralAiChatClient`.
NOTE: The `spring-ai-mistral-ai` dependency provides access also to the `MistralAiChatClient`.
For more information about the `MistralAiChatClient` refer to the link:../chat/mistralai-chat.html[MistralAI Chat Client] section.
Next, create an `MistralAiEmbeddingClient` instance and use it to compute the similarity between two input texts:

View File

@@ -81,7 +81,7 @@ List<List<Double>> embeddings = embeddingClient.embed(List.of("Hello world", "Wo
----
NOTE: that when created manually, you must call the `afterPropertiesSet()` after setting the properties and before using the client.
NOTE: If you create an instance of `TransformersEmbeddingClient` manually, you must call the `afterPropertiesSet()` method after setting the properties and before using the client.
The first `embed()` call downloads the large ONNX model and caches it on the local file system.
Therefore, the first call might take longer than usual.