3ee834726888000d4baf39dcbac619a30f5528e3
Discord Ollama Chatbot Integration
A Discord chatbot with a little "magic" added
A fork of https://github.com/kevinthedang/discord-ollama
About/Goals v 1.0
Ollama is an AI model management tool that allows users to install and use custom large language models locally.
The project aims to:
- Create a Discord bot that will utilize Ollama and chat to chat with users!
- User Preferences on Chat
- Message Persistance on Channels and Threads
- Threads
- Channels
- Containerization with Docker
- Slash Commands Compatible
- Generated Token Length Handling for >2000
- Token Length Handling of any message size
- User vs. Server Preferences
- Redis Caching
- Administrator Role Compatible
- Multi-User Chat Generation (Multiple users chatting at the same time) - This was built in from Ollama
v0.2.1+ - Automatic and Manual model pulling through the Discord client
- Leverage function calling capabilities in Gemma3
- json-formatted replies allowing hidden COT and statefulness
- base ollama system prompt providing json formatting, jailbreak resistance, and sentiment tracking
- function calling to imagegen
- integrate image recognition
- Store self- and per-user-sentiment in redis
- tell the model to create redis set and get commands itself
- Separate bot personality from base bot instructions (src/personality.json)
Documentation
These are guides to the features and capabilities of this app.
Environment Setup
- Clone this repo using
git clone https://gitea.matrixwide.com/alex/discord-aidolls - You will need a
.envfile in the root of the project directory with the bot's token. There is a.env.sampleis provided for you as a reference for what environment variables.- For example,
CLIENT_TOKEN = [Bot Token]
- For example,
- Please refer to the docs for bot setup.
- Creating a Discord App
- Local Machine Setup
- Docker Setup for Servers and Local Machines
- Nvidia is recommended for now, but support for other GPUs should be development.
- Local use is not recommended.
Resources
- NodeJS
- This project runs on
lts\jodand above. - This project requires the use of npm version
10.9.0or above.
- This project runs on
- Ollama
- Redis
- Discord.js Docs
- Setting up Docker (Ubuntu 20.04)
Acknowledgement
Description
Languages
TypeScript
99.8%
Dockerfile
0.2%
