summaryrefslogtreecommitdiff
path: root/rag/rag.py
diff options
context:
space:
mode:
Diffstat (limited to 'rag/rag.py')
-rw-r--r--rag/rag.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rag/rag.py b/rag/rag.py
index 1988ba7..7242db9 100644
--- a/rag/rag.py
+++ b/rag/rag.py
@@ -27,6 +27,8 @@ class RAG:
log.debug(f"Adding pdf with filepath: {filepath} to vector db")
points = self.encoder.encode_document(chunks)
self.vector_db.add(points)
+ else:
+ log.debug("Document already exists!")
def __context(self, query_emb: List[StrictFloat], limit: int) -> str:
hits = self.vector_db.search(query_emb, limit)