@atwine When it comes to health bro, it should take it more cautiously! If there is any other use case, I will not suggest and guide you more in detail. If your wrong suggestion, can make cause to someone health then ? I will help you. I already told you I respect your use case and this is my own perception you can agree or disagree I dn’t mind
@atwine Yes! I will give you solution. But, honestly I have my own priorities and office work I hope you respect that. Thanks
I am looking for help with rasa not advise on health: I have many doctors who are doing that. So humbly just let me know how I can do this. If not…then thank you for your time. Il find a way somehow.
Hi @atwine, if the different responses are the same in meaning but different in phrasing or complexity you can use conditional response variations for this. I would set a boolean slot depending on what the doctor/non-doctor responds, and then condition the responses on this slot. This is described in more detail here.
I have looked at the code, however I am not really sure how they are using the boolean slot. Its confusing how to fill it. Do you have an example where its being used so I can check it out.
There are different ways to fill the slot. In your case, since the setting of the slot will change the assistant’s behaviour, I think giving the users buttons to select from is a good approach. Your commented-out button approach should work, did you have problems with this?
I looked at your code briefly (note that it is much easier for us to look at this if you include snippets in your actual comments). I would not recommend setting an initial value for the slot, especially if you are trying to condition based on the slot. If you don’t set an initial value, the boolean slot will be handled differently for unset than it is for set to true or false, which I think is your desired behaviour.
So this is what is confusing me, and I have written this before looking through your links. So for a slot like text , I know its the presence that matters, but now this boolean, I am not sure how the filling works, when I try to use buttons, I don’t know what payload to send through.
I could used a good example of using the boolean and conditional variation to answer some questions.
I tried your method but I am running into this error:
2021-11-29 15:10:17 ERROR rasa.core.actions.action - Couldn't create message for response 'utter_inform'.
Your input -> what is flu
2021-11-29 15:10:28 ERROR rasa.core.actions.action - Couldn't create message for response 'utter_explain_flu'.
Your input -> bye
Bye
Your input ->
My rasa version:
(rasaenv) Drs-MacBook-Pro:Trial-CategoricalSlot drjamesmugume$ rasa --version
Rasa Version : 2.8.13
Minimum Compatible Version: 2.8.9
Rasa SDK Version : 2.8.3
Rasa X Version : 0.39.3
Python Version : 3.7.5
I am not sure what is causing that now.
Utter Inform
utter_inform:
- condition:
- type: slot
name: is_doctor
value: false
text: "Welcome NON DOCTOR, how can we assist you today?"
- condition:
- type: slot
name: is_doctor
value: true
text: "Welcome DOCTOR, how can we assist you today?"
Utter Explain Flu
utter_explain_flu:
- condition:
- type: slot
name: is_doctor
value: false
text: "Flu explanation for NON DOCTORS so that we know the logic works"
- condition:
- type: slot
name: is_doctor
value: true
text: "Flue explanation for DOCTORS such that the logic flow works well."
Ask Doctor
utter_ask_doctor:
- text: "Are you a doctor?"
buttons:
- title: "yes"
payload: '/inform{{"is_doctor":true}}'
- title: "no"
payload: '/inform{{"is_doctor":false}}'
That seems odd, that message might appear if the response wasn’t defined or something went wrong in the definition. Is utter_explain_flu under responses?