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.
- 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)
Clone the repository:
git clone https://github.com/pascalroget/whatsgpt.git
Install dependencies:
npm install
- Go to https://chat.openai.com/chat and log in or sign up.
- Open dev tools
- Open Application > Cookies
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
npm start
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