Start fixing forecast service API 5
This commit is contained in:
@@ -24,7 +24,12 @@ class ForecastRequest(BaseModel):
|
||||
"""Request schema for generating forecasts"""
|
||||
tenant_id: str = Field(..., description="Tenant ID")
|
||||
product_name: str = Field(..., description="Product name")
|
||||
forecast_date: date = Field(..., description="Date for which to generate forecast")
|
||||
forecast_date: date = Field(..., description="Starting date for forecast")
|
||||
forecast_days: int = Field(1, ge=1, le=30, description="Number of days to forecast")
|
||||
location: str = Field(..., description="Location identifier")
|
||||
|
||||
# Optional parameters - internally handled
|
||||
confidence_level: float = Field(0.8, ge=0.5, le=0.95, description="Confidence level")
|
||||
|
||||
@validator('forecast_date')
|
||||
def validate_forecast_date(cls, v):
|
||||
@@ -37,14 +42,7 @@ class BatchForecastRequest(BaseModel):
|
||||
tenant_id: str = Field(..., description="Tenant ID")
|
||||
batch_name: str = Field(..., description="Batch name for tracking")
|
||||
products: List[str] = Field(..., description="List of product names")
|
||||
location: str = Field(..., description="Location identifier")
|
||||
forecast_days: int = Field(7, ge=1, le=30, description="Number of days to forecast")
|
||||
business_type: BusinessType = Field(BusinessType.INDIVIDUAL, description="Business model type")
|
||||
|
||||
# Options
|
||||
include_weather: bool = Field(True, description="Include weather data")
|
||||
include_traffic: bool = Field(True, description="Include traffic data")
|
||||
confidence_level: float = Field(0.8, ge=0.5, le=0.95, description="Confidence level")
|
||||
|
||||
class ForecastResponse(BaseModel):
|
||||
"""Response schema for forecast results"""
|
||||
|
||||
Reference in New Issue
Block a user