https://github.com/doubleangels/chatgpt
A ChatGPT chatbot for use on Discord servers.
https://github.com/doubleangels/chatgpt
chatgpt discord interactions-py
Last synced: about 2 months ago
JSON representation
A ChatGPT chatbot for use on Discord servers.
- Host: GitHub
- URL: https://github.com/doubleangels/chatgpt
- Owner: doubleangels
- Created: 2025-01-27T18:10:56.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-28T07:23:45.000Z (2 months ago)
- Last Synced: 2025-03-28T08:23:41.675Z (2 months ago)
- Topics: chatgpt, discord, interactions-py
- Language: JavaScript
- Homepage:
- Size: 403 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chatgpt
![]()
A lightweight Discord bot powered by ChatGPT and OpenAI, designed to provide interactive conversational capabilities right within your Discord server.
## Features
- **ChatGPT Integration:** Leverage OpenAI's powerful language model for dynamic, context-aware conversations.
- **Easy Deployment:** Containerized with Docker, ensuring quick and hassle-free setup.
- **Scalable & Resilient:** Automatically restarts on failures to maintain high availability.## Prerequisites
Before deploying the bot, ensure you have the following:
- A valid [Discord Bot Token](https://discord.com/developers/applications).
- An active [OpenAI API key](https://platform.openai.com/overview).## Docker Compose Setup
Use the following `docker-compose.yml` snippet to deploy the bot:
```yaml
services:
chatgpt:
image: ghcr.io/doubleangels/chatgpt:latest
container_name: chatgpt
restart: always
environment:
- DISCORD_BOT_TOKEN=your_discord_bot_token_here
- OPENAI_API_KEY=your_openai_api_key_here
- MODEL_NAME=your_desired_model_name_here
- MAX_HISTORY_LENGTH=your_desired_max_history_length_here
- LOG_LEVEL=your_desired_log_level_herenetworks:
default:
name: chatgpt
```## Environment Variables
Here is a table of all available environment variables:
| Variable | Description | Required | Default | Example |
| --- | --- | :---: | :---: | --- |
| `DISCORD_BOT_TOKEN` | Authentication token for your Discord bot | ✅ | - | - |
| `OPENAI_API_KEY` | API key for OpenAI services | ✅ | - | - |
| `MODEL_NAME` | The name of the OpenAI model to use | ❌ | `gpt-3.5-turbo` | `gpt-4`, `gpt-4-turbo`, `gpt-3.5-turbo` |
| `MAX_HISTORY_LENGTH` | Maximum number of messages to keep in conversation history | ❌ | `10` | `20` |
| `LOG_LEVEL` | Determines the verbosity of logs | ❌ | `info` | `error`, `warn`, `info`, `debug` |