Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用AI进行全文翻译时,建议一次性提交多段文本,对返回的结果通过标记的方式进行段落匹配 #2197

Open
ziofat opened this issue Feb 5, 2025 · 1 comment

Comments

@ziofat
Copy link

ziofat commented Feb 5, 2025

没有这个功能(改进)的时候,你遇到了什么问题?
1、全文翻译时,存在多个段落之间的翻译不太匹配的情况
2、全文翻译时,并发数较大,容易触发服务商限制(如 Gemini 1.5 Flash 免费的调用限制是 15 次每分钟)

你想要如何解决你的问题?
AI 翻译时,可一次性提交多个段落,通过提示词要求模型返回特定格式的翻译,使插件能够将返回的段落重新匹配到原文中。
这样做的好处是,能通过上下文提高翻译的准确性,同时减少请求数,避免触发限制。
相应的翻译速度可能会变慢,建议支持自定义并发数。

更智能一点的,可以分析多个段落的字数,例如比较短的(导航类)可以批量提交,长的就单独提交,也能显著降低请求数。

@kingofotaku
Copy link

附议,我个人日常用于翻译的提示词比较长,当前都只能另搞一个模型填简单的提示词来做网页全文翻译,否则根本不划算。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants