Fill form slot with intent of initial message

@smn-snkl @Ghostvv I am stuck with same issue. can you share the full solution ? Do I have to create different forms for different Intents ??

Can you share your solution form ?? the slot mapping function implementations of different Intents ??

1 Like
example:
User :I want to buy a ticket 
Bot: May I know the data ?
User: I have changed my mind. I want to order a pizza.
Both: My I know the address.
class Order(Action):
    @staticmethod
    def required_slots(tracker):
        return ['name', 'item', ...]
class BookTciket(Action):
    @staticmethod
    def required_slots(tracker):
        return ['name', 'time', ...]

How can I combine both of them. if there is change of intent. Flow must be change.

    def required_slots(tracker):
        if intent=='booking':
            return ['name', 'time','flightPrice' ...]
        elif intent=='order':
            return ['name', 'item','foodPrice' ...]

The PRs are not merged yet

when it will be added ? will there be any example ??

@smn-snkl do you have any updates?

@Ghostvv any update ??

Can you help how can I update my form ??

you can check what is current intent in required_slots through tracker.latest_message.get("intent", {}).get("name")