Hi all. I want to grab the input entered by user and process in it in backend in actions.py. For example If user enters his address “3rd cross 4th main BDA layout Bengaluru India”, I want this whole address to be stored in an variable without creating it’s entity or slots. After that at later stage I want to process it in actions.py and display that address. Is it possible? Please help @Tanja @jonathanpwheat @JiteshGaikwad @amn41 @ashukrishna100 @imabhinav-am @akelad @juste_petr @Juste
If you want to process the entire message text as the address, you can do that in a custom action, but if you want to store it for later use, a slot would be the way to go. You don’t have to extract it as an entity to do this. If you don’t want it to affect action prediction, you could make an unfeaturized slot.
Thanks @mloubser. Could you please help me on how to get the entire message text as address in custom actions? As per my knowledge, if we want some user input in custom action we access it tracker.get_slot(“slot_name”). But here we don’t have slot or entity. So how do I get whatever user enters in custom actions?
In your custom action, you could do
address = tracker.get("latest_message").get("text")
Then you could set a slot based on that value e.g.
return [SlotSet("address", address)]
Might be helpful to explore the tracker
a bit and see what’s available for other custom actions too
thanks @mloubser. This is exactly what I wanted. Thanks so much