Skip to content

n3rdc4ptn/telegram-gpt

Repository files navigation

Telegram ChatGPT Bot

This is a Telegram bot that uses the new ChatGPT Api to generate text in a Telegram Chat.

You can write him a message and he will reply with a generated text.

It sends the last 5 messages to the API and uses the last message as the prompt. This is done in the queue.js file.

How to use

yarn install

node bot.js

You need to set the following environment variables:

OPENAI_API_KEY=
TELEGRAM_BOT_TOKEN=
ALLOWED_USERS=1234556,7859346

To find your user chat id you need to start the bot and send him a message. The log prints you your chat id.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published