Skip to content

Commit

Permalink
fixed serialization error in main
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Mar 29, 2024
1 parent 78e92e6 commit 4e553f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ai_ta_backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', '*')
Expand All @@ -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
Expand Down

0 comments on commit 4e553f4

Please sign in to comment.