Skip to content

Commit 6e40575

Browse files
ThomasVitaletzolov
authored andcommitted
Docs: Fix typos and add missing pieces
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
1 parent ac1a0d6 commit 6e40575

File tree

10 files changed

+57
-23
lines changed

10 files changed

+57
-23
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public interface ModelClient<TReq extends ModelRequest<?>, TRes extends ModelRes
3131

3232
== StreamingModelClient
3333

34-
The StreamingModelClient interface provides a generic API for invoking an AI models with streaming response. It abstracts the process of sending requests and receiving a streaming responses. The interface uses Java generics to accommodate different types of requests and responses, enhancing flexibility and adaptability across different AI model implementations.
34+
The StreamingModelClient interface provides a generic API for invoking an AI model with streaming response. It abstracts the process of sending requests and receiving a streaming response. The interface uses Java generics to accommodate different types of requests and responses, enhancing flexibility and adaptability across different AI model implementations.
3535

3636
[source,java]
3737
----
@@ -113,7 +113,8 @@ public interface ModelResponse<T extends ModelResult<?>> {
113113

114114

115115
== ModelResult
116-
This interface provides methods to access the main output of the AI model and the metadata associated with this result. It is designed to offer a standardized and comprehensive way to handle and interpret the outputs generated by AI models.
116+
117+
This interface provides methods to access the main output of the AI model and the metadata associated with this result. It is designed to offer a standardized and comprehensive way to handle and interpret the outputs generated by AI models.
117118

118119
[source,java]
119120
----

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Spring AI supports Stability AI's https://platform.stability.ai/docs/api-referen
77
You will need to create an API key with Stability AI to access their AI models, follow their https://platform.stability.ai/docs/getting-started/authentication[Getting Started documentation].
88

99
The Spring AI project defines a configuration property named `spring.ai.stabilityai.api-key` that you should set to the value of the `API Key` obtained from Stability AI.
10-
Exporting an environment variable in one way to set that configuration property.
10+
Exporting an environment variable is one way to set that configuration property.
1111

1212
[source,shell]
1313
----

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ The Spring AI API covers a wide range of functionalities.
66
Each major feature is detailed in its own dedicated section.
77
To provide an overview, the following key functionalities are available:
88

9-
* Portable API across AI providers for Chat, Text to Image, and Embedding models. Both synchronous and stream API options are supported. Dropping down to access model specific features is also supported. We support AI Models from OpenAI, Microsoft, Amazon, Google, Huggingface and more.
10-
* Portable API across Vector Store providers, including a novel SQL-like metadata filter API that is also portable. Support for 8 vector databases are available.
11-
* Function calling. Spring AI makes it easy to have the AI model invoke your POJO java.util.Function object.
9+
* Portable API across AI providers for Chat, Text to Image, Audio Transcription, Text to Speech, and Embedding models. Both synchronous and stream API options are supported. Dropping down to access model specific features is also supported. We support AI Models from OpenAI, Microsoft, Amazon, Google, Huggingface and more.
10+
* Portable API across Vector Store providers, including a novel SQL-like metadata filter API that is also portable. Support for 14 vector databases are available.
11+
* Function calling. Spring AI makes it easy to have the AI model invoke your POJO `java.util.Function` object.
1212
* Spring Boot Auto Configuration and Starters for AI Models and Vector Stores.
1313
* ETL framework for Data Engineering. This provides the basis of loading data into a vector database, helping implement the Retrieval Augmented Generation pattern that enables you to bring your data to the AI model to incorporate into its response.
1414

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ OpenAI have introduced even more structure to prompts by categorizing multiple m
2424

2525
=== Prompt
2626

27-
It is common to use the `generate` method of `ChatClient` that takes a `Prompt` instance and returns an `ChatResponse`.
27+
It is common to use the `call` method of `ChatClient` that takes a `Prompt` instance and returns an `ChatResponse`.
2828

2929
The Prompt class functions as a container for an organized series of Message objects, with each one forming a segment of the overall prompt.
3030
Every Message embodies a unique role within the prompt, differing in its content and intent.
@@ -126,7 +126,7 @@ public enum MessageType {
126126
=== PromptTemplate
127127

128128
A key component for prompt templating in Spring AI is the `PromptTemplate` class.
129-
This class uses the StringTemplate engine, developed by Terence Parr, for constructing and managing prompts.
129+
This class uses the OSS https://www.stringtemplate.org/[StringTemplate] engine, developed by Terence Parr, for constructing and managing prompts.
130130
The `PromptTemplate` class is designed to facilitate the creation of structured prompts that are then sent to the AI model for processing
131131

132132
```java

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
11
[[testcontainers]]
22
= Testcontainers
33

4+
Spring AI provides Spring Boot auto-configuration for establishing a connection to a model service
5+
or vector store running via Testcontainers. To enable it, add the following dependency
6+
to your project's Maven `pom.xml` file:
7+
8+
[source,xml]
9+
----
10+
<dependency>
11+
<groupId>org.springframework.ai</groupId>
12+
<artifactId>spring-ai-spring-boot-testcontainers</artifactId>
13+
</dependency>
14+
----
15+
16+
or to your Gradle `build.gradle` build file.
17+
18+
[source,groovy]
19+
----
20+
dependencies {
21+
implementation 'org.springframework.ai:spring-ai-spring-boot-testcontainers'
22+
}
23+
----
24+
25+
TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section to add the Spring AI BOM to your build file.
26+
427
== Service Connections
528

6-
The following service connection factories are provided in the spring-ai-spring-boot-testcontainers jar:
29+
The following service connection factories are provided in the `spring-ai-spring-boot-testcontainers` module:
730

831
[cols="|,|"]
932
|====

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ Find more information on the `Filter.Expression` in the <<metadata-filters>> sec
8787

8888
These are the available implementations of the `VectorStore` interface:
8989

90-
* xref:api/vectordbs/azure.adoc[ Azure Vector Search] - The https://learn.microsoft.com/en-us/azure/search/vector-search-overview[Azure] vector store.
91-
* xref:api/vectordbs/apache-cassandra.adoc[Apache Cassandra] - The https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html[Apache Cassandra]
90+
* xref:api/vectordbs/azure.adoc[Azure Vector Search] - The https://learn.microsoft.com/en-us/azure/search/vector-search-overview[Azure] vector store.
91+
* xref:api/vectordbs/apache-cassandra.adoc[Apache Cassandra] - The https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html[Apache Cassandra] vector store.
9292
* xref:api/vectordbs/chroma.adoc[Chroma Vector Store] - The https://www.trychroma.com/[Chroma] vector store.
93+
* xref:api/vectordbs/elasticsearch.adoc[Elasticsearch Vector Store] - The https://www.elastic.co/[Elasticsearch] vector store.
9394
* xref:api/vectordbs/gemfire.adoc[GemFire Vector Store] - The https://tanzu.vmware.com/content/blog/vmware-gemfire-vector-database-extension[GemFire] vector store.
9495
* xref:api/vectordbs/milvus.adoc[Milvus Vector Store] - The https://milvus.io/[Milvus] vector store.
9596
* xref:api/vectordbs/mongodb.adoc[MongoDB Atlas Vector Store] - The https://www.mongodb.com/atlas/database[MongoDB Atlas] vector store.
@@ -100,7 +101,6 @@ These are the available implementations of the `VectorStore` interface:
100101
* xref:api/vectordbs/redis.adoc[Redis Vector Store] - The https://redis.io/[Redis] vector store.
101102
* xref:api/vectordbs/hana.adoc[SAP Hana Vector Store] - The https://news.sap.com/2024/04/sap-hana-cloud-vector-engine-ai-with-business-context/[SAP HANA] vector store.
102103
* xref:api/vectordbs/weaviate.adoc[Weaviate Vector Store] - The https://weaviate.io/[Weaviate] vector store.
103-
vector store.
104104
* link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/vectorstore/SimpleVectorStore.java[SimpleVectorStore] - A simple implementation of persistent vector storage, good for educational purposes.
105105

106106
More implementations may be supported in future releases.
@@ -113,7 +113,7 @@ Information on each of the `VectorStore` implementations can be found in the sub
113113

114114
To compute the embeddings for a vector database, you need to pick an embedding model that matches the higher-level AI model being used.
115115

116-
For example, with OpenAI's ChatGPT, we use the `OpenAiEmbeddingClient` and a model name of `text-embedding-ada-002`.
116+
For example, with OpenAI's ChatGPT, we use the `OpenAiEmbeddingClient` and a model named `text-embedding-ada-002`.
117117

118118
The Spring Boot starter's auto-configuration for OpenAI makes an implementation of `EmbeddingClient` available in the Spring application context for dependency injection.
119119

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ It expands the two-dimensional definitions of Magnitude and Dot Product given pr
9191
stem:[similarity(vec{A},vec{B}) = \cos(\theta) = \frac{ \sum_{i=1}^{n} {A_i B_i} }{ \sqrt{\sum_{i=1}^{n}{A_i^2} \cdot \sum_{i=1}^{n}{B_i^2}}]
9292
****
9393

94-
This is the key formula used in the simple implementation of a vector store and can be found in the `InMemoryVectorStore` implementation.
94+
This is the key formula used in the simple implementation of a vector store and can be found in the `SimpleVectorStore` implementation.
9595

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,20 @@ The following table categorizes several models based on their input and output t
3636
|Image
3737
|Midjourney, Stable Diffusion, RunwayML
3838

39+
|Language
40+
|Audio
41+
|OpenAI, Azure OpenAI
42+
43+
|Audio
44+
|Language
45+
|OpenAI, Azure OpenAI
46+
3947
|Text
4048
|Numbers
4149
|Many (AKA embeddings)
4250
|===
4351

44-
The initial focus of Spring AI is on models that process language input and provide language output, initially OpenAI + Azure OpenAI.
52+
Spring AI currently supports models that process input and output as language, image, and audio.
4553
The last row in the previous table, which accepts text as input and outputs numbers, is more commonly known as embedding text and represents the internal data structures used in an AI model.
4654
Spring AI has support for embeddings to support more advanced use cases.
4755

@@ -115,7 +123,7 @@ On input, models convert words to tokens. On output, they convert tokens back to
115123

116124
In English, one token roughly corresponds to 75% of a word. For reference, Shakespeare's complete works, totaling around 900,000 words, translates to approximately 1.2 million tokens.
117125

118-
Perhaps more important is that Tokens = *`$`*.
126+
Perhaps more important is that Tokens = Money.
119127

120128
In the context of hosted AI models, your charges are determined by the number of tokens used. Both input and output contribute to the overall token count.
121129

@@ -195,7 +203,7 @@ The concepts map onto classes in Spring AI:
195203
Large Language Models (LLMs) are frozen after training, leading to stale knowledge and they are unable to access or modify external data.
196204

197205
The `Function Calling` mechanism addresses these shortcomings.
198-
It allows you register custom, user, functions that connect the large language models to the APIs of external systems.
206+
It allows you to register your own functions to connect the large language models to the APIs of external systems.
199207
These systems can provide LLMs with real-time data and perform data processing actions on their behalf.
200208

201209
Spring AI greatly simplifies code you need to write to support function invocation.

spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ spring boot new --from ai --name myai
2626
```
2727
. Consult the generated `README.md` file for guidance on obtaining an OpenAI API Key and running your first AI application.
2828

29-
To add the same simple AI application to an *existing* project, execute:
29+
NOTE: Currently, the Spring CLI only supports Maven projects.
30+
31+
To add the same simple AI application to an *existing* Maven project, execute:
3032

3133
```shell
3234
spring boot add ai

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ These abstractions have multiple implementations, enabling easy component swappi
1212
Spring AI provides the following features:
1313

1414
* Support for all major Model providers such as OpenAI, Microsoft, Amazon, Google, and Huggingface.
15-
* Supported Model types are Chat and Text to Image with more on the way.
16-
* Portable API across AI providers for Chat and for Embedding models. Both synchronous and stream API options are supported. Dropping down to access model specific features is also supported.
15+
* Supported Model types are Chat, Text to Image, Audio Transcription, Text to Speech, and more on the way.
16+
* Portable API across AI providers for all models. Both synchronous and stream API options are supported. Dropping down to access model specific features is also supported.
1717
* Mapping of AI Model output to POJOs.
18-
* Support for all major Vector Database providers such as Apache Cassandra, Azure Vector Search, Chroma, Milvus, Neo4j, PostgreSQL/PGVector, PineCone, Qdrant, Redis, and Weaviate
18+
* Support for all major Vector Database providers such as Apache Cassandra, Azure Vector Search, Chroma, Milvus, Neo4j, PostgreSQL/PGVector, PineCone, Qdrant, Redis, and Weaviate.
1919
* Portable API across Vector Store providers, including a novel SQL-like metadata filter API that is also portable.
20-
* Function calling
20+
* Function calling.
2121
* Spring Boot Auto Configuration and Starters for AI Models and Vector Stores.
22-
* ETL framework for Data Engineering
22+
* ETL framework for Data Engineering.
2323

2424
This feature set lets you implement common use cases such as "`Q&A over your documentation`" or "`Chat with your documentation.`"
2525

0 commit comments

Comments
 (0)