mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 18:49:02 +08:00
fix re.escape problem (#2735)
### What problem does this PR solve? #2716 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
6f7fcdc897
commit
a005be7c74
@ -112,7 +112,7 @@ class Generate(ComponentBase):
|
||||
|
||||
kwargs["input"] = input
|
||||
for n, v in kwargs.items():
|
||||
prompt = re.sub(r"\{%s\}" % n, re.escape(str(v)), prompt)
|
||||
prompt = re.sub(r"\{%s\}" % re.escape(n), str(v), prompt)
|
||||
|
||||
downstreams = self._canvas.get_component(self._id)["downstream"]
|
||||
if kwargs.get("stream") and len(downstreams) == 1 and self._canvas.get_component(downstreams[0])[
|
||||
|
Loading…
x
Reference in New Issue
Block a user