mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Add component 'Template' (#3562)
### What problem does this PR solve? #3560 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -79,7 +79,7 @@ class Template(ComponentBase):
|
||||
self._param.inputs.append({"component_id": para["component_id"], "content": kwargs[para["key"]]})
|
||||
|
||||
for n, v in kwargs.items():
|
||||
content = re.sub(r"\{%s\}" % re.escape(n), re.escape(str(v)), content)
|
||||
content = re.sub(r"\{%s\}" % re.escape(n), str(v), content)
|
||||
|
||||
return Template.be_output(content)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user