fixed the response of the level test grading summary
This commit is contained in:
@@ -192,11 +192,6 @@ def calculate_grading_summary(body):
|
||||
|
||||
|
||||
def calculate_section_grade_summary(section):
|
||||
res = openai.ChatCompletion.create(
|
||||
model="gpt-3.5-turbo",
|
||||
max_tokens=chat_config['max_tokens'],
|
||||
temperature=chat_config['temperature'],
|
||||
tools=tools,
|
||||
messages = [
|
||||
{
|
||||
"role": "user",
|
||||
@@ -208,7 +203,20 @@ def calculate_section_grade_summary(section):
|
||||
},
|
||||
{"role": "user", "content": "Speak in third person."},
|
||||
{"role": "user", "content": "Please save the evaluation and suggestions generated."}
|
||||
])
|
||||
]
|
||||
|
||||
if section['code'] == "level":
|
||||
messages[2:2] = [{
|
||||
"role": "user",
|
||||
"content": "This section is comprised of multiple choice questions that measure the user's overall english level. These multiple choice questions are about knowledge on vocabulary, syntax, grammar rules, and contextual usage. The grade obtained measures the ability in these areas and english language overall."
|
||||
}]
|
||||
|
||||
res = openai.ChatCompletion.create(
|
||||
model="gpt-3.5-turbo",
|
||||
max_tokens=chat_config['max_tokens'],
|
||||
temperature=chat_config['temperature'],
|
||||
tools=tools,
|
||||
messages=messages)
|
||||
|
||||
return parse_openai_response(res)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user