Update process_data.py
Browse files- process_data.py +5 -1
process_data.py
CHANGED
|
@@ -644,6 +644,7 @@ def parse_survey_stack(data):
|
|
| 644 |
|
| 645 |
print("NOW ONTO THE PROMPTS")
|
| 646 |
input_item = data[0]['data']['sections_prompt']
|
|
|
|
| 647 |
processed_data["prompts"]["first_schema_prompt_one"] = input_item.get('firstschemaprompt1', {}).get('value')
|
| 648 |
processed_data["prompts"]["first_schema_prompt_two"] = input_item.get('firstschemaprompt2', {}).get('value')
|
| 649 |
processed_data["prompts"]["first_schema_prompt_three"] = input_item.get('firstschemaprompt3', {}).get('value')
|
|
@@ -658,6 +659,8 @@ def parse_survey_stack(data):
|
|
| 658 |
print("IN THE SINGLE")
|
| 659 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
| 660 |
input_item = data[0]['data']['schema_prompt']
|
|
|
|
|
|
|
| 661 |
|
| 662 |
print("Input Item")
|
| 663 |
print(input_item)
|
|
@@ -665,7 +668,7 @@ def parse_survey_stack(data):
|
|
| 665 |
print("Processed input text")
|
| 666 |
print(processed_data["input_text"])
|
| 667 |
|
| 668 |
-
print("NOW ONTO THE PROMPTS")
|
| 669 |
processed_data["prompts"]["first_schema_prompt"] = input_item.get('firstschemaprompt', {}).get('value')
|
| 670 |
processed_data["prompts"]["second_schema_prompt"] = input_item.get('secondschemaprompt', {}).get('value')
|
| 671 |
processed_data["prompts"]["third_schema_prompt"] = input_item.get('thirdschemaprompt', {}).get('value')
|
|
@@ -673,6 +676,7 @@ def parse_survey_stack(data):
|
|
| 673 |
|
| 674 |
# parameters
|
| 675 |
parameter_data = data[0]['data']['parameters']
|
|
|
|
| 676 |
|
| 677 |
processed_data["parameters"] = {}
|
| 678 |
processed_data["parameters"]["model_version"] = parameter_data.get('modelversion', {}).get('value')
|
|
|
|
| 644 |
|
| 645 |
print("NOW ONTO THE PROMPTS")
|
| 646 |
input_item = data[0]['data']['sections_prompt']
|
| 647 |
+
print("PROMPTS INPUTS FOR PIECES" + str(input_item))
|
| 648 |
processed_data["prompts"]["first_schema_prompt_one"] = input_item.get('firstschemaprompt1', {}).get('value')
|
| 649 |
processed_data["prompts"]["first_schema_prompt_two"] = input_item.get('firstschemaprompt2', {}).get('value')
|
| 650 |
processed_data["prompts"]["first_schema_prompt_three"] = input_item.get('firstschemaprompt3', {}).get('value')
|
|
|
|
| 659 |
print("IN THE SINGLE")
|
| 660 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
| 661 |
input_item = data[0]['data']['schema_prompt']
|
| 662 |
+
print("INPUT TEXT SINGLE BLOCK" + str(processed_data["input_text"]))
|
| 663 |
+
print("INPUT ITEM" + str(input_item))
|
| 664 |
|
| 665 |
print("Input Item")
|
| 666 |
print(input_item)
|
|
|
|
| 668 |
print("Processed input text")
|
| 669 |
print(processed_data["input_text"])
|
| 670 |
|
| 671 |
+
print("NOW ONTO THE PROMPTS from Input Item")
|
| 672 |
processed_data["prompts"]["first_schema_prompt"] = input_item.get('firstschemaprompt', {}).get('value')
|
| 673 |
processed_data["prompts"]["second_schema_prompt"] = input_item.get('secondschemaprompt', {}).get('value')
|
| 674 |
processed_data["prompts"]["third_schema_prompt"] = input_item.get('thirdschemaprompt', {}).get('value')
|
|
|
|
| 676 |
|
| 677 |
# parameters
|
| 678 |
parameter_data = data[0]['data']['parameters']
|
| 679 |
+
print("PARAMETERS" + str(parameter_data))
|
| 680 |
|
| 681 |
processed_data["parameters"] = {}
|
| 682 |
processed_data["parameters"]["model_version"] = parameter_data.get('modelversion', {}).get('value')
|