- ChatGPT (ChatGPT by OpenAI): https://chat.openai.com/chat
- DALLE (DALLE by OpenAI): https://openai.com/dall-e-2/
- acheong08/ChatGPT (API): https://github.com/acheong08/ChatGPT
- python-telegram-bot (Telegram bot API): https://github.com/python-telegram-bot/python-telegram-bot
- Install Python and pip
- Download source code
- Install requirements
pip install -r requirements.txt --upgrade
- Create bot at https://t.me/BotFather
- Type Bot's token into
telegram_api_key
insettings.json
file - Create account at OpenAI using email and password
- Type OpenAI account email and password into
chatgpt_auth_email
andchatgpt_auth_password
insettings.json
file - For DALL-E, generate API Key https://platform.openai.com/account/api-keys
- Type OpenAI API Key into
open_ai_api_key
insettings.json
file - Run main script
python main.py
You can edit telegram bot messages by editing file messages.json
. You can add new lines by adding \\n
Note: make shure you don't delete argumensts {0}
in message and please restart script to apply changes
- Install Python and pip
- Clone repo
- Fill
telegram_api_key
,chatgpt_auth_email
,chatgpt_auth_password
andopen_ai_api_key
insettings.json
file - Install systemd
sudo apt-get install -y systemd
- Create new service file
sudo nano /etc/systemd/system/gpt-telegramus.service
[Unit] Description=GPT-Telegramus service After=multi-user.target [Service] Type=simple Restart=always WorkingDirectory=YOUR DIRECTORY HERE/GPT-Telegramus ExecStart=YOUR DIRECTORY HERE/GPT-Telegramus/run.sh RestartSec=5 [Install] WantedBy=multi-user.target
- Reload systemctl daemon
sudo systemctl daemon-reload
- Enable service
sudo systemctl enable gpt-telegramus.service
- Start service
sudo systemctl start gpt-telegramus.service
- Install Docker
- Clone repo
- Build container
docker buildx build -t telegramus --load -f Dockerfile .
- Run the container
docker run -d -e TELEGRAMUS_CHATGPT_AUTH_EMAIL=you_email -e TELEGRAMUS_CHATGPT_AUTH_PASSWORD=you_password -e TELEGRAMUS_OPEN_AI_API_KEY=you_apikey -e TELEGRAMUS_TELEGRAM_API_KEY=you_tgbot_apikey --name gpt-telegramus --restart on-failure telegramus
To enable insecure auth:
- you can set
chatgpt_auth_insecure
totrue
insettings.json
file - or you can set
TELEGRAMUS_CHATGPT_AUTH_INSECURE
env variable toTrue
(docker:-e TELEGRAMUS_CHATGPT_AUTH_INSECURE='True'
)
To enable custom proxy (see https://github.com/acheong08/ChatGPT-Proxy)
- you can set proxy to
chatgpt_auth_proxy
insettings.json
file - or you can set
TELEGRAMUS_CHATGPT_AUTH_PROXY
env variable (docker:-e TELEGRAMUS_CHATGPT_AUTH_PROXY=your_proxy
)
/start
- Shows version/help
- Shows list of commands/queue
- Shows requests queue/gpt YOUR REQUEST
- Request to ChatGPT/draw YOUR REQUEST
- Request to DALLE- Or just type your request as message without
/gpt
command
- Create
/settings
command to show and edit current settings - Add the ability to change settings on the fly
- Add the ability to restart bot / api using command