Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix empty children in mindmap (#2418)

Kevin Hu3f571a13c2d4
diff --git a/graphrag/mind_map_extractor.py b/graphrag/mind_map_extractor.py
index 9a5560dafe..e33650ba50 100644
--- a/graphrag/mind_map_extractor.py
+++ b/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)