Update app/schemas/categories.py
Browse files- app/schemas/categories.py +16 -0
app/schemas/categories.py
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
|
|
|
|
|
| 1 |
from pydantic import BaseModel, Field
|
| 2 |
|
| 3 |
|
| 4 |
class CategorizeRequest(BaseModel):
|
| 5 |
notes: str = Field(..., min_length=1, description="Full transaction note.")
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
|
| 8 |
class CategoryPrediction(BaseModel):
|
| 9 |
title: str = Field(..., description="High-level category title.")
|
| 10 |
subcategory: str = Field(..., description="Specific subcategory chosen by the model.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
|
| 3 |
from pydantic import BaseModel, Field
|
| 4 |
|
| 5 |
|
| 6 |
class CategorizeRequest(BaseModel):
|
| 7 |
notes: str = Field(..., min_length=1, description="Full transaction note.")
|
| 8 |
+
user_id: Optional[str] = Field(
|
| 9 |
+
None, description="Optional user identifier associated with the request."
|
| 10 |
+
)
|
| 11 |
|
| 12 |
|
| 13 |
class CategoryPrediction(BaseModel):
|
| 14 |
title: str = Field(..., description="High-level category title.")
|
| 15 |
subcategory: str = Field(..., description="Specific subcategory chosen by the model.")
|
| 16 |
+
|
| 17 |
+
# from pydantic import BaseModel, Field
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
# class CategorizeRequest(BaseModel):
|
| 21 |
+
# notes: str = Field(..., min_length=1, description="Full transaction note.")
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
# class CategoryPrediction(BaseModel):
|
| 25 |
+
# title: str = Field(..., description="High-level category title.")
|
| 26 |
+
# subcategory: str = Field(..., description="Specific subcategory chosen by the model.")
|