沉浸式翻译插件的进阶玩法——使用人工智能(ChatGPT)自动转换单位

在使用沉浸式翻译插件的时候,有时候会遇到计量单位转换的问题。

例如:英国和美国经常使用英尺(feet)和磅(pounds)作为长度和重量的单位,我们使用的是使用厘米和千克。

这让我们在阅读时,需要手动把单位换算成公制单位,造成思路被打断。

这时,我们可以使用沉浸式翻译的自定义ChatGPT提示功能,让它翻译的时候,自动把单位转换为中国的单位。

效果示例:

会把6英尺自动转换为183厘米。

把磅自动转换为公斤。

操作步骤:

1.注册

点击网址,然后点击个人中心

https://immersivetranslate.com/?via=yesaiwen

用邮箱注册或登录

2.安装免费的谷歌插件

点击网址:

https://immersivetranslate.com/?via=yesaiwen

选择相应的浏览器插件。 我这里以谷歌插件为例。

直接单击“添加至Chrome”即可安装。

安装成功后,标签栏会出现图标:

3. 连接ChatGPT的接口

接口一般又称为API。

API就像乐高积木的接口。 不同的乐高积木可以通过接口连接在一起,从而搭建出各种各样的玩具。同样,不同的软件可以通过API进行连接,从而实现各种各样的功能。

有2种方式连接ChatGPT的接口。 一种是直接购买沉浸式翻译的会员(可免费试用一天),一种是试用官方的接口。

3.1 购买沉浸式翻译会员

适合经常使用的人

可以免费试用一天。

特别注意:用支付宝试用的时候,要记得在支付宝里,及时取消自动扣费

开通后,可以立即使用ChatGPT翻译(openai)

3.2 使用ChatGPT的官方接口

适合偶尔使用一下的人

参考教程: http://yesaiwen.com/chatgpt-api-4-example/

获取ChatGPT的官方接口:

4.自定义设置提示词

修改openai的提示词

二者任选一个:

修改提示词:

(本文最后面,有我写的提示词,仅供参考)

5.使用

需要翻译的时候,服务商选择“openai”,就可以使用ChatGPT翻译了。

6.附录:我的提示词(仅供参考):

System Prompt:


You are a professional translation engine focused on delivering concise and precise translations. Please return the translated text directly, avoiding any redundancies or unnecessary expansions. Specifically, convert units from feet to centimeters, pounds to kilograms, and Fahrenheit to Celsius to align with common usage in China, while striving to maintain the brevity of the original text.

Prompt:


Please translate into {{to}} (avoid explaining the original text):

{{text}}

Specifically, convert units from feet to centimeters, pounds to kilograms, and Fahrenheit to Celsius to align with common usage in China, while striving to maintain the brevity of the original text.

Multiple Prompt:

Translate all {{imt_source_field}} field in the YAML-formatted text below into {{to}}, and write the translation result in the {{imt_trans_field}} field.
Specifically, convert units from feet to centimeters, pounds to kilograms, and Fahrenheit to Celsius to align with common usage in China, while striving to maintain the brevity of the original text.

Example request:
  - id: 1
    {{imt_source_field}}: Source
Example result:
  - id: 1
    {{imt_trans_field}}: Translation

Start:

{{yaml}}

7.常见错误

1. 额度不够

明明openai的账号里,有余额。但是在沉浸式翻译里,调用的时候,却报错:额度不够。

解决方法:随便更换一下模型,然后再点击测试,就会测试成功。

原因分析:可能是系统缓存的原因。 更换一下模型,更新数据,然后就验证成功(我自己瞎猜的原因)

全站侧栏

近期文章

发表评论