Konrad Wojciechowski
commited on
Commit
·
6a91381
1
Parent(s):
0fd9dfe
fix insert_custom_chunks skipping every new doc with "This document is already in the storage."
Browse files- lightrag/lightrag.py +1 -1
lightrag/lightrag.py
CHANGED
@@ -524,7 +524,7 @@ class LightRAG:
|
|
524 |
doc_key = compute_mdhash_id(full_text.strip(), prefix="doc-")
|
525 |
new_docs = {doc_key: {"content": full_text.strip()}}
|
526 |
|
527 |
-
_add_doc_keys = await self.full_docs.filter_keys(
|
528 |
new_docs = {k: v for k, v in new_docs.items() if k in _add_doc_keys}
|
529 |
if not len(new_docs):
|
530 |
logger.warning("This document is already in the storage.")
|
|
|
524 |
doc_key = compute_mdhash_id(full_text.strip(), prefix="doc-")
|
525 |
new_docs = {doc_key: {"content": full_text.strip()}}
|
526 |
|
527 |
+
_add_doc_keys = await self.full_docs.filter_keys({doc_key})
|
528 |
new_docs = {k: v for k, v in new_docs.items() if k in _add_doc_keys}
|
529 |
if not len(new_docs):
|
530 |
logger.warning("This document is already in the storage.")
|