I want to greet user with the name. For this my application will post the below json to rasa with username in “sender” option.
response = requests.post(“http://localhost:5005/webhooks/rest/webhook”, headers = { “Content-Type”: “application/json” }, json = { ‘message’: ‘hi’ , “sender”: “aniket”} )
How do i use custom action for this. My actions.py file is
class UserName(Action): def name(self): return “utter_greet_user”
def run(self, dispatcher, tracker, domain):
dispatcher.utter_custom_json()
return []
If i could read “sender” option from input json in my action file then i can call this action while greeting. Any suggestions?