mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: string merge bug about agent TextProcessing. (\m) (#10211)
### What problem does this PR solve? An error occurred while merging strings containing '\m' in the Text Processing function of the agent. Convert \ m to m using regular expressions From my example alone, it doesn't affect the original meaning, it's still math <img width="1227" height="1056" alt="image" src="https://github.com/user-attachments/assets/9306a8ca-bb97-47bf-b91f-77acfce49875" /> ### Type of change - [ √ ] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: mxc <mxc@example.com>
This commit is contained in:
@ -90,6 +90,8 @@ class StringTransform(Message, ABC):
|
||||
for k,v in kwargs.items():
|
||||
if not v:
|
||||
v = ""
|
||||
k = re.sub(r'\\m', 'm', k)
|
||||
v = re.sub(r'\\m', 'm', v)
|
||||
script = re.sub(k, v, script)
|
||||
|
||||
self.set_output("result", script)
|
||||
|
||||
Reference in New Issue
Block a user