-
Notifications
You must be signed in to change notification settings - Fork 491
fix(config): correct dialog rails activation logic #1161
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
Conversation
Fixed the `has_dialog_rails` logic in `RailsConfig` to require both `user_messages` and `bot_messages` for implicit activation. Removed `flows` from the condition to align with expected behavior. test(config): adjust tests for updated dialog rails logic Modified test cases to reflect the corrected dialog rails activation logic.
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!
Just a quick question. If we have only user canonical forms (user messages), don't we trigger the generate intent task if embeddings_only
is not set to True? This would activate the dialogue rails.
Thank you, @trebedea , for the review. I ran into some issues because the generate_user_intent action doesn’t just generate the user intent (it also produces the bot message and passthrough). So, I wasn’t able to identify the correct mapping from the config to the dialog rails tasks to prevent this behavior while still allowing it when it’s explicitly removed at the task level. Please let me know if there’s a way we can fix/improve this validation. We can also add tests in #1145 to ensure all scenarios are handled correctly. Thanks! |
63a18a9
to
836008d
Compare
Whenever we have any of user_messages, flows, or bot_messages in the config, we can consider has_dialog_rails is potentially True. In some cases, dialogue rails will not be triggered, e.g. if we have user_messages and embeddings_only is set to True. |
Description
Fixed the
has_dialog_rails
logic inRailsConfig
to require bothuser_messages
andbot_messages
for implicit activation. Removedflows
from the condition to align with expected behavior.test(config): adjust tests for updated dialog rails logic
Modified test cases to reflect the corrected dialog rails activation logic.
Related PR
#1137