Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xxxbrian/Discord-ChatGPT-Bot
Run a ChatGPT Bot in Discord with Docker
https://github.com/xxxbrian/Discord-ChatGPT-Bot
chatgpt discord-bot docker-image
Last synced: 3 months ago
JSON representation
Run a ChatGPT Bot in Discord with Docker
- Host: GitHub
- URL: https://github.com/xxxbrian/Discord-ChatGPT-Bot
- Owner: xxxbrian
- License: gpl-3.0
- Archived: true
- Created: 2022-12-07T04:01:32.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-12T12:24:37.000Z (almost 2 years ago)
- Last Synced: 2024-05-11T07:35:08.830Z (6 months ago)
- Topics: chatgpt, discord-bot, docker-image
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 38
- Watchers: 3
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- project-awesome - xxxbrian/Discord-ChatGPT-Bot - Run a ChatGPT Bot in Discord with Docker (Python)
README
# Discord ChatGPT Bot
[![Base Docker Image CI](https://github.com/xxxbrian/Discord-ChatGPT-Bot/actions/workflows/base-image.yml/badge.svg)](https://github.com/xxxbrian/Discord-ChatGPT-Bot/actions/workflows/base-image.yml) [![Docker Image CI](https://github.com/xxxbrian/Discord-ChatGPT-Bot/actions/workflows/docker-image.yml/badge.svg)](https://github.com/xxxbrian/Discord-ChatGPT-Bot/actions/workflows/docker-image.yml)
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:**
```bash
# 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:**
```bash
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:
- [OpenAI](https://chat.openai.com/)
- [rawandahmad698/PyChatGPT](https://github.com/rawandahmad698/PyChatGPT)
- [Rapptz/discord.py](https://github.com/Rapptz/discord.py)#### TODO:
- [x] Slash command
- [ ] Support retry
- [ ] Display mode