From fb53c4a6b7edb6748d5f0c8d1675df6b0f298b1f Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 7 Apr 2026 02:36:53 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20replace=20=E8=9A=82=E8=9A=81=E9=9B=86?= =?UTF-8?q?=E5=9B=A2/=E8=9A=82=E8=9A=81/=E6=94=AF=E4=BB=98=E5=AE=9D/?= =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=98=AF=E7=A6=8F=20in=20antaf=20responses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/antaf/antaf_llm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/antaf/antaf_llm.py b/modules/antaf/antaf_llm.py index 7627fdf..548a744 100644 --- a/modules/antaf/antaf_llm.py +++ b/modules/antaf/antaf_llm.py @@ -65,9 +65,13 @@ class LLMProvider(LLMProviderBase): text = re.sub(r'\|\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?', '', text) # Markdown标题 ### 文字 text = re.sub(r'#{1,6}\s*', '', text) - # 人格替换:蚂蚁阿福 → 泰小虎 + # 人格替换 text = text.replace("蚂蚁阿福", "泰小虎") text = text.replace("阿福", "泰小虎") + text = text.replace("蚂蚁集团", "泰兴福") + text = text.replace("蚂蚁", "泰兴福") + text = text.replace("支付宝", "泰兴福") + text = text.replace("健康是福", "健康是虎") # 多余空格和空行 text = re.sub(r' +', ' ', text) text = re.sub(r'\n{2,}', '\n', text)