File size: 327 Bytes
7f7b773
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
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