- Changes to support SpecialistID being passed iso CatalogID
- Removed error that stopped sync
This commit is contained in:
@@ -133,12 +133,17 @@ def check_task_status(data):
|
||||
elif task_result.state == 'SUCCESS':
|
||||
result = task_result.result
|
||||
current_app.logger.debug(f'SocketIO: Task {task_id} returned: {result}')
|
||||
|
||||
# Access the result structure correctly
|
||||
specialist_result = result['result'] # This contains the SpecialistResult model_dump
|
||||
response = {
|
||||
'status': 'success',
|
||||
'taskId': task_id,
|
||||
'answer': result['answer'],
|
||||
'citations': result['citations'],
|
||||
'algorithm': result['algorithm'],
|
||||
'results': {
|
||||
'answer': specialist_result.get('answer'),
|
||||
'citations': specialist_result.get('citations', []),
|
||||
'insufficient_info': specialist_result.get('insufficient_info', False)
|
||||
},
|
||||
'interaction_id': result['interaction_id'],
|
||||
}
|
||||
emit('task_status', response, room=room)
|
||||
@@ -146,7 +151,6 @@ def check_task_status(data):
|
||||
current_app.logger.error(f'SocketIO: Task {task_id} has failed. Error: {task_result.info}')
|
||||
emit('task_status', {'status': task_result.state, 'message': str(task_result.info)}, room=room)
|
||||
|
||||
|
||||
@socketio.on('feedback')
|
||||
def handle_feedback(data):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user