Add AI insights feature
This commit is contained in:
@@ -344,7 +344,7 @@ async def generate_batch_forecast(
|
||||
return BatchForecastResponse(
|
||||
id=str(uuid.uuid4()),
|
||||
tenant_id=tenant_id,
|
||||
batch_name=getattr(request, 'batch_name', f"orchestrator-batch-{datetime.now().strftime('%Y%m%d')}"),
|
||||
batch_name=request.batch_name,
|
||||
status="completed",
|
||||
total_products=0,
|
||||
completed_products=0,
|
||||
@@ -358,8 +358,8 @@ async def generate_batch_forecast(
|
||||
|
||||
# IMPROVEMENT: For large batches (>5 products), use background task
|
||||
# For small batches, execute synchronously for immediate results
|
||||
batch_name = getattr(request, 'batch_name', f"batch-{datetime.now().strftime('%Y%m%d_%H%M%S')}")
|
||||
forecast_days = getattr(request, 'forecast_days', 7)
|
||||
batch_name = request.batch_name
|
||||
forecast_days = request.forecast_days
|
||||
|
||||
# Create batch record first
|
||||
batch_id = str(uuid.uuid4())
|
||||
|
||||
Reference in New Issue
Block a user