Hi, I am a new in rasa. I’am using http api and i want to return json response instead of text. I took a look documentation then found dispatcher.response. I tried to use it but i got errow below.
'CollectingDispatcher' object has no attribute 'utter_response'
My action code:
class ActionRoute(Action):
def name(self):
return 'action_route'
def run(self, dispatcher, tracker, domain):
location = tracker.get_slot('location')
travelmode = tracker.get_slot('travelmode')
data = {
"travelmode":travelmode,
"location":location
}
response = "Hedef: {} ulaşım tercihi: {}".format(location,travelmode)
dispatcher.utter_response(json.dumps(data))
return [SlotSet("location", location),SlotSet("travelmode", travelmode)]
Is there anyone that have experienced before? Please help me?