在沉浸式翻译中使用 oairoute
- 浏览器扩展,对照翻译网页
- 支持自定义 AI 翻译服务
- 用大模型翻译,长句与专业术语比传统机翻更通顺
第一步:获取 API Key
在 OAIRoute 控制台 创建。
Create one in the OAIRoute console.
第二步:添加自定义翻译服务
打开沉浸式翻译扩展的设置,进入 翻译服务,点 添加自定义翻译服务:
自定义,例如 OAIRoute。
https://api.oairoute.com/v1/chat/completions
注意这里要填完整端点,不是 base URL。
你的 OAIRoute Key。
建议选便宜且速度快的模型,例如 gpt-4o-mini。
使用扩展内置的翻译提示词即可。需要特定风格时再改。
Open the Immersive Translate extension settings, go to Translation services, and click Add custom translation service:
Any name, e.g. OAIRoute.
https://api.oairoute.com/v1/chat/completions
Note this must be the full endpoint, not a base URL.
Your OAIRoute key.
Pick a cheap, fast model, e.g. gpt-4o-mini.
The extension's built-in translation prompt works fine. Change it only if you need a specific style.
第三步:测试
在设置页点 测试服务,看到「验证成功」即可。之后打开任意英文网页,按快捷键触发翻译。
Click Test service on the settings page; "Verification successful" means you're set. Then open any English page and press the shortcut to translate.
模型选择建议
翻译是高频、短文本、强并发的场景,与对话场景的取舍不同:
| 关注点 | 建议 |
|---|---|
| 成本 | 选小模型,翻译不需要强推理 |
| 速度 | 小模型首 token 更快,翻译体验更好 |
| 质量 | 专业文档可切到大模型,日常网页小模型足够 |
| 并发 | 长网页会并发多次请求,注意限流 |
沉浸式翻译会把网页切成多个段落并发请求。一篇长文可能瞬间发出几十次调用。用按次计费的模型时成本会偏高,建议先翻译一篇试试。
Translation is high-frequency, short-text, high-concurrency work, so the trade-offs differ from chat:
| Concern | Recommendation |
|---|---|
| Cost | Use a small model; translation doesn't need strong reasoning |
| Speed | Small models reach the first token faster, which feels better |
| Quality | Switch to a large model for technical documents; a small one suffices for everyday pages |
| Concurrency | Long pages fire many requests at once; watch rate limits |
Immersive Translate splits a page into paragraphs and requests them concurrently. A long article can fire dozens of calls in an instant. With per-call pricing this gets expensive; translate one article as a trial first.
常见问题
测试服务失败
接口地址填成了 base URL。要填完整的 /v1/chat/completions。
翻译出来是原文
模型返回了拒绝或空内容。换一个指令遵循更好的模型。
翻译很慢
并发数设得太高导致限流。在扩展的「高级设置」里把并发调低。
术语翻错
在内置提示词里补充术语表,或换用更强的模型。
Test service fails
The endpoint was entered as a base URL. Enter the full /v1/chat/completions.
The output is the original text
The model returned a refusal or empty content. Switch to a model that follows instructions better.
Translation is slow
Concurrency is set too high and you're being rate limited. Lower it in the extension's Advanced settings.
Terms translated incorrectly
Add a glossary to the built-in prompt, or use a stronger model.