Objective: Develop an AI chatbot named EliTechWiz AI that automatically connects to WhatsApp using the Baileys library and responds to user messages by querying any LLM API (such as OpenAI, Anthropic, Cohere, or others). Key Features: WhatsApp Integration: Use the open-source Baileys Node.js library to connect to a WhatsApp number via Web API (via WhatsApp Web emulation). The bot should auto-reconnect if disconnected and maintain session persistence. AI Message Handling: For each incoming message, forward it to a selected LLM API (e.g., OpenAI GPT-4) and retrieve a generated response. Respond to the user with the AI-generated message through WhatsApp. AI Identity and Behavior: The AI should identify itself as "EliTechWiz AI" when asked who it is or anything related to its identity. Include polite, helpful, and professional tone in responses. Basic Features: Log all incoming and outgoing messages. Handle errors gracefully (e.g., API errors, connectivity issues). Use .env for sensitive configuration (API keys, session path, etc.). Optional Enhancements: Add basic context handling for short conversations. Allow different commands (e.g., /help, /about, etc.). Add typing simulation (delay typing status). Constraints: Must comply with WhatsApp's Terms of Use (Baileys uses reverse-engineering, which is unofficial — document this clearly). Must secure API keys and personal data handling. Deliverables: Source code with clear comments (Node.js preferred). README.md with full setup instructions, including Baileys auth setup. .env.example file for config. Instructions to run locally and optionally deploy (e.g., using PM2 or Docker).
Loading...
ok make the app easily deployable to platforms like heroku, vercel , koyeb, railway , netlify etc. also put a bot command that trigers it on on a chat and starts to answer messages
Loading...
ok look all files and enhance it check the errors and improve the performance. and make sure it is easily connected to whatsapp by baileys system either by pairing code or by qr code