Categorical Slots error

edo

(Samarth Bhandari) #1

I am getting the following error while adding categorical slots to my bot, I am not sure why it is throwing this error.

rasa_core.slots  - Categorical slot 'affirm' is set to a value ('no') that is not specified in the domain. Value will be ignored and the slot will behave as if no value is set. Make sure to add all values a categorical slot should store to the domain.

Here are the two ways I tried setting the slots based on the documentation and github issues:

slots:
  affirm:
    type: categorical
    values: yes,no
  talk_more:
    type: text
  set_ip:
    type: text 
slots:
  affirm:
    type: categorical
    values:
    - yes
    - no
  talk_more:
    type: text
  set_ip:
    type: text 

And I setting the slots in the stories as I would in any other case:

 *decide_yes[affirm=yes]
 - slot{"affirm":"yes"}

What am I missing?


(Edoardo Pedrotti) #2

Hi @samarth12, categorial slots should be specified as follows:

   risk_level:
      type: categorical
      values:
      - low
      - medium
      - high