Package dev.langchain4j.store.embedding
Class EmbeddingSearchRequest
java.lang.Object
dev.langchain4j.store.embedding.EmbeddingSearchRequest
Represents a request to search in an
EmbeddingStore
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Constructor Summary
ConstructorDescriptionEmbeddingSearchRequest
(Embedding queryEmbedding, Integer maxResults, Double minScore, Filter filter) Creates an instance of an EmbeddingSearchRequest. -
Method Summary
-
Constructor Details
-
EmbeddingSearchRequest
public EmbeddingSearchRequest(Embedding queryEmbedding, Integer maxResults, Double minScore, Filter filter) Creates an instance of an EmbeddingSearchRequest.- Parameters:
queryEmbedding
- The embedding used as a reference. Found embeddings should be similar to this one. This is a mandatory parameter.maxResults
- The maximum number of embeddings to return. This is an optional parameter. Default: 3minScore
- The minimum score, ranging from 0 to 1 (inclusive). Only embeddings with a score >= minScore will be returned. This is an optional parameter. Default: 0filter
- The filter to be applied to theMetadata
during search. OnlyTextSegment
s whoseMetadata
matches theFilter
will be returned. Please note that not allEmbeddingStore
s support this feature yet. This is an optional parameter. Default: no filtering
-
-
Method Details