Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

xxxbrian/Discord-ChatGPT-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord ChatGPT Bot

Base Docker Image CI Docker Image CI

A Discord bot based on ChatGPT with support for opening multiple different conversation sessions in channels and DM, each Channel and DM having a separate contextual conversation.

Usage:

Slash Commands:

  • /start: Start a new conversation thread, each thread is a separate conversation.
  • /chat [message]: Chat the bot with [message], remembers what user said earlier in the conversation.
  • /end: End the conversation thread, the bot will forget what user said earlier in the conversation.

Install:

With git clone:

# Install dependencies
pip install -r requirements.txt

# Set environment variables
export DISCORD_TOKEN="YOUR_TOKEN"
export OPENAI_EMAIL="YOUR_EMAIL"
export OPENAI_PASSWORD="YOUR_PASSWORD"

# Run
python src/dcbot.py

With docker:

docker run -d --name=Discord-ChatGPT-Bot --restart=unless-stopped \
-e DISCORD_TOKEN="YOUR_TOKEN" \
-e OPENAI_EMAIL="YOUR_EMAIL" \
-e OPENAI_PASSWORD="YOUR_PASSWORD" \
xxxbrian/discord_chatgpt_bot:latest

Dependencies:

TODO:

  • Slash command
  • Support retry
  • Display mode