Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

daohoangson/bubby

Repository files navigation

Telegram bot powered by OpenAI

Usage

Chat with gpt-4o-mini Analyze image Generate with dall-e-3
Chat Analyze image Analyze then generate image

Roadmap

  • Integrate with Assistants API
  • Use GPT-4o mini for conversation
  • Use DALL-E 3 for image generation
  • Use whisper-1 for speech to text transcription
  • Use tts-1 for text to speech synthesis
  • Add support for memory recall
  • Allow bot to search for old messages, and maybe continue previous conversation
  • Add support for reminders
  • Add support for Google Mail

Development

# 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

Secrets

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
  • OpenAI assistant doesn't need to be fully configured, the instruction and tools will be set per run
  • Only admin can initiate chat with the bot
  • Admin can invite the bot to a group chat, it will reply to everyone

Deployment

# 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:

About

Telegram bot powered by OpenAI

Topics

Resources

Stars

Watchers

Forks

AltStyle によって変換されたページ (->オリジナル) /