An intelligent Telegram bot powered by advanced AI models and internet search capabilities. The bot uses Llama 3.1-Nemotron for text generation and BART for text summarization, with future plans for internet search integration.
- Advanced language understanding using multiple AI models
- Text summarization for long messages
- Intelligent response generation
- Continuous learning capabilities (planned)
- Internet search integration (planned)
- Python 3.8+
- pip (Python package manager)
- A Telegram Bot Token (get it from @BotFather)
- Clone the repository:
git clone /~https://github.com/MilesONerd/telegram-bot.git
cd telegram-bot
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
cp .env.example .env
Edit .env
and set your Telegram Bot Token:
TELEGRAM_BOT_TOKEN=your_bot_token_here
- Start the bot:
python bot.py
-
Open Telegram and search for your bot using the username you set with @BotFather
-
Start chatting with the bot using these commands:
/start
- Begin interaction with the bot/help
- Show available commands/about
- Learn more about the bot
The bot processes messages differently based on their content:
- Short questions (< 10 words): Quick responses using Llama 3.3
- Long messages (> 100 words): Summarization using BART + detailed response
- Messages containing 'summarize' or 'tldr': Text summarization
- Chat-related queries: Optimized conversation handling
- Regular messages: Comprehensive AI-powered responses
TELEGRAM_BOT_TOKEN
: Your Telegram Bot API token (required)SERPAPI_API_KEY
: Google Search API key (optional, for future use)DEFAULT_MODEL
: Default AI model to use (default: llama)ENABLE_CONTINUOUS_LEARNING
: Enable/disable learning capabilities (default: true)
telegram-bot/
├── bot.py # Main bot implementation
├── ai_handler.py # AI model handling and text generation
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── README.md # Project documentation
└── LICENSE # Project License
- Basic bot implementation
- Llama 3.1-Nemotron integration
- BART integration
- Llama 3.3 integration
- Mistral Mathstral
- Mistral Mamba Codestral
- Mistral Pixtral
- Internet search integration
- Continuous learning implementation
- Advanced error handling
- Performance optimizations
This project is BSD 3-Clause License. All rights reserved to Enzo Fuke (MilesONerd).
Created by MilesONerd