瀏覽代碼

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

### What problem does this PR solve?
Close #7879
I checked the current master code, the kb_parser_config is join from
knowledge table, so I think should be some edge cases due to history
data

### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.19.1
Stephen Hu 5 月之前
父節點
當前提交
a71376ad6a
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      graphrag/general/index.py

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

Loading…
取消
儲存