A Telegram Bot using Gemini API
- Install dependencies
pip install -r requirements.txt
- Obtain Telegram Bot API at BotFather
- Get Gemini API keys from Google AI Studio
- To run the bot, execute:
python main.py ${Telegram Bot API} ${Gemini API keys}
docker run -d --restart=always -e TELEGRAM_BOT_API_KEY={Telegram Bot API} -e GEMINI_API_KEYS={Gemini API Key} qwqhthqwq/gemini-telegram-bot:main
- Get Telegram Bot API at BotFather
- Get Gemini API keys on Google AI Studio
- Clone repository
git clone https://github.com/H-T-H/Gemini-Telegram-Bot.git
- Enter repository directory.
cd Gemini-Telegram-Bot
- Build images
docker build -t gemini_tg_bot .
- run
docker run -d --restart=always -e TELEGRAM_BOT_API_KEY={Telegram Bot API} -e GEMINI_API_KEYS={Gemini API Key} gemini_tg_bot
Click on the button below for a one-click deployment.
Click on the button below for a one-click deployment.
- If you want to communicate with the bot in a group, your chat must start with /gemini or /gemini_pro.
/gemini Who is John Lennon?
/gemini_pro Who is John Lennon?
- If you are having a private chat with the bot, you can directly send what you want.
Who is John Lennon?
-
You can use the /clear command to delete the current conversation history.
-
You can use the /switch command to switch the model.