SoDa12321 commited on
Commit
eba01bd
·
verified ·
1 Parent(s): 913f56c

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +9 -2
functions.py CHANGED
@@ -77,14 +77,21 @@ def generate_all_sections(data):
77
  Generate all sections for the specified report type.
78
  """
79
  sections_content = {}
 
 
80
  report_sections = get_report_sections(data.get("report_type"))
81
 
 
82
  for section_name, function_name in report_sections:
83
- if function_name != "generate_all_sections": # Skip this function itself
84
- sections_content[section_name] = call_dynamic_function(function_name, data)
 
 
 
85
 
86
  return sections_content
87
 
 
88
  # Define the actual generation functions, like:
89
  def generate_executive_summary(data):
90
  return f"Executive Summary for {data['research_topic']}"
 
77
  Generate all sections for the specified report type.
78
  """
79
  sections_content = {}
80
+
81
+ # Retrieve sections based on report type
82
  report_sections = get_report_sections(data.get("report_type"))
83
 
84
+ # Loop through each section and generate content
85
  for section_name, function_name in report_sections:
86
+ # Call the respective function dynamically
87
+ section_content = call_dynamic_function(function_name, data)
88
+
89
+ # Store the generated content in a dictionary
90
+ sections_content[section_name] = section_content
91
 
92
  return sections_content
93
 
94
+
95
  # Define the actual generation functions, like:
96
  def generate_executive_summary(data):
97
  return f"Executive Summary for {data['research_topic']}"