Git Product home page Git Product logo

bubby's Introduction

Telegram bot powered by OpenAI

Usage

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

Roadmap

  • Integrate with Assistants API
  • Use GPT-4o 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:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.