Skip to content

saharshpand3y/Ruby-TG-Gemini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google's Gemini Integration in Telegram

The Telegram Gemini Project is a Ruby application designed to interact with users via text messages or visualize images based on user queries. It utilizes the Telegram Bot API for communication and integrates with the Gemini API for generating content.

Description

This project enables users to interact with a Telegram bot by sending text messages or images. The bot processes the user input, performs queries using the Gemini API, and returns relevant responses or visualizations. It leverages natural language processing (NLP) and image recognition technologies to understand user queries and provide accurate outputs.

Features

  • Text Interaction: Users can communicate with the bot by sending text messages.
  • Image Visualization: Users can send images to the bot, which will be processed to generate visualizations based on the content.
  • Natural Language Processing: The bot utilizes NLP techniques to understand user queries and provide meaningful responses.
  • Image Recognition: Images sent to the bot are analyzed using image recognition algorithms to extract relevant information.

Configuration

  1. Bot Token:

    • Obtain a Telegram Bot token by creating a bot using the BotFather bot on Telegram.
  2. API Key:

    • Obtain a Gemini API Key by Signing up for an account on Gemini's Website.

Installation

  1. Clone the repository:

    $ git clone https://github.com/saharshpand3y/Ruby-TG-Gemini.git
  2. Go to Project Directory:

      cd Ruby-TG-Gemini
  3. Rename the .env.sample file to .env & fill in Your Gemini API Key & Telegram Bot Token:

  4. Install dependencies:

    • If you are a Mac/Linux User:

        bash install.sh
    • If you are using Windows:

        gem install bundler
        bundle install

Usage

  1. Run Main

      ruby main.rb
  2. If you want to keep the code always on (Optional):

      sudo apt install screen -y
      screen -S Bot
      ruby main.rb
    • To exit Virtual Screen, Press Ctrl+A+D
  3. Interact with your Bot on Telegram:

    • Send text messages to bot to query Information.
    • Send Images to bot with query regarding the image as caption.

Contributing

  • Contributions to the Project are welcome! Feel free to submit pull requests.

Releases

No releases published

Packages

No packages published