Letting story depend on the number of entities present in a list entity


(Ben M. ) #1

Hi,

I’ve been attempting to let the story depend on the number of entities present in a list. For example: a list entity “letters” with possible values “a” and “b”. I want that the outputted utterance is different if only one of the two is present than if both are present. e.g.

*intent{“letters”:[“a”]}

  • utter_one

*intent{“letters”:[“b”]}

  • utter_one

*intent{“letters”:[“a”, “b”]}

  • utter_two

I have tried this syntax, but it does not seem to be getting this no matter how many training examples I add. It seems the stories only look at if list entities are present or not and not how many. Is there a way I can do this?


(Romain Huber) #2

Can’t you handle this in a custom action ?

With only one story and then in your custom action you can do if/else on the number of entities in the list do change the response