Can I set a slot from an NLU component?

Hi all,

I want to set a slot from an NLP component. As for setting the user input language. Is this possible?

What I want to do, is to ask wikipedia, and I want to find out what language to ask. I have defined a “language” slot, but I don’t know hot to fill it with a value, that can survive even if an action calls “AllSlotsReset()”.

I have a language identifier, I have created a custom NLU component, but I don’t know how to set the slot from the component.

I found it: Slots I can set an “entity” with the name of the slot I want to fill. With auto_fill true, it will be filled.

Hi, you can set a slot’s value declaratively in your story or domain file, or programatically in an action.

I guess your language slot qualifies as a categorial slot. You could set set it like this (a modified example from the docs):

    slots:
       language:
       type: categorical
       values:
       - en
       - es
       - fr

I am not sure if a slot can survive an explicit reset. What are you trying to achieve with that?

Yes, I defined a categorical slot, and then I am using an entity with the same name to auto_fill it. I have a component that does language detection in the pipeline, to support multiple languages.