Skip to content
/ aibot Public

AIBot is a Discord bot that uses an OpenAI API-compatible API to interact with LLMs from Discord.

License

Notifications You must be signed in to change notification settings

runbgp/aibot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIBot

AIBot is a Discord bot that uses an OpenAI API-compatible API to interact with LLMs from Discord.

This bot is designed to work with just about any model served by an OpenAI API-compatible API, but some features such as vision model support for interpreting images in messages were specifically designed for use with xAI Image Understanding.

Using the vision model support is entirely optional. Simply remove the vision_model variable from your .env file, and support for image understanding will be disabled.

Running the bot

  1. Clone the repository.
  2. Install the required Python packages. pip install -r requirements.txt
  3. Rename the .env.example file to .env and populate the following environment variables:
    • discord_bot_token: Your Discord bot token.
    • openai_api_base: Your OpenAI API base.
    • openai_api_key: Your OpenAI API key.
    • model: Your model.
    • vision_model: Your vision model for image understanding (optional).
    • prompt: Your prompt.
  4. Run the bot. python3 aibot.py

Running with Docker

Docker Compose

  1. Create a docker-compose.yml file using the example below.
services:
  ai-bot:
    image: ghcr.io/runbgp/aibot:latest
    restart: unless-stopped
    container_name: aibot
    volumes:
      - .env:/.env
  1. Rename the .env.example file to .env and populate the following environment variables:
    • discord_bot_token: Your Discord bot token.
    • openai_api_base: Your OpenAI API base.
    • openai_api_key: Your OpenAI API key.
    • model: Your model.
    • vision_model: Your vision model for image understanding (optional).
    • prompt: Your prompt.
  2. Pull the latest container. docker pull ghcr.io/runbgp/aibot:latest
  3. Run the bot. docker compose up -d

Contributing

Contributions are always welcome. Please feel free to submit an issue or a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

AIBot is a Discord bot that uses an OpenAI API-compatible API to interact with LLMs from Discord.

Topics

Resources

License

Stars

Watchers

Forks

Packages