/What-GPT

Whatsapp bot for GPT-3 & DALL-E. Made with WhatsApp Web, Firebase and OpenAI.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

What-GPT

This bot allows users to interact with ChatGPT & DALL-E via WhatsApp text messages, providing automated responses based on their questions, and commands with message history saved on Firebase Realtime Database. It allows to generate images with Dall-E with prompts given inside whatsapp. It also allows to set the personality of bot to Funny, Genius or anything you like.

Deploy on Heroku

Deploy on Railway

Technologies

Run the project

Clone this project with the command:

  git clone https://github.com/imasimali/what-gpt.git

Get OpenAI api key for .env from OpenAI.

Go to the .env.example file and rename it to .env, and change the necessary values ​​for it to work.

Now install the project dependencies with the command:

  npm install

Finally run the command below to start the project and read the QR Code with your Whasapp to connect with the service.

  npm start

Optional (Save Message History on Firebase):

Create a Firebase Project. Goto Realtime Database and Create it. Copy the Database URL from Project Settings. Use the following rules for Firebase Realtime Database to allow access and prevent deletion.

  {
    "rules":{
        ".read":false,
        ".write":false,
        "$phone":{
          ".read":true,
          ".write":"newData.exists()"
        }
    }
  }