Class CoherenceEmbeddingStore.Builder
java.lang.Object
dev.langchain4j.store.embedding.coherence.CoherenceEmbeddingStore.Builder
- Enclosing class:
CoherenceEmbeddingStore
A builder to create
CoherenceEmbeddingStore instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aCoherenceEmbeddingStorefrom the state in this builder.index(com.oracle.coherence.ai.VectorIndexExtractor<com.oracle.coherence.ai.DocumentChunk, float[]> extractor) Set the vector index to add to the underlyingNamedMap.Set the name of theNamedMapthat will hold thedocument chunks.normalizeEmbeddings(boolean f) Set whether to force normalization of vectors on adding and searching.session(com.tangosol.net.Session session) Set theSessionto use to obtain the document chunkNamedMap.Set the name of theSessionto use to obtain the document chunkNamedMap.
-
Constructor Details
-
Builder
protected Builder()Create aCoherenceEmbeddingStore.Builder.
-
-
Method Details
-
name
Set the name of theNamedMapthat will hold thedocument chunks.- Parameters:
name- the name of theNamedMapthat will hold thedocument chunks- Returns:
- this builder for fluent method calls
-
session
Set the name of theSessionto use to obtain the document chunkNamedMap.- Parameters:
sessionName- the session name- Returns:
- this builder for fluent method calls
-
session
Set theSessionto use to obtain the document chunkNamedMap.- Parameters:
session- theSessionto use- Returns:
- this builder for fluent method calls
-
index
public CoherenceEmbeddingStore.Builder index(com.oracle.coherence.ai.VectorIndexExtractor<com.oracle.coherence.ai.DocumentChunk, float[]> extractor) Set the vector index to add to the underlyingNamedMap.- Parameters:
extractor- theVectorIndexExtractorto use to create the index- Returns:
- this builder for fluent method calls
-
normalizeEmbeddings
Set whether to force normalization of vectors on adding and searching.- Parameters:
f-trueif theCoherenceEmbeddingStoreshould call forceEmbedding.normalize()on embeddings when adding or searching- Returns:
- this builder for fluent method calls
-
build
Build aCoherenceEmbeddingStorefrom the state in this builder.- Returns:
- a new instance of a
CoherenceEmbeddingStore
-