Hi all,
I would like to know whether is possible to display the value of a variable by dispatcher.utter_message()
.
Below, my custom action:
class ActionRecap(Action):
def name(self) -> Text:
return "action_recap"
def run(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[EventType]:
pizza = tracker.get_slot("pizza_type")
drinks = tracker.get_slot("drink_type")
pizza_quantity = tracker.get_slot("pizza_quantity")
drinks_quantity = tracker.get_slot("drinks_quantity")
recap_pizza = zip(pizza_quantity, pizza)
recap_drinks = zip(drinks_quantity, drinks)
recap_text= "Recap: {recap_pizza}, {recap_drinks}"
dispatcher.utter_message(text=recap_text)
return []
Is it possible to output the values of the variables {recap_pizza}
, {recap_drinks}
?