Class CoherenceEmbeddingStore.Builder

java.lang.Object
dev.langchain4j.store.embedding.coherence.CoherenceEmbeddingStore.Builder
Enclosing class:
CoherenceEmbeddingStore

public static class CoherenceEmbeddingStore.Builder extends Object
A builder to create CoherenceEmbeddingStore instances.
  • Constructor Details

  • Method Details

    • name

      Set the name of the NamedMap that will hold the document chunks.
      Parameters:
      name - the name of the NamedMap that will hold the document chunks
      Returns:
      this builder for fluent method calls
    • session

      public CoherenceEmbeddingStore.Builder session(String sessionName)
      Set the name of the Session to use to obtain the document chunk NamedMap.
      Parameters:
      sessionName - the session name
      Returns:
      this builder for fluent method calls
    • session

      public CoherenceEmbeddingStore.Builder session(com.tangosol.net.Session session)
      Set the Session to use to obtain the document chunk NamedMap.
      Parameters:
      session - the Session to use
      Returns:
      this builder for fluent method calls
    • index

      public CoherenceEmbeddingStore.Builder index(com.oracle.coherence.ai.VectorIndexExtractor<com.oracle.coherence.ai.DocumentChunk,com.oracle.coherence.ai.Vector<?>> extractor)
      Set the vector index to add to the underlying NamedMap.
      Parameters:
      extractor - the VectorIndexExtractor to use to create the index
      Returns:
      this builder for fluent method calls
    • normalizeEmbeddings

      public CoherenceEmbeddingStore.Builder normalizeEmbeddings(boolean f)
      Set whether to force normalization of vectors on adding and searching.
      Parameters:
      f - true if the CoherenceEmbeddingStore should call force Embedding.normalize() on embeddings when adding or searching
      Returns:
      this builder for fluent method calls
    • build

      public CoherenceEmbeddingStore build()
      Build a CoherenceEmbeddingStore from the state in this builder.
      Returns:
      a new instance of a CoherenceEmbeddingStore