Update functions.py
Browse files- 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 |
-
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
| 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']}"
|