getRelevantDocuments method

  1. @override
Future<List<Document>> getRelevantDocuments(
  1. String query, {
  2. VectorStoreRetrieverOptions? options,
})
override

Get the most relevant documents for a given query.

  • query - The query to search for.
  • options - Retrieval options.

Implementation

@override
Future<List<Document>> getRelevantDocuments(
  final String query, {
  final VectorStoreRetrieverOptions? options,
}) {
  return vectorStore.search(
    query: query,
    searchType: options?.searchType ?? defaultOptions.searchType,
  );
}