fix: fix variable name(entitiy->entity)

This commit is contained in:
chenzihong
2024-12-12 23:59:40 +08:00
parent 3e33cfc20e
commit e9107a67c3

View File

@@ -137,13 +137,13 @@ async def _merge_nodes_then_upsert(
knowledge_graph_inst: BaseGraphStorage, knowledge_graph_inst: BaseGraphStorage,
global_config: dict, global_config: dict,
): ):
already_entitiy_types = [] already_entity_types = []
already_source_ids = [] already_source_ids = []
already_description = [] already_description = []
already_node = await knowledge_graph_inst.get_node(entity_name) already_node = await knowledge_graph_inst.get_node(entity_name)
if already_node is not None: 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( already_source_ids.extend(
split_string_by_multi_markers(already_node["source_id"], [GRAPH_FIELD_SEP]) 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( entity_type = sorted(
Counter( Counter(
[dp["entity_type"] for dp in nodes_data] + already_entitiy_types [dp["entity_type"] for dp in nodes_data] + already_entity_types
).items(), ).items(),
key=lambda x: x[1], key=lambda x: x[1],
reverse=True, reverse=True,