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

319 closing dialog #75

Merged
merged 49 commits into from
Apr 17, 2023
Merged

319 closing dialog #75

merged 49 commits into from
Apr 17, 2023

Conversation

bscheltinga
Copy link
Contributor

@bscheltinga bscheltinga requested a review from wbaccinelli March 8, 2023 11:35
@bscheltinga
Copy link
Contributor Author

bscheltinga commented Mar 8, 2023

I do have a specific question on the top 5 of the first aid kit. I think there is a bug and it shows not the top 5 in terms of rating, but the top 5 entries from the db. I looked into it but cannot find what's going wrong. So it is printing:

  1. Vier je succes: None
  2. Doe het anders: None
  3. Advies voor bewegen: None
  4. Gezond eten: None
  5. Omgeving opnieuw inrichten: None

However, in the database, this is the rating from low to high. The highest rated activity is not printed.

@bscheltinga
Copy link
Contributor Author

I do have a specific question on the top 5 of the first aid kit. I think there is a bug and it shows not the top 5 in terms of rating, but the top 5 entries from the db. I looked into it but cannot find what's going wrong. So it is printing:

  1. Vier je succes: None
  2. Doe het anders: None
  3. Advies voor bewegen: None
  4. Gezond eten: None
  5. Omgeving opnieuw inrichten: None

However, in the database, this is the rating from low to high. The highest rated activity is not printed.

This got fixed in the latest commit. Function 'get_faik_text' is added to to .helper, this function is called in faik and closing dialog actions.

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.

Well done, more and more a Rasa expert! I left some comments to improve a bit the structure.

Comment on lines +4 to +5
- EXTERNAL_delayed_message_smoke_lapse
- EXTERNAL_delayed_message_smoke
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these two intents work even if they are not defined in the nlu?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it did work!

Comment on lines +66 to +82
closing_pf_grade:
type: text
influence_conversation: false
mappings:
- type: from_text
conditions:
- active_loop: closing_evaluate_pf_form
requested_slot: closing_pf_grade

closing_pf_evaluate:
type: text
influence_conversation: false
mappings:
- type: from_text
conditions:
- active_loop: closing_evaluate_pf_form
requested_slot: closing_pf_evaluate
Copy link
Contributor

Choose a reason for hiding this comment

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

Why has the requested_slot to be specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Requested slot needs to be specified if one form is used to fill multiple slots. Otherwise, the first slot is discarded if the second form is filled...

Comment on lines 121 to 122
if value not in ['Klaar', 'klaar']:
return {"closing_relapse_prevention_plan_one_done": None}
Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely we can use the validator

Comment on lines 141 to 142
if value not in ['Klaar', 'klaar']:
return {"closing_relapse_prevention_plan_two_done": None}
Copy link
Contributor

Choose a reason for hiding this comment

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

same


async def run(self, dispatcher, tracker, domain):
user_id = int(tracker.current_state()['sender_id']) # retrieve userID
new_intent = 'EXTERNAL_delayed_message_smoke_lapse'
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move the definition to the ComponentsTriggers class in the definitions in the DB.

Suggested change
new_intent = 'EXTERNAL_delayed_message_smoke_lapse'
new_intent = ComponentsTriggers.DELAYED_MSG_LAPSE


async def run(self, dispatcher, tracker, domain):
user_id = int(tracker.current_state()['sender_id']) # retrieve userID
new_intent = 'EXTERNAL_delayed_message_smoke'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
new_intent = 'EXTERNAL_delayed_message_smoke'
new_intent = ComponentsTriggers.DELAYED_MSG_SMOKE

bscheltinga and others added 2 commits March 10, 2023 15:37
Co-authored-by: Walter Baccinelli <100706999+wbaccinelli@users.noreply.github.com>
Co-authored-by: Walter Baccinelli <100706999+wbaccinelli@users.noreply.github.com>
bscheltinga and others added 23 commits March 10, 2023 15:38
Co-authored-by: Walter Baccinelli <100706999+wbaccinelli@users.noreply.github.com>
Co-authored-by: Walter Baccinelli <100706999+wbaccinelli@users.noreply.github.com>
Co-authored-by: Walter Baccinelli <100706999+wbaccinelli@users.noreply.github.com>
Co-authored-by: Walter Baccinelli <100706999+wbaccinelli@users.noreply.github.com>
Co-authored-by: Walter Baccinelli <100706999+wbaccinelli@users.noreply.github.com>
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 A 0 Security Hotspots
Code Smell A 2 Code Smells

1.5% 1.5% Coverage
0.0% 0.0% Duplication

@bscheltinga bscheltinga merged commit 9c57226 into main Apr 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.

Implement 1.20 Closing dialog
2 participants