LLM4SciLit / src /document_retriever /simple_retriever.py
tommymarto's picture
first attempt to hf spaces
7f7b773
raw
history blame
327 Bytes
class SimpleDocumentRetriever:
def __init__(self, vector_store):
self.vector_store = vector_store
self.retriever = None
def initialize(self):
self.retriever = self.vector_store.db.as_retriever(search_kwargs={"k": 10, "fetch_k": 40})
def retrieve(self, query: str, k: int = 4):
pass