Skip to content

Commit 1e83cec

Browse files
John Blumjxblum
authored andcommitted
Cleanup grammar in documentation
* Fixes grammar in (Ollama) Function Calling. * Fixes grammar in ETL Pipeline. * Fixes grammar in Vector Databases. Closes #1494
1 parent 1606383 commit 1e83cec

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/functions/ollama-chat-functions.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
TIP: You need Ollama 0.2.8 or newer.
44

5-
TIP: You need https://ollama.com/search?c=tools[Models] pre-trained for Tools support.
5+
TIP: You need https://ollama.com/search?c=tools[Models] pre-trained for Tools support.
66
Usually, such models are tagged with a `Tools` tag.
77
For example `mistral`, `firefunction-v2` or `llama3.1:70b`.
88

@@ -14,10 +14,10 @@ The Ollama models tagged with the `Tools` label (see https://ollama.com/search?c
1414

1515
The Ollama API does not call the function directly; instead, the model generates JSON that you can use to call the function in your code and return the result back to the model to complete the conversation.
1616
Spring AI provides flexible and user-friendly ways to register and call custom functions.
17-
In general, the custom functions need to provide a function `name`, `description`, and the function call `signature` (as JSON schema) to let the model know what arguments the function expects.
17+
In general, the custom functions need to provide a function `name`, `description`, and the function call `signature` (as JSON schema) to let the model know what arguments the function expects.
1818
The `description` helps the model to understand when to call the function.
1919

20-
As a developer, you need to implement a function that takes the function call arguments sent from the AI model, and responds with the result back to the model.
20+
As a developer, you need to implement a function that takes the function call arguments sent from the AI model, and responds with the result back to the model.
2121
Your function can in turn invoke other 3rd party services to provide the results.
2222

2323
Spring AI makes this as easy as defining a `@Bean` definition that returns a `java.util.Function` and supplying the bean name as an option when invoking the `ChatModel`.
@@ -117,7 +117,7 @@ public record Request(String location, Unit unit) {}
117117

118118
It is a best practice to annotate the request object with information such that the generated JSON schema of that function is as descriptive as possible to help the AI model pick the correct function to invoke.
119119

120-
==== FunctionCallback Wrapper
120+
==== FunctionCallbackWrapper
121121

122122
Another way to register a function is to create a `FunctionCallbackWrapper` like this:
123123

@@ -196,7 +196,7 @@ ChatResponse response = chatModel.call(new Prompt(userMessage, promptOptions));
196196

197197
NOTE: The in-prompt registered functions are enabled by default for the duration of this request.
198198

199-
This approach allows to choose dynamically different functions to be called based on the user input.
199+
This approach allows you to dynamically choose different functions to be called based on the user input.
200200

201201
The link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/ollama/tool/FunctionCallbackInPromptIT.java[FunctionCallbackInPromptIT.java] integration test provides a complete example of how to register a function with the `OllamaChatModel` and use it in a prompt request.
202202

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/etl-pipeline.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The RAG use case is text to augment the capabilities of generative models by ret
88

99
== API Overview
1010

11-
The ETL pipelines creates, transforms and stores `Document` instances.
11+
The ETL pipelines creates, transforms and stores `Document` instances.
1212

1313
image::spring-ai-document1-api.jpg[Spring AI Message API, width=400, align="center"]
1414

@@ -20,7 +20,7 @@ There are three main components of the ETL pipeline,
2020
* `DocumentTransformer` that implements `Function<List<Document>, List<Document>>`
2121
* `DocumentWriter` that implements `Consumer<List<Document>>`
2222

23-
The `Document` class content is created from PDFs, text files and other document types throught the help of `DocumentReader`.
23+
The `Document` class content is created from PDFs, text files and other document types with the help of `DocumentReader`.
2424

2525
To construct a simple ETL pipeline, you can chain together an instance of each type.
2626

@@ -870,4 +870,4 @@ This will write all documents to "output.txt", including document markers, using
870870
=== VectorStore
871871

872872
Provides integration with various vector stores.
873-
See xref:api/vectordbs.adoc[Vector DB Documentation] for a full listing.
873+
See xref:api/vectordbs.adoc[Vector DB Documentation] for a full listing.

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[vector-databases]]
22
= Vector Databases
33

4-
A vector databases is a specialized type of database that plays an essential role in AI applications.
4+
A vector database is a specialized type of database that plays an essential role in AI applications.
55

66
In vector databases, queries differ from traditional relational databases.
77
Instead of exact matches, they perform similarity searches.
@@ -334,5 +334,3 @@ Expression exp = b.and(b.eq("genre", "drama"), b.gte("year", 2020)).build();
334334
== Understanding Vectors
335335

336336
xref:api/vectordbs/understand-vectordbs.adoc[Understanding Vectors]
337-
338-

0 commit comments

Comments
 (0)