增加txt不分段选项

This commit is contained in:
xunbu
2025-11-09 19:18:28 +08:00
parent ad9f01c2b1
commit a67ede5820
5 changed files with 80 additions and 147 deletions

View File

@@ -469,9 +469,9 @@ class TextWorkflowParams(BaseWorkflowParams):
"\n",
description="当 insert_mode 为 'append''prepend' 时,用于分隔原文和译文的分隔符。",
)
segment_mode: Literal["line", "paragraph"] = Field(
segment_mode: Literal["line", "paragraph", "none"] = Field(
"line",
description="分段模式。'line':按行分段(每行独立翻译),'paragraph':按段落分段(连续非空行合并为段落)。",
description="分段模式。'line':按行分段(每行独立翻译),'paragraph':按段落分段(连续非空行合并为段落)'none':不分段(全文视为一个段落)",
)