You can do this by talking with the official "BotFather" tool on Telegram: https://t.me/botfather
For example, of your friends in telegram.
For example, in Digital Ocean, Azure, etc.
You can also run the script locally. Useful for testing.
git clone https://github.com/RomanPlusPlus/telegram-llm-bot.git
tmux new -s session_name
cd to the dir where you cloned this and run in a terminal:
pip install -r requirements.txt
echo "export TELEGRAM_LLM_BOT_TOKEN='<your_token>'" >> ~/.bashrc
echo "export OPENAI_API_KEY='<your_token>'" >> ~/.bashrc
echo "export OPENAI_MODEL='<your_token>'" >> ~/.bashrc
echo "export ALLOWED_USER_IDS='some_id1,some_id2,some_id3'" >> ~/.bashrc
source ~/.bashrc
python3 main.py
To leave the script running even after you log out, press Ctrl+b
, and then press d
.
To return to the tmux session in the future, run tmux attach -t session_name
.