From 15748f0f2f987a2dd74c8b0ae4f0c6c93b36e7e7 Mon Sep 17 00:00:00 2001 From: xunbu Date: Sat, 23 Aug 2025 14:06:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docutranslate/agents/markdown_agent.py | 2 +- docutranslate/agents/segments_agent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docutranslate/agents/markdown_agent.py b/docutranslate/agents/markdown_agent.py index 020afd0..d4f60ff 100644 --- a/docutranslate/agents/markdown_agent.py +++ b/docutranslate/agents/markdown_agent.py @@ -49,4 +49,4 @@ Output: $$1+1=2$$ \\((c_0,c_1,c_2^2)\\)是一个坐标。""" if config.custom_prompt: - self.system_prompt += "\n# 重要规则或背景【非常重要】\n" + config.custom_prompt + '\n' + self.system_prompt += "\n# Important rules or background\n" + config.custom_prompt + '\n' diff --git a/docutranslate/agents/segments_agent.py b/docutranslate/agents/segments_agent.py index c68878e..f8ec5c8 100644 --- a/docutranslate/agents/segments_agent.py +++ b/docutranslate/agents/segments_agent.py @@ -44,7 +44,7 @@ Output Warning: Never wrap the entire JSON object in quotes to make it a single string. Never wrap the JSON text in ```. """ if config.custom_prompt: - self.system_prompt += "\n# 重要规则或背景【非常重要】\n" + config.custom_prompt + '\n' + self.system_prompt += "\n# Important rules or background for segments for translation\n" + config.custom_prompt + '\n' def _result_handler(self, result: str, origin_prompt: str, logger: Logger): try: