Skip to content

Commit

Permalink
fix(stores): VectorStore k variable was ignored (davidmigloz#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkancal authored and KennethKnudsen97 committed Sep 29, 2023
1 parent 8476eed commit ae8adf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/langchain/lib/src/documents/vector_stores/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ abstract class VectorStore {
final int k = 4,
}) {
return switch (searchType) {
VectorStoreSearchType.similarity => similaritySearch(query: query),
VectorStoreSearchType.mmr => maxMarginalRelevanceSearch(query: query),
VectorStoreSearchType.similarity => similaritySearch(query: query, k: k),
VectorStoreSearchType.mmr => maxMarginalRelevanceSearch(query: query, k: k),
};
}

Expand Down

0 comments on commit ae8adf5

Please sign in to comment.