In rasa form for a entity, it is assigning list to a slot.
How to restrict slot to take only one value not a list ?
Ex : the flow is as below while using form
* user_bank_name{"bankname":"adib"}
- slot{"bankname":"adib"}
- form_personal_loan
- slot{"bankname":["adib","adib"]}
Not sure how you ended up there. Is that a training story?
However, you end up with a list in a slot when you get multiple entities that are mapped to this slot in a single message.
Example:
User: I want to go to Dubai and Ulan Bartor
Now the bot recoginizes ‘Dubai’ and ‘Ulan Bartor’ as city entity and got a slot with the same name, you’ll get a list ([‘Dubai’, ‘Ulan Bartor’]) as the slot value. Your chance to control this, is the {slotname}_validate method, where you can write your own logic to handle this.
Thank you for your reply.
Coming to story part, I am using rasa x to test forms and create story, i have bank names in nlu as below
- [Dubai Islamic Bank](bankname) bank
- [National Bank of Fujairah](bankname) bank
- [national bank of fujairah](bankname) bank
- [adib](bankname)
When i enter ‘adib’, nlu is getting changed to (adib is added to nlu)
- [Dubai Islamic Bank](bankname) bank
- [National Bank of Fujairah](bankname) bank
- [national bank of fujairah](bankname) bank
- [adib](bankname)[adib](bankname)