So currently, in my food ordering app, I have some metadata that stores the state of the order in a list slot. I want POST requests that I make to Rasa to also contain this data.
text = "I've added cheeseburger to your order"
order = ['cheeseburger']
dispatcher.utter_message(template="utter_after_ordering", voice=text, order=order)
and from there, I use python requests to make a post request to the REST api:
data = { "sender": "rasa", "message": message}
data = json.dumps(data)
rasa_api_endpint = "http://localhost:5005/webhooks/rest/webhook"
res = requests.post(url = rasa_api_endpint, data = data).json()['custom']
text, order = res['text'], ast.literal_eval(res['order'])
which allows me to get order back as a list of items (works even for a list of dictionaries as well). Would be cool if someone could tell me how to potentially have the order be in natively as a json rather than a string dictionary, but this works for now