Integrate WhatsApp Bot with Gemini API. This project is a simple WhatsApp bot that can interact with the Gemini API. This project is built using Node.js and whatsapp-web.js library.
😄 Actually this is not a meaningful project, it's just that I'm bored then I want to make a bot on whatsapp. So, I made this project.
- Node.js v18+
- Create API Key on aistudio
- Clone this repository
git clone https://github.com/ferdyhape/wabot-gemini.git
- Go to the project directory and install the dependencies
cd wabot-gemini npm install
- Copy
.env.example
to.env
and paste your API Key toGEMINI_API_KEY
cp .env.example .env
GEMINI_API_KEY = "YOUR_API_KEY"
- Run the project
npm start
- Scan the QR Code on your WhatsApp Web (You can see the QR Code on your terminal)
- Reference on index.js, to use the bot you can send a message to your WhatsApp number with the format:
Example:
.bot <message>
.bot Hello, what's up?
- The bot will reply to your message
- Enjoy!