GeminiProBot
GeminiProBot copied to clipboard
Gemini is an advanced Artificial Intelligence (AI) system designed to intelligently respond to diverse prompts, including pictures, text, speech, music, and code. This Python Telegram Bot script lever...
Gemini Pro Telegram Bot 🌌
Gemini Pro: An AI-powered Telegram bot script for generating text and image-based responses using Gemini AI
🌟 Features
- 🍪 Text Prompt Response: Accepts text prompts and generates text.
- 🖼️ Image Recognition: Can read and interpret images.
Requirements
Before you begin, ensure you have met the following requirements:
- Python 3.9 or higher.
pyrofork,google-generativeaiandpillowlibraries.- A Telegram bot token (you can get one from @BotFather on Telegram).
- API ID and Hash: You can get these by creating an application on my.telegram.org.
- To Get
GOOGLE_API_KEYOpen GOOGLE_API_KEY.
Installation
To install pyrofork, google-generativeai and pillow, run the following command:
pip install pyrofork google-generativeai pillow
Note: If you previously installed pyrogram, uninstall it before installing pyrofork.
Configuration
- Open the
config.pyfile in your favorite text editor. - Replace the placeholders for
API_ID,API_HASH,GOOGLE_API_KEY, andBOT_TOKENwith your actual values:API_ID: Your API ID from my.telegram.org.API_HASH: Your API Hash from my.telegram.org.GOOGLE_API_KEY: To get google api key Click Here.BOT_TOKEN: The token you obtained from @BotFather.
Deploy the Bot
git clone https://github.com/bisnuray/GeminiProBot
cd GeminiProBot
python gemini.py
Usage 🛠️
The bot supports the following commands:
/gem <prompt>: Generates a response based on a provided text prompt./imgai <optional prompt>: Generates a response based on an image. Ensure you reply to an image with the /imgai command. Optionally, you can provide a prompt along with the command, like/imgai What is this?, while replying to a photo to get a more specific response.
Author 📝
- Name: Bisnu Ray
- Telegram: @SmartBisnuBio
Feel free to reach out if you have any questions or feedback.