Данные могли устареть: источник временно недоступен, показан кэш.

AskChat
An AI chat assistant for servers. Players ask questions in chat with !ask <question> and a configurable AI persona ("Notch" by default) answers, optionally calling tools to fetch live information.
Supports three providers — Gemini (default), Ollama (local or cloud), and NVIDIA NIM — with agentic tool use for web search (Brave) and the Minecraft Wiki.
Examples
Features
- Chat-Based Interface: Ask questions and receive answers without leaving your Minecraft world.
- Configurable:
- Customize the AI's prompt to guide its responses.
- Change the bot's name in chat.
- Optionally broadcast both the question and the answer to the server.
- Lightweight: Designed to minimize impact on server performance.
Installation
- Drop the matching jar into your server's
plugins/directory. - Start the server once to generate
plugins/AiChatBuddy/config.yml. - Stop the server, edit
config.yml(see below), and start again — or edit live and run/aichat reload.
Configuration
Default config.yml:
provider: gemini # gemini | ollama | nvidia
bot-name: "Notch"
private-questions: false # true = whisper replies, false = broadcast
max-history: 8 # rolling per-player message history; 0 = stateless
agent-max-steps: 8 # max tool-calling iterations before forcing a best-effort answer
prompt-template: |
You are Notch — the ancient architect and silent overseer ...
(full Notch persona, see config.yml)
providers:
gemini:
api-key: ""
api-url: "https://generativelanguage.googleapis.com/v1beta/models/gemma-4-31b-it:generateContent"
temperature: 0.5
top-p: 0.99
ollama:
base-url: "http://localhost:11434" # or https://ollama.com for cloud
api-key: "" # cloud only
model: "gpt-oss:20b"
temperature: 0.7
nvidia:
base-url: "https://integrate.api.nvidia.com"
api-key: "" # must start with nvapi-
model: "meta/llama-3.3-70b-instruct"
temperature: 0.5
tools:
web-search:
enabled: true
api-key: "" # Brave Search API key; tool is hidden from the LLM if blank
max-results: 3
minecraft-wiki:
enabled: true
max-results: 3
You only need to fill in the api-keys for the provider(s) and tool(s) you want to use. Unconfigured providers/tools are simply skipped.
Getting API keys
Gemini (default, free tier available)
- Go to https://aistudio.google.com/apikey.
- Sign in with a Google account.
- Click Create API key.
- Copy the key (starts with
AIza…) intoproviders.gemini.api-key.
Switch models by editing providers.gemini.api-url — the URL contains the model name. Defaults to gemma-4-31b-it (function-calling capable, fast, free). Other good choices:
gemini-2.5-flash— fast, low-cost, strong tool use.gemini-2.5-pro— better quality, slower.gemma-4-26b-a4b-it— bigger context window, only ~4B active params per token.
Brave Search (for the web_search tool)
- Go to https://brave.com/search/api/.
- Click Get Started and sign up.
- Subscribe to the Free plan (1 query/sec, 2k queries/month).
- In the dashboard, create an API key under API Keys.
- Paste it into
tools.web-search.api-key. Leave blank to disable web search.
NVIDIA NIM (free tier)
- Go to https://build.nvidia.com/.
- Sign in with NVIDIA Developer credentials.
- Open any model (e.g. https://build.nvidia.com/meta/llama-3_3-70b-instruct).
- Click Get API Key in the top right.
- Copy the key (starts with
nvapi-) intoproviders.nvidia.api-key.
Recommended models for providers.nvidia.model:
meta/llama-3.3-70b-instruct(default)nvidia/llama-3.1-nemotron-70b-instructmistralai/mixtral-8x22b-instruct-v0.1
Ollama
You can run Ollama locally (free, private) or use Ollama cloud.
Local:
- Install Ollama from https://ollama.com/download.
- Pull a model that supports tool calls, e.g.
ollama pull llama3.1orollama pull qwen2.5. - In
config.yml:providers.ollama.base-url: "http://localhost:11434"providers.ollama.api-key: ""(not needed locally)providers.ollama.model: "llama3.1"(or whichever you pulled)
Cloud :
- Sign up at https://ollama.com/.
- Generate an API key under your account settings.
- In
config.yml:providers.ollama.base-url: "https://ollama.com"providers.ollama.api-key: "<your-key-key>"providers.ollama.model: "gpt-oss:20b"(orgpt-oss:120b,qwen3-coder:480b,deepseek-v3.1:671b,glm-4.7,kimi-k2.6, etc.)
Switch providers at any time by editing provider: and running /aichat reload.
Commands
| Command | Permission | Description |
|---|---|---|
!ask <question> |
aichatbuddy.ask (default: everyone) |
Ask the AI in chat. |
/aichat reload |
aichatbuddy.reload (default: op) |
Reload config.yml and clear in-memory history. |
/aichat forget |
aichatbuddy.forget.self (default: everyone) |
Clear your own conversation history. |
/aichat forget <player> |
aichatbuddy.forget.others (default: op) |
Clear another player's history. |
Usage
Type !ask followed by your question in the chat, e.g., !ask How do I make a crafting table?. The AI will respond with an answer.
Support & Feedback
If you have any questions, issues, or feature requests, please open an issue on GitHub.
Contributing
Contributions are welcome! Please feel free to fork this repository and submit pull requests.
License
This project is licensed under the MIT License.
Ченджлог
1.3Релиз26.1.2 · 20 мая 2026 г.
Supporting 26.1.2
1.2Релиз1.21.9, 1.21.10, 1.21.11 · 20 мая 2026 г.
Changelog
1.2
First public multi-provider release. Two jars are shipped:
AiChatBuddy-1.2-mc26.jar— Paper 26.x (Java 25)AiChatBuddy-1.2-mc1.21.jar— Paper 1.21.x (Java 21)
Added
- Three AI providers, runtime-switchable via
provider:inconfig.yml:- Gemini (default) — defaults to
gemma-4-31b-it, supports function calling. - Ollama — works with local Ollama (
http://localhost:11434) or Ollama Turbo cloud (https://ollama.com). - NVIDIA NIM — OpenAI-compatible, defaults to
meta/llama-3.3-70b-instruct.
- Gemini (default) — defaults to
- Agentic tool use — the model can call tools mid-conversation and the plugin loops until it produces a final answer:
web_search— Brave Search API (free tier, hidden from the model if no key is set).minecraft_wiki— MediaWiki search against the official Minecraft Wiki.
- Notch persona — default
prompt-templatecasts the bot as the ancient overseer of the world: mythical, kind, knowledgeable, never breaks character, never narrates its plan. - Per-player rolling history — last
max-historyturns (default 8) kept per UUID, plus:/aichat forget— clears your own history./aichat forget <player>— op-only, clears another player's.
/aichat reload— re-readsconfig.ymland clears in-memory history without a server restart.agent-max-steps(default 8) — caps tool-calling iterations, then forces a best-effort synthesis pass so players always get an answer instead of an error.private-questionsmode — when true,!askis whispered back to the asker instead of broadcast.- Dual-flavor build —
-Pflavor=modern|legacyproduces the matching jar with the correct Java target and paper-api version.
Changed
- Default Gemini model:
gemini-2.5-flash→gemma-4-31b-it(verified function-calling support, free tier). - Default Ollama model:
llama3.2→gpt-oss:20b(works on cloud;llama3.2is local-only). - Default
agent-max-steps: 5 → 8. - Prompt template rewritten for Notch persona with explicit anti-narration rules ("never say 'let me try again'", etc.) and balanced tool-use guidance (use tools for factual queries, skip for greetings/jokes/opinions).
- Length guidance: short by default but go longer when the question genuinely needs detail.
Fixed
- Gemini 400 INVALID_ARGUMENT ("function response turn must immediately follow function call turn"). Root cause: per-player history was storing the full tool-call trajectory, and the front-trim could leave an orphan
function_callat the head. Fix: only user turns and plain assistant-text turns are persisted; intermediate tool plumbing is dropped. - Hitting
agent-max-stepsproduced a hard error instead of an answer. Now does one final synthesis pass with tools disabled. - Bot saying "Let me try that again!" without retrying. Prompt now bans status-update narration outright — either silently call a tool or give the final answer.
- MediaWiki tool — pipe separator must be
%7C-encoded in URLs. - Brave Search tool — gzip handling fixed; parse errors now include a body preview (json-simple's
ParseException.getMessage()returns null otherwise).
Configuration migration
- Old top-level
api-key/api-urlare still read but logged as deprecated. Move them toproviders.gemini.api-key/providers.gemini.api-url.
Build
./gradlew build— modern (Paper 26.x, Java 25)../gradlew build -Pflavor=legacy— legacy (Paper 1.21.x, Java 21).- Foojay toolchain resolver added so missing JDKs auto-download.
Permissions
aichatbuddy.ask(default: everyone) — use!askin chat.aichatbuddy.reload(op) —/aichat reload.aichatbuddy.forget.self(default: everyone) —/aichat forget.aichatbuddy.forget.others(op) —/aichat forget <player>.
1.1Релиз1.21, 1.21.1 · 9 августа 2024 г.
Initial Release (see readme for features)
Комментарии
Загружаем…