File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[project ]
22name = " kintsugi-python"
3- version = " 0.1.6 "
3+ version = " 0.1.7 "
44
55description = " Python SDK to access Kintsugi Voice API V2."
66authors = [
Original file line number Diff line number Diff line change @@ -29,14 +29,12 @@ def parse(self, data: dict) -> Prediction:
2929 output .is_calibrated = data ['is_calibrated' ]
3030 output .status = data ['status' ]
3131
32- if 'predicted_score' in data :
33- predicted_data_raw = data ['predicted_score' ]
34- predicted_data = predicted_data_raw
32+ if output .status != 'processing' :
33+ categories = data ['model_category' ].split (',' )
3534
36- if isinstance (predicted_data_raw , str ):
37- predicted_data = {data ['model_category' ]: predicted_data_raw }
38-
39- output .predicted_score = predicted_data
35+ for category in categories :
36+ if 'predicted_score_' + category in data :
37+ output .predicted_score [category ] = data ['predicted_score_' + category ]
4038
4139 if 'actual_score' in data :
4240 output .feedback_score = FeedbackScoreParser ().parse (data ['actual_score' ])
You can’t perform that action at this time.
0 commit comments