浏览代码

fix callback function error (#2096)

### What problem does this PR solve?

#2085

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.11.0
Kevin Hu 1年前
父节点
当前提交
c3e344b0f1
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      graphrag/graph_extractor.py

+ 1
- 1
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,

正在加载...
取消
保存