diff --git a/python/07-build-copilot/api/app/models/completion_request.py b/python/07-build-copilot/api/app/models/completion_request.py index 84eb5a0..0425038 100644 --- a/python/07-build-copilot/api/app/models/completion_request.py +++ b/python/07-build-copilot/api/app/models/completion_request.py @@ -1,4 +1,5 @@ from pydantic import BaseModel class CompletionRequest(BaseModel): - message: str \ No newline at end of file + message: str + chat_history: list = [] \ No newline at end of file diff --git a/python/07-build-copilot/api/app/models/product.py b/python/07-build-copilot/api/app/models/product.py index 508d101..88f65c0 100644 --- a/python/07-build-copilot/api/app/models/product.py +++ b/python/07-build-copilot/api/app/models/product.py @@ -1,11 +1,14 @@ +import uuid from pydantic import BaseModel, Field class Product(BaseModel): - id: str = Field(default=None, alias="id") - category_id: str = Field(alias="categoryId") - category_name: str = Field(alias="categoryName") - sku: str - name: str - description: str - price: float - embedding: list = [] + id: str = Field(str(uuid.uuid4()), description="Unique identifier for the product") + category_id: str = Field(..., description="Unique identifier for the product's category") + category_name: str = Field(..., description="A comma-separated string containing the names associated with the product's category") + sku: str = Field(..., alias="sku", description="Stock Keeping Unit (SKU) for the product") + name: str = Field(..., alias="name", description="Name of the product") + description: str = Field(..., alias="description", description="Description of the product") + price: float = Field(..., alias="price", description="Price of the product") + discount: float = Field(None, alias="discount", description="Discounted price of the product") + sale_price: float = Field(None, alias="salePrice", description="Sale price of the product") + embedding: list = Field([], alias="embedding", description="Vector representation of the product description")