Giter Site home page Giter Site logo

whatsgpt's Introduction

WhatsGPT?

WhatsGPT is a wrapper for ChatGPT for personal or family use, that runs inside your own WhatsApp bot.

It can keep track of several distinct conversations with different users, so your entire family (and friends) can use it

My family and I find ChatGPT very useful want we want to use it on the go and I was bored on a Saturday morning, so here we are.

It's experimental and relies on the preview release of OpenAI's ChatGPT.

Thanks to

Requirements

  • A phone number that can receive text messages/voice calls, linked to its own WhatsApp instance.
  • I use a Google Voice number, and run a 2nd instance of WhatsApp on my phone by using the WhatsApp for Business app (it's free!])
  • A recent version of NodeJS
  • A computer that can run Chrome (headless is OK)

Installation

Get the files

Clone the repository:

git clone https://github.com/pascalroget/whatsgpt.git

Install dependencies:

npm install

Obtain your session token from ChatGPT:

  1. Go to https://chat.openai.com/chat and log in or sign up.
  2. Open dev tools
  3. Open Application > Cookies

Find your local path to Chrome

Configure it

Create a .env file with the following two variables. In this example, we are using Chrome on OSX.

SESSION_TOKEN=[Your session token]
CLEARANCE_TOKEN=[Your clearance token obtained from the cookies]
CHROME_PATH=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome

Run it

npm start

Scan the barcode with your WhatsApp app:

Done :)

Use it

Open a chat with the WhatsApp account linked to the number you just linked to this bot. ChatGPT will answer. This works for several users at the same time and each conversation is separate. Additionally, you can reset an ongoing conversation by sending this message:

reset

whatsgpt's People

Contributors

pascalroget avatar apollotsantos avatar

Forkers

eduardopmaga

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.