From ce688e5f0c1860b021e7efb0d24b5814f9d1f103 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Thu, 11 Apr 2024 11:00:14 +0330 Subject: [PATCH] fix: codeRabbitAI's mistake! --- bot/retrievers/retrieve_similar_nodes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot/retrievers/retrieve_similar_nodes.py b/bot/retrievers/retrieve_similar_nodes.py index ddd80c5..c88e178 100644 --- a/bot/retrievers/retrieve_similar_nodes.py +++ b/bot/retrievers/retrieve_similar_nodes.py @@ -57,11 +57,17 @@ def query_db( Note: This would completely disable the similarity search and it would just return the results with no ordering. default is `False`. If `True` the query will be ignored and no embedding of it would be fetched + aggregate_records : bool + aggregate records and group by a given term in `group_by_metadata` + group_by_metadata : list[str] + do grouping by some property of `metadata_` + """ ignore_sort = kwargs.get("ignore_sort", False) aggregate_records = kwargs.get("aggregate_records", False) group_by_metadata = kwargs.get("group_by_metadata", []) if not isinstance(group_by_metadata, list): raise ValueError("Expected 'group_by_metadata' to be a list.") + self._vector_store._initialize() if not aggregate_records: