You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/agents/utils/parse_json_to_prompt.py
+24-5Lines changed: 24 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -191,24 +191,43 @@ def format_part_details(part: PartDetails, currentPart: Optional[CurrentPart], s
191
191
]
192
192
) ifpart.publishedWorkedSolutionSectionselsef"No worked solutions for part ({convert_index_to_lowercase_letter(part.publishedPartPosition)});"
193
193
)
194
-
returnf"""
194
+
ifcurrentPart:
195
+
returnf"""
195
196
# {'[CURRENTLY WORKING ON] 'ifcurrentPart.id==part.publishedPartIdelse''}Part ({convert_index_to_lowercase_letter(part.publishedPartPosition)}):
196
197
{f"Time spent on this part: {currentPart.timeTakenPartifcurrentPart.timeTakenPartisnotNoneelse'No recorded duration'}"ifcurrentPart.id==part.publishedPartIdelse''}
197
198
Part Content: {part.publishedPartContent.strip() ifpart.publishedPartContentelse'No content'};
198
199
{responseAreas}
199
200
{f'Final Part Answer: {part.publishedPartAnswerContent}'ifpart.publishedPartAnswerContentelse'No direct answer for this part.'}
200
201
{workedSolutions}
201
-
"""
202
-
203
-
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.
202
+
"""
203
+
else:
204
+
returnf"""
205
+
# Part ({convert_index_to_lowercase_letter(part.publishedPartPosition)}):
206
+
Part Content: {part.publishedPartContent.strip() ifpart.publishedPartContentelse'No content'};
207
+
{responseAreas}
208
+
{f'Final Part Answer: {part.publishedPartAnswerContent}'ifpart.publishedPartAnswerContentelse'No direct answer for this part.'}
209
+
{workedSolutions}
210
+
"""
211
+
212
+
ifnotquestionSubmissionSummary:
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.
204
214
Maths equations are in KaTex format, preserve them the same. Use British English spellings.
205
215
{f'# Question Set {questionInformation.setNumber+1}: {questionInformation.setName};'if ((questionInformation.setNameisnotNone) and (questionInformation.setNumberisnotNone)) else''}
206
216
# Question {f' {questionInformation.setNumber+1}.{questionInformation.questionNumber+1}'if ((questionInformation.setNumberisnotNone) and (questionInformation.questionNumberisnotNone)) else''}: {questionInformation.questionTitle};
207
217
Guidance to Solve the Question: {questionInformation.questionGuidanceor'None'};
208
218
Description of Question: {questionInformation.questionContent};
209
219
Expected Time to Complete the Question: {f'{questionInformation.durationLowerBound} - {questionInformation.durationUpperBound} min;'ifquestionInformation.durationLowerBoundandquestionInformation.durationUpperBoundelse'No specified duration.'}
210
-
Time Spent on the Question today: {questionAccessInformation.timeTakenor'No recorded duration'}{f'which is {questionAccessInformation.accessStatus}'ifquestionAccessInformation.accessStatuselse''}{f'{questionAccessInformation.markedDone}'ifquestionAccessInformation.markedDoneelse''};
211
220
"""
221
+
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.
224
+
{f'# Question Set {questionInformation.setNumber+1}: {questionInformation.setName};'if ((questionInformation.setNameisnotNone) and (questionInformation.setNumberisnotNone)) else''}
225
+
# Question {f' {questionInformation.setNumber+1}.{questionInformation.questionNumber+1}'if ((questionInformation.setNumberisnotNone) and (questionInformation.questionNumberisnotNone)) else''}: {questionInformation.questionTitle};
226
+
Guidance to Solve the Question: {questionInformation.questionGuidanceor'None'};
227
+
Description of Question: {questionInformation.questionContent};
228
+
Expected Time to Complete the Question: {f'{questionInformation.durationLowerBound} - {questionInformation.durationUpperBound} min;'ifquestionInformation.durationLowerBoundandquestionInformation.durationUpperBoundelse'No specified duration.'}
229
+
Time Spent on the Question today: {questionAccessInformation.timeTakenor'No recorded duration'}{f'which is {questionAccessInformation.accessStatus}'ifquestionAccessInformation.accessStatuselse''}{f'{questionAccessInformation.markedDone}'ifquestionAccessInformation.markedDoneelse''};
0 commit comments