RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
fix: issue #5600 (#5645)
郭大鹏78b2e0be890f
diff --git a/graphrag/general/community_reports_extractor.py b/graphrag/general/community_reports_extractor.pyindex b294c543f2..9ef7c173f7 100644--- a/graphrag/general/community_reports_extractor.py+++ b/graphrag/general/community_reports_extractor.py@@ -95,7 +95,12 @@ class CommunityReportsExtractor(Extractor):response = re.sub(r"\{\{", "{", response)response = re.sub(r"\}\}", "}", response)logging.debug(response)- response = json.loads(response)+ try:+ response = json.loads(response)+ except json.JSONDecodeError as e:+ logging.error(f"Failed to parse JSON response: {e}")+ logging.error(f"Response content: {response}")+ continueif not dict_has_keys_with_types(response, [("title", str),("summary", str),diff --git a/graphrag/general/leiden.py b/graphrag/general/leiden.pyindex 212fe0c4fc..98ecca7045 100644--- a/graphrag/general/leiden.py+++ b/graphrag/general/leiden.py@@ -120,6 +120,9 @@ def run(graph: nx.Graph, args: dict[str, Any]) -> dict[int, dict[str, dict]]:result = {}results_by_level[level] = resultfor node_id, raw_community_id in node_id_to_community_map[level].items():+ if node_id not in graph.nodes:+ logging.warning(f"Node {node_id} not found in the graph.")+ continuecommunity_id = str(raw_community_id)if community_id not in result:result[community_id] = {"weight": 0, "nodes": []}