Extracted the pseudo code from the OpenAI API response and stored it in the database in JSON format.
Handled cases where pseudo code is already present in the database or if there are errors during retrieval.
Added try-catch clauses to handlers to help with debugging.
Modified exercise.html:
Integrated a parallel AJAX call to retrieve pseudo code and hint code endpoints.
The parallel AJAX call is triggered on click of the hint button (change this).
Next Steps
The response from the endpoints should be further parsed to only include the necessary content from the endpoint responses. Currently, they have a lot of unnecessary information from the model.
Changes Made
Modified
webserver.py
Created the
whatsNextHandler
:Modified
exercise.html
:Next Steps
The response from the endpoints should be further parsed to only include the necessary content from the endpoint responses. Currently, they have a lot of unnecessary information from the model.