Skip to content

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

fix callback function error (#2096)

Kevin Huc3e344b0f181
diff --git a/graphrag/graph_extractor.py b/graphrag/graph_extractor.py
index c2dc530eec..837f6ff2f4 100644
--- a/graphrag/graph_extractor.py
+++ b/graphrag/graph_extractor.py
@@ -131,7 +131,7 @@ class GraphExtractor:
total_token_count += token_count
if callback: callback(msg=f"{doc_index+1}/{total}, elapsed: {timer() - st}s, used tokens: {total_token_count}")
except Exception as e:
- if callback: callback("Knowledge graph extraction error:{}".format(str(e)))
+ if callback: callback(msg="Knowledge graph extraction error:{}".format(str(e)))
logging.exception("error extracting graph")
self._on_error(
e,