Set a slot without custom action?

Can I set a slot with the value from an entity, which has different name from the slot, in a normal action rather than formaction and without writing a custom action?

Hi @lullaby-afa, I understand that you’d like to do something like the current from_entity mapping where you can specify the entity to fill the given slot, but you want to do it outside forms. I’m afraid this isn’t currently possible without custom actions (I also wonder what you mean under “normal action”). However, bringing more flexibility into this is something that we’re actively looking into as part of our next major release (Rasa Open Source 3.0).

Currently, in Rasa 2.x, the only way to fill a differently named slot from user text outside forms is to run some sort of code that looks at the text (and at the entities extracted) and fills the slot. And custom actions are the easiest place where one can add this sort of code (a much more obscure option being adding a custom NLU component at the end of the pipeline).

Thanks, now I’m rewriting your Slot class and domain file to implement that. Looking forward to your release!

1 Like