A Telegram bot that integrates with OpenAI’s official ChatGPT APIs to provide answers, written in Python
A Telegram bot that integrates with OpenAI’s official ChatGPT, DALL·E and Whisper APIs to provide answers. Ready to use with minimal configuration required.
Plugins
Features
- Support markdown in answers
- Reset conversation with the
/reset
command - Typing indicator while generating a response
- Access can be restricted by specifying a list of allowed users
- Docker and Proxy support
- Image generation using DALL·E via the
/image
command - Transcribe audio and video messages using Whisper (may require ffmpeg)
- Automatic conversation summary to avoid excessive token usage
- Track token usage per user - by @AlexHTW
- Get personal token usage statistics via the
/stats
command - by @AlexHTW - User budgets and guest budgets - by @AlexHTW
- Stream support
- GPT-4 support
- If you have access to the GPT-4 API, simply change the
OPENAI_MODEL
parameter togpt-4
- If you have access to the GPT-4 API, simply change the
- Localized bot language
- Available languages
- Improved inline queries support for group and private chats - by @bugfloyd
- To use this feature, enable inline queries for your bot in BotFather via the
/setinline
command
- To use this feature, enable inline queries for your bot in BotFather via the
- Support new models announced on June 13, 2023
- Support functions (plugins) to extend the bot’s functionality with 3rd party services
- Weather, Spotify, Web search, text-to-speech and more. See here for a list of available plugins
- Support unofficial OpenAI-compatible APIs - by @kristaller486
- (NEW!) Support GPT-4 Turbo and DALL·E 3 announced on November 6, 2023 - by @AlexHTW
- (NEW!) Text-to-speech support announced on November 6, 2023 - by @gilcu3
- (NEW!) Vision support announced on November 6, 2023 - by @gilcu3
Prerequisites
- Python 3.9+
- A Telegram bot and its token (see tutorial)
- An OpenAI account (see configuration section)