Pet Paradise Shop¶
A complete pet shop ordering and support system built with Chainlit, Azure OpenAI, structured outputs, and MongoDB.
🌟 Features¶
- 🤖 AI Chat Assistant: Intelligent Chainlit-based chat interface powered by Azure OpenAI
- 🛠️ Structured Tool Calling: Type-safe tool calling with Pydantic validation
- 🐾 Pet Inventory: Browse dogs, cats, birds, fish, rabbits, and hamsters
- 🛒 Order Management: Complete order placement and tracking system
- 📦 REST API: FastAPI-based backend with MongoDB database
- ✅ Structured Outputs: Azure OpenAI structured outputs with strict validation
🚀 Quick Start¶
# Clone the repository
git clone https://github.com/ianlintner/structured_output_tool_callin.git
cd structured_output_tool_callin
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your Azure OpenAI credentials
# Start the system
./start.sh
Visit http://localhost:8001 to access the chat interface!
📚 Documentation Sections¶
Getting Started¶
Learn how to install and configure the system.
User Guide¶
Discover how to use the chat interface.
Architecture¶
Understand the system design and components.
Observability¶
Monitor and trace system performance.
💡 Example Usage¶
Browse pets:
Place order:
Check status:
🏗️ Architecture¶
The system uses structured outputs throughout, ensuring type safety and validation at every layer.
🛠️ Technology Stack¶
| Component | Technology |
|---|---|
| UI | Chainlit |
| AI | Azure OpenAI (GPT-4) |
| Validation | Pydantic v2 |
| API | FastAPI |
| Database | MongoDB |
| Language | Python 3.8+ |
📊 Sample Data¶
The system includes 10 pre-loaded pets: - 3 Dogs (Golden Retriever, Beagle, German Shepherd) - 2 Cats (British Shorthair, Siamese) - 2 Birds (Cockatiel, Parakeets) - 1 Fish (Betta) - 1 Rabbit (Holland Lop) - 1 Hamster (Syrian)
🔒 Security¶
- Environment variable management
- Multi-layer input validation
- Type-safe enums
- Error sanitization
- Async operations
📄 License¶
MIT License - See LICENSE file for details.
🤝 Contributing¶
Contributions are welcome! Please check the repository for contribution guidelines.