Filter topics and words on exercises.
This commit is contained in:
10
app.py
10
app.py
@@ -243,7 +243,8 @@ def get_writing_task_1_general_question():
|
||||
try:
|
||||
gen_wt1_question = "Craft a prompt for an IELTS Writing Task 1 General Training exercise that instructs the " \
|
||||
"student to compose a letter. The prompt should present a specific scenario or situation, " \
|
||||
"requiring the student to provide information, advice, or instructions within the letter."
|
||||
"requiring the student to provide information, advice, or instructions within the letter. " \
|
||||
"Make sure that the generated prompt does not contain forbidden subjects in muslim countries."
|
||||
token_count = count_tokens(gen_wt1_question)["n_tokens"]
|
||||
response = make_openai_instruct_call(GPT_3_5_TURBO_INSTRUCT, gen_wt1_question, token_count, None,
|
||||
GEN_QUESTION_TEMPERATURE)
|
||||
@@ -391,7 +392,7 @@ def get_speaking_task_1_question():
|
||||
gen_sp1_question = "Craft a thought-provoking question for IELTS Speaking Part 1 that encourages candidates to delve deeply " \
|
||||
"into personal experiences, preferences, or insights on diverse topics. Instruct the candidate to offer " \
|
||||
"not only detailed descriptions but also provide nuanced explanations, examples, or anecdotes to enrich " \
|
||||
"their response." \
|
||||
"their response. Make sure that the generated question does not contain forbidden subjects in muslim countries." \
|
||||
"Provide your response in this json format: {'topic': 'topic','question': 'question'}"
|
||||
token_count = count_tokens(gen_sp1_question)["n_tokens"]
|
||||
response = make_openai_instruct_call(GPT_3_5_TURBO_INSTRUCT, gen_sp1_question, token_count, GEN_FIELDS,
|
||||
@@ -462,7 +463,7 @@ def get_speaking_task_2_question():
|
||||
gen_sp2_question = "Create a question for IELTS Speaking Part 2 that encourages candidates to narrate a personal experience " \
|
||||
"or story related to a randomly selected topic. Include 3 prompts that guide the candidate to describe " \
|
||||
"specific aspects of the experience, such as details about the situation, their actions, and the " \
|
||||
"reasons it left a lasting impression." \
|
||||
"reasons it left a lasting impression. Make sure that the generated question does not contain forbidden subjects in muslim countries." \
|
||||
"Provide your response in this json format: {'topic': 'topic','question': 'question', " \
|
||||
"'prompts': ['prompt_1', 'prompt_2', 'prompt_3']}"
|
||||
token_count = count_tokens(gen_sp2_question)["n_tokens"]
|
||||
@@ -480,7 +481,8 @@ def get_speaking_task_3_question():
|
||||
try:
|
||||
gen_sp3_question = "Formulate a set of 3 questions for IELTS Speaking Part 3 that encourage candidates to engage in a " \
|
||||
"meaningful discussion on a particular topic. Provide inquiries, ensuring " \
|
||||
"they explore various aspects, perspectives, and implications related to the topic." \
|
||||
"they explore various aspects, perspectives, and implications related to the topic. " \
|
||||
"Make sure that the generated question does not contain forbidden subjects in muslim countries." \
|
||||
"Provide your response in this json format: {'topic': 'topic','questions': ['question', " \
|
||||
"'question', 'question']}"
|
||||
token_count = count_tokens(gen_sp3_question)["n_tokens"]
|
||||
|
||||
Reference in New Issue
Block a user