From 40905d1810fd0e541cec35483162a5dc2ca7f9f9 Mon Sep 17 00:00:00 2001 From: FatRicePaddyyyy Date: Sat, 30 Nov 2024 21:49:46 +0900 Subject: [PATCH] Update NanoVectorDBStorage upsert to use hash values for IDs --- lightrag/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/storage.py b/lightrag/storage.py index 007d6534..3e0d2207 100644 --- a/lightrag/storage.py +++ b/lightrag/storage.py @@ -86,7 +86,7 @@ async def upsert(self, data: dict[str, dict]): return [] list_data = [ { - "__id__": k, + "__id__": compute_mdhash_id(k, prefix="ent-"), **{k1: v1 for k1, v1 in v.items() if k1 in self.meta_fields}, } for k, v in data.items()