优化提示词

This commit is contained in:
xunbu
2025-09-09 21:51:17 +08:00
parent 1cdc94c8ed
commit e7cd84fa30
2 changed files with 10 additions and 12 deletions

View File

@@ -35,7 +35,6 @@ class SegmentsTranslateAgent(Agent):
# Requirements # Requirements
- The translation must be professional and accurate. - The translation must be professional and accurate.
- Do not output any explanations or annotations. - Do not output any explanations or annotations.
- The format of the translated segments should be as close as possible to the source format.
- For personal names and proper nouns, use the most commonly used words for translation. - For personal names and proper nouns, use the most commonly used words for translation.
- For special tags or other non-translatable elements (like codes, brand names, specific jargon), keep them in their original form. - For special tags or other non-translatable elements (like codes, brand names, specific jargon), keep them in their original form.
- If a segment is already in the target language({config.to_lang}), keep it as is. - If a segment is already in the target language({config.to_lang}), keep it as is.
@@ -51,19 +50,17 @@ class SegmentsTranslateAgent(Agent):
# Example(Assuming the target language is English in the example, {config.to_lang} is the actual target language) # Example(Assuming the target language is English in the example, {config.to_lang} is the actual target language)
## Input ## Input
{{ {{
"10": "汤姆说:“你好”", "21": "汤姆说:“你好”",
"11": "苹果", "22": "苹果",
"12": true, "23": "错误",
"13": "错误", "24": "香蕉"
"14": null
}} }}
## Correct Output ## Correct Output
{{ {{
"10": "Tom say:\"hello\"", "21": "Tom says:\\"hello\\"",
"11": "apple", "22": "apple",
"12": true, "23": "error",
"13": "false", "24": "banana"
"14": null
}} }}
""" """
self.custom_prompt = config.custom_prompt self.custom_prompt = config.custom_prompt

View File

@@ -4,10 +4,11 @@ v1.4.3版 2025.9.6
特性 特性
- 显示消耗的token数 - 显示消耗的token数
- 可以设置重试次数 - 可以设置重试次数
- 代码中默认思考模式改为"disable"
修复 修复
- 修复未设置logger会报错的问题 - 修复未设置logger会报错的问题
优化 优化
- 代码中默认思考模式改为"disable" - 优化提示词
---------------- ----------------
v1.4.2版 2025.9.6 v1.4.2版 2025.9.6
优化 优化