Error working with buttons in rasa IT helpdesk bot

Hi @nik202 I have deployed rasa IT helpdesk bot on ms teams, they work fine except when the user clicks the buttons, it throws an error on the terminal as:

ERROR rasa.core.nlg.interpolator - Failed to replace placeholders in response ‘/inform{“priority”:“low”}’. Tried to replace ‘“priority”:“low”’ but could not find a value for it. There is no slot with this name nor did you pass the value explicitly when calling the response. Return response without filling the response. Traceback (most recent call last): File “Users@\rasa\HelpdeskAssistant\venv_hd\lib\site-packages\rasa\core\nlg\interpolator.py”, line 27, in interpolate_text text = text.format(values) KeyError: ‘“priority”:“low”’

Please help me resolve this error. Thank you

@srishti please check this link Dispatcher utter_button_message not showing up in MS Teams

1 Like

From https://rasa.com/docs/rasa/responses/#rich-responses:

ESCAPING CURLY BRACES IN DOMAIN.YML

You need to write the /intent{entities} shorthand response with double curly braces in domain.yml so that the assistant does not treat it as a variable in a response and interpolate the content within the curly braces.

The example on that page is:

responses:
  utter_greet:
  - text: "Hey! Would you like to purchase motor or home insurance?"
    buttons:
    - title: "Motor insurance"
      payload: '/inform{{"insurance":"motor"}}'
    - title: "Home insurance"
      payload: '/inform{{"insurance":"home"}}'