Skip to content

Commit

Permalink
lint and doc multivec_retriever
Browse files Browse the repository at this point in the history
  • Loading branch information
arjbingly committed Mar 25, 2024
1 parent f611f40 commit 97c9a97
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/grag/components/multivec_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

import asyncio
import uuid
from typing import Any, Dict, List, Optional
from pathlib import Path
from typing import Any, Dict, List, Optional, Union

from grag.components.parse_pdf import ParsePDF
from grag.components.text_splitter import TextSplitter
from grag.components.utils import get_config
from grag.components.vectordb.base import VectorDB
Expand Down Expand Up @@ -53,10 +55,12 @@ def __init__(
"""Initialize the Retriever.
Args:
vectordb: Vector DB client instance
store_path: Path to the local file store, defaults to argument from config file
id_key: A key prefix for identifying documents, defaults to argument from config file
namespace: A namespace for producing unique id, defaults to argument from congig file
top_k: Number of top chunks to return from similarity search, defaults to 1
client_kwargs: kwargs to pass to the vectordb client
"""
self.store_path = store_path
self.id_key = id_key
Expand Down Expand Up @@ -239,8 +243,8 @@ def ingest(
verbose: bool = True,
parser_kwargs: dict = None,
):
"""
Ingests the files in directory
"""Ingests the files in directory.
Args:
dir_path: path to the directory
glob_pattern: glob pattern to identify files
Expand Down Expand Up @@ -281,8 +285,8 @@ async def aingest(
verbose: bool = True,
parser_kwargs: dict = None,
):
"""
Asynchronously ingests the files in directory
"""Asynchronously ingests the files in directory.
Args:
dir_path: path to the directory
glob_pattern: glob pattern to identify files
Expand Down

0 comments on commit 97c9a97

Please sign in to comment.