供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 translators
and 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 repository
3.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
,Default
andNotebook
tabs: - More_translators will take effect only when
☑ Activate
is checked. - In
to-from
mode, it will translate both your input fromUser's language
toLLM's language
using theTranslator
selected, and LLM's output fromLLM's language
toUser's language
. - In
to
mode, it will only translate your input, and infrom
mode, it will only translate LLM's output. Plugin's language
refers to the language of this plugin's UI, all the contents is ini18n.csv
.- If you found a
Translator
is not working, you can search for similar issue in translators's Issues page, and submit new issue if there's no similar issues.