Discord AI Chars is a bot that can switch between models and send AI-generated messages via webhooks. It uses the Ollama library to generate the AI responses. Users in your server have the ability to create and customize their characters and even have them talk to each other. With a multimodal model like LLaVA, the bot can also describe images that users send.
Software:
Hardware:
For high performance, a GPU is recommended.
(For 8b models like dolphin-llama3:8b
)
- GPU: Atleast 6GB VRAM
- CPU: Atleast 16GB of RAM and 4 cores
Please do your own research on the requirements for the models you want to use.
- Clone the repository
git clone https://github.com/LeonhardTissen/discordAIChars.git
- Change into the directory
cd discordAIChars
- Install the dependencies
npm i
-
Create a Discord bot and invite it to your server. Make sure it has the
Manage Webhooks
permission and all intents enabled -
Copy
example.env
to.env
and fill in the required values
BOT_TOKEN=YourBotTokenHere
CHANNEL_ID=YourChannelIdHere
ADMIN_ID=YourDiscordUserIdHere
BASE_MODEL=dolphin-llama3
IMAGE_RECOGNITION_MODEL=llava-llama3:8b-v1.1-q4_0
PREFIX=!
MAXIMUM_MODEL_CHAIN=5
- Download the models of your choice from Ollama, for example:
ollama pull dolphin-llama3
ollama pull llava-llama3:8b-v1.1-q4_0
- Run the bot
node main
- Type
!create
to start the creation of a new model. The bot will ask you for a name, then a profile picture, then the prompt for the model - Type
!default [name]
to make that model the default for the channel. Now the bot will respond to all messages in that channel with that model