Skip to content

Commit 19ee47e

Browse files
committed
fix questionAccessInformation
1 parent 25a466a commit 19ee47e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/agents/utils/parse_json_to_prompt.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,25 +209,25 @@ def format_part_details(part: PartDetails, currentPart: Optional[CurrentPart], s
209209
{workedSolutions}
210210
"""
211211

212-
if not questionSubmissionSummary:
213-
questionDetails = f"""This is the question I am currently working on. Below, you'll find its details, including the parts of the question, my responses for each response area, and the feedback I received. This information highlights my efforts and progress so far. Use this this information to inform your understanding about the question materials provided to me and my work on them.
214-
Maths equations are in KaTex format, preserve them the same. Use British English spellings.
212+
if questionAccessInformation:
213+
questionDetails = f"""This is the question I am currently working on. I am currently working on Part ({convert_index_to_lowercase_letter(questionAccessInformation.currentPart.position)}). Below, you'll find its details, including the parts of the question, my responses for each response area, and the feedback I received. This information highlights my efforts and progress so far. Use this this information to inform your understanding about the question materials provided to me and my work on them.
214+
Maths equations are in KaTex format, preserve them the same. Use British English spellings.
215215
{f'# Question Set {questionInformation.setNumber + 1}: {questionInformation.setName};' if ((questionInformation.setName is not None) and (questionInformation.setNumber is not None)) else ''}
216216
# Question {f' {questionInformation.setNumber + 1}.{questionInformation.questionNumber + 1}' if ((questionInformation.setNumber is not None) and (questionInformation.questionNumber is not None)) else ''}: {questionInformation.questionTitle};
217217
Guidance to Solve the Question: {questionInformation.questionGuidance or 'None'};
218218
Description of Question: {questionInformation.questionContent};
219219
Expected Time to Complete the Question: {f'{questionInformation.durationLowerBound} - {questionInformation.durationUpperBound} min;' if questionInformation.durationLowerBound and questionInformation.durationUpperBound else 'No specified duration.'}
220-
"""
220+
Time Spent on the Question today: {questionAccessInformation.timeTaken or 'No recorded duration'} {f'which is {questionAccessInformation.accessStatus}' if questionAccessInformation.accessStatus else ''} {f'{questionAccessInformation.markedDone}' if questionAccessInformation.markedDone else ''};
221+
"""
221222
else:
222-
questionDetails = f"""This is the question I am currently working on. I am currently working on Part ({convert_index_to_lowercase_letter(questionAccessInformation.currentPart.position)}). Below, you'll find its details, including the parts of the question, my responses for each response area, and the feedback I received. This information highlights my efforts and progress so far. Use this this information to inform your understanding about the question materials provided to me and my work on them.
223-
Maths equations are in KaTex format, preserve them the same. Use British English spellings.
223+
questionDetails = f"""This is the question I am currently working on. Below, you'll find its details, including the parts of the question, my responses for each response area, and the feedback I received. This information highlights my efforts and progress so far. Use this this information to inform your understanding about the question materials provided to me and my work on them.
224+
Maths equations are in KaTex format, preserve them the same. Use British English spellings.
224225
{f'# Question Set {questionInformation.setNumber + 1}: {questionInformation.setName};' if ((questionInformation.setName is not None) and (questionInformation.setNumber is not None)) else ''}
225226
# Question {f' {questionInformation.setNumber + 1}.{questionInformation.questionNumber + 1}' if ((questionInformation.setNumber is not None) and (questionInformation.questionNumber is not None)) else ''}: {questionInformation.questionTitle};
226227
Guidance to Solve the Question: {questionInformation.questionGuidance or 'None'};
227228
Description of Question: {questionInformation.questionContent};
228229
Expected Time to Complete the Question: {f'{questionInformation.durationLowerBound} - {questionInformation.durationUpperBound} min;' if questionInformation.durationLowerBound and questionInformation.durationUpperBound else 'No specified duration.'}
229-
Time Spent on the Question today: {questionAccessInformation.timeTaken or 'No recorded duration'} {f'which is {questionAccessInformation.accessStatus}' if questionAccessInformation.accessStatus else ''} {f'{questionAccessInformation.markedDone}' if questionAccessInformation.markedDone else ''};
230-
"""
230+
"""
231231

232232
partsDetails = "\n".join(
233233
[

0 commit comments

Comments
 (0)