Skip to content

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

fix: double brace issue (#3328)

Kevin Hu88072b1e900c
diff --git a/graphrag/community_reports_extractor.py b/graphrag/community_reports_extractor.py
index 1412555e49..5efc120afe 100644
--- a/graphrag/community_reports_extractor.py
+++ b/graphrag/community_reports_extractor.py
@@ -80,6 +80,8 @@ class CommunityReportsExtractor:
token_count += num_tokens_from_string(text + response)
response = re.sub(r"^[^\{]*", "", response)
response = re.sub(r"[^\}]*$", "", response)
+ response = re.sub(r"\{\{", "{", response)
+ response = re.sub(r"\}\}", "}", response)
print(response)
response = json.loads(response)
if not dict_has_keys_with_types(response, [