Update process_data.py
Browse files- process_data.py +14 -12
process_data.py
CHANGED
|
@@ -642,25 +642,27 @@ def parse_survey_stack(data):
|
|
| 642 |
processed_data["input_text_pieces"]["treatment_data_input"] = trials_inputs.get('treatment_data_input', {}).get('value', None)
|
| 643 |
|
| 644 |
print("NOW ONTO THE PROMPTS")
|
| 645 |
-
|
| 646 |
-
processed_data["prompts"]["
|
| 647 |
-
processed_data["prompts"]["
|
| 648 |
-
processed_data["prompts"]["
|
| 649 |
-
processed_data["prompts"]["
|
| 650 |
-
processed_data["prompts"]["
|
| 651 |
-
processed_data["prompts"]["
|
| 652 |
-
processed_data["prompts"]["
|
| 653 |
-
processed_data["prompts"]["
|
|
|
|
| 654 |
|
| 655 |
elif processed_data["inputstyle"] == "big-block-input-text":
|
| 656 |
print("IN THE SINGLE")
|
|
|
|
| 657 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
| 658 |
print(processed_data["input_text"])
|
| 659 |
|
| 660 |
print("NOW ONTO THE PROMPTS")
|
| 661 |
-
processed_data["prompts"]["first_schema_prompt"] =
|
| 662 |
-
processed_data["prompts"]["second_schema_prompt"] =
|
| 663 |
-
processed_data["prompts"]["third_schema_prompt"] =
|
| 664 |
|
| 665 |
|
| 666 |
# parameters
|
|
|
|
| 642 |
processed_data["input_text_pieces"]["treatment_data_input"] = trials_inputs.get('treatment_data_input', {}).get('value', None)
|
| 643 |
|
| 644 |
print("NOW ONTO THE PROMPTS")
|
| 645 |
+
input_item = input_data[0]['data']['group_7']
|
| 646 |
+
processed_data["prompts"]["first_schema_prompt_one"] = input_item['group_7'].get('firstschemaprompt1', {}).get('value')
|
| 647 |
+
processed_data["prompts"]["first_schema_prompt_two"] = input_item['group_7'].get('firstschemaprompt2', {}).get('value')
|
| 648 |
+
processed_data["prompts"]["first_schema_prompt_three"] = input_item['group_7'].get('firstschemaprompt3', {}).get('value')
|
| 649 |
+
processed_data["prompts"]["first_schema_prompt_four"] = input_item['group_7'].get('firstschemaprompt4', {}).get('value')
|
| 650 |
+
processed_data["prompts"]["first_schema_prompt_five"] = input_item['group_7'].get('firstschemaprompt5', {}).get('value')
|
| 651 |
+
processed_data["prompts"]["second_schema_prompt_one"] = input_item['group_7'].get('secondschemaprompt1', {}).get('value')
|
| 652 |
+
processed_data["prompts"]["second_schema_prompt_two"] = input_item['group_7'].get('secondschemaprompt2', {}).get('value')
|
| 653 |
+
processed_data["prompts"]["third_schema_prompt_one"] = input_item['group_7'].get('thirdschemaprompt1', {}).get('value')
|
| 654 |
+
processed_data["prompts"]["third_schema_prompt_two"] = input_item['group_7'].get('thirdschemaprompt2', {}).get('value')
|
| 655 |
|
| 656 |
elif processed_data["inputstyle"] == "big-block-input-text":
|
| 657 |
print("IN THE SINGLE")
|
| 658 |
+
input_item = input_data[0]['data']['group_7']
|
| 659 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
| 660 |
print(processed_data["input_text"])
|
| 661 |
|
| 662 |
print("NOW ONTO THE PROMPTS")
|
| 663 |
+
processed_data["prompts"]["first_schema_prompt"] = input_item['group_7'].get('firstschemaprompt', {}).get('value')
|
| 664 |
+
processed_data["prompts"]["second_schema_prompt"] = input_item['group_7'].get('secondschemaprompt', {}).get('value')
|
| 665 |
+
processed_data["prompts"]["third_schema_prompt"] = input_item['group_7'].get('thirdschemaprompt', {}).get('value')
|
| 666 |
|
| 667 |
|
| 668 |
# parameters
|