Hello
i have an issue with dynamically creating buttons for multiple questions after each other, similar to: How to get values from payload in button after choosing an option?
However, i have multiple questions. For now i tried to put them in a for-loop, but that returns all the questions/buttons at once, without waiting for user input. Is there a way to check for user input? like triggering “action_listen” from my custom action.
def run(self, dispatcher, tracker, domain): dispatcher.utter_message("Welches der Bilder entspricht dir am meisten?") custom_dicts = [[{"parameter1": 3*i+1,"payload": '/temporary{/"codes_tmp":/"code_'+str(3*i+1)+'/"',"title": f"Neigung {3*i+1}","typus": "image_button"}, {"parameter1": 3*i+2,"payload": '/temporary{/"codes_tmp":/"code_'+str(3*i+2)+'/"',"title": f"Neigung {3*i+2}","typus": "image_button"}, {"parameter1": 3*i+3,"payload": '/temporary{/"codes_tmp":/"code_'+str(3*i+3)+'/"',"title": f"Neigung {3*i+3}","typus": "image_button"}] for i in range(9)] tmp_prev = ['code_1','code_2','code_3'] SlotSet("n_1",['z']) for i in custom_dicts: dispatcher.utter_message("Welches der Bilder entspricht dir am meisten?") dispatcher.utter_custom_json(i) n_prev = tracker.get_slot('n_1') #### here is the issue: how do i wait for the user input, before i read the slot to add the value to the list? n = [tracker.get_slot('codes_tmp')] # while not n in tmp_prev: # this is sth i tried, wait until the slot changes # print('sleep') # time.sleep(10) # tmp_prev = tmp_prev + n #SlotSet("n_1",n_prev+n) return[]