AchmadZackyGZ/whatsapp-ai-bot — reverse-engineered prompt
Reverse engineered prompt
Build me a simple WhatsApp AI chatbot in Python. I want people to send a message to a Twilio WhatsApp number, then the bot should send that message to an AI model through OpenRouter and reply back in the same WhatsApp chat.
Use Flask for the small web server and make it easy to run locally. Put the Twilio credentials, OpenRouter key, phone numbers, and model name in environment variables so I don’t have to hardcode secrets. Add clear setup comments so I know what to put in Twilio for the webhook URL.
Please keep it simple, one main app file is fine. Handle basic errors nicely, like missing keys, empty messages, or the AI service failing, and send a friendly fallback reply instead of crashing. Include the needed requirements file and a short explanation in comments or a README for how to install, run, and test it with ngrok.
Look up current Twilio and OpenRouter docs online if you need to.
Want more depth? Deep Reverse