Skip to content

TivenTux/telegram-chatgpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram ChatGPT Bot

Simple telegram bot that uses chatGPT or hosted LLM.

Get chatGPT api key here: https://platform.openai.com/account/api-keys

Environment Variables

Environment Variable Description
openaikey Your openAI api key (https://platform.openai.com/account/api-keys)
telegram_bot_token The api token of your telegram bot. (https://core.telegram.org/bots)
bot_nickname Set the bot's name.
bot_keyword Keyword which the bot will respond to. Usually same with its name.
allow_private Allow private chat with the bot or restrict to channels only. Disable with 0. Default enabled.
pass_author Option to give the user's first name to the bot. Enable with 1, disable with 0. Default enabled.

You can specify these environment variables when starting the container using the -e command-line option as documented here:

docker run -e "openaikey=yy"

Building the container

After having cloned this repository, you can run

docker build -t telegram-chatgpt .

Running the container

docker run -d -e "openaikey=yyy" -e "telegram_bot_token=yyy" -e "bot_nickname=yyy" -e "bot_keyword=yyy" telegram-chatgpt

About

Telegram bot that uses chatGPT or hosted LLM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published