Skip to content

Gemini Pro: An AI-powered Telegram bot script for generating text and image-based responses using Gemini AI

Notifications You must be signed in to change notification settings

bisnuray/GeminiProBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

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-generativeai and pillow libraries.
  • 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_KEY Open 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

  1. Open the config.py file in your favorite text editor.
  2. Replace the placeholders for API_ID, API_HASH, GOOGLE_API_KEY, and BOT_TOKEN with your actual values:

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 📝

Feel free to reach out if you have any questions or feedback.

About

Gemini Pro: An AI-powered Telegram bot script for generating text and image-based responses using Gemini AI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages