ModsJava
AIFriend-Personal_Assistant
A Minecraft plugin that enhances player interactions with an AI chatbot using OpenAI's API.
⬇ Download on HangarOpen in MCModsHubGet it on Google Play →## **AI Friend Plugin for Minecraft**
**AI Friend** is a plugin designed to enhance player interactions in Minecraft by integrating an AI-powered chatbot that responds to player messages. It leverages OpenAI's API to generate contextual responses based on player chat history.

**Key Features**
* **AI Chatbot**: Real-time interaction with players using AI-generated responses.
* **Customizable Settings**: Easily configure the chatbot’s name, language preferences, and connect it to a custom database.
* **Automated API Calls**: Periodically invokes OpenAI’s API to generate new responses.
* **Command Access**: Server operators can view the plugin's configuration with a simple command.
* **Player angryness recognition:** The AI chatbot can recognize if the player is angry about AI and respond accordingly. Stopping the responses (API calls) for 30 minutes.
* **Personalization:** You can add your own custom message to the AI chatbot.
* **☺ Free Trial:** The plugin offers the "trial" API key to use for 3 days.
**Available Commands**
* **/aifriend**: Displays the current AI Friend plugin configuration (operator-only command).
* **/aifriendreload**: Reloads the plugin configuration.
**Configuration Details (config.yml)**
The behavior of the plugin can be customized through the config.yml file. Below is an example configuration:
```
# OpenAI API key for accessing the OpenAI services
# You can get an API key at https://platform.openai.com/signup
# Trial API key is available for free, but has limited functionality
# To use trial API key, set the value to "trial" (3 days of free trial)
openai_api_key: trial
# Enable or disable the AI Friend plugin
enabled: true
# Disable the AI Friend plugin when players are not interested in talking to AI
player_dissinterest: true
# Interval in seconds for the timer to call the OpenAI API
# Must be positive, determines how often the AI Friend will respond to player messages
timer_interval: 60
# Version of the GPT model to use gpt-4o-mini, gpt-4o, ...
# Changes doesn't apply if you use trial API key.
gpt_version: gpt-4o-mini
# Name of the OpenAI chatbot
chatbot_name: AI Friend
# Preferred language for the chatbot responses - English, German, Czech, ...
preffered_language: English
# Personalization for the chatbot responses
# You can add some personalization for the chatbot responses
# For example: Our website is https://www.example.com and sometimes tell a joke.
# Can be empty
personalization:
```

**Installation Instructions**
* Download the latest AI Friend plugin jar file.
* Move the jar file into your server's plugins folder.
* Start your Minecraft server to auto-generate the config.yml file.
* Edit the config.yml to include your OpenAI API key and modify other settings as needed.
* Restart your server to apply any configuration changes.
**How to Use**
Once installed and configured, the AI chatbot will respond to player messages at the defined intervals. Server operators can view the plugin’s configuration using the /aifriend command.
**Authors & Support**
* **Filasik** - Discord: filasik
* **Patr1xCZ** - Discord: paprik_man
AIFriend-Personal_Assistant is a free Minecraft Java mod. Compatible with Minecraft 1.21, 1.21.1, 1.21.2, 1.21.3 and newer. Downloaded 154 times (via Hangar). Download it and open it directly in the game.
Explore more