Quick Start¶
Get up and running with Pet Paradise Shop in minutes!
Automated Start (Recommended)¶
The easiest way to start the system:
This script will:
- ✓ Check for
.envconfiguration - ✓ Create virtual environment (if needed)
- ✓ Install dependencies
- ✓ Check MongoDB connectivity
- ✓ Start the API server
- ✓ Start the Chainlit chat interface
Manual Start¶
Terminal 1: Start the API Server¶
You should see:
✓ Connected to MongoDB: petshop
✓ Initialized database with 10 sample pets
INFO: Uvicorn running on http://0.0.0.0:8000
Terminal 2: Start the Chat Interface¶
You should see:
Access the Application¶
- Chat Interface: http://localhost:8001
- API Documentation: http://localhost:8000/docs
- API Health Check: http://localhost:8000/health
First Conversation¶
Once the chat interface is open, try these example conversations:
Browse Pets¶
The AI will use the browse_pets tool to fetch the inventory.
Filter by Type¶
Filter by Price¶
Place an Order¶
You: I'd like to order the Golden Retriever puppy
[AI will ask for your information]
You: My name is John Doe, email john@example.com,
phone 555-1234, address 123 Main St, City, ST 12345
The AI will use the place_order tool and provide an order ID.
Check Order Status¶
Using the REST API Directly¶
Browse Pets¶
# Get all pets
curl http://localhost:8000/pets
# Filter by type
curl "http://localhost:8000/pets?pet_type=dog"
# Filter by price
curl "http://localhost:8000/pets?max_price=500"
Create an Order¶
curl -X POST http://localhost:8000/orders \
-H "Content-Type: application/json" \
-d '{
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_phone": "555-1234",
"delivery_address": "123 Main St, City, ST 12345",
"pet_ids": ["pet001"]
}'
Check Order Status¶
Docker Deployment¶
For a containerized deployment:
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
Services will be available at the same ports.
Verify Everything Works¶
1. Check API Health¶
Expected response:
2. Run Demo¶
This will show examples of structured outputs and tool calling.
3. Run Tests¶
All tests should pass.
Common Issues¶
Port Already in Use¶
If port 8000 or 8001 is in use, edit .env:
For Chainlit, it automatically finds the next available port.
MongoDB Not Connected¶
Ensure MongoDB is running:
# Check if MongoDB is running
mongod --version
# Start MongoDB
mongod
# Or with Docker
docker run -d -p 27017:27017 mongo:latest
Azure OpenAI Errors¶
Verify your .env configuration:
Make sure all Azure OpenAI variables are set correctly.
Next Steps¶
- Explore the Chat Interface Guide
- Read about Configuration Options
- Learn about the Architecture