mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: meta data error. (#9670)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -57,7 +57,7 @@ async def run_graphrag(
|
|||||||
):
|
):
|
||||||
chunks.append(d["content_with_weight"])
|
chunks.append(d["content_with_weight"])
|
||||||
|
|
||||||
with trio.fail_after(max(120, len(chunks)*120)):
|
with trio.fail_after(max(120, len(chunks)*60*10)):
|
||||||
subgraph = await generate_subgraph(
|
subgraph = await generate_subgraph(
|
||||||
LightKGExt
|
LightKGExt
|
||||||
if "method" not in row["kb_parser_config"].get("graphrag", {}) or row["kb_parser_config"]["graphrag"]["method"] != "general"
|
if "method" not in row["kb_parser_config"].get("graphrag", {}) or row["kb_parser_config"]["graphrag"]["method"] != "general"
|
||||||
|
|||||||
@ -114,6 +114,8 @@ def kb_prompt(kbinfos, max_tokens, hash_id=False):
|
|||||||
docs = {d.id: d.meta_fields for d in docs}
|
docs = {d.id: d.meta_fields for d in docs}
|
||||||
|
|
||||||
def draw_node(k, line):
|
def draw_node(k, line):
|
||||||
|
if line is not None and not isinstance(line, str):
|
||||||
|
line = str(line)
|
||||||
if not line:
|
if not line:
|
||||||
return ""
|
return ""
|
||||||
return f"\n├── {k}: " + re.sub(r"\n+", " ", line, flags=re.DOTALL)
|
return f"\n├── {k}: " + re.sub(r"\n+", " ", line, flags=re.DOTALL)
|
||||||
|
|||||||
Reference in New Issue
Block a user