A clean, specialized Discord bot template designed to interact with a local Ollama AI instance.
- Integrated with Ollama: Chat with models like Llama 2, Gemma, Mistral, etc.
- Concurrency Limit: Ensures only one request is processed at a time to save resources.
- System Prompt: Configurable persona for your AI.
- Modern Stack: Built with
discord.jsv14 andcommandkit.
- Node.js (v18 or higher)
- Ollama: Installed and running locally. Download Ollama
- Discord Bot Token: From the Discord Developer Portal.
- Clone the repository (or just use this folder).
- Install dependencies:
npm install
- Configure Environment:
- Rename
.env.exampleto.env. - Fill in your
TOKENandCLIENT_ID. - Set your
OLLAMA_MODEL(e.g.,gemma:2b,llama2).
- Rename
- Run the Bot:
node src/index.js
- Use
/askto chat with the AI. - Example:
/ask prompt: "Tell me a joke"
- Change Model: Update
OLLAMA_MODELin.env. - Change Persona: Update
OLLAMA_SYSTEM_PROMPTin.env.