Skip to content

TheoBrigitte/chatgpt-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Telegram logo

Github release Github action

About

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.

Screenshots

Chat example screenshot

Quickstart

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

Features

  • 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

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 here
  • TELEGRAM_BOT_TOKEN: Your Telegram bot's token, you can get it using this tutorial

Credits