Skip to content

Commit

Permalink
Update NanoVectorDBStorage upsert to use hash values for IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
FatRicePaddyyyy committed Nov 30, 2024
1 parent f3fe5d3 commit 40905d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightrag/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 40905d1

Please sign in to comment.