A simple web app that extracts user memories from chat messages and applies different personality tones to AI responses.
This project is hosted on Render’s free tier. If the backend has been idle for a while, Render puts the server to sleep. When it wakes up, the first request may take 20–30 seconds to load. After the initial spin-up, everything works normally.
A background uptime monitor keeps the service warm, but occasional delays are still expected on the free tier.
-
Memory Extraction - Give it 30 chat messages and it pulls out:
- User preferences (likes/dislikes)
- Emotional patterns
- Important facts
-
Personality Engine - Takes a message and transforms the AI response based on tone:
- Calm Mentor
- Witty Friend
- Therapist
cd backend
pip install -r requirements.txt
export OPENAI_API_KEY="your-api-key-here"
python app.pyServer runs on http://localhost:5000
Just open frontend/index.html in your browser. Or use a simple server:
cd frontend
python -m http.server 8080Then go to http://localhost:8080
Request:
{
"messages": ["message 1", "message 2", "..."]
}Response:
{
"preferences": ["..."],
"emotional_patterns": ["..."],
"facts": ["..."]
}Request:
{
"message": "I'm feeling stressed",
"tone": "calm mentor"
}Response:
{
"original_message": "...",
"before": "basic response",
"after": "response with personality",
"tone": "calm mentor"
}- Push to GitHub
- Create new Web Service on Render
- Set root directory to
backend - Add environment variable
OPENAI_API_KEY - Start command:
gunicorn app:app
- Set root directory to
frontend - Deploy as static site
- Update
API_URLin index.html to point to your backend
- Backend: Flask (Python)
- Frontend: Plain HTML/CSS/JS
- LLM: OpenAI GPT-3.5
- You need an OpenAI API key to run this
- The app doesn't store any data
- Keep your API key secret!