whatsapp-python-chatbot  by YonkoSam

WhatsApp chatbot using Gemini + WaSenderAPI

created 2 months ago
650 stars

Top 52.3% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides an affordable WhatsApp AI chatbot solution, targeting individuals and small businesses looking to integrate AI-powered conversational capabilities into their WhatsApp communication. It leverages Google's Gemini AI and the WaSenderAPI service for cost-effective integration.

How It Works

The solution uses a Python Flask application to receive incoming WhatsApp messages via webhooks from WaSenderAPI. These messages are then processed by Google's Gemini AI to generate intelligent responses. The Flask app handles message routing, AI interaction, and sending replies back through WaSenderAPI. A key advantage is its low cost, utilizing the free tier of Gemini and a low-cost subscription for WhatsApp integration, bypassing expensive official WhatsApp Business API fees.

Quick Start & Requirements

  • Install: pip3 install -r requirements.txt
  • Prerequisites: Python 3, GEMINI_API_KEY, WASENDER_API_TOKEN (from WaSenderAPI, $6/month).
  • Setup: Requires creating a .env file with API keys. Running locally involves python3 script.py and potentially ngrok for webhook testing.
  • Docs: WaSenderAPI documentation: https://wasenderapi.com/api-docs

Highlighted Details

  • Cost-effective: $6/month for WaSenderAPI + free Gemini API tier (1500 requests/month).
  • Supports text, images, audio, video, and document messages.
  • Features smart message splitting for long responses and customizable AI persona via persona.json.
  • Maintains conversation history for context.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.

Licensing & Compatibility

The README does not explicitly state a license. It is a Python project using Flask and standard libraries. Commercial use is implied by the target audience and cost structure, but the lack of a specified license requires clarification.

Limitations & Caveats

The project relies on a third-party service (WaSenderAPI) for WhatsApp integration, which has its own terms and potential limitations. The free tier of Gemini AI has a request limit of 1500 per month, which may be insufficient for high-volume usage. Production deployment recommendations are basic, suggesting further configuration for robust logging and reverse proxying.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
655 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.