Skip to content

Commit

Permalink
Updating M07 models
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebunting committed Dec 3, 2024
1 parent 1b24d55 commit d43d69e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion python/07-build-copilot/api/app/models/completion_request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pydantic import BaseModel

class CompletionRequest(BaseModel):
message: str
message: str
chat_history: list = []
19 changes: 11 additions & 8 deletions python/07-build-copilot/api/app/models/product.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit d43d69e

Please sign in to comment.