Skip to content

Commit

Permalink
fix empty mind map issue (infiniflow#1991)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored Aug 19, 2024
1 parent a74c0cc commit 2302a6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions graphrag/mind_map_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ def __call__(
for i, _ in enumerate(threads):
res.append(_.result())

if not res:
return MindMapResult(output={"root":{}})

merge_json = reduce(self._merge, res)
if len(merge_json.keys()) > 1:
keyset = set(
Expand Down

0 comments on commit 2302a6b

Please sign in to comment.