Giter VIP home page Giter VIP logo

family-tele-chatgpt's Introduction

Telegram Gpt-4o Bot for My Family

Description

A Telegram bot using OpenAI and Telegram API.

Setup Instructions

Prerequisites

  • Node.js >= 14.0.0
  • Telegram Bot Token
  • OpenAI API Key

Installation

  1. Clone the repository:

    git clone https://github.com/RostyslavDzhohola/family-tele-chatGPT.git
    cd family-tele-chatGPT
  2. Install dependencies:

    npm install
  3. Create a .env file in the root directory and add your credentials:

    TELEGRAM_BOT_TOKEN=your-telegram-bot-token
    OPENAI_API_KEY=your-openai-api-key
  4. Create a bot with Telegram BotFather to get the TELEGRAM_BOT_TOKEN. You can contact BotFather here.

  5. Add the bot to a chat group and give it admin permissions to enable it to work in group chats.

Running the Bot

Start the bot with:

npm start

Usage

  • /start - Welcome message
  • /help - List of commands
  • Mention the bot (@your_bot_name or name) to ask questions.

Deploying to Heroku (Mac Users)

  1. Install the Heroku CLI using Homebrew:

    brew tap heroku/brew && brew install heroku
    • brew tap heroku/brew: Adds the Heroku repository to Homebrew.
    • brew install heroku: Installs the Heroku CLI.
  2. Log in to Heroku:

    heroku login
  3. Create a new Heroku app:

    heroku create
  4. Add your environment variables to Heroku:

    heroku config:set TELEGRAM_BOT_TOKEN=your-telegram-bot-token
    heroku config:set OPENAI_API_KEY=your-openai-api-key
  5. Deploy the app:

    git push heroku main
  6. Scale the worker:

    heroku ps:scale worker=1
  7. Open the app:

    heroku open

Note

These instructions are tailored for macOS users. If you are using a different operating system, please refer to the appropriate installation instructions for the Heroku CLI on the Heroku Dev Center.

family-tele-chatgpt's People

Contributors

rostyslavdzhohola avatar

Watchers

 avatar

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.