Skip to content

Commit c2c2984

Browse files
committed
docs: update README and add configuration manuals
1 parent 58537dd commit c2c2984

File tree

4 files changed

+149
-6
lines changed

4 files changed

+149
-6
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,19 @@ ChatGPT 向我们展示了 GPT 模型的伟大之处,所以我使用 OpenAI
5151
2. 下载此插件: [openai-translator.bobplugin](https://github.com/yetone/bob-plugin-openai-translator/releases/latest)
5252

5353
3. 安装此插件:
54-
![安装步骤](https://user-images.githubusercontent.com/1206493/219937302-6be8d362-1520-4906-b8d6-284d01012837.gif)
54+
55+
![安装步骤](https://user-images.githubusercontent.com/1206493/219937302-6be8d362-1520-4906-b8d6-284d01012837.gif)
5556

5657
4.[OpenAI](https://platform.openai.com/account/api-keys) 获取你的 API KEY
5758

5859
5. 把 API KEY 填入 Bob 偏好设置 > 服务 > 此插件配置界面的 API KEY 的输入框中
59-
![设置步骤](https://user-images.githubusercontent.com/1206493/219937398-8e5bb8d2-7dc8-404a-96e7-a937e08c939f.gif)
60+
- 如果你想了解关于其他设置的更多信息,请查看[配置手册](./docs/configuration_manual_CN.md)
61+
62+
![设置步骤](https://user-images.githubusercontent.com/1206493/219937398-8e5bb8d2-7dc8-404a-96e7-a937e08c939f.gif)
6063

6164
6. 安装 [PopClip](https://bobtranslate.com/guide/integration/popclip.html) 实现划词后鼠标附近出现悬浮图标
62-
![PopClip](https://user-images.githubusercontent.com/1206493/219933584-d0c2b6cf-8fa0-40a6-858f-8f4bf05f38ef.gif)
65+
66+
![PopClip](https://user-images.githubusercontent.com/1206493/219933584-d0c2b6cf-8fa0-40a6-858f-8f4bf05f38ef.gif)
6367

6468

6569
## 贡献

docs/README_EN.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,20 @@ To use the ChatGPT API, go to Bob's settings page and change the plugin model to
5353
2. Download this plugin: [openai-translator.bobplugin](https://github.com/yetone/bob-plugin-openai-translator/releases/latest)
5454

5555
3. Install this plugin:
56-
![Installation Steps](https://user-images.githubusercontent.com/1206493/219937302-6be8d362-1520-4906-b8d6-284d01012837.gif)
56+
57+
![Installation Steps](https://user-images.githubusercontent.com/1206493/219937302-6be8d362-1520-4906-b8d6-284d01012837.gif)
5758

5859
4. Get your API KEY from [OpenAI](https://platform.openai.com/account/api-keys)
5960

6061
5. Enter the API KEY in Bob Preferences > Services > This plugin configuration interface's API KEY input box:
61-
![Settings Steps](https://user-images.githubusercontent.com/1206493/219937398-8e5bb8d2-7dc8-404a-96e7-a937e08c939f.gif)
62+
- If you would like to learn more about other settings, please refer to the [Configuration Manual](./docs/configuration_manual_EN.md)
63+
64+
![Settings Steps](https://user-images.githubusercontent.com/1206493/219937398-8e5bb8d2-7dc8-404a-96e7-a937e08c939f.gif)
65+
6266

6367
6. Install [PopClip](https://bobtranslate.com/guide/integration/popclip.html) for highlighted text mouse proximity floating icon:
64-
![PopClip](https://user-images.githubusercontent.com/1206493/219933584-d0c2b6cf-8fa0-40a6-858f-8f4bf05f38ef.gif)
68+
69+
![PopClip](https://user-images.githubusercontent.com/1206493/219933584-d0c2b6cf-8fa0-40a6-858f-8f4bf05f38ef.gif)
6570

6671
## Contributing
6772

docs/configuration_manual_CN.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
## 配置手册
2+
3+
### 服务名称
4+
5+
- 可选项
6+
- 默认值: OpenAl Translator
7+
8+
### API URL
9+
10+
- 可选项
11+
- 默认值: `https://api.openai.com`
12+
13+
### Dep. Name
14+
15+
- 可选项
16+
- 默认值: 无
17+
- 说明
18+
- 当使用 Azure OpenAI Service 服务时,需要填写此项,具体步骤可参阅 [Azure OpenAI 翻译设置](https://bobtranslate.com/service/translate/azureopenai.html)
19+
- [🔗 Azure OpenAI Service 官方文档](https://learn.microsoft.com/zh-cn/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line&pivots=rest-api)
20+
21+
### API Version
22+
23+
- 可选项
24+
- 默认值: 无
25+
- 说明
26+
- 当使用 Azure OpenAI Service 服务时,需要填写此项,具体步骤可参阅 [Azure OpenAI 翻译设置](https://bobtranslate.com/service/translate/azureopenai.html)
27+
- [🔗 Azure OpenAI Service 官方文档](https://learn.microsoft.com/zh-cn/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line&pivots=rest-api)
28+
29+
### API KEY
30+
31+
- 必填项
32+
- 默认值: 无
33+
- 说明
34+
- 可使用英文逗号分割多个账号下不同的 API KEY 以实现额度加倍及负载均衡
35+
36+
### 模型
37+
38+
- 必选项
39+
- 默认值: `gpt-3.5-turbo-1106`
40+
- 说明
41+
- 选择 `custom` 时,需要设置 `自定义模型` 配置项
42+
43+
### 自定义模型
44+
45+
- 可选项
46+
- 默认值: `gpt-3.5-turbo`
47+
- 说明
48+
- 联动项,当 `模型` 配置选择 `custom` 时,会读取此配置项设置的模型
49+
50+
### 系统指令
51+
52+
- 可选项
53+
- 默认值: `You are a translation engine that can only translate text and cannot interpret it.`
54+
- 说明
55+
- 自定义 System Prompt,填写则会覆盖默认的 System Prompt
56+
- 自定义 Prompt可使用以下变量:
57+
1. `$text`:需要翻译的文本,即翻译窗口输入框内的文本
58+
2. `$sourceLang`:-原文语言, 即翻译窗口输入框内文本的语言,比如「简体中文」
59+
3. `$targetLang`:目标语言,即需要翻译成的语言,可以在翻译窗口中手动选择或自动检测,比如「English」
60+
61+
### 用户指令
62+
63+
- 可选项
64+
- 默认值: `translate from $sourceLang to $targetLang:/n/n $text`
65+
- 说明
66+
- 自定义 User Prompt,填写则会覆盖默认的 User Prompt
67+
- 可以使用与系统指令中相同的变量

docs/configuration_manual_EN.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
## Configuration Manual
2+
3+
### Service Name
4+
5+
- Optional
6+
- Default value: OpenAI Translator
7+
8+
### API URL
9+
10+
- Optional
11+
- Default value: `https://api.openai.com`
12+
13+
### Dep. Name
14+
15+
- Optional
16+
- Default value: None
17+
- Description
18+
- This field must be filled in when using the Azure OpenAI Service, for specific steps, please refer to [Azure OpenAI Translation Settings](https://bobtranslate.com/service/translate/azureopenai.html)
19+
- [🔗 Official Azure OpenAI Service Documentation](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line&pivots=rest-api)
20+
21+
### API Version
22+
23+
- Optional
24+
- Default value: None
25+
- Description
26+
- This field must be filled in when using the Azure OpenAI Service, for specific steps, please refer to [Azure OpenAI Translation Settings](https://bobtranslate.com/service/translate/azureopenai.html)
27+
- [🔗 Official Azure OpenAI Service Documentation](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line&pivots=rest-api)
28+
29+
### API KEY
30+
31+
- Mandatory
32+
- Default value: None
33+
- Description
34+
- Multiple API KEYS under different accounts can be separated by commas to achieve quota doubling and load balancing
35+
36+
### Model
37+
38+
- Mandatory
39+
- Default value: `gpt-3.5-turbo-1106`
40+
- Description
41+
- When selecting `custom`, the `Custom Model` configuration item needs to be set
42+
43+
### Custom Model
44+
45+
- Optional
46+
- Default value: `gpt-3.5-turbo`
47+
- Description
48+
- A linked item, when the `Model` configuration selects `custom`, this configuration item's model will be read
49+
50+
### System Prompt
51+
52+
- Optional
53+
- Default value: `You are a translation engine that can only translate text and cannot interpret it.`
54+
- Description
55+
- Customize System Prompt, filling this will override the default System Prompt
56+
- Custom Prompt can use the following variables:
57+
1. `$text`: the text to be translated, i.e., the text in the translation window input box
58+
2. `$sourceLang`: the source language, i.e., the language of the text in the translation window input box, such as "Simplified Chinese"
59+
3. `$targetLang`: the target language, i.e., the language into which the text is to be translated, which can be manually selected or automatically detected in the translation window, such as "English"
60+
61+
### User Prompt
62+
63+
- Optional
64+
- Default value: `translate from $sourceLang to $targetLang:/n/n $text`
65+
- Description
66+
- Customize User Prompt, filling this will override the default User Prompt
67+
- Can use the same variables as in the system command

0 commit comments

Comments
 (0)