GithubHelp home page GithubHelp logo

whatsappgpt's Introduction

WhatsappGPT - ChatGPT in your whatsapp
WhatsappGPT
ChatGPT in your whatsapp, with your own phone number!

Installation

  1. Clone the repo

Getting Started

Quick Start

  1. First, you need to setup OpenAI API and put a system message.
  1. Setup your mongodb database. register here
  • Create your cluster.
  1. Add OpenAI API key, system message and mongodb URI in the .env file.
  • System message can be anything, it is the first prompt chatgpt will listen to, we use it to setup how the AI chat should behave. You can put rules there.
  1. Then, you need to setup your whatsapp client. From the remote directory, run npm run setup
  2. Wait for it to produce a QR code, scan it with your phone to connect to your number.
  3. When it logs Client is ready!, close with shift and C.
  4. Then run npm run start
  5. You are done with the setup! Now any message received that starts with !chat(and space after) would be answered with a ChatGPT response!

Usage

Note Right now error handling via the API call isn't working. Don't mad at me.

Warning Caution with sharing your number connected to this. Incase somebody spam your number, the number might be banned by whatsapp, or you will lose a ton of money via OpenAI.

  • When somebody send a message to the number you connected starting with !chat(or other command you configured) via whatsapp, either in groups or personal, it will reply with a response from chatGPT.
  • It remembers your previous messages(only that starts with !chat) and you can follow up the questions with that.
  • The memory will be deleted if you havent used !chat for more than 30 minutes or you restart the server.
  • If you want to delete the memory manually, message the chat with !chat delete history and it will wipe the memory, this is useful if you dont want to overuse the token.

Deploying

Deploy on Railway

Deploy on railway is the easiest method. Once you've set up your number and store it with mongo, just deploy and your whatsapp will forever be connected! Add your environment variables in railway.

Security

  • OpenAI stores your message, so every message you sent with "!chat" will be remembered

Configuration

  • You can replace the default !chat command with anything with anything by changing the trigger value in config.yaml

Legal

  • This isn't affiliated in any way with OpenAI or Whatsapp.

Warning Whatsapp prohibits the use of unauthirized bots on their platform. Use this at your own risk.

whatsappgpt's People

Contributors

k11q avatar

Stargazers

Hypnos avatar Juan Manuel Mery avatar Fareez Iqmal avatar  avatar 0EFB6 avatar Shafeeq Ur Rahman avatar

Watchers

 avatar

whatsappgpt's Issues

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.