From 4e553f4ae4378b7865aef5250a0b2ee1751fb980 Mon Sep 17 00:00:00 2001 From: star-nox Date: Thu, 28 Mar 2024 19:54:34 -0500 Subject: [PATCH] fixed serialization error in main --- ai_ta_backend/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ai_ta_backend/main.py b/ai_ta_backend/main.py index cb63cb99..452792ac 100644 --- a/ai_ta_backend/main.py +++ b/ai_ta_backend/main.py @@ -221,8 +221,8 @@ def logToConversationMap(service: NomicService, flaskExecutor: ExecutorInterface # proper web error "400 Bad request" abort(400, description=f"Missing required parameter: 'course_name' must be provided. Course name: `{course_name}`") - map_id = service.log_to_conversation_map(course_name) - #map_id = flaskExecutor.submit(service.log_to_conversation_map, course_name) + #map_id = service.log_to_conversation_map(course_name) + map_id = flaskExecutor.submit(service.log_to_conversation_map, course_name).result() response = jsonify(map_id) response.headers.add('Access-Control-Allow-Origin', '*') @@ -246,7 +246,7 @@ def logToNomic(service: NomicService, flaskExecutor: ExecutorInterface): # background execution of tasks!! #response = flaskExecutor.submit(service.log_convo_to_nomic, course_name, data) - response = flaskExecutor.submit(service.log_to_conversation_map, course_name) + result = flaskExecutor.submit(service.log_to_conversation_map, course_name).result() response = jsonify({'outcome': 'success'}) response.headers.add('Access-Control-Allow-Origin', '*') return response