I use a form and check if the content of the slots matches with the symptoms for a cold, if not it matches with symptoms with a flu. Wich worked fine during the last weeks. Today I updates Rasa X (now 0.34.0) and Rasa (now 2.1.3) and I get only what happens under “else” although I make my answers true for “if”. I checked multiple times if there could be a typo, but there isn’t. Any ideas?
The actions.py looks like this:
class SymptomQuizDiseases: cold = [["discomfort_slow", "symptom_light", "false", "false", "feel_listless"], ... ]] responseCold = "It's a cold." flu = [["discomfort_fast", "symptom_heavy", "true", "true", "feel_bad"], ... ] responseFlu = "It's a flu." class SymptomQuizSubmission(Action): def name(self): return "submit_symptom_quiz_result" def run( self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: DomainDict ): slot_list = [tracker.get_slot("discomfort_beginning"),tracker.get_slot("discomfort_development"),tracker.get_slot("temperature"),tracker.get_slot("body_aches"),tracker.get_slot("physical_condition")] if slot_list in SymptomQuizDiseases.cold: dispatcher.utter_message(SymptomQuizDiseases.responseCold) else: dispatcher.utter_message(SymptomQuizDiseases.responseFlu) return []
The form part of my domain.yml
forms:
symptom_quiz_form:
body_aches:
- intent: affirm
type: from_intent
value: true
- intent: deny
type: from_intent
value: false
discomfort_beginning:
- intent: feel_bad
type: from_intent
value: discomfort_fast
- intent: slow
type: from_intent
value: discomfort_slow
discomfort_development:
- intent: feel_bad
type: from_intent
value: symptom_heavy
- intent: symptom_light
type: from_intent
value: symptom_light
physical_condition:
- intent: feel_bad
type: from_intent
value: feel_bad
- intent: feel_listless
type: from_intent
value: feel_listless
temperature:
- intent: affirm
type: from_intent
value: true
- intent: deny
type: from_intent
value: false