This is a WhatsApp bot that uses the OpenAI API to generate responses to incoming messages. It is built with whatsapp-web.js and openai.
- Node.js
- A WhatsApp account
- An OpenAI API key
- Clone this repository
- Run
npm install
to install the dependencies - Create a
.env
file in the root directory and add your OpenAI API key:OPENAI_API_KEY=your_api_key_here
- Run
node server.js
to start the bot - Scan the QR code that appears in the terminal with your WhatsApp account
The bot will respond to any message that it receives. Try sending it a message and see what it says!
Please use this bot responsibly. Do not spam or misuse it, as this may result in your WhatsApp account being banned.