I am attempting to troubleshoot my own application that is using button payloads of “/SetSlot()”… but then displays the “/SetSlot” text to the chat user when you click the button. Couldn’t figure out what I was doing, so cloned the rasa-calm-demo, and experienced the same exact problem there.
which is using the action:
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker, domain: Dict[str, Any]):
dispatcher.utter_message(
response=“utter_confirm”,
buttons=[
{“title”: “Yes”, “payload”: “/SetSlots(confirmation_order=True)”},
{“title”: “No”, “payload”: “/SetSlots(confirmation_order=False)”}
]
)
return
Ultimately, the “SetSlot” step works – the slot value does properly get set. However, I can’t understand why it’s displaying the actual text.
I can see that there are other buttons that work properly – not clear why some work, and others don’t. Anyone know why the above code actually displays the test “/SetSlots(confirmation_order=True)”?
The built-in inspector will show the button payload since the inspector is used during the development cycle and this can prove to be more useful during that process.
When you are utilizing a chat widget (such as our’s – documentation available here), it will instead display the button’s title back to the user. Example:
I tried unsuccessfully to setup the NPN server to try the widget out… so I didn’t try it that way. However, I did do “rasa shell”, and it echoed the same messages I was seeing in “rasa inspect”. Admittedly it may too be another tool intended only to support development.
Surprisingly – The money transfer flow in the rasa-calm-demo demo behaves properly, just like you’re seeing, displaying the right values.
Your screenshot from the rasa-calm-demo is still following the original behavior. For this response the payload is no and that is what you are seeing in the inspector (as opposed to the payload of, e.g., /SetSlots...).
If inspector were returning the same response as the widget, you would have instead seen No, cancel the transaction.