提供强制json输出的选项

This commit is contained in:
xunbu
2025-11-09 22:28:38 +08:00
parent b68fbf5b7f
commit 9af1f7198d
12 changed files with 101 additions and 78 deletions

View File

@@ -129,7 +129,7 @@ class DocxTranslator(AiTranslator):
api_key=config.api_key, model_id=config.model_id, temperature=config.temperature,
thinking=config.thinking, concurrent=config.concurrent, timeout=config.timeout,
logger=self.logger, glossary_dict=config.glossary_dict, retry=config.retry,
system_proxy_enable=config.system_proxy_enable
system_proxy_enable=config.system_proxy_enable,json_format=config.force_json
)
self.translate_agent = SegmentsTranslateAgent(agent_config)
self.insert_mode = config.insert_mode