How to check for not null values in template

Easy question, how can I check for not null values in an utterance template?

# favorite dish is empty
* choose{"favorite_dish": null}
  - utter_choose_again
# let's go with next question
* choose{"favorite_dish": not_null}
  - utter_choose_favorite_restaurant

The null works fine, but I can’t find the expected synthax for a not null check. I’d like to prevent setting two variables (favorite_dish, favorite_dish_is_set: bool) every time.

You only need to provide examples data that show any favorite dish and core will figure out that you mean not null.

* choose{"favorite_dish": "dish1"}
  - utter_choose_favorite_restaurant
#next
* choose{"favorite_dish": "dish2"}
  - utter_choose_favorite_restaurant
1 Like