Rasa error: UserWarning: Failed to parse arguments

26 views Asked by At

The issue arises when the chatbot presents two buttons for the user to choose from, one for "astreinte" and the other for "support". After the user selects one of these options, the chatbot should extract information from a CSV file accordingly. However, there is an error occurring when the user selects either "astreinte" or "support":

"UserWarning: Failed to parse arguments in line '/choose_topic{"topic": "astreinte"}'. Expected entities from [] but found {'topic'}. Continuing without unknown entity types."

file nly.yml:

- intent: choose_topic
  examples: |
    - '/choose_topic{"topic": "astreinte"}'
    - '/choose_topic{"topic": "support"}'

file domain.yml:

utter_greet_with_options:
  - text: "Bonjour, voulez-vous avoir des informations sur l'astreinte ou le support ?"
    buttons:
      - title: "astreinte"
        payload: '/choose_topic{"topic": "astreinte"}'
      - title: "support"
        payload: '/choose_topic{"topic": "support"}'

What do I have to do to fix this error?

1

There are 1 answers

0
Insouciant On
utter_greet_with_options:
  - text: "Bonjour, voulez-vous avoir des informations sur l'astreinte ou le support ?"
    buttons:
      - title: "astreinte"
        payload: /choose_topic{{"topic": "astreinte"}}
      - title: "support"
        payload: /choose_topic{{"topic": "support"}}

This is proper format for buttons.
This syntax is telling rasa that current message has intent choose_topic and has entity topic with value astrinte / support.
Thus, giving the nlu training data for choose_topic like you have given is not necessary.