PigPig is a powerful, multi-modal Discord bot powered by Large Language Models (LLMs). It's designed to interact with users through natural language, combining advanced AI capabilities with practical, fun features to enrich any Discord community.
🧠 AI-Powered Conversations: Utilizes advanced LLMs for natural language understanding and generation.
🖼️ Multi-modal Capabilities: Supports visual question answering (VQA) and AI image generation.
🎵 Music Playback: Plays music from YouTube with queue and playlist management.
🧠 Intelligent Channel Memory: Permanently stores and intelligently retrieves conversation history with semantic search to provide enhanced context for responses.
🔄 Auto-Update System: Automatically checks for and applies GitHub updates with secure backups and rollback functionality.
🍽️ Practical Tools: Set reminders, get restaurant recommendations, perform calculations, and more.
| Variable | Description |
| --------------------- | ---------------------------------------------------------------------------------------------------------- |
| TOKEN | (Required) Your Discord bot token from the Discord Developer Portal. |
| CLIENT_ID | (Required) Your bot's client ID from the Developer Portal. |
| CLIENT_SECRET_ID | (Optional) Your bot's client secret, used for specific API interactions. |
| SERCET_KEY | (Optional) A secret key for dashboard authentication. |
| BOT_OWNER_ID | (Required) Your Discord User ID. Grants owner-level privileges and is required for the auto-update system. |
| BUG_REPORT_CHANNEL_ID | (Optional) A Discord channel ID where error messages and bug reports will be sent. |
| MODEL_NAME | The default local multi-modal model to use. |
| ANTHROPIC_API_KEY | (Optional) Your API key for Anthropic's Claude models, available on Anthropic official website. |
| OPENAI_API_KEY | (Optional) Your API key for OpenAI's GPT models, available on OpenAI official website. |
| GEMINI_API_KEY | (Optional) Your API key for Google's Gemini models, available on Google AI Studio. |
| VECTOR_STORE_API_KEY | (Optional) Your API key for vector databases (like Qdrant), only needed if using cloud database. |
| CONFIG_ROOT | (Optional) Root directory path for custom configuration files and data. Defaults to ./base_configs folder in current directory. |
Step 2: Configure configs folder
The bot's default files are in the ./base_configs folder. You can edit these JSON files to customize the bot's behavior as needed. It is recommended to copy them and set the 'CONFIG_ROOT' parameter in '.env'.
Step 3: Configure Long-term Memory System
If you do not want to enable the long-term memory system, set enabled to false in base_configs/memory.yaml.
If you use a cloud vector database (like Qdrant), set the VECTOR_STORE_API_KEY in the .env file.
And ensure that the vector database URL and other parameters are correctly set in base_configs/memory.yaml.
For local installation or cloud setup methods, refer to Qdrant official documentation.
Step 4: Start the Bot
Once configured, you can start the bot with the following command:
python main.py
📦 Features / Cogs Overview
The bot's functionality is divided into modules called "Cogs". Here are the key features available:
🧠 Memory System
Description: Manages long-term conversation memory, enabling the bot to recall past interactions. It uses semantic search to find the most relevant context.
Description: Facilitates interactive, collaborative storytelling using a multi-agent AI architecture to create dynamic narratives guided by user actions.
Description: Allows deep customization of the bot's personality and behavior on a per-server or per-channel basis using a three-tiered inheritance model.