Whatsapp bot that uses OpenAI's GPT & DALLE to respond to user inputs.
- Node.js
- A recent version of npm
- An OpenAI Account
OPENAI_API_KEY=put_your_key_here
PREFIX_ENABLED=false
- 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.
docker build . -t [image-name]
To use the bot, simply send a message with the !gpt
/!dalle
command followed by your prompt. For example:
GPT:
!gpt What is the meaning of life?
DALLE:
!dalle A frog with a red hat is walking on a bridge.
The bot only responds to messages that are received by you, not sent by you.
You can disable the !gpt
prefix by setting PREFIX_ENABLED
to false
in the .env file.
If you disable the prefix, the bot will not support DALLE and only GPT will be used.
The operations performed by this bot are not free. You will be charged by OpenAI for each request you make.
- andrewssobral - DALLE integration
- RG7279805 - Docker support