? PixelAI
将 AI 的力量带给你的 Minecraft 服务器。
PixelAI 是一个轻量级、高性能的集成模组,允许玩家在游戏中直接与最先进的 AI 模型互动。无论你是需要一个助手来管理服务器的所有功能,还是需要一个机智的全局聊天机器人来娱乐你的社区,PixelAI 都能满足你的需求。
✨ 主要特性
双 AI 人格:配置一个私人助手用于个人帮助,以及一个全局 AI 用于公共聊天互动。
完全掌控模型:由 OpenRouter 提供支持。使用 GPT-4、Claude 3、Llama 3 或任何其他 AI 模型。
智能记忆:内置对话历史记录,能在不占用服务器大量 RAM 的情况下记住上下文。
高度可定制:更改每一个设置和每一条消息,以契合你服务器的主题风格。
异步逻辑:所有 API 调用均在后台线程进行,确保玩家零延迟体验。
灵活的存储:在本地 YAML 文件或 MySQL 数据库之间选择,以实现跨服务器数据同步。
MiniMessage 支持:不再需要混乱的传统颜色代码。PixelAI 原生支持 MiniMessage。
?️ 命令与权限
/pixelai <prompt>
- 与你的 AI 助手进行私人聊天。(pixelai.use.private)
/pixelai model <model>
- 即时切换你的个人 AI 模型。(pixelai.model)
/pixelai clear
- 重置你的私人对话历史。(pixelai.use.private)
/pixelai reload
- 重新加载配置文件和消息内容。(pixelai.admin.reload)
? 快速开始
将 PixelAI.jar 放入你的 plugins 文件夹中。
从 OpenRouter 获取 API Key,并将密钥添加到 config.yml 中。
开始聊天吧!在公共聊天中使用 @AI 或使用 /pixelai 获取私人帮助。
config.yml
# ==========================================================
# PixelAI 配置
# ==========================================================
# OpenRouter API Key: https://openrouter.ai/settings/keys
# OpenRouter 提供免费的和付费的 AI 模型
api-key: "YOUR_OPENROUTER_KEY_HERE"
# --- AI 模型设置 ---
# 新玩家的默认模型,或未选择模型时使用
default-model: "openai/gpt-3.5-turbo"
# 用于公共 @AI 消息的特定模型
public-model: "meta-llama/llama-3-8b-instruct"
# 在 /pixelai model <model> 标签补全中可用的模型
# 探索所有模型请访问 https://openrouter.ai/models
allowed-models:
- "openai/gpt-3.5-turbo"
- "openai/gpt-4o"
- "anthropic/claude-3-haiku"
- "meta-llama/llama-3-8b-instruct"
- "nvidia/nemotron-3-nano-30b-a3b:free"
- "tngtech/tng-r1t-chimera:free"
# --- AI 人格 ---
private-system-prompt: "You are a helpful assistant on a Minecraft server. Keep responses concise and friendly."
global-system-prompt: "You are the server's Global Assistant. You are talking to everyone in the public chat."
# 在公共聊天中触发 AI 的前缀
chat-trigger: "@AI"
# --- 记忆设置 ---
memory:
public-size: 5 # @AI 共享的历史记录长度
private-size: 15 # /pixelai <prompt> 的个人历史记录长度
# --- 存储设置 ---
storage:
type: "YAML" # 选项: YAML, MYSQL
mysql:
host: "localhost"
port: 3306
database: "pixelai"
username: "root"
password: ""
use-ssl: false
# --- 速率限制 ---
# 权限格式: [最大请求数, 时间(秒)]
limits:
private:
pixelai.limit.admin: [-1, 0] # 管理员: 无限
pixelai.limit.vip: [50, 86400] # VIP: 每天 50 次
pixelai.limit.default: [10, 3600] # 默认: 每小时 10 次
global:
pixelai.limit.admin: [-1, 0] # 管理员: 无限
pixelai.limit.vip: [20, 3600] # VIP: 每小时 20 次
pixelai.limit.default: [5, 3600] # 默认: 每小时 5 次
# --- 默认命令 ---
# 自定义默认命令
# 修改后需要重载配置
command:
name: "pixelai"
aliases:
- "ai"
- "ask"
# --- 权限节点 ---
permissions:
use_private: "pixelai.use.private" # 使用 /pixelai <prompt> 所需权限
use_global: "pixelai.use.global" # 在聊天中使用 @AI 所需权限
help: "pixelai.help"
admin: "pixelai.admin"
reload: "pixelai.admin.reload"
? PixelAI
Bring the power of AI to your Minecraft server.
PixelAI is a lightweight, high-performance integration that allows players to interact with state-of-the-art AI models directly in-game. Whether you need an assistant for all your server features or a witty global chatbot to entertain your community, PixelAI has you covered.
✨ Key Features
Dual AI Personalities: Configure a Private Assistant for individual help and a Global AI for public chat interactions.
Total Model Control: Powered by OpenRouter. Use GPT-4, Claude 3, Llama 3, or any other AI model.
Smart Memory: Built-in conversation history that remembers context without bloating your server's RAM.
Fully Customizable: Change every setting and every single message to fit your server's theme.
Asynchronous Logic: All API calls happen off-thread, ensuring zero lag for your players.
Flexible Storage: Choose between local YAML files or a MySQL database for cross-server data syncing.
MiniMessage: No more messy legacy color codes. PixelAI natively supports MiniMessage.
?️ Commands & Permissions
/pixelai <prompt>
- Chat privately with your AI assistant. (pixelai.use.private)
/pixelai model <model>
- Switch your personal AI model on the fly. (pixelai.model)
/pixelai clear
- Reset your private conversation history. (pixelai.use.private)
/pixelai reload
- Reload the configuration and messages. (pixelai.admin.reload)
? Getting Started
Drop the PixelAI.jar into your plugins folder.
Get an API Key from OpenRouter and add your key to config.yml.
Start chatting! Use @AI in public chat or /pixelai for private help.
config.yml
# ==========================================================
# PixelAI Configuration
# ==========================================================
# OpenRouter API Key: https://openrouter.ai/settings/keys
# OpenRouter offers free and paid AI models
api-key: "YOUR_OPENROUTER_KEY_HERE"
# --- AI Model Settings ---
# Default for new players or if no model is selected
default-model: "openai/gpt-3.5-turbo"
# The specific model used for public @AI messages
public-model: "meta-llama/llama-3-8b-instruct"
# Models available in the /pixelai model <model> tab completion
# Explore all models at https://openrouter.ai/models
allowed-models:
- "openai/gpt-3.5-turbo"
- "openai/gpt-4o"
- "anthropic/claude-3-haiku"
- "meta-llama/llama-3-8b-instruct"
- "nvidia/nemotron-3-nano-30b-a3b:free"
- "tngtech/tng-r1t-chimera:free"
# --- AI Personalities ---
private-system-prompt: "You are a helpful assistant on a Minecraft server. Keep responses concise and friendly."
global-system-prompt: "You are the server's Global Assistant. You are talking to everyone in the public chat."
# Prefix to trigger the AI in public chat
chat-trigger: "@AI"
# --- Memory Settings ---
memory:
public-size: 5 # Shared history for @AI
private-size: 15 # Personal history for /pixelai <prompt>
# --- Storage Settings ---
storage:
type: "YAML" # Options: YAML, MYSQL
mysql:
host: "localhost"
port: 3306
database: "pixelai"
username: "root"
password: ""
use-ssl: false
# --- Rate Limiting ---
# Permission: [max_requests, time_in_seconds]
limits:
private:
pixelai.limit.admin: [-1, 0] # Admins: Infinite
pixelai.limit.vip: [50, 86400] # VIPs: 50/day
pixelai.limit.default: [10, 3600] # Default: 10/hour
global:
pixelai.limit.admin: [-1, 0] # Admins: Infinite
pixelai.limit.vip: [20, 3600] # VIPs: 20/hour
pixelai.limit.default: [5, 3600] # Default: 5/hour
# --- Default Command ---
# Customize the default command
# Requires reload when changed
command:
name: "pixelai"
aliases:
- "ai"
- "ask"
# --- Permission Nodes ---
permissions:
use_private: "pixelai.use.private" # Required for /pixelai <prompt>
use_global: "pixelai.use.global" # Required for @AI in chat
help: "pixelai.help"
admin: "pixelai.admin"
reload: "pixelai.admin.reload"
评论 0
登录后参与评分
还没有评论,来抢沙发吧