Add comment to grading of writing.
This commit is contained in:
@@ -238,6 +238,27 @@ def build_write_blanks_solutions_listening(words: [], start_id):
|
||||
)
|
||||
return solutions
|
||||
|
||||
def get_perfect_answer(question: str, size: int):
|
||||
messages = [
|
||||
{
|
||||
"role": "system",
|
||||
"content": (
|
||||
'You are a helpful assistant designed to output JSON on this format: '
|
||||
'{"perfect_answer": "perfect answer for the question"}')
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": ('Write a perfect answer for this writing exercise of a IELTS exam. Question: ' + question)
|
||||
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": ('The answer must have at least ' + str(size) + ' words')
|
||||
|
||||
}
|
||||
]
|
||||
token_count = count_total_tokens(messages)
|
||||
return make_openai_call(GPT_4_O, messages, token_count, GEN_TEXT_FIELDS, GEN_QUESTION_TEMPERATURE)
|
||||
|
||||
def generate_reading_passage(type: QuestionType, topic: str):
|
||||
messages = [
|
||||
|
||||
Reference in New Issue
Block a user