-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
IntentTEDPolicy
: rasa interactive
updates
#8906
Conversation
There are literally no tests for |
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 know it's a hard to test module but could we please try to add a test for the new edge case?
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.
Can we please add a test for it, Alex?
441cb4f
to
c2e13b6
Compare
) | ||
monkeypatch.setattr(interactive, "_form_is_rejected", Mock(return_value=False)) | ||
monkeypatch.setattr(interactive, "_form_is_restored", Mock(return_value=False)) | ||
monkeypatch.setattr(interactive, "send_action", asyncio.coroutine(Mock())) |
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.
how about making sure this gets called with the expected values?
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
f"to indicate that the last user message was unexpected " | ||
f"at this point in the conversation. " | ||
f"Check out IntentTEDPolicy ({DOCS_URL_POLICIES}/#intent-ted-policy) " | ||
f"to learn more." |
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.
Do we need to ask the user here to press Y/N to continue?
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.
That's what we've decided to do, yes (to keep it consistent with the rest)
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.
Ah ok, then maybe it should be explicitly stated? Unless questionary
takes care of this 😄
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.
IMO this should instead be written in docs with the explanation what action_unlikely_intent
is and how it works. We can also write it here but I am afraid the message will be too long in this case.
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.
Ah I meant maybe it's not obvious what keys to press from the question and that should be explicitly stated, thats all 👍
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.
Oh, got it! Actually, questionary
handles that and shows the available options automatically :)
is_correct = await _ask_questions(question, conversation_id, endpoint) | ||
is_correct = ( | ||
await _ask_questions(question, conversation_id, endpoint) | ||
or action_name == ACTION_UNLIKELY_INTENT_NAME |
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.
Does this line imply that regardless of user answer to the query, the action is always correct for action_unlikely_intent
?
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 means that the choice (Y/N) doesn't affect what's gonna be happening next.
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.
Thanks for adding the test! 💯
Proposed changes:
rasa interactive
toIntentTEDPolicy
(action_unlikely_intent
)rasa interactive
#8421It requires
rasa test
updates to be merged first! #8843Status (please check what you already did):
black
(please check Readme for instructions)