Simple Telegram bot that uses OpenAI API to generate text like ChatGPT.
pnpm install
- Create
.local.env
and fill in config
BOT_TOKEN=your_bot_token
BOT_USERNAME=your_test_bot
BOT_ADMIN_ID=your_telegram_id
OPENAI_KEY=your_openapi_key
OPENAI_ORG_ID=your_openapi_org_id
TELEGRAM_WHITELIST_USERNAMES=your_username // add this config to restrict to specific users
pnpm dev
Hosted on AWS Lambda
Inline query ends with double semicolon so OpenAI API won't be spammed because this bot is intended to be deployed on a serverless platform without a database or cache