OpenAI ChatGPT is a conversational AI model that generates human-like text. This Telegram bot allows users to interact with the model directly from the Telegram app.
git clone [email protected]:TheoBrigitte/chatgpt-telegram-bot.git
cd chatgpt-telegram-bot
cp config.env.example config.env
$EDITOR config.env # fill in the required environment variables
source config.env
go build -v
./chatgpt-telegram-bot run
- Send a message to the bot to get a response from the ChatGPT Model
- Set system role with
/setrole
command - Clear chat session (history and role) with
/clear
command - Clear chat history with
/clearhistory
command - Clear system role with
/clearrole
command
Configuration is done through environment variables.
Copy the config.env.example file to config.env
and fill in the required environment variables.
The following variables are available:
OPENAI_API_KEY
: Your OpenAI API key, you can get it from hereTELEGRAM_BOT_TOKEN
: Your Telegram bot's token, you can get it using this tutorial