Merge pull request #906 from konrad-woj/fix-insert-custom-chunks
fix insert_custom_chunks skipping every new doc
This commit is contained in:
commit
6ed81ed1c6
1 changed files with 1 additions and 1 deletions
|
|
@ -528,7 +528,7 @@ class LightRAG:
|
|||
doc_key = compute_mdhash_id(full_text.strip(), prefix="doc-")
|
||||
new_docs = {doc_key: {"content": full_text.strip()}}
|
||||
|
||||
_add_doc_keys = await self.full_docs.filter_keys(set(doc_key))
|
||||
_add_doc_keys = await self.full_docs.filter_keys({doc_key})
|
||||
new_docs = {k: v for k, v in new_docs.items() if k in _add_doc_keys}
|
||||
if not len(new_docs):
|
||||
logger.warning("This document is already in the storage.")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue