GPT-4 Telegram Bot is a simple and easy-to-use conversational AI-assistant running on GPT-4 language models. It provides the capability to interact with the bot through voice inputs by performing audio recognition on Telegram.
- Responds to user inputs in text format using OpenAI GPT-4 Language Models.
- Voice recognition with OpenAI Whisper ASR to handle voice inputs.
- Reset mechanism for clearing the conversation history.
- Python 3.x installed
- Install necessary Python packages using the requirements.txt file.
pip install -r requirements.txt
TELEGRAM_TOKEN
: Your Telegram Bot Token which can be obtained from BotFather.OPENAI_TOKEN
: Your OpenAI API Key, which can be found on the OpenAI Dashboard.OPENAI_VERSION
: OpenAI GPT version. Can begpt-4
orgpt-3.5-turbo
. Full version list can be found here
-
Set your environment variables:
export TELEGRAM_TOKEN=your_telegram_token export OPENAI_TOKEN=your_openai_token export OPENAI_VERSION=gpt-4
-
Run the script:
python3 gpt_telegram_bot.py
-
Open the Telegram app and interact with the bot using text messages or voice inputs.