Skip to content

Unisami/Telegram-Ai-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Telegram Bot with Gemini AI Integration

A demo project that shows how multiple APIs can be integrated.

Prerequisites

  • Python 3.10+
  • Telegram Bot Token
  • Gemini API Key

Installation

  1. Clone the repository:

    git clone https://github.com/Unisami/Telegram-Ai-Bot
    cd Telegram-Ai-Bot
  2. Install the required packages:

    pip install pyTelegramBotAPI google-generativeai python-dotenv
  3. Set up environment variables:

    • Add your API keys to the .env file.

Usage

  1. Run the bot:

    python tbot.py
  2. Interact with the bot on Telegram. Send /start or /help to initiate a conversation. The bot will respond to other messages using Gemini AI.

Environment Variables

  • TELEGRAM_BOT_TOKEN: The token for your Telegram bot, obtained from BotFather.
  • GEMINI_API_KEY: The API key for accessing the Gemini AI model.

About

Telegram Bot with Gemini AI Integration

Topics

Resources

Stars

Watchers

Forks

Languages