(^ AI generated illustration from the ChatGPT Logo)
Simple ChatGPT Bot for a small team or personal use.
Quick Deploy, Easy Config, Simple Usage
- Support
Discord
&Telegram
- Selectable Chat Mode: Group Chat & Individual
- Easy to config
- Ready to run: 🐳
docker compose
or ⚙️PM2
- Using Azure OpenAI
- Lightweight source code
- Flexible development design
Mode | Name | Description |
---|---|---|
1 | Default | Discord bot for group chat, Telegram bot for individual. Suitable for a small team/group of people. |
2 | Individual | Both Discord bot & Telegram bot will separate chat for each user. (1-to-1 chat) |
3 | Seamless | All chats of Discord bot and Telegram bot will count as the same conversation. Useful for personal. |
Config Variable | Data Type | Description |
---|---|---|
DISCORD_BOT_TOKEN |
string | The token of the Discord bot. If no token is provided, discord bot will be disabled. |
DISCORD_ALLOW_CHANNELS |
string | A comma-separated (, ) whitelist of Discord channel IDs. The bot will only responsive in the channels from the list. |
TELEGRAM_BOT_TOKEN |
string | The token of the Telegram bot. If no token is provided, telegram bot will be disabled. |
TELEGRAM_ALLOW_USERS |
string | A comma-separated (, ) whitelist of Telegram user IDs. The bot will only responsive to the users from the list. |
AZURE_ENDPOINT |
string | The endpoint URL of the Azure OpenAI service. |
AZURE_DEPLOYMENT_NAME |
string | The deployment name of the Azure OpenAI service. |
AZURE_KEY |
string | The key of the Azure OpenAI service. |
CHAT_MODE |
number | Choose the chat mode. Refer to the Chat Mode section. |
ALWAYS_SYSTEM_PROMPT |
boolean | Send system prompt to ChatGPT in each request? This can make ChatGPT keep remember the system prompt to provide better responsive in some cases, but more prompt tokens will be used. |
SYSTEM_PROMPT |
string | The system prompt for ChatGPT (optional) |
- You must have enabled the Azure OpenAI services
- You must created a Discord Application / Telegram Bot
- git clone to download the source code
- Copy the
sample.env
file and rename as.env
- Edit the config in the
.env
file - If you want to use ⚙️ PM2, run
yarn run init:pm2
- If you want to use 🐳 docker compose, run
yarn run docker
(:warning: This project will not build a docker image, it use the node image to run the bot and manage with docker) - The bot will be run in the background