Skip to content

Telegram Advanced AI ChatBot: GPT-4o and Gpt-4o-mini, Dall-E Model, OCR and Google Voice2Text.

License

Notifications You must be signed in to change notification settings

TechyCSR/AdvAITelegramBot

Repository files navigation

GitHub stars    GitHub forks    GitHub issues    GitHub license    GitHub contributors    GitHub pull requests    GitHub last commit

Welcome to the Telegram Advanced AI ChatBot project! This bot leverages cutting-edge AI technologies to provide a seamless and intelligent chat experience on Telegram. With features like AI chat, voice interaction, image generation, and visual analysis, this bot is designed to enhance your conversational experience and make interactions more engaging and dynamic.


✨ Features

🚀 Getting Started:

  • Direct AI Chat: Start typing in the chat to interact with the AI instantly.
  • Voice and Image Commands:
    • Record a voice message or send an image to chat with the AI.
    • In groups, send an image with a caption "ai" or "ask" to extract text from the image and interact with the AI.

🔧 Commands:

  • Text Commands:

    • /start - 🚀 Start the Bot
    • /ai - 🤖 Start a Chat with AI in Groups
      (Eg: /ai what is the capital of India?)
    • /img or /image - 🖼️ Generate an image from the given prompt
      (Eg: /img Sunset on a beach or /image Sunset on a beach)
    • /settings - ⚙️ Configure Bot Settings
    • /new or /newchat - 🔄 Start a New Chat and Clear Previous Chat History
    • /rate - ⭐️ Rate the Bot
    • /help - ❓ Show this Help Menu
  • Voice Commands:

    • Record a voice message for seamless interaction.
  • Image Commands:

    • Send an image with a caption like "ai" or "ask" for text extraction and interaction.

🧠 AI-Powered Features:

  • 💬 Intelligent ChatBot (GPT-4):
    Engage in dynamic, context-aware conversations with the bot.
  • 🎙️ Voice Interaction:
    Convert speech to text and generate speech from text for a smooth voice experience.
  • 🖼️ Image Generation (DALL-E 3):
    Transform your ideas into stunning visuals by generating images from textual prompts.
  • 🔍 Visual Analysis (Google Lens):
    Extract insights and text from any image using cutting-edge AI tools.

💡 Group & Personal Chat Features:

  • Interact with the bot in group chats or private conversations seamlessly.
  • Leverage powerful commands and AI tools to enhance your experience in any context.

🛠️ Technology Stack


📂 Project Structure

AdvAITelegramBot/
├── assets/                      # Static assets (images, icons, etc.)
│   ├── logos/                   # Logos for branding
├── database/                    # Database-related scripts or schema
│   ├── migrations/              # Database migration scripts
│   └── models.py                # Database models
├── modules/                     # Core logic and functionality modules
│   ├── __init__.py              # Marks 'modules' as a package
│   ├── group/                   # Group-related functionalities
│   │   ├── __init__.py          # Marks 'group' as a package
│   │   ├── group_info.py        # Handles group information
│   │   ├── group_settings.py    # Manages group settings
│   │   ├── new_group.py         # Handles new group creation
│   ├── image/                   # Image processing functionalities
│   │   ├── __init__.py          # Marks 'image' as a package
│   │   ├── image_generation.py  # AI-based image generation
│   │   ├── img_to_text.py       # Extract text from images
│   ├── speech/                  # Speech processing functionalities
│   │   ├── __init__.py          # Marks 'speech' as a package
│   │   ├── text_to_voice.py     # Converts text to speech
│   │   ├── user_voice.py        # Manages user voice data
│   │   ├── voice_to_text.py     # Converts voice input to text
│   ├── user/                    # User-related functionalities
│   │   ├── __init__.py          # Marks 'user' as a package
│   │   ├── assistant.py         # AI assistant functionalities
│   │   ├── commands.py          # Manages user commands
│   │   ├── dev_support.py       # Developer-specific support logic
│   │   ├── global_setting.py    # Global user settings
│   │   ├── help.py              # Help command handling
│   │   ├── lang_settings.py     # Language-related user settings
│   │   ├── settings.py          # General user settings management
│   │   ├── start.py             # User onboarding/start commands
│   │   ├── user_support.py      # Feedback and support handling
|   ├── chatlogs.py                  # Chat logging script
|   ├── feedback_and_ratings.py      # Feedback and ratings handling
|   ├── maintenance.py               # Maintenance scripts
|   ├── lang.py                      # General language processing utilities
├── tests/                       # Test cases for modules
│   ├── test_speech.py           # Test cases for speech module
├── har_and_cookies/             # Stores HAR files and cookies for debugging
│   └── ...                      # HAR and cookie files
├── .env                         # Environment variables (API keys, etc.)
├── .gitignore                   # Git ignore rules
├── Dockerfile                   # Docker configuration for the project
├── LICENSE                      # License for the project
├── README.md                    # Project documentation
├── config.py                    # Bot configuration file
├── requirements.txt             # Python dependencies
├── run.py                       # Entry point for running the bot


🚀 Quick Start

📦 Installation

  1. Clone the Repository:

    git clone "https:github.com/TechyCSR/AdvAITelegramBot.git"
    cd AdvAITelegramBot
    
  2. Install Dependencies:

    pip install -r requirements.txt
    
  3. Set Environment Variables:

    Create a .env file in the root directory and add the following environment variables:

    TELEGRAM
    OPENAI
    OCR_SPACE
    MONGO_URI
    Log_Channel (Mandatory)
    
  4. Run the Bot:

    python run.py
    
  5. Start Chatting:

    Open the Telegram app and start chatting with the bot!


Contributors

Maintained by:

License

Licensed under the MIT License. This open-source project provides no warranties or guaranteed support.