File size: 882 Bytes
a6e6a7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e903858
a6e6a7c
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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