Update json_kv_impl.py

There is no delete function in chunks_vdb and text_chunks in lines 1300-1302 of the lightrag.py file:
    if chunk_ids:
                await self.chunks_vdb.delete(chunk_ids)
                await self.text_chunks.delete(chunk_ids)
This commit is contained in:
St1ve 2025-02-16 19:33:59 +08:00 committed by GitHub
parent 4d58ff8bb4
commit edaba428ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,3 +47,8 @@ class JsonKVStorage(BaseKVStorage):
async def drop(self) -> None: async def drop(self) -> None:
self._data = {} self._data = {}
async def delete(self, ids: list[str]) -> None:
for doc_id in ids:
self._data.pop(doc_id, None)
await self.index_done_callback()