From e2b9be2dc6b5ed5dbcc56b5ed6ddd3f6faadf1c2 Mon Sep 17 00:00:00 2001 From: zrguo Date: Thu, 13 Mar 2025 16:52:48 +0800 Subject: [PATCH] Update lightrag.py --- lightrag/lightrag.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index 4f374890..a466e572 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -1114,6 +1114,7 @@ class LightRAG: # Prepare node data node_data: dict[str, str] = { + "entity_id": entity_name, "entity_type": entity_type, "description": description, "source_id": source_id, @@ -1151,6 +1152,7 @@ class LightRAG: await self.chunk_entity_relation_graph.upsert_node( need_insert_id, node_data={ + "entity_id": need_insert_id, "source_id": source_id, "description": "UNKNOWN", "entity_type": "UNKNOWN", @@ -2160,6 +2162,7 @@ class LightRAG: # Prepare node data with defaults if missing node_data = { + "entity_id": entity_name, "entity_type": entity_data.get("entity_type", "UNKNOWN"), "description": entity_data.get("description", ""), "source_id": entity_data.get("source_id", "manual"),