RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix: Preserve quotes while handling variable substitution withTemplate component. (#6410)
Richardd869e4d43f7c
diff --git a/agent/component/template.py b/agent/component/template.pyindex b7838c2cc8..b54b93d56a 100644--- a/agent/component/template.py+++ b/agent/component/template.py@@ -109,16 +109,14 @@ class Template(ComponentBase):passfor n, v in kwargs.items():- try:- v = json.dumps(v, ensure_ascii=False)- except Exception:- pass+ if not isinstance(v, str):+ try:+ v = json.dumps(v, ensure_ascii=False)+ except Exception:+ passcontent = re.sub(r"\{%s\}" % re.escape(n), v, content)- content = re.sub(- r"(\\\")", "", content- )content = re.sub(r"(#+)", r" \1 ", content)