SoDa12321 commited on
Commit
202f29f
·
verified ·
1 Parent(s): 18c6e2a

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +9 -7
functions.py CHANGED
@@ -77,24 +77,26 @@ def generate_all_sections(data):
77
  Generate all sections for the specified report type.
78
  """
79
  sections_content = {}
80
-
81
  # Get the report type from data
82
  report_type = data.get("report_type")
83
-
84
  # Retrieve sections based on report type
85
  report_sections = get_report_sections(report_type)
86
-
87
- # Loop through each section and generate content
88
  for section_name, function_name in report_sections:
 
 
 
89
  # Call the respective function dynamically
90
  section_content = call_dynamic_function(function_name, data)
91
 
92
  # Store the generated content in a dictionary
93
  sections_content[section_name] = section_content
94
 
95
- return sections_content
96
-
97
-
98
 
99
  # Define the actual generation functions, like:
100
  def generate_executive_summary(data):
 
77
  Generate all sections for the specified report type.
78
  """
79
  sections_content = {}
80
+
81
  # Get the report type from data
82
  report_type = data.get("report_type")
83
+
84
  # Retrieve sections based on report type
85
  report_sections = get_report_sections(report_type)
86
+
87
+ # Loop through each section, skipping "All Sections" itself
88
  for section_name, function_name in report_sections:
89
+ if function_name == "generate_all_sections":
90
+ continue
91
+
92
  # Call the respective function dynamically
93
  section_content = call_dynamic_function(function_name, data)
94
 
95
  # Store the generated content in a dictionary
96
  sections_content[section_name] = section_content
97
 
98
+ return sections_content # Return the content dictionary
99
+
 
100
 
101
  # Define the actual generation functions, like:
102
  def generate_executive_summary(data):