This WhatsApp bot uses OpenAIโs GPT and DALL-E 2 to respond to user inputs.
npm install
.env
file
npm run start
Make sure to edit the docker-compose.yml
file and set your own variables there.
sudo docker-compose up
To use the bot, simply send a message with the !gpt
/!dalle
/!config
command followed by your prompt. For example:
!gpt What is the meaning of life?
!dalle A frog with a red hat is walking on a bridge.
To modify the botโs configuration, you can use the !config
command. For example:
!config <target> <type> <value>
e.g.
!config dalle size 256x256
You can disable the !gpt
/!dalle
/!config
prefix by setting PREFIX_ENABLED
to false
in the .env
file.
If you disable the prefix, the bot will not support DALL-E, and only GPT will be used.
This bot also supports sending messages to yourself.
To use this feature, simply send a message to your own phone number using the WhatsApp link https://wa.me/<your_phone_number>
.
This will take you to your own chat window.
After gaining access to your own chat, you can send a message to yourself and the bot will respond.
The operations performed by this bot are not free. You will be charged by OpenAI for each request you make.
This bot uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.
NOTE: We canโt guarantee you will not be blocked by using this method, although it works. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldnโt be considered totally safe.