786 B
786 B
BetterBot
A simplified Telegram bot that lets non-technical users edit the Better Life SG website by sending natural language instructions.
How it works
- User sends a message to the Telegram bot (e.g. "Change the phone number to 91234567")
- BetterBot uses an LLM (GPT-4.1) with file-editing tools to read and modify the website HTML
- Changes are written directly to the site files served by Caddy
Stack
- Python 3.12 + python-telegram-bot + OpenAI SDK
- Reads/writes static HTML files mounted from
/opt/betterlifesg/site/ - Runs on RackNerd at
betterbot.bytesizeprotip.com
Deployment
ssh racknerd bash /opt/src/betterbot/scripts/deploy-betterbot.sh
Commands
/start— Introduction and examples/reset— Clear conversation history