From 78e92e6f262073abfef7725de96f6dfbd44f28ea Mon Sep 17 00:00:00 2001 From: star-nox Date: Thu, 28 Mar 2024 18:14:17 -0500 Subject: [PATCH] removed executor bec of errors --- ai_ta_backend/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ai_ta_backend/main.py b/ai_ta_backend/main.py index b27e97c3..cb63cb99 100644 --- a/ai_ta_backend/main.py +++ b/ai_ta_backend/main.py @@ -214,7 +214,7 @@ def createConversationMap(service: NomicService): return response @app.route('/logToConversationMap', methods=['GET']) -def logToConversationMap(service: NomicService): +def logToConversationMap(service: NomicService, flaskExecutor: ExecutorInterface): course_name: str = request.args.get('course_name', default='', type=str) if course_name == '': @@ -222,6 +222,7 @@ def logToConversationMap(service: NomicService): 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) response = jsonify(map_id) response.headers.add('Access-Control-Allow-Origin', '*') @@ -244,7 +245,8 @@ def logToNomic(service: NomicService, flaskExecutor: ExecutorInterface): print(f"In /onResponseCompletion for course: {course_name}") # background execution of tasks!! - response = flaskExecutor.submit(service.log_convo_to_nomic, course_name, data) + #response = flaskExecutor.submit(service.log_convo_to_nomic, course_name, data) + response = flaskExecutor.submit(service.log_to_conversation_map, course_name) response = jsonify({'outcome': 'success'}) response.headers.add('Access-Control-Allow-Origin', '*') return response