This is a telegram bot that uses the GPT-3.5 & GPT-4 API to generate text. It is a work in progress.
- Install the dependencies
yarn install
- Build the project with typescript TSC. The output should be in the dist directory
tsc
- Create a telegram bot and get the token
- Create an API key from OpenAI
- Create a .env file and add the following variables
# Path: .env
# .env file
# This file should be used to store environment variables on your local machine.
# Do not commit this file to source control.
BOT_TOKEN=your_bot_token_here
GPT_TOKEN= your_gpt_token_here
TELE_CHANNEL= "your channel id here"
TELE_CHAT_ID= "your chat id here"
- Create a file called users.txt and add the telegram user ids of the users you want to allow to use the bot (will use database in the future)
# Path: users.txt
# users.txt file
# This file should be used to store the telegram user ids of the users you want to allow to use the bot.
# Do not commit this file to source control.
111111111111
222222222222
333333333333
- Run the bot
node index.js