PigPig is a powerful Discord bot based on multi-modal Large Language Models (LLM), designed to interact with users through natural language. It combines advanced AI capabilities with practical features, offering a rich experience for Discord communities.
- 🧠 AI-Powered Conversations: Utilizes LLMs and LangChain for natural language understanding and generation.
- 🖼️ Multi-modal Capabilities: Visual question answering and image generation.
- 🍽️ Practical Features: Set reminders, get recommendations, and perform calculations.
- 👤 User Information Management: Create and maintain user profiles.
- 📊 Channel Data RAG: Use channel history for context-aware responses.
- 💭 Chain of Thought Reasoning: Employs Chain of Thought reasoning to provide detailed, step-by-step explanations of its thought process, enhancing transparency and understanding. This feature allows the bot to break down complex problems into smaller, manageable steps, providing a more comprehensive and insightful response.
- Python 3.10+
- Lavalink Server (4.0.0+)
- Modules in requirements
- NVIDIA GPU with at least 12GB VRAM (required for optimal AI performance)
git clone https://github.com/starpig1129/discord-LLM-bot-PigPig.git #Clone the repository
cd PigPig-discord-LLM-bot #Go to the directory
python -m pip install -r requirements.txt #Install required packages
After installing all packages, you must configure the bot before to start! How To Configure
Start your bot with python main.py
- Rename
.env Example
to.env
and fill all the values
TOKEN = XXXXXXXXXXXXXXXXXXXXXXXX.XXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXX
CLIENT_ID = 123456789012345678
CLIENT_SECRET_ID = XXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXX
SERCET_KEY = DASHBOARD_SERCET_KEY
BUG_REPORT_CHANNEL_ID = 123456789012345678
LLM_MODEL_NAME = shenzhi-wang/Llama3-8B-Chinese-Chat
VQA_MODEL_NAME = openbmb/MiniCPM-Llama3-V-2_5-int4
ANTHROPIC_API_KEY = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
OPENAI_API_KEY = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GEMINI_API_KEY = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Values | Description |
---|---|
TOKEN | Your Discord bot token (Discord Portal) |
CLIENT_ID | Your Discord bot client id (Discord Portal) |
CLIENT_SECRET_ID | Your Discord bot client secret id (Discord Portal) (optional) |
SERCET_KEY | Secret key for dashboard (optional) |
BUG_REPORT_CHANNEL_ID | All the error messages will send to this text channel (optional) |
ANTHROPIC_API_KEY | Your Anthropic api key (Anthropic API) (optional) |
OPENAI_API_KEY | Your OpenAI api key (OpenAI API) (optional) |
GEMINI_API_KEY | Your GEMINI API key (GEMINI API) (optional) |
- Rename
settings Example.json
tosettings.json
and customize your settings (Note: Do not change any keys fromsettings.json
)
{
"prefix": "/",
"activity": [
{
"paly": "\u5b78\u7fd2\u8aaa\u8a71"
}
],
"ipc_server": {
"host": "127.0.0.1",
"port": 8000,
"enable": false
},
"version": "v1.2.0"
}
This bot utilizes a modular design with several cogs (modules) to handle different functionalities. Here's a brief overview:
- CoT_AI: Implements Chain of Thought reasoning for detailed, step-by-step responses.
- Channel Manager: Manages channel-specific settings and permissions.
- Image Generation: Generates images based on text prompts.
- Help: Provides a list of available commands.
- Internet Search: Performs various web searches (general, image, YouTube, URL content).
- Math: Performs mathematical calculations.
- Model Management: Loads and unloads language models.
- Reminder: Sets reminders for users.
- Schedule: Manages user schedules.
- User Data: Manages user-specific data.
- Eat: Provides food recommendations.
This project is licensed under the MIT License - see the LICENSE file for details.