Gemini Pro AI telegram bot [python]
• Responds to text, voice, photo, and video messages
• Uses speech recognition and text-to-speech to handle voice messages
• Answers questions about images when users send photos
git clone https://github.com/theurs/tbg.git
python -m venv .tb1
source ~/.tb1/bin/activate
cd tbg
pip install -r requirements.txt
sudo apt install ffmpeg
- Get free Gemini Pro API token(s) at https://ai.google.dev/ use VPN and multiple accounts if needed.
- Get telegram bot token from @BotFather.
- Set up cfg.py, see example.
- Run bot ./tb.py or with systemd service (see example)
- [Optional] Get api token key from https://huggingface.co/
In windows download and install ffmpeg from https://ffmpeg.org/download.html
- Download and run EXE file with telegram bot token as argument https://disk.yandex.ru/d/Y2UsesubYWNxFA
- Set keys with /key command
- Set users with /users command
- [Optional] Set hugging face keys with /hfkey command