Package dev.langchain4j.retriever
Interface Retriever
-
- All Implemented Interfaces:
@Deprecated(forRemoval = true) public interface Retriever<T>
Interface for retrieving relevant items.
-
-
Method Summary
Modifier and Type Method Description abstract List<T>findRelevant(String text)Find relevant items for the given text. List<T>findRelevant(Object memoryId, String text)Find relevant items for the given text and memoryId. ContentRetrievertoContentRetriever()-
-
Method Detail
-
findRelevant
abstract List<T> findRelevant(String text)
Find relevant items for the given text.
- Parameters:
text- the text to search for.- Returns:
the list of relevant items.
-
findRelevant
List<T> findRelevant(Object memoryId, String text)
Find relevant items for the given text and memoryId.
Default implementation throws an exception.
- Parameters:
memoryId- the memoryId to search for.text- the text to search for.- Returns:
the list of relevant items.
-
toContentRetriever
ContentRetriever toContentRetriever()
-
-
-
-