Skip to content

Commit 5339d9f

Browse files
committed
fix questionAccessInformation optional
1 parent 9aea009 commit 5339d9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/agents/utils/parse_json_to_prompt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def parse_json_to_prompt( questionSubmissionSummary: Optional[List[StudentWorkRe
146146
questionAccessInformation: Optional[QuestionAccessInformation]
147147
) -> Optional[str]:
148148

149-
if not questionInformation or not questionAccessInformation:
149+
if not questionInformation:
150150
return "There must have been an error in fetching the question details. So ask me about the question I am working on such that you can still help me."
151151

152152
questionSubmissionSummary = [StudentWorkResponseArea(**submissionsSummary) for submissionsSummary in questionSubmissionSummary]
@@ -174,7 +174,7 @@ def format_response_area_details(responseArea: ResponseAreaDetails, studentSumma
174174
(Keep it Secret) Expected Answer: {responseArea.answer};
175175
{submissionDetails}"""
176176

177-
def format_part_details(part: PartDetails, currentPart: CurrentPart, summary: List[StudentWorkResponseArea]) -> str:
177+
def format_part_details(part: PartDetails, currentPart: Optional[CurrentPart], summary: List[StudentWorkResponseArea]) -> str:
178178
if not part:
179179
return ''
180180

0 commit comments

Comments
 (0)