diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-06 01:39:58 +0200 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-06 01:39:58 +0200 |
| commit | 3a4efdbb50add7abd26a0f6e145dec1e0b897e77 (patch) | |
| tree | 1b62f3e3b0e239f6eb08b686d7aa5f786b94a3e6 /rag/rag.py | |
| parent | 8fda223c36db69d7fb5c029bd55a1321c9812a7a (diff) | |
Fix document bug
Diffstat (limited to 'rag/rag.py')
| -rw-r--r-- | rag/rag.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |