146
Follow below steps.
Base on n3d1117’s chatgpt-telegram-bot
https://github.com/n3d1117/chatgpt-telegram-bot
- Build a Ubuntu LXC (Hard disk = 1GB)
- Allow Root SSH
- apt update && apt upgrade -y
- Download the code
wget https://github.com/V-know/ChatGPT-Telegram-Bot/archive/refs/heads/main.zip - Install Unzip and unzip the code
apt install unzip
unzip main.zip - Copy .env.example to .env, then edit the own keys and id
cd ChatGPT-Telegram-Bot-main - Install pip
apt install python3-pip - Install required modules
pip install -r requirements.txt –break-system-packages - Since this code is for original OpenAI ChatGPT, this is not work for Azure OpenAI. Therefore this is required to make change on bot/openai_helper.py
- Execute the code
python3 bot/main.py - Test it.
- If everything go smooth, then stop the code. And then, set the cron job to let the code start everything boot up the system.
crontab -e
Then add
$ @reboot sleep 60; sudo python3 bot/main.py &
Done.
Optional:
Install ffmpeg to support voice message.
apt install ffmpeg
Refer:
https://github.com/n3d1117/chatgpt-telegram-bot