Skip to content

Commit

Permalink
Merge pull request #458 from ChenZiHong-Gavin/fix-variable-name
Browse files Browse the repository at this point in the history
fix: fix variable name(entitiy->entity)
  • Loading branch information
LarFii authored Dec 13, 2024
2 parents 3e33cfc + e9107a6 commit 3de0245
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lightrag/operate.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,21 @@ 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])
)
already_description.append(already_node["description"])

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,
Expand Down

0 comments on commit 3de0245

Please sign in to comment.