edsl
edsl copied to clipboard
QuestionMultipleChoice is allowing "None" response
Expected behavior: An exception is thrown when the model does not provide a response to a question.
Actual behavior: QuestionMultipleChoice
and QuestionCheckBox
allow "None" response:
Code to reproduce:
from edsl.questions import QuestionMultipleChoice
q = QuestionMultipleChoice(
question_name = "bad_instruction",
question_text = "?",
question_options = ["breakfast", "cars"]
)
results = q.run()
results.select("bad_instruction").print(format="rich")
from edsl.questions import QuestionCheckBox
q = QuestionCheckBox(
question_name = "bad_instruction",
question_text = "What are your 2 favorite foods?",
question_options = ["dogs", "cars", "blue", "movies"],
min_selections = 1,
max_selections = 1
)
results = q.run()
results.select("bad_instruction").print(format="rich")