LLMjs - KubeJS LLM Integration Mod
A KubeJS addon for Minecraft 1.20.1 Forge that provides seamless integration with Large Language Models (LLMs) using OpenAI-compatible APIs.
Features
- 🤖 OpenAI Compatible: Works with OpenAI, Claude, local models, and other OpenAI-compatible APIs
- ⚙️ Live Configuration: Modify API settings without restarting the game
- 🔄 Async Support: Non-blocking API calls to prevent game lag
- 💬 Multi-turn Conversations: Support for conversation history
- 📊 Detailed Responses: Access to token usage and response metadata
For Example:
PlayerEvents.chat(event => {
if (event.message.startsWith("!ai ")) {
let userPrompt = event.message.substring(4);
let systemPrompt = "You are a helpful Minecraft assistant. Keep responses concise and friendly.";
let response = LLM.chat(userPrompt, systemPrompt);
event.server.tell(Text.of("§bAI: §f" + response));
event.cancel();
}
});

