Skip to content

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

Fix: KeyError: 'method' when build run_graphrag (#7899)

Stephen Hua71376ad6a24
diff --git a/graphrag/general/index.py b/graphrag/general/index.py
index 4aa73ac40b..db3645b357 100644
--- a/graphrag/general/index.py
+++ b/graphrag/general/index.py
@@ -57,7 +57,7 @@ async def run_graphrag(
subgraph = await generate_subgraph(
LightKGExt
- if row["kb_parser_config"]["graphrag"]["method"] != "general"
+ if "method" not in row["kb_parser_config"]["graphrag"] or row["kb_parser_config"]["graphrag"]["method"] != "general"
else GeneralKGExt,
tenant_id,
kb_id,