Loading repository data…
Loading repository data…
EngShimaaZeid / repository
WhatsApp-AI-AppRoute is a smart automation bot that connects WhatsApp with AI models via OpenRouter. It delivers intelligent, context-aware responses using dynamic model selection (GPT-4 Turbo or GPT-4o-mini), conversation memory, caching, and rate limiting. Ideal for AI-powered messaging automation.
README.md (make sure the extension is .md, not .txt)Run this command to create the file directly:
cat > README.md << 'EOF'
# WhatsApp AI Automation
A Node.js-based automation system that integrates WhatsApp with advanced AI models through OpenRouter. This bot enables intelligent, context-aware responses using GPT-4 Turbo and GPT-4o-mini, with features like conversation memory, caching, rate limiting, and command handling.
## Author
**Dr. Shimaa Zeid**
GitHub: [https://github.com/EngShimaaZeid](https://github.com/EngShimaaZeid)
Affiliation: Shoubra Faculty of Engineering, Benha University
## Features
- Powered by GPT-4 Turbo and GPT-4o-mini via OpenRouter
- Automatic model selection based on message complexity
- Conversation history retention per user (last 15 messages)
- Response caching for improved performance and reduced API usage
- Rate limiting: 15 messages per minute per user
- Built-in command support: /help, /info, /stats, /ping, /model, /cache
- Real-time statistics tracking
- WhatsApp Web integration using QR-based authentication
- Graceful shutdown handling (SIGINT/SIGTERM)
## Getting Started
### Prerequisites
- Node.js v18 or higher
- npm or yarn
- A WhatsApp account for device pairing
- OpenRouter API key from https://openrouter.ai/keys
### Installation
1. Clone the repository:
```bash
git clone https://github.com/EngShimaaZeid/whatsapp-ai-automation.git
cd whatsapp-ai-automation