From e9107a67c357bbff4156bfec00de1bc307621e82 Mon Sep 17 00:00:00 2001 From: chenzihong <522023320011@smail.nju.edu.cn> Date: Thu, 12 Dec 2024 23:59:40 +0800 Subject: [PATCH] fix: fix variable name(entitiy->entity) --- lightrag/operate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightrag/operate.py b/lightrag/operate.py index 8b8ad85b..6936ce73 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -137,13 +137,13 @@ async def _merge_nodes_then_upsert( knowledge_graph_inst: BaseGraphStorage, global_config: dict, ): - already_entitiy_types = [] + already_entity_types = [] already_source_ids = [] already_description = [] already_node = await knowledge_graph_inst.get_node(entity_name) if already_node is not None: - already_entitiy_types.append(already_node["entity_type"]) + already_entity_types.append(already_node["entity_type"]) already_source_ids.extend( split_string_by_multi_markers(already_node["source_id"], [GRAPH_FIELD_SEP]) ) @@ -151,7 +151,7 @@ async def _merge_nodes_then_upsert( entity_type = sorted( Counter( - [dp["entity_type"] for dp in nodes_data] + already_entitiy_types + [dp["entity_type"] for dp in nodes_data] + already_entity_types ).items(), key=lambda x: x[1], reverse=True,