diff --git a/app.py b/app.py index 488f93a..9cdbe80 100644 --- a/app.py +++ b/app.py @@ -29,7 +29,7 @@ GRADING_TEMPERATURE = 0.1 GEN_QUESTION_TEMPERATURE = 0.9 GPT_3_5_TURBO = "gpt-3.5-turbo" GPT_3_5_TURBO_16K = "gpt-3.5-turbo-16k" -GRADING_FIELDS = ['overall', 'comment', 'task_response'] +GRADING_FIELDS = ['comment', 'overall', 'task_response'] GEN_FIELDS = ['question'] LISTENING_GEN_FIELDS = ['transcript', 'exercise'] diff --git a/helper/openai_interface.py b/helper/openai_interface.py index 374fcf0..edf8ee3 100644 --- a/helper/openai_interface.py +++ b/helper/openai_interface.py @@ -23,7 +23,7 @@ def process_response(input_string, quotation_check_field): index = input_string.index('{') # Extract everything after the first '{' (inclusive) result = input_string[index:] - if re.search(r"'" + quotation_check_field + "':\s*'(.*?)'", result): + if re.search(r"'" + quotation_check_field + "':\s*'(.*?)'", result, re.DOTALL | re.MULTILINE): parsed_string = result.replace("\"", "\\\"") pattern = r"(?