描述
这款基于当前最新 Minecraft 版本 1.20.6 开发的 Spigot 插件,利用 Ollama 和 Ollama4j 打破你服务器上的语言障碍。无论玩家使用英语、西班牙语还是其他任何语言,他们都能轻松互动,从而营造更良好的社区与环境。
Java 版本
从现在起,对于 Minecraft 1.21 及更高版本的 Minecraft/Spigot 等,请使用 Java 21!
功能
- 对所有玩家消息(长度超过五个字符)进行“实时”翻译。
- 鼠标悬停在所有翻译后的消息上时,会显示原始消息。
- 可配置的设置项。
- 与 Ollama API 轻松集成。
- (目前仅)支持本地托管翻译模型。
- 快速设置与最小化配置。
安装步骤
要设置 Ollama Translator 插件,请按照以下步骤操作:
-
安装 Ollama:Ollama 是实现翻译功能所必需的。请访问 Ollama GitHub 页面 在你的服务器上下载并安装 Ollama。
-
拉取模型:安装完 Ollama 后,拉取一个翻译模型,例如 Mistral 或 LLAMA2/3。请遵循 Ollama 提供的说明以下载和配置所需的模型。
-
启动 Ollama 应用:确保 Ollama 应用程序正在你的服务器上运行。检查 API 是否可以通过插件配置的 options.yml 文件中指定的地址访问。
-
配置插件:根据你的偏好和服务器设置,配置 Ollama Translator 插件的 options.yml 文件。
-
重启/重载服务器:重启或重载你的 Spigot Minecraft 服务器以应用更改。
-
开始翻译:设置完成后,插件将根据配置的设置自动翻译玩家消息。
插件配置
在部署插件之前,请确保在 options.yml 文件中配置以下参数:
donottouch:
configexists: true
ollama:
secondstimeout: 20
modelname: llama3:8b-instruct-q6_K
apiaddress: http://localhost:11434/
cooldown:
enabled: true
milliseconds: 1000
message: §c请稍等...
translation:
canceloriginalmessage: true
notify: true
cancelmessage: §7您的消息正在翻译中,请稍候...
targetlanguage: english
broadcastmessage: '§r%PLAYER% §r: §r§b%TRANSLATION%'
使用方法
- 启动 ollama 并下载所选模型
- 将插件安装到 Spigot Minecraft 服务器的 plugins 目录中。
- 根据你的偏好配置
options.yml 文件。
- 重启/重载服务器以应用更改。
- 玩家的消息现在将根据配置的设置自动翻译。
注意事项
- 所有消息(长度超过五个字符)都会被翻译,包括母语消息,因此该插件真正适用于拥有多语言混合玩家群体的服务器。
- 模型越大,效果越好。Mistral 表现非常出色,但有时行为怪异;llama3:8b-instruct-q6_K 表现也很好,但仍不够完美。
- 请注意,LLM/SLM 需要(大量)内存,小型模型至少需要 5-8 GB,中型模型则需要 15-30 GB 或更多。
- 如果例如 llama3:8b-instruct-q6_K 能产生良好的效果,你就不需要一个 30GB(文件大小)的模型。我测试过 mistral 和 llama3,请自行测试。
对其他加载器的支持
Description
This Spigot Minecraft plugin, built with the currently newest Minecraft version 1.20.6, uses Ollama and Ollama4j to break language barriers on your Minecraft server. Whether players speak English, Spanish, or any other language, they can interact effortlessly, creating a better community and environment.
Java version
From now on with minecraft 1.21 minecraft/spigot etc. use Java 21!
Features
- "Real-time" translation of all player messages (all messages longer than five characters).
- All translated messages show the original message when hovering over them.
- Configurable settings.
- Easy integration with Ollama API.
- (ONLY) Support for local hosting of translation models (for now).
- Quick setup and minimal configuration.
Setup
To set up the Ollama Translator plugin, follow these steps:
-
Install Ollama: Ollama is required for translation functionality. Visit Ollama GitHub page to download and install Ollama on your server.
-
Pull a Model: After installing Ollama, pull a translation model such as Mistral or LLAMA2/3. Make sure to follow the instructions provided with Ollama to download and configure the desired model.
-
Start Ollama Application: Ensure that the Ollama application is running on your server. Check that the API is reachable under the address specified in the options.yml file configured for the plugin.
-
Configure Plugin: Configure the options.yml file for the Ollama Translator plugin according to your preferences and server setup.
-
Restart/Reload Server: Restart or reload your Spigot Minecraft server to apply the changes.
-
Start Translating: Once the setup is complete, the plugin will automatically translate player messages as per the configured settings.
Plugin Configuration
Before deploying the plugin, ensure you configure the following parameters in the options.yml file:
donottouch:
configexists: true
ollama:
secondstimeout: 20
modelname: llama3:8b-instruct-q6_K
apiaddress: http://localhost:11434/
cooldown:
enabled: true
milliseconds: 1000
message: §cPlease wait...
translation:
canceloriginalmessage: true
notify: true
cancelmessage: §7Your message is being translated, please wait...
targetlanguage: english
broadcastmessage: '§r%PLAYER% §r: §r§b%TRANSLATION%'
Usage
- Start ollama and download the model of choice
- Install the plugin in your Spigot Minecraft server's plugins directory.
- Configure the
options.yml file according to your preferences.
- Restart/Reload the server to apply the changes.
- Players' messages will now be automatically translated as per the configured settings.
Note
- ALL messages (longer than five characters) are translated, also native ones, so this plugin is really only for servers with a mixed-language player-base.
- The bigger the model the better the outcome, mistral showed to be very good but sometimes it is acting weird, llama3:8b-instruct-q6_K was very good but still not perfect.
- Please note that LLM/SLM require (a significant amount of) memory, with a minimum of 5-8 GB for small and 15-30 GB for middle-sized models or even more.
- You don't need a 30gb (file size) model if e.g. llama3:8b-instruct-q6_K produces a good outcome then it is alright, I tested mistral and llama3 so test it yourself.
Support for other loaders
- Support for other loaders will follow in the future as needed
评论 0
登录后参与评分
还没有评论,来抢沙发吧