Update process_data.py
Browse files- process_data.py +4 -3
process_data.py
CHANGED
|
@@ -216,10 +216,12 @@ def pre_processing(input_data, parameters):
|
|
| 216 |
]
|
| 217 |
)
|
| 218 |
|
|
|
|
|
|
|
|
|
|
| 219 |
print("Response Text: ")
|
| 220 |
print(response_text)
|
| 221 |
|
| 222 |
-
response_text = response.choices[0].message.content
|
| 223 |
partially_processed_input = response_text.json()
|
| 224 |
|
| 225 |
|
|
@@ -229,8 +231,7 @@ def pre_processing(input_data, parameters):
|
|
| 229 |
input_text = partially_processed_input
|
| 230 |
|
| 231 |
except Exception as e:
|
| 232 |
-
print("Failed to parse response as JSON. Error was:")
|
| 233 |
-
print(e)
|
| 234 |
|
| 235 |
input_data["input_context"] = False
|
| 236 |
input_data["input_text"] = input_text
|
|
|
|
| 216 |
]
|
| 217 |
)
|
| 218 |
|
| 219 |
+
|
| 220 |
+
response_text = response.choices[0].message.content
|
| 221 |
+
|
| 222 |
print("Response Text: ")
|
| 223 |
print(response_text)
|
| 224 |
|
|
|
|
| 225 |
partially_processed_input = response_text.json()
|
| 226 |
|
| 227 |
|
|
|
|
| 231 |
input_text = partially_processed_input
|
| 232 |
|
| 233 |
except Exception as e:
|
| 234 |
+
print(f"Failed to parse response as JSON. Error was: {e}")
|
|
|
|
| 235 |
|
| 236 |
input_data["input_context"] = False
|
| 237 |
input_data["input_text"] = input_text
|