Skip to content

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

Fix: meta data error. (#9670)

Kevin Hu2f74727bb980
diff --git a/graphrag/general/index.py b/graphrag/general/index.py
index 345f838501..ac7fb9607f 100644
--- a/graphrag/general/index.py
+++ b/graphrag/general/index.py
@@ -57,7 +57,7 @@ async def run_graphrag(
):
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(
LightKGExt
if "method" not in row["kb_parser_config"].get("graphrag", {}) or row["kb_parser_config"]["graphrag"]["method"] != "general"
diff --git a/rag/prompts/prompts.py b/rag/prompts/prompts.py
index 1e6255b35b..40750a1efc 100644
--- a/rag/prompts/prompts.py
+++ b/rag/prompts/prompts.py
@@ -114,6 +114,8 @@ def kb_prompt(kbinfos, max_tokens, hash_id=False):
docs = {d.id: d.meta_fields for d in docs}
def draw_node(k, line):
+ if line is not None and not isinstance(line, str):
+ line = str(line)
if not line:
return ""
return f"\n├── {k}: " + re.sub(r"\n+", " ", line, flags=re.DOTALL)