fix: replace 蚂蚁集团/蚂蚁/支付宝/健康是福 in antaf responses

This commit is contained in:
hailin 2026-04-07 02:36:53 -07:00
parent e37a65ba1d
commit fb53c4a6b7
1 changed files with 5 additions and 1 deletions

View File

@ -65,9 +65,13 @@ class LLMProvider(LLMProviderBase):
text = re.sub(r'\|\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?', '', text) text = re.sub(r'\|\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?', '', text)
# Markdown标题 ### 文字 # Markdown标题 ### 文字
text = re.sub(r'#{1,6}\s*', '', text) 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 = text.replace("支付宝", "泰兴福")
text = text.replace("健康是福", "健康是虎")
# 多余空格和空行 # 多余空格和空行
text = re.sub(r' +', ' ', text) text = re.sub(r' +', ' ', text)
text = re.sub(r'\n{2,}', '\n', text) text = re.sub(r'\n{2,}', '\n', text)