LLM Connect

Connecting to various text2text ai models (llm) using the OpenAI compatible API endpoint

Work in Progress Chat / Commands Complex installation

Download (8 KB)

How do I install this?

NOTE!! 🔗

You must add secure.http_mods = llm_connect to your minetest.conf file for the mod to work correctly.

About LLM Connect 🔗

This mod allows players to interact with a Large Language Model (LLM) directly within the Minetest chat. It sends the player's chat message along with relevant in-game context (server info, installed mods, and available materials) to a remote API endpoint. This enables the LLM to provide highly specific and helpful answers, for example, on how to craft items or where to find certain materials in the game.

Features 🔗

  • In-game AI Chat: Use a simple chat command to send prompts to the LLM.
  • Context-Aware: Automatically includes crucial server and material data in the prompts.
  • Configurable: API key, endpoint URL, and model can be set via chat commands.
  • Conversation History: Maintains a short-term conversation history for more relevant responses.

Usage 🔗

  1. Get an API Key: Obtain an API key from a supported service.
  2. Set the Endpoint: Use the /llm_setkey <key> [url] [model] command in the game chat to configure the API.
  3. Chat with the AI: Use /llm <prompt> to start a conversation.

Supported API Endpoints 🔗

This mod has been successfully tested with the following APIs:

Please note that this mod might have issues with some self-hosted backends like Ollama and LocalAI, as they may not correctly handle the floating-point numbers in the API requests and return errors.

Call for Contributors 🔗

This mod was created with the help of AI and is currently in its early stages. I am not an experienced programmer, and my primary goal is to make the mod known and have more experienced developers contribute to its further development. If you are a programmer and would like to help improve this mod, your contributions are highly welcome!

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.