- Supported Skript Version
- 2.10
- 2.11
- 2.12
- 2.13
- 2.14
- 2.15
- Supported Minecraft Versions
- 1.21
- 26.1
This Skript adds an AI command to the Minecraft server.
Players can use /ai <question> to ask a question to an AI model.
The AI model is selected in the script file using the ai-model option.
The script automatically detects the AI provider based on the model name:
- Models starting with "gemini" use the Gemini API key.
- Models starting with "gpt", "o1", "o3", or "o4" use the OpenAI API key.
- Models starting with "grok" use the xAI/Grok API key.
- Models starting with "claude" use the Anthropic/Claude API key.
The request is sent asynchronously so the server does not freeze while waiting for the API response.
After the AI response is received, the answer is sent back to the player on the main server thread.
The script includes:
- A cooldown for the /ai command
- A maximum question length limit
- Basic quote blocking to prevent JSON formatting issues
- Automatic provider detection
- Support for OpenAI, Gemini, Grok, and Claude models
Players can use /ai <question> to ask a question to an AI model.
The AI model is selected in the script file using the ai-model option.
The script automatically detects the AI provider based on the model name:
- Models starting with "gemini" use the Gemini API key.
- Models starting with "gpt", "o1", "o3", or "o4" use the OpenAI API key.
- Models starting with "grok" use the xAI/Grok API key.
- Models starting with "claude" use the Anthropic/Claude API key.
The request is sent asynchronously so the server does not freeze while waiting for the API response.
After the AI response is received, the answer is sent back to the player on the main server thread.
The script includes:
- A cooldown for the /ai command
- A maximum question length limit
- Basic quote blocking to prevent JSON formatting issues
- Automatic provider detection
- Support for OpenAI, Gemini, Grok, and Claude models