Skip to content

Commit

Permalink
Top_k bug multivec retriever
Browse files Browse the repository at this point in the history
  • Loading branch information
arjbingly committed Mar 26, 2024
1 parent c18390a commit 546d163
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/grag/components/multivec_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class Retriever:
"""

def __init__(
self,
vectordb: Optional[VectorDB] = None,
store_path: str = multivec_retriever_conf["store_path"],
id_key: str = multivec_retriever_conf["id_key"],
namespace: str = multivec_retriever_conf["namespace"],
top_k=1,
client_kwargs: Optional[Dict[str, Any]] = None,
self,
vectordb: Optional[VectorDB] = None,
store_path: str = multivec_retriever_conf["store_path"],
id_key: str = multivec_retriever_conf["id_key"],
namespace: str = multivec_retriever_conf["namespace"],
top_k=multivec_retriever_conf["top_k"],
client_kwargs: Optional[Dict[str, Any]] = None,
):
"""Initialize the Retriever.
Expand Down Expand Up @@ -236,12 +236,12 @@ def get_docs_from_chunks(self, chunks: List[Document], one_to_one=False):
return [d for d in docs if d is not None]

def ingest(
self,
dir_path: Union[str, Path],
glob_pattern: str = "**/*.pdf",
dry_run: bool = False,
verbose: bool = True,
parser_kwargs: dict = None,
self,
dir_path: Union[str, Path],
glob_pattern: str = "**/*.pdf",
dry_run: bool = False,
verbose: bool = True,
parser_kwargs: dict = None,
):
"""Ingests the files in directory.
Expand Down Expand Up @@ -278,12 +278,12 @@ def ingest(
print(f"DRY RUN: found - {filepath.relative_to(dir_path)}")

async def aingest(
self,
dir_path: Union[str, Path],
glob_pattern: str = "**/*.pdf",
dry_run: bool = False,
verbose: bool = True,
parser_kwargs: dict = None,
self,
dir_path: Union[str, Path],
glob_pattern: str = "**/*.pdf",
dry_run: bool = False,
verbose: bool = True,
parser_kwargs: dict = None,
):
"""Asynchronously ingests the files in directory.
Expand Down

0 comments on commit 546d163

Please sign in to comment.