Code Monkey home page Code Monkey logo

telegram-chatgpt-concierge-bot's Introduction

Telegram ChatGPT Concierge Bot (+ Voice!)

Deploy on Railway

Telegram ChatGPT Concierge Bot

This is a Telegram bot that uses:

  • OpenAI's ChatGPT, obviously, as "the brain"
  • LangchainJS to constructs prompts, handle convo history and interact with Google
  • OpenAI's Whisper API to generate text from voice
  • Play.ht to generate voice from text and reply to voice messages

How to use

Prerequisite: You need Node 18, a Telegram bot token and an OpenAI API key with access to GPT-4. Optionally you can use other model by setting OPENAI_MODEL env var. Ask ChatGPT how to get these. You'll also need ffmpeg installed to use voice interactions.

  1. git clone https://github.com/RafalWilinski/telegram-chatgpt-concierge-bot
  2. cd telegram-chatgpt-concierge-bot
  3. touch .env and fill the following:
TELEGRAM_TOKEN=
OPENAI_API_KEY=
PLAY_HT_SECRET_KEY=
PLAY_HT_USER_ID=
PLAY_HT_VOICE= # check docs for available voices https://playht.github.io/api-docs-generator/#utra-realistic-voices
OPENAI_MODEL=gpt-3.5-turbo # only if you don't have access to GPT-4
  1. npm install
  2. npm start

Follow me on Twitter

Discuss on Twitter or HackerNews

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.