Telegram bot powered by OpenAI
Chat with gpt-4o-mini
|
Analyze image | Generate with dall-e-3
|
---|---|---|
# this project uses PNPM instead of NPM
npm install --global pnpm
# install dependencies
pnpm install
# set secrets for the local stage, use `--stage prod` for production
# see the full list of secrets below
pnpm sst secrets set KEY VALUE
# this project use SST to deploy to AWS
# use its dev command for https://docs.sst.dev/live-lambda-development
pnpm dev
KEY | VALUE |
---|---|
OPENAI_API_KEY | Create new secret key at https://platform.openai.com/api-keys |
OPENAI_ASSISTANT_ID | Create new assistant at https://platform.openai.com/assistants |
TELEGRAM_ADMIN_IDS | Comma separated list of Telegram user IDs |
TELEGRAM_BOT_TOKEN | Chat with https://t.me/BotFather to create a new bot |
TELEGRAM_WEBHOOK_SECRET_TOKEN | Use random.org or similar tool to generate a secret token |
# set secrets for the production stage
pnpm sst secrets set --stage prod KEY VALUE
# go production!
pnpm run deploy --stage prod
This project has been setup to be deployed automatically with GitHub Actions. A few manual steps are required:
.github/workflows/sst.yml
to use the correct role-to-assume
and aws-region