-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b24d55
commit d43d69e
Showing
2 changed files
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |