Simple implementation OpenAI in Whatsapp chatbot.
Just clone this repo and run the following command in your terminal
git clone https://github.com/IhsanDevs/OpenAI-Whatsapp-Bot.git
Install all the dependencies
npm install
Copy the .env.example
file to .env
and fill the required fields
cp .env.example .env
Open OpenAI dashboard and create a new API key
https://beta.openai.com/account/api-keys
Set the API key in the .env
file
OPENAI_API=YOUR_API_KEY
Then run the following command to start the server
npm run watch
Scan the QR code using your Whatsapp app and start chatting with the bot using prefix from .env
file
- NodeJS - Server Environment
- Whatsapp-Web.js - Whatsapp Web API
- OpenAI - OpenAI API
- @IhsanDevs - Just code it