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
ConstructorDescriptionVectorStoreRetriever
(VectorStore vectorStore) VectorStoreRetriever
(VectorStore vectorStore, int k) VectorStoreRetriever
(VectorStore vectorStore, int k, double threshold) -
Method Summary
Modifier and TypeMethodDescriptionint
getK()
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, wait
Methods 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:DocumentRetriever
Retrieves relevant documents however the implementation sees fit.- Specified by:
retrieve
in interfaceDocumentRetriever
- Parameters:
query
- query string- Returns:
- relevant documents
-