discollama

discollama

Run an AI-powered Discord bot from the comfort of your laptop.

Stars: 98

Visit
 screenshot

Discollama is a Discord bot powered by a local large language model backed by Ollama. It allows users to interact with the bot in Discord by mentioning it in a message to start a new conversation or in a reply to a previous response to continue an ongoing conversation. The bot requires Docker and Docker Compose to run, and users need to set up a Discord Bot and environment variable DISCORD_TOKEN before using discollama.py. Additionally, an Ollama server is needed, and users can customize the bot's personality by creating a custom model using Modelfile and running 'ollama create'.

README:

discollama

discollama is a Discord bot powered by a local large language model backed by Ollama.

Dependencies

  • Docker and Docker Compose

Run discollama.py

DISCORD_TOKEN=xxxxx docker compose up

Note: You must setup a Discord Bot and set environment variable DISCORD_TOKEN before discollama.py can access Discord.

discollama.py requires an Ollama server. Follow the steps in jmorganca/ollama repository to setup Ollama.

By default, it uses 127.0.0.1:11434 which can be overwritten with OLLAMA_HOST.

Note: Deploying this on Linux requires updating network configurations and OLLAMA_HOST.

Customize discollama.py

The default LLM is mike/discollama. A custom personality can be added by changing the SYSTEM instruction in the Modelfile and running ollama create:

ollama create mymodel -f Modelfile

This can be changed in compose.yaml:

environment:
  - OLLAMA_MODEL=mymodel

See jmorganca/ollama for more details.

Activating the Bot

Discord users can interact with the bot by mentioning it in a message to start a new conversation or in a reply to a previous response to continue an ongoing conversation.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for discollama

Similar Open Source Tools

For similar tasks

For similar jobs