供text-generation-webui使用的插件,为其提供多种翻译器支持。
- 根据你使用的操作系统双击对应的批处理文件
cmd_xxx.bat。 - 输入
pip install --upgrade translators,然后按Enter键来安装这个插件的依赖。
3. 把这个代码仓库下载到你text-generation-webui的插件文件夹。你可以通过以下方式之一来完成:
①. 手动下载zip压缩包
3.1. 点击3.2. 然后点击
以下载zip压缩包3.3. 之后把
more_translators-main.zip解压到你的extensions文件夹,并将其重命名为more_translators。之后,你的文件结构应该像这样:
text-generation-webui
├─extensions
│ ├─more_translators
│ │ │ script.py
... ...
②. 使用Git
3.1. 确保你已经正确安装Git,并且确保你的Git代理设置能让你的Git连接到Github3.2. 在步骤一打开的命令行窗口中,输入
cd extensions并按下Enter键3.3. 随后输入
git clone https://github.com/Touch-Night/more_translators.git并按下Enter键。之后,你的文件结构应该像这样:
text-generation-webui
├─extensions
│ ├─more_translators
│ │ │ script.py
... ...
- 如果你正确地启动了这个插件,那么你将可以在
Chat、Default、Notebook下看到新增了如下面板:
- 这个插件在
☑ 启用翻译勾选上时才会起作用。 - 它在
to-from模式下,会使用你选择的翻译器将你的输入从用户语言翻译成LLM的语言之后再提交给模型,并把模型生成的结果从LLM的语言翻译成用户语言之后再输出给你。 - 而在
to模式下,它就只会翻译你的输入,不翻译模型输出;在from模式下,只翻译模型输出,不翻译你的输入。 - 设置项
插件语言是指这个插件界面的显示语言,不对输入输出造成影响。内容由文件i18n.csv控制。 - 如果你发现某个
翻译器不起作用,可以在translators模块的仓库的Issues一栏中查找该问题是否已被报告,并在没有人报告此翻译器问题时提交Issue
Extension for text-generation-webui, added a lot more translators.
- Double click
cmd_xxx.bat. - Type
pip install --upgrade translatorsand then press Enter to install dependency for this extension.
3. Download this repo to your webui extension folder. You can do that by either:
①. Download zip mannually
3.1. Click3.2. Then click
to download this repository3.3. And then extract
more_translators-main.zip to your extensions folder, rename more_translators-main folder to more_translators. After that, your file structure should be like:
text-generation-webui
├─extensions
│ ├─more_translators
│ │ │ script.py
... ...
②. Git
3.1. Make sure you have installed Git, and have set the proxy correctly if your connection to GitHub is blocked by local government3.2. In the terminal opened in step 1, type
cd extensions and then press Enter3.3. Type
git clone https://github.com/Touch-Night/more_translators.git and then press Enter. After that, your file structure should be like:
text-generation-webui
├─extensions
│ ├─more_translators
│ │ │ script.py
... ...
- If you applied this extension correctly, you should see this block is added in
Chat,DefaultandNotebooktabs:
- More_translators will take effect only when
☑ Activateis checked. - In
to-frommode, it will translate both your input fromUser's languagetoLLM's languageusing theTranslatorselected, and LLM's output fromLLM's languagetoUser's language. - In
tomode, it will only translate your input, and infrommode, it will only translate LLM's output. Plugin's languagerefers to the language of this plugin's UI, all the contents is ini18n.csv.- If you found a
Translatoris not working, you can search for similar issue in translators's Issues page, and submit new issue if there's no similar issues.
