
Locrow AI is a local AI library mod made to bring AI utilities from Python into a Java environment.
This library is currently in a minimal release state and may not be supported on your machine.
Beware of bugs.
Since Locrow AI hosts all AI utilities locally, it is forever free! Long gone are the dependencies on costly API services like OpenAI. Now, as long as you have a GPU, you can run complex AI models akin to ChatGPT, natural text-to-speech engines, and voice conversion models, all to bring more life to your mod at zero monetary cost to your users.
Windows Security Pop-Up
With Locrow AI 0.2.1, a Windows Security pop-up now asks you to allow it to access the network. Minimal testing shows that clicking Allow or Cancel makes no difference.
Supported Systems
The following is a list of all systems this mod supports. Attempting to use this mod on an unsupported system may result in unavoidable crashes. We are working fast to introduce support for more systems.
- Windows computers with NVIDIA GPUs
- More will be introduced in the coming days and weeks
Running on Unsupported Servers
With Locrow AI 0.2.0, client offloading allows for usage on any server, as long as a player is online who is on a supported version. To enable this feature, adjust the server config toml according to your setup. See the changelog for Locrow AI 0.2.0 for details.
AI Features
The following features are currently available:
- A lightweight LLM like ChatGPT with chat capabilities
- A natural text-to-speech engine with a small selection of voices
- An RVC (voice conversion) model to convert voices to villager voices
- Java API access
- JSON API access
Future Expansions
The following is a list of every planned addition:
- Support for Linux systems with an NVIDIA GPU
- Support for Windows and Linux systems with a non-NVIDIA GPU
- Support for systems without a GPU
- Support for Mac systems
- Official Documentation
- Official support for model and voice packs
- Migration of packaged models to model packs
- Official support for custom code injections into the AI environment
Questions
When will you support my system?
I am prioritizing more commonly used systems when adding support. If your system is not yet supported, please contact me so it can be pushed up the priority list.
What if my system is unsupported and I want to use a mod that depends on this?
This mod is server-side only, so as long as you are not hosting the Minecraft world/server, you are safely able to disable this mod until it is supported.
How do I use this library in my mod?
I currently do not have documentation available for reference, but below is an example usage from my Villager AI mod:
ScriptBuilder scriptBuilder = new ScriptBuilder();
scriptBuilder.then(new FunctionBuilder("/llm/chat")
.feed("temperature", 0.7)
.feed("messages", List.of(Map.of("role", "user", "content", "How are you?")))
.feedReturn("content", "text")
.passReturn("content", "script"))
.then(new FunctionBuilder("/tts")
.feed("voice", "am_puck")
.feed("speed", 1.1)
.feedReturn("audio", "audio")
.pass("script"))
.then(new FunctionBuilder("/rvc/infer")
.feed("model", "villager")
.feedReturn("audio", "audio")
.feedReturn("samplerate", "original_sr")
.pass("script"))
.then(new FunctionBuilder("/audio/resample")
.feed("target_sr", 48000)
.feedReturn("audio", "audio")
.pass("script"))
.then(new FunctionBuilder("/audio/pcm_convert")
.feedReturn("audio", "bytes")
.pass("script"))
.then(new FunctionBuilder("/json_serializer/bytes"))
.returns("base64")
.returns("script");
Script script = scriptBuilder.build();
System.out.println(script.getJsonBlueprint());
script.execute(results -> {
System.out.println(results.get("script").getAsString());
});
Known Issues
- The Python environment does not close if the Minecraft server is not closed gracefully.