Executor / pdf_report_generation_model.py
Soumik Bose
go
e903858
Raw
History Blame Contribute Delete
882 Bytes
from pydantic import BaseModel, Field
from typing import List, Optional, Union, Dict, Any
class ImageConfig(BaseModel):
url: str
caption: Optional[str] = "Figure"
class ReportSection(BaseModel):
content: str
images: Optional[List[Union[str, ImageConfig]]] = []
page_break: Optional[bool] = False
class ReportGenerationRequest(BaseModel):
chat_id: str
file_name: str = "Analysis_Report"
title: Optional[str] = "Analytics Performance Report"
subtitle: Optional[str] = "Generated Insights"
author: Optional[str] = "AI Assistant"
department: Optional[str] = "Data Analytics Team"
sections: List[ReportSection]
confidential: bool = True
class ReportGenerationResponse(BaseModel):
success: bool
pdf_report_file_url: Optional[str] = None
file_name: Optional[str] = None
error: Optional[str] = None
request_id: str