Spaces:
Sleeping
Sleeping
File size: 613 Bytes
bab4aa8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | from pydantic import BaseModel
from typing import List, Optional
class RecipeStructure(BaseModel):
dish: str
servings: int
ingredients: List[str]
instructions: List[str]
class ChatMessagePayload(BaseModel):
is_user: bool
text: str
class CartItemPayload(BaseModel):
sku: str
name: str
quantity: int
class ChatRequest(BaseModel):
user_id: str
current_cart_slugs: List[str]
dish_query: str
servings: int
chat_history: Optional[List[ChatMessagePayload]] = None
current_cart: Optional[List[CartItemPayload]] = None
image_base64: Optional[str] = None
|