-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slot mappings #549
Slot mappings #549
Conversation
rasa_sdk/forms.py
Outdated
validation_events = await self.validate(dispatcher, tracker, domain) | ||
validation_events = await self.get_validation_events( | ||
dispatcher, tracker, domain | ||
) | ||
tracker.add_slots(validation_events) | ||
|
||
next_slot = await self.next_requested_slot(dispatcher, tracker, domain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably either need a comment to specify that this is here to work for FormValidationAction
, because it will always be None
for global slot mappings, or run
method needs to be refactored? This could be confusing if we mention in the docs only to use ValidationAction
for slot validation outside forms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem like it will always be None
because required_slots
can still be overridden in a specific implementation of ValidationAction
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, however having a SlotSet event for requested_slot
doesn't make sense in the context of the rasa action_extract_slots
because this action doesn't request slots; it's only valid in case of a form so maybe there could be a way for this functionality only to be restricted to forms 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you for coping with all my comments 👍🏼 The only thing left to address is the removal of FormAction
since that's been deprecated so it wasn't actually required to mirror changes from rasa-oss as mentioned in the implementation proposal - my bad for not realising this earlier 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wohooo 🎉
Proposed changes:
Status (please check what you already did):
black
(please check Readme for instructions)