Gemini2TG is a project that deploys Google Gemini's API to a Telegram bot, giving you your own AI bot.
- This script integrates Google Gemini Pro and Google Gemini Pro Vision, eliminating the need for manual switching.
- When entering text, it uses Google Gemini Pro, and for image with text, it uses Gemini Pro Vision.
- Additionally, Google Gemini Pro supports contextual understanding.
- You can start a new chat when sending "/start" to your bot
Before you start using Gemini2TG, you need to obtain a Google API key.
- Click here to get the Google Gemini API Get Google Gemini API.
- Click here to get the Telegram bot API Get Telegram bot API.
wget -O setup.sh https://raw.githubusercontent.com/zhuchangyi/Gemini2tg/main/setup.sh && chmod +x setup.sh && ./setup.sh
wget -O Dockerfile https://raw.githubusercontent.com/zhuchangyi/Gemini2tg/main/Dockerfile
docker build -t gemini2tg .
docker run -v "$(pwd)/config.json:/app/config.json" gemini2tg
I am using Ubuntu
wget -O gemini2tg.sh https://raw.githubusercontent.com/zhuchangyi/Gemini2tg/main/gemini2tg.sh && chmod +x gemini2tg.sh && ./gemini2tg.sh
SCRIPT_NAME="script.py"
PID=$(ps aux | grep $SCRIPT_NAME | grep -v "grep" | awk '{print $2}')
if [ -z "$PID" ]; then
echo "Process not found."
else
echo "Killing process with PID: $PID"
sudo kill $PID
fi