|
{ |
|
"timestamp": "2024-11-01T06:17:37.681989", |
|
"health_check": { |
|
"status_code": 200, |
|
"response": { |
|
"services": { |
|
"intelligent_routing": "up", |
|
"job_recommendation": "up", |
|
"sentiment_analysis": "up", |
|
"translation": "up" |
|
}, |
|
"status": "healthy", |
|
"timestamp": "2024-11-01T06:17:35.202569" |
|
} |
|
}, |
|
"translation_tests": [ |
|
{ |
|
"test_case": { |
|
"user_message": "toilet me paani nahi aa rha hain", |
|
"target_language": "en" |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"confidence": 0.9, |
|
"error": null, |
|
"language_name": "English", |
|
"original_message": "toilet me paani nahi aa rha hain", |
|
"source_language": "hi", |
|
"target_language": "en", |
|
"timestamp": "2024-11-01T06:17:36.424617", |
|
"translated_message": "There is no water in the toilet" |
|
} |
|
}, |
|
{ |
|
"test_case": { |
|
"user_message": "AC not working properly", |
|
"target_language": "hi" |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"confidence": 0.9, |
|
"error": null, |
|
"language_name": "Hindi", |
|
"original_message": "AC not working properly", |
|
"source_language": "af", |
|
"target_language": "hi", |
|
"timestamp": "2024-11-01T06:17:39.476121", |
|
"translated_message": "एसी ठीक से काम नहीं कर रहा है" |
|
} |
|
}, |
|
{ |
|
"test_case": { |
|
"user_message": "ਪੱਖਾ ਕੰਮ ਨਹੀਂ ਕਰ ਰਿਹਾ", |
|
"target_language": "en" |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"confidence": 0.9, |
|
"error": null, |
|
"language_name": "English", |
|
"original_message": "ਪੱਖਾ ਕੰਮ ਨਹੀਂ ਕਰ ਰਿਹਾ", |
|
"source_language": "pa", |
|
"target_language": "en", |
|
"timestamp": "2024-11-01T06:17:41.900115", |
|
"translated_message": "The fan is not working" |
|
} |
|
} |
|
], |
|
"sentiment_analysis_tests": [ |
|
{ |
|
"test_case": { |
|
"grievance_id": "G12347", |
|
"text": "I am extremely frustrated with the constant power outages in my room." |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"confidence": 0.98044353723526, |
|
"emotional_label": "Frustration", |
|
"grievance_id": "G12347", |
|
"timestamp": "2024-11-01T06:17:59.323044" |
|
} |
|
}, |
|
{ |
|
"test_case": { |
|
"grievance_id": "G12348", |
|
"text": "Thank you for quickly fixing the water issue." |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"confidence": 0.938926100730896, |
|
"emotional_label": "Satisfaction", |
|
"grievance_id": "G12348", |
|
"timestamp": "2024-11-01T06:18:01.466741" |
|
} |
|
}, |
|
{ |
|
"test_case": { |
|
"grievance_id": "G12349", |
|
"text": "The AC has been making strange noises all night." |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"confidence": 0.8782024383544922, |
|
"emotional_label": "Frustration", |
|
"grievance_id": "G12349", |
|
"timestamp": "2024-11-01T06:18:03.554306" |
|
} |
|
} |
|
], |
|
"routing_tests": [ |
|
{ |
|
"test_case": { |
|
"grievance_id": "G67890", |
|
"category": "water_cooler", |
|
"submission_timestamp": "2024-10-28T04:22:13Z", |
|
"student_room_no": "148", |
|
"hostel_name": "bh2", |
|
"floor_number": 3, |
|
"current_staff_status": [ |
|
{ |
|
"staff_id": "S84148", |
|
"department": "water_cooler", |
|
"current_workload": 0, |
|
"availability_status": "Unavailable", |
|
"past_resolution_rate": 0.98 |
|
}, |
|
{ |
|
"staff_id": "S57369", |
|
"department": "water_cooler", |
|
"current_workload": 0, |
|
"availability_status": "Available", |
|
"past_resolution_rate": 0.96 |
|
} |
|
], |
|
"floor_metrics": { |
|
"number_of_requests": 0, |
|
"total_delays": 4 |
|
}, |
|
"availability_data": { |
|
"staff_availability": [ |
|
{ |
|
"staff_id": "S84148", |
|
"time_slot": "08:00-12:00", |
|
"availability_status": "Available" |
|
} |
|
], |
|
"student_availability": [ |
|
{ |
|
"student_id": "STU200", |
|
"time_slot": "16:00-20:00", |
|
"availability_status": "Available" |
|
} |
|
] |
|
} |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"assigned_staff_id": "S84148", |
|
"assignment_timestamp": "2024-11-01T06:18:06Z", |
|
"confidence_score": 0.0, |
|
"estimated_resolution_time": null, |
|
"grievance_id": "G67890" |
|
} |
|
}, |
|
{ |
|
"test_case": { |
|
"grievance_id": "G67891", |
|
"category": "carpenter", |
|
"submission_timestamp": "2024-10-28T04:18:13Z", |
|
"student_room_no": "213", |
|
"hostel_name": "bh1", |
|
"floor_number": 2, |
|
"current_staff_status": [ |
|
{ |
|
"staff_id": "S52775", |
|
"department": "carpenter", |
|
"current_workload": 5, |
|
"availability_status": "Unavailable", |
|
"past_resolution_rate": 0.98 |
|
}, |
|
{ |
|
"staff_id": "S24943", |
|
"department": "carpenter", |
|
"current_workload": 3, |
|
"availability_status": "Unavailable", |
|
"past_resolution_rate": 0.85 |
|
} |
|
], |
|
"floor_metrics": { |
|
"number_of_requests": 29, |
|
"total_delays": 4 |
|
}, |
|
"availability_data": { |
|
"staff_availability": [ |
|
{ |
|
"staff_id": "S52775", |
|
"time_slot": "12:00-16:00", |
|
"availability_status": "Unavailable" |
|
} |
|
], |
|
"student_availability": [ |
|
{ |
|
"student_id": "STU201", |
|
"time_slot": "08:00-12:00", |
|
"availability_status": "Available" |
|
} |
|
] |
|
} |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"assigned_staff_id": "S24943", |
|
"assignment_timestamp": "2024-11-01T06:18:08Z", |
|
"confidence_score": 0.0, |
|
"estimated_resolution_time": null, |
|
"grievance_id": "G67891" |
|
} |
|
}, |
|
{ |
|
"test_case": { |
|
"grievance_id": "G67892", |
|
"category": "electricity", |
|
"submission_timestamp": "2024-10-28T04:00:13Z", |
|
"student_room_no": "275", |
|
"hostel_name": "bh3", |
|
"floor_number": 2, |
|
"current_staff_status": [ |
|
{ |
|
"staff_id": "S33368", |
|
"department": "electricity", |
|
"current_workload": 1, |
|
"availability_status": "Available", |
|
"past_resolution_rate": 0.95 |
|
}, |
|
{ |
|
"staff_id": "S20522", |
|
"department": "electricity", |
|
"current_workload": 5, |
|
"availability_status": "Available", |
|
"past_resolution_rate": 0.87 |
|
} |
|
], |
|
"floor_metrics": { |
|
"number_of_requests": 2, |
|
"total_delays": 3 |
|
}, |
|
"availability_data": { |
|
"staff_availability": [ |
|
{ |
|
"staff_id": "S33368", |
|
"time_slot": "12:00-16:00", |
|
"availability_status": "Unavailable" |
|
} |
|
], |
|
"student_availability": [ |
|
{ |
|
"student_id": "STU202", |
|
"time_slot": "08:00-12:00", |
|
"availability_status": "Unavailable" |
|
} |
|
] |
|
} |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"assigned_staff_id": "S33368", |
|
"assignment_timestamp": "2024-11-01T06:18:10Z", |
|
"confidence_score": 0.0, |
|
"estimated_resolution_time": null, |
|
"grievance_id": "G67892" |
|
} |
|
} |
|
], |
|
"job_recommendation_tests": [ |
|
{ |
|
"test_case": { |
|
"job_id": "J60000", |
|
"type": "IT", |
|
"description": "IT issue in room 358.", |
|
"urgency_level": "Low", |
|
"location": { |
|
"hostel_name": "Hostel B", |
|
"floor_number": 3, |
|
"room_number": "358" |
|
}, |
|
"workers": [ |
|
{ |
|
"worker_id": "W97053", |
|
"department": "IT", |
|
"current_workload": 3, |
|
"availability_status": "Available", |
|
"job_success_rate": 0.95, |
|
"current_location": { |
|
"hostel_name": "Hostel A", |
|
"floor_number": 3, |
|
"room_number": "468" |
|
} |
|
}, |
|
{ |
|
"worker_id": "W97054", |
|
"department": "IT", |
|
"current_workload": 1, |
|
"availability_status": "Available", |
|
"job_success_rate": 0.92, |
|
"current_location": { |
|
"hostel_name": "Hostel B", |
|
"floor_number": 3, |
|
"room_number": "360" |
|
} |
|
} |
|
] |
|
}, |
|
"status_code": 200, |
|
"response": { |
|
"alternative_workers": [ |
|
{ |
|
"confidence_score": 0.92, |
|
"current_workload": 1, |
|
"worker_id": "W97054" |
|
} |
|
], |
|
"confidence_score": 0.95, |
|
"job_id": "J60000", |
|
"predicted_completion_time": "2024-11-01T18:48:12Z", |
|
"recommendation_timestamp": "2024-11-01T06:18:12Z", |
|
"recommended_worker_id": "W97053" |
|
} |
|
} |
|
] |
|
} |