Telegram bot integrating OpenAI APIs
Top 15.0% on sourcepulse
This project provides a feature-rich Telegram bot that integrates with OpenAI's ChatGPT, DALL·E, and Whisper APIs, enabling users to interact with advanced AI models directly from Telegram. It targets Telegram users seeking a convenient interface for AI-powered text generation, image creation, and audio transcription, offering features like conversation summarization, token usage tracking, and plugin support for extended functionality.
How It Works
The bot leverages the python-telegram-bot
library to handle Telegram interactions and the official OpenAI API client for AI model communication. It supports streaming responses, conversation history management with summarization to control token usage, and a plugin system that allows integration with external services like weather, Spotify, and web search. The architecture is designed for flexibility, allowing configuration of various OpenAI models (including GPT-4o, GPT-4 Turbo, DALL·E 3), proxies, and user access controls.
Quick Start & Requirements
pip install -r requirements.txt
or use Docker (docker compose up
).ffmpeg
for audio/video transcription..env.example
to .env
and fill in OPENAI_API_KEY
and TELEGRAM_BOT_TOKEN
.Highlighted Details
Maintenance & Community
The project has active contributions from multiple users, indicated by author tags next to new features. Community engagement is encouraged via issues and pull requests.
Licensing & Compatibility
Released under the GPL 2.0 license. This is a copyleft license, meaning derivative works must also be licensed under GPL 2.0. Commercial use or linking with closed-source applications may be restricted due to the GPL 2.0 license.
Limitations & Caveats
The GPL 2.0 license may impose restrictions on commercial use or integration into proprietary software. Some features, like streaming, are noted as incompatible with multiple response choices. The README mentions preliminary support for o1
and o1-mini
models, suggesting potential instability or incomplete implementation for these.
2 months ago
Inactive