Welcome to CatBot, a friendly AI assistant built with FastAPI and powered by Google Gemini. Designed to patiently assist elderly users with tech problems, CatBot focuses on simplicity, clarity, and user comfort — no technical jargon, no command-line magic. Just helpful answers. 🧡
- 🤖 Natural language support via Gemini 2.5 Flash
- 💾 Loads API key securely via
.env - 🧠 Remembers conversation context (previous messages)
- 🧓 Tailored responses for elderly/non-tech-savvy users
- 🔧 Simple steps for common tasks like formatting pendrives, using browsers, etc.
- ⚡ Built with FastAPI for speed and flexibility
catbot/
├── main.py # FastAPI app
├── model.py # Pydantic model for message handling
├── generate.py # Gemini content generation logic
├── .env # Securely store your Gemini API Key
└── README.md # You're reading it!
git clone https://github.com/your-username/catbot.git
cd catbotpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtCreate a .env file in the root directory:
GEMINI_API_KEY=your_google_gemini_api_keyuvicorn main:app --reloadRequest Body:
{
"role": "User",
"message": "Yes I have backed up and am sure I have a Windows 11 PC",
"context": [
{"user": "Help me format my pendrive"},
{"model": "Is the pendrive connected to your computer?"},
{"user": "yes now what"},
{"model": "Are you using Windows or Mac?"}
]
}Response:
{
"response": [
{
"text": "Okay, perfect! Here are the steps to format your pendrive on Windows 11..."
}
]
}- Add context in a clean, sequential format
- The system prompt is tailored specifically for non-technical elderly users
- Use
.encode().decode('unicode_escape')to clean Gemini's response output - Easy to customize and extend (e.g., for new devices or platforms)
- 🐍 Python 3.10+
- ⚡ FastAPI
- 🌐 Google Gemini API
- 🔐 python-dotenv
- 📦 Pydantic
To all the grandparents, parents, and elders who strive to adapt to the digital age — this one's for you. ❤️
This project is licensed under the MIT License - see the LICENSE file for details.