ChatGPT Telegram Bot - @altryne
This is a Telegram bot that lets you chat with the chatGPT language model using your local browser. The bot uses Playwright to run chatGPT in Chromium, and can parse code and text, as well as send messages. It also includes a /draw command that allows you to generate pictures using stable diffusion. More features are coming soon.
Features
- Chat with chatGPT from your Telegram on the go
-
/drawpictures using stable diffusion (version 0.0.2) -
/browsegive chatGPT access to Google (version 0.0.3)
How to Install
Step 1: Install Python and Miniconda
- Go to the Miniconda download page.
- Click on the appropriate installer for your operating system.
- Follow the prompts to complete the installation.
Step 2: Create a conda environment
- Open a terminal or command prompt.
- Navigate to the directory where you want to create the environment.
- Run
conda env create -f environment.ymlto create the environment. - Activate the newly created environment
conda activate chat
Step 3: Install Playwright
- Open a terminal or command prompt.
- Navigate to the directory where you installed Miniconda.
- Run
playwright installto download the necessary Chromium software. - Run
playwright install-depsto download the necessary dependencies
Step 4: Set up your Telegram bot
- Set up your Telegram bot token and user ID in the
.envfile. See these instructions for more information on how to do this. - Edit the
.env.examplefile, rename it to.env, and place your values in the appropriate fields.
Step 5: Set up your API keys
- Copy the
.env.examplefile and rename the copy to.env. - To use the
/drawcommand, you will need to obtain an API key for stable diffusion. To do this, go to Dream Studio Beta and sign up for a free membership. - SERP_API_KEY is optional. If you want to use the
/browsecommand, you will need to obtain an API key for SERP. To do this, go to SERP API and sign up for a free account.
Step 5: Run the server
- Open a terminal or command prompt.
- Navigate to the directory where you installed the ChatGPT Telegram bot.
- Run
python server.pyto start the server.
Step 6: Chat with your bot in Telegram
- Open the Telegram app on your device.
- Find your bot in the list of contacts (you should have already created it with @botfather).
- Start chatting with your bot.
Credits
- Creator @Altryne on Twitter
- Based on Daniel Gross's whatsapp gpt package.


