ChatGPT/Gemini AI for WhatsApp using Google’s Gemini API/OAI API and whatsapp-web.js, written in JS using Node.js
NOTE: I can’t guarantee you will not be blocked by using this method, although it has worked for me. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn’t be considered totally safe.
npm install npm@latest -g
git clone https://github.com/iamkhalid2/WhatsAppGPT.git
npm install
Create a “.env” file
OPENAI_API_KEY="INSERT YOUR OPENAI API KEY HERE"
GEMINI_API_KEY="INSERT YOUR GEMINI API KEY HERE"
npm start
Scan the QR code that appears in the terminal with WhatsApp to link your account.