Interface RedisEmbeddingStoreConfig
@ConfigRoot(phase=BUILD_AND_RUN_TIME_FIXED)
@ConfigMapping(prefix="quarkus.langchain4j.redis")
public interface RedisEmbeddingStoreConfig
Configuration of the Redis embedding store.
-
Method Summary
Modifier and TypeMethodDescriptionThe name of the Redis client to use.The dimension of the embedding vectors.Name of the index that will be used in Redis when searching for related embeddings.Names of extra fields that will be stored in Redis along with the embedding vectors.Metric used to compute the distance between two vectors.prefix()
Prefix to be applied to all keys by the embedding store.Name of the key that will be used to store the embedded text.Algorithm used to index the embedding vectors.Name of the key that will be used to store the embedding vector.
-
Method Details
-
clientName
The name of the Redis client to use. These clients are configured by means of the `redis-client` extension. If unspecified, it will use the default Redis client. -
dimension
Long dimension()The dimension of the embedding vectors. This has to be the same as the dimension of vectors produced by the embedding model that you use. For example, AllMiniLmL6V2QuantizedEmbeddingModel produces vectors of dimension 384. OpenAI's text-embedding-ada-002 produces vectors of dimension 1536. -
indexName
Name of the index that will be used in Redis when searching for related embeddings. If this index doesn't exist, it will be created. -
metadataFields
Names of extra fields that will be stored in Redis along with the embedding vectors. This corresponds to keys in the `dev.langchain4j.data.document.Metadata` map. Storing embeddings with metadata fields unlisted here is possible, but these fields will then not be present in the returned EmbeddingMatch objects. -
metricType
Metric used to compute the distance between two vectors. -
vectorFieldName
Name of the key that will be used to store the embedding vector. -
scalarFieldName
Name of the key that will be used to store the embedded text. -
prefix
Prefix to be applied to all keys by the embedding store. Embeddings are stored in Redis under a key that is the concatenation of this prefix and the embedding ID. -
vectorAlgorithm
Algorithm used to index the embedding vectors.
-