Soumik Bose commited on
Commit
e903858
·
1 Parent(s): 7db7163
controller.py CHANGED
@@ -817,7 +817,8 @@ async def generate_pdf_report_endpoint(
817
  subtitle=payload.subtitle,
818
  author=payload.author,
819
  department=payload.department,
820
- output_dir="temp_reports"
 
821
  )
822
 
823
  # Prepare final filename
 
817
  subtitle=payload.subtitle,
818
  author=payload.author,
819
  department=payload.department,
820
+ output_dir="temp_reports",
821
+ confidential=payload.confidential
822
  )
823
 
824
  # Prepare final filename
pdf_report_generation_helper.py CHANGED
@@ -16,7 +16,8 @@ async def generate_and_upload_report(
16
  subtitle: str = "Generated Report",
17
  author: str = "AI Assistant",
18
  department: str = "Data Analytics",
19
- output_dir: str = "temp_reports"
 
20
  ) -> str:
21
  """
22
  Generates a PDF report from content configuration, uploads it to Supabase,
@@ -40,7 +41,7 @@ async def generate_and_upload_report(
40
  subtitle=subtitle,
41
  author=author,
42
  department=department,
43
- confidential=True
44
  )
45
 
46
  # 3. Generate PDF (Blocking I/O, so we run it in a way that doesn't block main loop if called properly)
 
16
  subtitle: str = "Generated Report",
17
  author: str = "AI Assistant",
18
  department: str = "Data Analytics",
19
+ output_dir: str = "temp_reports",
20
+ confidential: bool = False
21
  ) -> str:
22
  """
23
  Generates a PDF report from content configuration, uploads it to Supabase,
 
41
  subtitle=subtitle,
42
  author=author,
43
  department=department,
44
+ confidential=confidential
45
  )
46
 
47
  # 3. Generate PDF (Blocking I/O, so we run it in a way that doesn't block main loop if called properly)
pdf_report_generation_model.py CHANGED
@@ -18,6 +18,7 @@ class ReportGenerationRequest(BaseModel):
18
  author: Optional[str] = "AI Assistant"
19
  department: Optional[str] = "Data Analytics Team"
20
  sections: List[ReportSection]
 
21
 
22
  class ReportGenerationResponse(BaseModel):
23
  success: bool
 
18
  author: Optional[str] = "AI Assistant"
19
  department: Optional[str] = "Data Analytics Team"
20
  sections: List[ReportSection]
21
+ confidential: bool = True
22
 
23
  class ReportGenerationResponse(BaseModel):
24
  success: bool
pdf_report_generation_service.py CHANGED
@@ -88,7 +88,8 @@ async def generate_and_upload_report(
88
  subtitle: str = "Generated Report",
89
  author: str = "AI Assistant",
90
  department: str = "Data Analytics",
91
- output_dir: str = "temp_reports"
 
92
  ) -> str:
93
  """
94
  Generates a PDF report from content configuration, uploads it to Supabase,
@@ -134,7 +135,7 @@ async def generate_and_upload_report(
134
  subtitle=subtitle,
135
  author=author,
136
  department=department,
137
- confidential=True
138
  )
139
 
140
  # 3. Generate PDF (Run in thread pool to avoid blocking)
 
88
  subtitle: str = "Generated Report",
89
  author: str = "AI Assistant",
90
  department: str = "Data Analytics",
91
+ output_dir: str = "temp_reports",
92
+ confidential: bool = True
93
  ) -> str:
94
  """
95
  Generates a PDF report from content configuration, uploads it to Supabase,
 
135
  subtitle=subtitle,
136
  author=author,
137
  department=department,
138
+ confidential=confidential
139
  )
140
 
141
  # 3. Generate PDF (Run in thread pool to avoid blocking)