File size: 217 Bytes
6afe180 |
1 2 3 4 5 6 7 8 |
def doc_to_text(doc) -> str:
choices = ""
for idx, choice in enumerate(doc["choices"]):
letter = "ABCD"[idx]
choices += f"{letter}. {choice}\n"
return f"Question: {doc['question']}\n{choices}\nAnswer:"
|