This project is a whatsapp bot that uses OpenAI's APIs to respond to user inputs. This is a fork from https://github.com/navopw/whatsapp-chatgpt
To use ChatGPT, simply type gpt
followed by your prompt, and the bot will generate a response.
To use DALL-E, simply type dalle
followed by your prompt, and the bot will generate an image response.
- Node.js
- A recent version of npm
- An OpenAI Account
OPENAI_API_KEY=put_your_key_here
PREFIX_ENABLED=false
PREFIX_GPT=gpt
PREFIX_DALLE=dalle
- Clone this repository
- Install the required packages by running
npm install
- Put your OpenAI API Key into the .env File (
OPENAI_API_KEY
)- You can obtain an API Key here: OpenAI API Keys
- Run the bot using
npm run start
- Scan the QR Code with Whatsapp (Link a device)
- Now you're ready to go, people can send you messages and the bot will respond to them.
To use the bot, simply send a message with gpt
command followed by your prompt. For example:
gpt What is the meaning of life?
The bot only responds to messages that are received by you, not sent.
You can disable the gpt
prefix by setting PREFIX_ENABLED
to false
in the .env file.