I want to check in my list if have that fruit in my list if not, it must ask the user to ask to choose some other fruit. It must not go to next state until I do not get the fruit which is the list. Can anyone help.
def run(self, dispatcher, tracker, domain): ents= ['mango','apple','banana'] ent = next(tracker.get_latest_entity_values("names"), None) if ent not in ents: #tracker._paused = True #ConversationPaused() dispatcher.utter_template("utter_ask_again", tracker) return  #tracker._paused = False #ConversationResumed() dispatcher.utter_template("utter_ask_for_home", tracker) return ()
## Generated Story -2116955147822496342 * Greet - action_ask_fruit * Affrim - ask_name * Name - utter_address * Closing - utter_close