Interface RedisEmbeddingStoreConfig


@ConfigRoot(phase=BUILD_AND_RUN_TIME_FIXED) @ConfigMapping(prefix="quarkus.langchain4j.redis") public interface RedisEmbeddingStoreConfig
Configuration of the Redis embedding store.
  • Method Details

    • clientName

      Optional<String> 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

      @WithDefault("embedding-index") String 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

      Optional<List<String>> 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

      @WithDefault("COSINE") MetricType metricType()
      Metric used to compute the distance between two vectors.
    • vectorFieldName

      @WithDefault("vector") String vectorFieldName()
      Name of the key that will be used to store the embedding vector.
    • scalarFieldName

      @WithDefault("scalar") String scalarFieldName()
      Name of the key that will be used to store the embedded text.
    • prefix

      @WithDefault("embedding:") String 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

      @WithDefault("HNSW") VectorAlgorithm vectorAlgorithm()
      Algorithm used to index the embedding vectors.