intent = tracker.latest_message["intent"].get("name")
user_type = next(tracker.get_latest_entity_values("user_type"), None)
is_new_user = intent == "how_to_get_started" and user_type == "new"
if intent == "affirm" or is_new_user:
return [SlotSet("onboarding", True)]
elif intent == "deny":
return [SlotSet("onboarding", False)]
return []
In the code above, how to understand this line:
is_new_user = intent == "how_to_get_started" and user_type == "new"
Does it mean:
if "intent == "how_to_get_started" and user_type == "new" "
, this will return a True or False, then assign this bool to 'is_new_user'. Is that right?