✨ LLMCraft ✨ [1.12-1.20.6] [Make AI-powered NPCs talk] icon

✨ LLMCraft ✨ [1.12-1.20.6] [Make AI-powered NPCs talk] -----

Add your favourite characters to your server !




upload_2024-12-8_12-46-13.png
Add your own AI to your server!

Supports 1.12 - 1.20.6 servers
Can hook with Luckperms, Citizens, DecentHolograms



craftt.gif

upload_2024-12-8_12-35-14.png


LLMCraft helps you to easily integrate diverse LLM models into your server. You can configure model's parameters from the system prompt (how it will act) to the finest details such as temperature or frequency-penalty.

If you're using Citizens, you can add your models to NPC's so that players are able to speak with them in game.

Each model in your config.yml is a "Model Type" that can be instanced in any number of different "Models" in-game; so you can have the same character multiple times, with different memory/context !



The plugins uses LangChain4J library for making API requests.

Features
  • Multiple API providers (Anthropic, OpenAI...)
  • Fine-configure your models
  • Embed models into Citizens NPC
  • Generate answers token per token into a DecentHolograms
  • Individuals or shared conversations, with or without memory
Installation
  1. Upload the jar to your plugins' folder and restart your server
  2. Config your API-keys and your models/NPCs
  3. Reload the plugin using /llmcraft reload
  4. Enjoy !
Commands
  • /llmcraft : shows the plugin's help page
  • /ask <model> <prompt> : Chat with a model
  • /instance <model type> <identifier> : creates a new instance of a model
  • /model <model> : get info on a model
Configuration:

Model Configuration:

Here's an example of 2 models in the config :

Code (YAML):

models
:
  helper
:
    provider
: openai
    model-name
: gpt-3.5-turbo
    visibility
: private
    persistent
: true
    prefix
: "§6§lHelper >§e§l "
    system-prompt
: "You are a Minecraft assistant, design to help the players with anything minecraft-related."
  crazy-guy
:
    provider
: openai
    visibility
: shared
    persistent
: true
    prefix
: "§6§lCrazy Guy >§e"
    system-prompt
: "You are a completely insane medieval peasant, who likes to prank, joke, taunt etc."
    temperature
: 0.2
    max-tokens
: 400
    frequency-penalty
: 2
    time-out
: 60
 


NPC Configuration :

You can then if you want add a NPC configuration:
Shared NPC speak with everyone in their range and will remember what previous people said, where personal one will remember separately their conversations with players.

Code (YAML):

npcs
:

  guard
:
    citizen-id
: 0
    model
: city-guard
    type
: shared
    talking
: chat
    range
: 10
  helper
:
    citizen-id
: 3
    model
: basicgpt
    type
: personal
    talking
: hologramdzdz
    range
: 15

Limits Configuration :

As each request cost you money, you have to be able to limit players' usage of the API. You can do so with limiters:


Code (YAML):
usage-limits:
  king
:
    deny-message
: "I'm busy right now, sorry."
    groups
:
      default
: 3
      vip
: 5
      super-vip
: 10
  city-guard
:
    deny-message
: "You can not enter this castle."
    groups
:
      default
: 3
You need LuckPerms on your server to use this functionality. Usages are reset each time the plugin is reloaded (so basically, everytime your server restart).



Commands
  • /llmcraft : shows the plugin's help page
  • /modeltypes, /modeltype : see available model types
  • /modeltype <model type> : see information on given model type
  • /model, /models : see available instanced models
  • /model <model name> : see information on a model
  • /instance <model type> : create a new model based on given model type
  • /ask <model> <prompt> : chat with given model


FAQ
  • Why is the plugin so heavy?
The plugin uses the Langchain4J library, I shaded it into the plugin. You can build it from source without it from github if needed.

LLMCraft is under GPL-3.0 license. Feel free to do everything you want with the source code. Please, consider contributing to the project, a lot can be improved !

Resource Information
Author:
----------
Total Downloads: 210
First Release: Jun 9, 2024
Last Update: Dec 8, 2024
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings