Package org.springframework.ai.retriever
Class VectorStoreRetriever
java.lang.Object
org.springframework.ai.retriever.VectorStoreRetriever
- All Implemented Interfaces:
Function<String,,List<Document>> DocumentRetriever
-
Constructor Summary
ConstructorsConstructorDescriptionVectorStoreRetriever(VectorStore vectorStore) VectorStoreRetriever(VectorStore vectorStore, int k) VectorStoreRetriever(VectorStore vectorStore, int k, double threshold) -
Method Summary
Modifier and TypeMethodDescriptionintgetK()Retrieves relevant documents however the implementation sees fit.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.document.DocumentRetriever
apply
-
Constructor Details
-
VectorStoreRetriever
-
VectorStoreRetriever
-
VectorStoreRetriever
-
-
Method Details
-
getVectorStore
-
getK
public int getK() -
getThreshold
-
retrieve
Description copied from interface:DocumentRetrieverRetrieves relevant documents however the implementation sees fit.- Specified by:
retrievein interfaceDocumentRetriever- Parameters:
query- query string- Returns:
- relevant documents
-