Spaces:
Sleeping
Sleeping
| from pydantic import BaseModel, Field | |
| from typing import List, Optional | |
| class PoojaRequest(BaseModel): | |
| pooja_name: str = Field(..., description="The name of the Pooja for which ingredients are requested") | |
| class Ingredient(BaseModel): | |
| name: str = Field(..., description="The name of the ingredient") | |
| quantity: str = Field(..., description="The required quantity of the ingredient (e.g., '100g', '1 bunch', '2 pieces')") | |
| purpose: Optional[str] = Field(None, description="The specific purpose of this ingredient in the step") | |
| class PoojaStep(BaseModel): | |
| step_name: str = Field(..., description="The name of the Pooja step (e.g., 'Sankalp', 'Snan', 'Aarti')") | |
| description: str = Field(..., description="A brief description of what happens during this step") | |
| ingredients: List[Ingredient] = Field(..., description="The list of ingredients required for this step") | |
| class PoojaIngredientsResponse(BaseModel): | |
| pooja_name: str = Field(..., description="The name of the Pooja") | |
| overall_description: str = Field(..., description="A short overall description of the Pooja") | |
| steps: List[PoojaStep] = Field(..., description="The sequence of steps in the Pooja and their required ingredients") | |