-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix ValidationAction
dispatching of BotUttered
messages
#11394
Conversation
rasa/core/processor.py
Outdated
@@ -180,6 +180,8 @@ async def run_action_extract_slots( | |||
f"Default action '{ACTION_EXTRACT_SLOTS}' was executed, " | |||
f"resulting in {len(extraction_events)} events: {events_as_str}" | |||
) | |||
await self.execute_side_effects(extraction_events, tracker, output_channel) |
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 that the other side effects are scheduling / cancelling reminders - do you know if the behaviour for either of those now changes?
Is it possible to include unit tests for the expected behaviour of those two, once we know what it is?
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.
Good question, I should only apply the first side-effect (sending bot messages), since the other events are disallowed during validation (only SlotSet
and BotUttered
are allowed event types to be returned during slot validation, see here).
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.
Gotcha, that makes sense.
One thing I am confused by, why do users want to return BotUttered
events instead of returning responses
directly? Or is this different for slot validation than for other custom actions?
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.
why do users want to return BotUttered events instead of returning responses directly?
You mean why wouldn't they use dispatcher.utter_message
instead of returning the BotUttered
event? Not sure 😄 It seems both approaches are valid, so we wanted to enable that.
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.
just a small suggestion for the changelog since it's only the messages that are being executed and not other side effects
🚀 A preview of the docs have been deployed at the following URL: https://11394--rasahq-docs-rasa-v2.netlify.app/docs/rasa |
Proposed changes:
dispatcher.utter_message
in a slot validation action does not display in a conversation rasa-sdk#612 (more context in the discussion here)Status (please check what you already did):
black
(please check Readme for instructions)