A powerful and easy-to-use Discord bot built with Python and Ollama Mistral to automatically summarize long messages and conversations in Discord servers.
- 📚 Summarizes long text messages
- 🗣️ Summarizes full conversation threads
- ⚡ Fast and efficient responses using local LLMs via Ollama
- 🔧 Customizable commands
- 🔐 Runs locally without relying on external APIs
- Python – Bot logic and Discord integration
- discord.py – For interacting with the Discord API
- Ollama – Local language model runner
- Mistral – The language model used for summarization
- Python 3.8+
- Ollama installed and running (
https://ollama.com) - A Discord bot token
-
Clone this repository
git clone https://github.com/yourusername/discord-summarizer-bot.git cd discord-summarizer-bot -
Install dependencies
pip install -r requirements.txt
-
Start your Ollama model
ollama run mistral
-
Set your environment variables
Create a
.envfile in the root folder:DISCORD_TOKEN=your_discord_bot_token_here
-
Run the bot
python bot.py
Once the bot is running and added to your server, you can use commands like:
!summarize <text>— Summarizes a long message!summarize_thread— Summarizes the recent conversation in the current channel
You can customize these commands in the bot.py file.
This bot uses the Mistral model via Ollama, which allows fast local inference without needing cloud APIs or keys.
- Add slash command support
- Improve context window handling
- Multi-language support
- Persistent conversation logging
Pull requests are welcome! If you have suggestions for improvements, feel free to open an issue or a PR.
This project is licensed under the MIT License. See the LICENSE file for more details.
🧠 Built with love and language models.