Fallback policy fails when user rephrases

Im overriding the ActionDefaultAskAffirmation action to provide buttons with intents above a certain confidence threshold (below the nlu threshold). If no intents have high enough confidence then it asks the user to rephrase their message.

       if len(buttons) > 0:
            dispatcher.utter_message(text="Did you mean: ", buttons=buttons)
            dispatcher.utter_message(text="You can also try rephrasing your message.")
        else:
            dispatcher.utter_message(template="utter_ask_rephrase"
            
        return []

So if the user chooses a button it works but if the user types something themselves then an empty response is returned. Im not sure if I need to add training stories or add some logic to the policy to handle if a user types something instead of choosing an intent provided.

Hi Tatiana,

Can you show the debug log when the user types a response? Also, have you looked at our example which is described here.

Greg

hmm is that new?? ive looked at the action code before and docs a million times and it didnt look like that haha

i was looking at rasa code not rasa-demo i guess

this is actually what i need to solve the issue: rasa-demo/actions.py at 87206e6b1e28abd22b6f4f739ba28a34bd4e5f06 · RasaHQ/rasa-demo · GitHub