nlu:
- intent: change_slot
examples: |
- quiero cambiar
- cambiar informaciĂłn
- cambiar dato
- quiero cambiar dato
- el dato esta mal quiero cambiarlo
Problem
When the user triggers the change_slot intent, Rasa continues asking for the slots instead of displaying the message specified in the utter response.
Question
What am I missing? Do you have any thoughts on this @fkoerner ?
This sounds like somehow you’re not breaking out of the form. That happens because forms override rules until the form action is rejected. You could try:
I added that change and then retrained the chatbot and finally didn’t work.
There isn’t a specific reason because I want to break out of the form. I’ve just followed the chitchat example provided in the forms documentation. I thought that this would match my requirements.
What I want to achieve with this is to enable a user to change the information set in a slot of the form. I was thinking of adding a button (in the frontend) for each slot that I have, and when the user pressed it the bot should utter something like “Oh… I see that you want to change {slot_name}”. Then, that slot should be unset (set to None) and then the bot should ask it again. Maybe an action is better suited for that because I need to custom create the uttering since the slots’ names don’t match exactly how a human would say their names. Also, I think it would be easier to unset the slot and to ask for the changed slot programmatically.
I’ve added it and it didn’t work. Prompted the same form question again since it didn’t find any intent that matches what I’m looking for in the input text. I don’t know why I’m not being able to break out of the form…
I’ve attached to this reply the files that you requested with all the information in regards to the form. Actually, they have more information but I’ve cut it to show you only the things that involves the form.
The issue seems to be with the custom validations that I have. When I disable them and I leave only the slots defined in the forms section of the domain.yml file the intent change_slot stops the form loop. Also, I’ve added to those slots the property not_intent: change_slot.
Maybe I have to add extra logic in my extract_<slot_name> functions to handle that situation? What are your thoughts on this @fkoerner ?
I’m only seeing extract methods not validation methods in your actions.py. I think you may be having issues because of lines like:
if tracker.slots['slot_to_change'] != None:
self.deactivate()
return {}
You shouldn’t have to self.deactivate(). If you reject the value to validate by returning {}, that form action is rejected and the rule should kick in. So it should look like:
if tracker.slots['slot_to_change'] != None:
return {}
You also need to do this for slots that use default mappings, in your case: court, vendor_signature, buyer_signature. This should look something like: