Skip to content
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

Restart dialogs #85

Merged
merged 23 commits into from
May 17, 2023
Merged

Restart dialogs #85

merged 23 commits into from
May 17, 2023

Conversation

nelealbers
Copy link
Contributor

Fixes PerfectFit-project/virtual-coach-issues#296 for the goal-setting dialog.

@nelealbers
Copy link
Contributor Author

@wbaccinelli , could you please take a look what I am missing in actions_idle_commands.py to let the state machine figure out whether there is an uncompleted dialog after the user types "verder"?

@nelealbers nelealbers requested a review from wbaccinelli May 3, 2023 13:52
Comment on lines 114 to 116
UserInterventionState.users_nicedayuid == user_id,
UserInterventionState.intervention_component_id == intervention_component_id
)
Copy link
Contributor

@wbaccinelli wbaccinelli May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the table there is also the completed field that we can check to filter out the results.

Suggested change
UserInterventionState.users_nicedayuid == user_id,
UserInterventionState.intervention_component_id == intervention_component_id
)
UserInterventionState.users_nicedayuid == user_id,
UserInterventionState.intervention_component_id == intervention_component_id
UserInterventionState.completed.is_(False)
)

@wbaccinelli
Copy link
Contributor

Moving everythting to the FSM was too complicated, so the actions will check the presence of uncompleted dialog, and the FSM will trigger the right one. In the FMS there is also an additional layer of checking, in case the user types 'verder' (which triggers the rule for continuing the dialog in any case) when this is not allowed.

Copy link
Contributor

@wbaccinelli wbaccinelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works perfectly! I added the mechanism for the menu selection and for starting the dialog to be continued. Let me know if it looks good to you

Rasa_Bot/actions/helper.py Outdated Show resolved Hide resolved
nelealbers and others added 4 commits May 17, 2023 14:28
filter for uncompleted dialogs only

Co-authored-by: Walter Baccinelli <100706999+wbaccinelli@users.noreply.github.com>
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 0 Code Smells

6.7% 6.7% Coverage
0.0% 0.0% Duplication

@nelealbers nelealbers merged commit 6486c3e into main May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to resume the last uncompleted dialog
2 participants