ConditionChoiceState
Last updated
Last updated
ConditionChoiceState is used to jumpt to another state based on the value of an condition (which can be computed based on some variables in the ctx). For example:
"check_answer": ConditionChoiceState(
name="check_answer",
choices={
"true": "correct_answer_state",
"false": "wrong_answer_state",
},
condition='${str(image_selected) == str(correct_answer)}',
title="check_answer",
),
Note that the key of choices can be any string apart from boolean values.