A Node.js-based WhatsApp chatbot that uses whatsapp-web.js for WhatsApp interaction and Google's Gemini AI for intelligent responses. This project was developed as part of President University MSIT Machine Learning course assignment to demonstrate practical applications of AI in messaging platforms.
Before running this bot, make sure you have:
- Node.js
- npm
- A WhatsApp account
- Google Cloud account with Gemini AI API access
- Chrome/Chromium browser installed
- Clone the repository:
git clone https://github.com/nathanpasca/wa-chat-bot
cd wa-chat-bot- Install dependencies:
npm install whatsapp-web.js
npm install @google/generative-ai
npm install qrcode-terminal- Create a
.envfile in the root directory:
API_KEY=your_gemini_api_key_here- Start the bot:
node index.js-
Scan the QR code with WhatsApp to authenticate
-
The bot is now ready to receive and respond to messages
This project was developed as part of an academic assignment in Machine Learning. While it serves as a practical demonstration of AI concepts, it may need additional features and security measures for production use.
- whatsapp-web.js
- Google Gemini AI
- Course instructors Mr. R for guidance