Merge pull request #906 from konrad-woj/fix-insert-custom-chunks
Browse files- lightrag/lightrag.py +1 -1
lightrag/lightrag.py
CHANGED
@@ -528,7 +528,7 @@ class LightRAG:
|
|
528 |
doc_key = compute_mdhash_id(full_text.strip(), prefix="doc-")
|
529 |
new_docs = {doc_key: {"content": full_text.strip()}}
|
530 |
|
531 |
-
_add_doc_keys = await self.full_docs.filter_keys(
|
532 |
new_docs = {k: v for k, v in new_docs.items() if k in _add_doc_keys}
|
533 |
if not len(new_docs):
|
534 |
logger.warning("This document is already in the storage.")
|
|
|
528 |
doc_key = compute_mdhash_id(full_text.strip(), prefix="doc-")
|
529 |
new_docs = {doc_key: {"content": full_text.strip()}}
|
530 |
|
531 |
+
_add_doc_keys = await self.full_docs.filter_keys({doc_key})
|
532 |
new_docs = {k: v for k, v in new_docs.items() if k in _add_doc_keys}
|
533 |
if not len(new_docs):
|
534 |
logger.warning("This document is already in the storage.")
|