Преглед изворни кода

Fix keyerror issue while rebuilding graph. (#5022)

### What problem does this PR solve?

#4995

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.17.0
Kevin Hu пре 8 месеци
родитељ
комит
f29da49893
No account linked to committer's email address
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      graphrag/utils.py

+ 1
- 1
graphrag/utils.py Прегледај датотеку

@@ -540,7 +540,7 @@ def rebuild_graph(tenant_id, kb_id):
src_ids.extend(d.get("source_id", []))
if d["knowledge_graph_kwd"] == "entity":
graph.add_node(d["entity_kwd"], entity_type=d["entity_type_kwd"])
else:
elif "from_entity_kwd" in d and "to_entity_kwd" in d:
graph.add_edge(
d["from_entity_kwd"],
d["to_entity_kwd"],

Loading…
Откажи
Сачувај