An intelligent AI-powered assistant that helps users book appointments and manage their Google Calendar through natural conversation.
- Natural Language Processing: Book meetings using plain English
- Intelligent Parsing: Understands various date/time formats (tomorrow, next monday, 3 PM, etc.)
- Context Awareness: Remembers conversation history and asks follow-up questions
- Error Handling: Graceful handling of missing information and conflicts
- Google Calendar Integration: Direct booking to your Google Calendar
- Availability Checking: Verify time slots before booking
- Conflict Resolution: Automatically detect and avoid scheduling conflicts
- Meeting Details: Support for titles, descriptions, attendees, and durations
- Modern Streamlit Interface: Clean, responsive design with custom styling
- Real-time Status: Backend connection monitoring
- Chat History: Persistent conversation memory
- Quick Actions: Example prompts and meeting history
- Visual Feedback: Color-coded messages and status indicators
- FastAPI REST API: High-performance backend with automatic documentation
- Comprehensive Validation: Input validation and error handling
- Health Monitoring: System status and health checks
- Logging: Detailed logging for debugging and monitoring
- FastAPI: Modern, fast web framework for building APIs
- LangChain: Framework for developing applications with LLMs
- Groq: High-performance LLM inference
- Google Calendar API: Calendar integration
- Pydantic: Data validation using Python type annotations
- Streamlit: Rapid web app development
- Custom CSS: Beautiful, responsive design
- Real-time Updates: Live status monitoring
- Google Cloud: Service account for calendar access
- Environment Variables: Secure configuration management
- Logging: Comprehensive error tracking
- Python 3.8+
- Google Cloud Project with Calendar API enabled
- Groq API key
git clone <repository-url>
cd tailorTalk
pip install -r requirements.txt- Go to Google Cloud Console
- Create a new project or select existing one
- Enable the Google Calendar API
- Create a Service Account:
- Go to "IAM & Admin" > "Service Accounts"
- Click "Create Service Account"
- Download the JSON key file
- Share your calendar with the service account email
- Place the JSON file in the project root as
assignments-464701-418734497e1c.json
Create a .env file in the project root:
GROQ_API_KEY=your-groq-api-key-herecd app
uvicorn main:app --reload --host 0.0.0.0 --port 8000cd streamlitApp
streamlit run app.pyThe application will be available at:
- Frontend: http://localhost:8501
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
"Book a meeting tomorrow at 3 PM about project review"
"Schedule a 1-hour call next Monday at 10 AM with sarah@company.com"
"Set up a 30-minute meeting on 2025-01-15 at 14:30 with team@company.com"
"Show me my upcoming meetings"
"What's on my calendar for tomorrow?"
"Check my availability for next week"
"Cancel my meeting with John tomorrow"
"Reschedule my 3 PM meeting to 4 PM"
"What meetings do I have this week?"
POST /chat- Main chat interfacePOST /book_meeting- Direct meeting bookingGET /health- System health checkGET /- API information
{
"response": "Meeting booked successfully!",
"success": true,
"details": {
"date": "2025-01-15",
"time": "14:30",
"participants": ["user@example.com"],
"agenda": "Project review",
"duration": 60
}
}- Flexible Date Parsing: "tomorrow", "next monday", "2025-01-15"
- Time Format Support: "3 PM", "15:30", "3:30 PM"
- Duration Recognition: "1 hour", "30 minutes", "2-hour meeting"
- Context Extraction: Meeting titles, descriptions, attendees
- Validation: Comprehensive input validation
- Conflict Detection: Automatic availability checking
- Graceful Degradation: Fallback responses for errors
- User Guidance: Helpful error messages with suggestions
- Real-time Status: Backend connection monitoring
- Visual Feedback: Color-coded messages and status indicators
- Quick Actions: Example prompts and meeting history
- Responsive Design: Works on desktop and mobile
- API keys stored in
.envfile (not committed to version control) - Service account credentials secured
- Environment-specific configurations
- Comprehensive try-catch blocks
- Detailed logging for debugging
- User-friendly error messages
- Graceful fallbacks
- Pydantic models for request/response validation
- Input sanitization and validation
- Type checking and conversion
tailorTalk/
βββ app/
β βββ main.py # FastAPI backend
β βββ agent.py # LangChain agent
β βββ calendarUtils.py # Google Calendar integration
βββ streamlitApp/
β βββ app.py # Streamlit frontend
βββ requirements.txt # Python dependencies
βββ README.md # This file
- Backend: Add new endpoints in
app/main.py - Calendar: Extend
app/calendarUtils.pywith new functions - Agent: Add new tools in
app/agent.py - Frontend: Enhance UI in
streamlitApp/app.py
# Test backend
curl -X POST "http://localhost:8000/chat" \
-H "Content-Type: application/json" \
-d '{"user_input": "Book a meeting tomorrow at 3 PM"}'
# Test health endpoint
curl http://localhost:8000/health- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues:
- Check the logs for error messages
- Verify your API keys and service account setup
- Ensure all dependencies are installed
- Check the API documentation at
/docs
Made with β€οΈ using FastAPI, Streamlit, and LangChain