Want to skip intent_check

I want to take an address as input from the user but I am unable to do that.

responses: utter_ask_address:

  • text: Please enter your new address…
  • story: address update story steps:
    • intent: address_update
    • action: utter_ask_address
    • action: action_listen
    • action: action_address_update

class ActionAddressUpdate(Action):

def name(self) -> Text:
    return "action_address_update"

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

    address = tracker.latest_message['text']
    print(address)
   return []

The problem I am facing here is that when I write my address (my address is having spaces obviously), it starts matching it with other intents (BTW I don’t have any intent for address), and my story above is not followed. I have used tracker.latest_message to extract the address and print that but due to that intent matching it is never reaching that action in the story.

Please help me solve it.

Did you changed the action order to have a try? Like this:

story: address update story steps
    intent: address_update
    action: utter_ask_address
    action: action_address_update
    action: action_listen

@Dustyposa If I do like this then how will action_address_update will catch the latest message. The reason I applied action_listen in middle was to take address input from the user at that step.

You shouldn’t put action_listen in your stories. If you’re waiting for user input it will have to be an intent:

story: address update story steps
- intent: address_update
- action: utter_ask_address
- intent: give_address
- action: action_address_update

@ChrisRahme Yeah but this was the last option I was available with. But when taking address as input it will definitely have spaces and intent will break that into multiple entites and not take that whole as a full address.

In your Custom Action, you’re taking the whole text as the address. So no need to worry about how the entities are split up.

If you want to set the address in a slot, do return [SlotSet('address', address)].

@sharmaji27 Hi, please can I see your snippet code for intent and slot mention for address? Further, you are facing issue, when user input the address which obviously have space, number and char, it not matching with your intent or please clear me the process what will happen when user enter address and what will be the output by bot. Thanks.

@nik202 what I want to do is. I want to take an address as input from the user and print that in action. So this is how I am doing it.

First I am detecting the intent, if it’s address_update then following this story.

Second I am uttering ‘Please enter your address.’

After this, I used action_listen to take input from the user, because if I had not applied it and directly applied action_address_upate that would have not taken any user input because there would be no halt in between.

Please help me solve this…

@ChrisRahme this is the problem, because in my usecase I am also having username and password, so it would become more prone to confusion if I add address in this way and it might also wrongly fill my username and password slot from this intent.

Please take a look at Forms and extracting from text.

Forms are used when you want to ask a series of questions to the user to gather information.