Update process_data.py
Browse files- process_data.py +2 -1
process_data.py
CHANGED
|
@@ -294,7 +294,6 @@ def parse_survey_stack_parameters(data):
|
|
| 294 |
|
| 295 |
# Check if chaining is set to "yes" or "no"
|
| 296 |
chaining_value = data['group_2'].get('prepromptchaining', {}).get('value', [None])[0]
|
| 297 |
-
processed_data["chaining"] = chaining_value == "yes"
|
| 298 |
|
| 299 |
if chaining_value == "no":
|
| 300 |
# Combine prompts if chaining is "no"
|
|
@@ -306,9 +305,11 @@ def parse_survey_stack_parameters(data):
|
|
| 306 |
processed_data["example_pre_prompt"]
|
| 307 |
])
|
| 308 |
)
|
|
|
|
| 309 |
processed_data["combined_prompt"] = combined_prompt
|
| 310 |
else:
|
| 311 |
# Set combined_pre_prompt to None if chaining is enabled
|
|
|
|
| 312 |
processed_data["combined_pre_prompt"] = None
|
| 313 |
else:
|
| 314 |
# Set fields to None if preprompt is not "continue_preprompts"
|
|
|
|
| 294 |
|
| 295 |
# Check if chaining is set to "yes" or "no"
|
| 296 |
chaining_value = data['group_2'].get('prepromptchaining', {}).get('value', [None])[0]
|
|
|
|
| 297 |
|
| 298 |
if chaining_value == "no":
|
| 299 |
# Combine prompts if chaining is "no"
|
|
|
|
| 305 |
processed_data["example_pre_prompt"]
|
| 306 |
])
|
| 307 |
)
|
| 308 |
+
processed_data["chaining"] = False
|
| 309 |
processed_data["combined_prompt"] = combined_prompt
|
| 310 |
else:
|
| 311 |
# Set combined_pre_prompt to None if chaining is enabled
|
| 312 |
+
processed_data["chaining"] = True
|
| 313 |
processed_data["combined_pre_prompt"] = None
|
| 314 |
else:
|
| 315 |
# Set fields to None if preprompt is not "continue_preprompts"
|