This Telegram Bot is built with Python and the TeleBot and OpenAI libraries. It allows users to generate responses to messages sent in Telegram groups or private chats using OpenAI's text generation API.
- Telebot - A Python wrapper for the Telegram Bot API
- OpenAI API - OpenAI's language generation API
-
Clone the repository to your local machine: $
git clone https://github.com/dhir4j/chatgpt-bot-telegram.git
-
Install the required packages: $
pip install -r requirements.txt
-
Replace the OpenAI API key and Telegram Bot Token in the code with your own.
-
Run the program: $
python main.py
gpt
- chatGPT answer, give a query after the command
reply
- use it as reply to a message, you can extend the query after the command
dan
- chatGPT unleashed, give a query after the command
karen
- AI character: I'm Karen; demanding, arrogant, and unapologetically myself
rdan
- use dan to reply
rkaren
- use karen to reply
bug
- use it to find bugs in the code snippets
roasthim
- same as reply but for roasting
gpta
- chatGPT answer in mp3
tl
- use it as reply or provide text to translate it into English
tts
- use it as reply to convert text to speech
- Add /rdan (reply dan)
- Add /rkaren (reply karen)
- Optimize reply (check for telegram commands in reply prompt, if found remove it using array slicing)
- Fix Telegram text character limit