Fix Typos and Grammatical Errors
* Fix Typo: Duplicate 'for' in documentation text * Fix Typo: Duplicate 'to' in documentation text * Fix broken links in documentation * Correct grammar by deleting unnecessary 'an' in documentation * Fix typo: Change 'tunning' to 'tuning' in documentation * Fix typo: Change 'an' to 'can' in documentation * Fix typo: Change 'generats' to 'generates' in documentation * Fix grammatical error: Change 'a AI' to 'an AI' in documentation * Fix grammatical error: Change 'a AI' to 'an AI' in code * Fix Typo: Duplicate 'for' in code
This commit is contained in:
@@ -32,7 +32,7 @@ public class BedrockCohereEmbeddingOptions implements EmbeddingOptions {
|
||||
// @formatter:off
|
||||
/**
|
||||
* Prepends special tokens to differentiate each type from one another. You should not mix
|
||||
* different types together, except when mixing types for for search and retrieval.
|
||||
* different types together, except when mixing types for search and retrieval.
|
||||
* In this case, embed your corpus with the search_document type and embedded queries with
|
||||
* type search_query type.
|
||||
*/
|
||||
|
||||
@@ -69,7 +69,7 @@ public class CohereEmbeddingBedrockApi extends
|
||||
* @param texts An array of strings for the model to embed. For optimal performance, we recommend reducing the
|
||||
* length of each text to less than 512 tokens. 1 token is about 4 characters.
|
||||
* @param inputType Prepends special tokens to differentiate each type from one another. You should not mix
|
||||
* different types together, except when mixing types for for search and retrieval. In this case, embed your corpus
|
||||
* different types together, except when mixing types for search and retrieval. In this case, embed your corpus
|
||||
* with the search_document type and embedded queries with type search_query type.
|
||||
* @param truncate Specifies how the API handles inputs longer than the maximum token length. If you specify LEFT or
|
||||
* RIGHT, the model discards the input until the remaining input is exactly the maximum input token length for the
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
package org.springframework.ai.document;
|
||||
|
||||
/**
|
||||
* Converts the Document text and metadata into a AI, prompt-friendly text representation.
|
||||
* Converts the Document text and metadata into an AI, prompt-friendly text representation.
|
||||
*
|
||||
* @author Christian Tzolov
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.ai.model;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
/**
|
||||
* The StreamingModelClient interface provides a generic API for invoking a AI models with
|
||||
* 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
|
||||
|
||||
@@ -108,7 +108,7 @@ static class Config {
|
||||
public record Request(String location, Unit unit) {}
|
||||
----
|
||||
|
||||
It is a best practice to annotate the request object with information such that the generats JSON schema of that function is as descriptive as possible to help the AI model pick the correct funciton to invoke.
|
||||
It is a best practice to annotate the request object with information such that the generates JSON schema of that function is as descriptive as possible to help the AI model pick the correct function to invoke.
|
||||
|
||||
The link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/gemini/tool/FunctionCallWithFunctionBeanIT.java[FunctionCallWithFunctionBeanIT.java] demonstrates this approach.
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ The prefix `spring.ai.bedrock.cohere.embedding` (defined in `BedrockCohereEmbedd
|
||||
| Property | Description | Default
|
||||
| spring.ai.bedrock.cohere.embedding.enabled | Enable or disable support for Cohere | false
|
||||
| spring.ai.bedrock.cohere.embedding.model | The model id to use. See the https://github.com/spring-projects/spring-ai/blob/056b95a00efa5b014a1f488329fbd07a46c02378/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/api/CohereEmbeddingBedrockApi.java#L150[CohereEmbeddingModel] for the supported models. | cohere.embed-multilingual-v3
|
||||
| spring.ai.bedrock.cohere.embedding.options.input-type | Prepends special tokens to differentiate each type from one another. You should not mix different types together, except when mixing types for for search and retrieval. In this case, embed your corpus with the search_document type and embedded queries with type search_query type. | SEARCH_DOCUMENT
|
||||
| spring.ai.bedrock.cohere.embedding.options.input-type | Prepends special tokens to differentiate each type from one another. You should not mix different types together, except when mixing types for search and retrieval. In this case, embed your corpus with the search_document type and embedded queries with type search_query type. | SEARCH_DOCUMENT
|
||||
| spring.ai.bedrock.cohere.embedding.options.truncate | Specifies how the API handles inputs longer than the maximum token length. If you specify LEFT or RIGHT, the model discards the input until the remaining input is exactly the maximum input token length for the model. | NONE
|
||||
|====
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ TIP: All properties prefixed with `spring.ai.ollama.embedding.options` can be ov
|
||||
|
||||
=== Embedding Options [[embedding-options]]
|
||||
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java[OllamaOptions.java] provides the Ollama configurations, such as the model to use, the low level GPU and CPU tunning, etc.
|
||||
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java[OllamaOptions.java] provides the Ollama configurations, such as the model to use, the low level GPU and CPU tuning, etc.
|
||||
|
||||
The default options can be configured using the `spring.ai.ollama.embedding.options` properties as well.
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public interface ModelClient<TReq extends ModelRequest<?>, TRes extends ModelRes
|
||||
|
||||
== StreamingModelClient
|
||||
|
||||
The StreamingModelClient interface provides a generic API for invoking a 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.
|
||||
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.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface FormatProvider {
|
||||
|
||||
The `Parser` interface parses text strings to produce instances of the type T.
|
||||
|
||||
The `FormatProvider` provides text instructions for the AI Model to format the output so that it an be parsed into the type T by the `Parser`.
|
||||
The `FormatProvider` provides text instructions for the AI Model to format the output so that it can be parsed into the type T by the `Parser`.
|
||||
These text instructions are most often appended to the end of the user input to the AI Model.
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ link:https://docs.trychroma.com/[Chroma] is the open-source embedding database.
|
||||
|
||||
1. OpenAI Account: Create an account at link:https://platform.openai.com/signup[OpenAI Signup] and generate the token at link:https://platform.openai.com/account/api-keys[API Keys].
|
||||
|
||||
2. Access to ChromeDB. The <<appendix-a, setup local ChromaDB>> appendix shows how to set up a DB locally with a Docker container.
|
||||
2. Access to ChromeDB. The <<Run Chroma Locally, setup local ChromaDB>> appendix shows how to set up a DB locally with a Docker container.
|
||||
|
||||
On startup, the `ChromaVectorStore` creates the required collection if one is not provisioned already.
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ link:https://github.com/pgvector/pgvector[PGvector] is an open-source extension
|
||||
|
||||
== Prerequisites
|
||||
|
||||
First you need an access to PostgreSQL instance with enabled `vector`, `hstore` and `uuid-ossp` extensions.
|
||||
First you need access to PostgreSQL instance with enabled `vector`, `hstore` and `uuid-ossp` extensions.
|
||||
|
||||
TIP: The <<appendix_a,setup local Postgres/PGVector>> appendix shows how to set up a DB locally with a Docker container.
|
||||
TIP: The <<Run Postgres & PGVector DB locally,setup local Postgres/PGVector>> appendix shows how to set up a DB locally with a Docker container.
|
||||
|
||||
On startup, the `PgVectorStore` will attempt to install the required database extensions and create the required `vector_store` table with an index.
|
||||
|
||||
@@ -200,7 +200,7 @@ You can use the following properties in your Spring Boot configuration to custom
|
||||
|
||||
|`spring.ai.vectorstore.pgvector.index-type`| Nearest neighbor search index type. Options are `NONE` - exact nearest neighbor search, `IVFFlat` - index divides vectors into lists, and then searches a subset of those lists that are closest to the query vector. It has faster build times and uses less memory than HNSW, but has lower query performance (in terms of speed-recall tradeoff). `HNSW` - creates a multilayer graph. It has slower build times and uses more memory than IVFFlat, but has better query performance (in terms of speed-recall tradeoff). There’s no training step like IVFFlat, so the index can be created without any data in the table.| HNSW
|
||||
|`spring.ai.vectorstore.pgvector.distance-type`| Search distance type. Defaults to `COSINE_DISTANCE`. But if vectors are normalized to length 1, you can use `EUCLIDEAN_DISTANCE` or `NEGATIVE_INNER_PRODUCT` for best performance.| COSINE_DISTANCE
|
||||
|`spring.ai.vectorstore.pgvector.dimension`| Embeddings dimension. If not specified explicitly the PgVectorStore will retrieve the dimensions form the provided `EmbeddingClient`. Dimensions are set to the embedding column the on table creation. If you change the dimensions your would have to to re-create the vector_store table as well. | -
|
||||
|`spring.ai.vectorstore.pgvector.dimension`| Embeddings dimension. If not specified explicitly the PgVectorStore will retrieve the dimensions form the provided `EmbeddingClient`. Dimensions are set to the embedding column the on table creation. If you change the dimensions your would have to re-create the vector_store table as well. | -
|
||||
|spring.ai.vectorstore.pgvector.remove-existing-vector-store-table| Deletes the existing `vector_store` table on start up. | false
|
||||
|===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user