Skip to content

Commit

Permalink
feat : regulization answer format
Browse files Browse the repository at this point in the history
  • Loading branch information
Son-GyeongSik committed Nov 23, 2023
1 parent 59e5967 commit ab0b275
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/quiz/quizv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ async def generate_quizzes(summaries: list):
quiz_list = []
for quiz_chunk in quiz_chunk_list:
quiz_list.extend(quiz_chunk)

for quiz in quiz_list:
if isinstance(quiz['answer'], list) and len(quiz['answer']) > 0:
quiz['answer'] = quiz['answer'][0]

if quiz['answer'] == 0:
quiz['answer'] = 1

return quiz_list


Expand Down

0 comments on commit ab0b275

Please sign in to comment.