A WhatsApp chatbot that uses ThingESP for messaging and Google Gemini for AI responses.
- Receives WhatsApp queries via ThingESP
- Generates AI responses using Gemini
- Replies automatically through MQTT
- Python 3.8+
- ThingESP account credentials
- Google Gemini API key
pip install google-genai paho-mqttEdit these values inside WhatsChatbot.py:
client = genai.Client(api_key="YOUR_GEMINI_API_KEY")
thing = Client('YOUR_USERNAME', 'YOUR_PROJECT_NAME', 'YOUR_PASSWORD')Run the script:
python WhatsChatbot.pyYour bot will listen for incoming messages and respond automatically.
- Keep your API keys secret.
- You can customize
handleResponse()to modify how replies are generated.
MIT (or your preferred license)