Skip to content

翻译引擎配置

流畅阅读支持多种翻译引擎,包括传统机器翻译和大语言模型。本文将介绍各个翻译引擎的配置方法。

支持的翻译引擎

免费服务

  • Microsoft 翻译:免费且无需配置,开箱即用,支持多种语言互译
  • Google 翻译:免费且无需配置,支持多种语言,国内暂不支持使用
  • DeepL (免费版):每月 50 万字符免费额度,开发者平台
  • 小牛翻译API 文档

AI 大模型

配置示例:以 DeepSeek 为例

模型选择

1. 获取 API Key

  1. 访问 DeepSeek 开发者中心
  2. 注册/登录账号
  3. 进入 API Keys 页面创建密钥
  4. 复制生成的 API Key
DeepSeek API Key

2. 配置插件

  1. 点击浏览器工具栏中的流畅阅读图标
  2. 点击设置图标,进入设置页面
  3. 选择 "翻译引擎" 选项卡
  4. 在引擎列表中选择 "DeepSeek"
  5. 选择 deepseek-chat 模型,并填入配置信息
点击流畅阅读图标

4. 使用效果

原文:

text
The quantum computer performs operations on qubits, which can exist in multiple states simultaneously due to quantum superposition.

翻译结果:

text
量子计算机对量子比特进行操作,由于量子叠加原理,这些量子比特可以同时存在于多个状态。

5. 高级选项

高级选项

代理配置

如果你所在的网络环境无法直接访问某些 AI 服务,可以配置代理服务器。一般情况下无需配置此项。

提示词配置

大语言模型的翻译效果很大程度上取决于提示词(Prompt)的设置。流畅阅读提供了默认的提示词配置:

系统提示词(System Prompt)
text
You are a professional, authentic machine translation engine.
You only return the translated text, without any explanations.

这个提示词告诉模型:

  • 扮演专业的机器翻译引擎
  • 只返回翻译结果
  • 不添加任何解释或额外信息
用户提示词(User Prompt)
Translate the following text into {to}, 
output translation text directly without any extra information:

{{origin}}

其中:

text
{{to}} 表示目标语言
{{origin}} 表示原文内容

两者不可或缺。

自定义提示词

你可以根据需要自定义提示词,以获得不同的翻译效果:

  1. 更正式的翻译
text
You are a professional translator specializing in formal documentation.
Translate with accuracy and maintain professional terminology.
  1. 更口语化的翻译
text
You are a translator focusing on natural, conversational language.
Translate into casual, everyday speech.
  1. 技术文档翻译
text
You are a technical documentation translator.
Maintain precise technical terms and professional standards.

提示

  1. 修改提示词时请保持简洁明确
  2. 避免添加过多限制条件
  3. 确保提示词与目标语言相匹配

下一步

基于 GPL-3.0 许可发布