St1ve
commited on
Update json_kv_impl.py
Browse filesThere 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)
lightrag/kg/json_kv_impl.py
CHANGED
@@ -47,3 +47,8 @@ class JsonKVStorage(BaseKVStorage):
|
|
47 |
|
48 |
async def drop(self) -> None:
|
49 |
self._data = {}
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
async def drop(self) -> None:
|
49 |
self._data = {}
|
50 |
+
|
51 |
+
async def delete(self, ids: list[str]) -> None:
|
52 |
+
for doc_id in ids:
|
53 |
+
self._data.pop(doc_id, None)
|
54 |
+
await self.index_done_callback()
|