소스 검색

fix empty children in mindmap (#2418)

### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.11.0
Kevin Hu 1 년 전
부모
커밋
3f571a13c2
No account linked to committer's email address
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      graphrag/mind_map_extractor.py

+ 1
- 1
graphrag/mind_map_extractor.py 파일 보기

@@ -66,7 +66,7 @@ class MindMapExtractor:
obj = [obj]
if isinstance(obj, list):
for i in obj: keyset.add(i)
return [{"id": re.sub(r"\*+", "", i), "children": []} for i in obj]
return [{"id": re.sub(r"\*+", "", i), "children": []} for i in obj if re.sub(r"\*+", "", i)]
arr = []
for k, v in obj.items():
k = self._key(k)

Loading…
취소
저장