Spaces:
Sleeping
Sleeping
Update rasa_app/domain.yml
Browse files- rasa_app/domain.yml +29 -4
rasa_app/domain.yml
CHANGED
@@ -15,6 +15,7 @@ intents:
|
|
15 |
- ask_for_changes
|
16 |
- ask_for_recommendation
|
17 |
- change_diet_day
|
|
|
18 |
|
19 |
entities:
|
20 |
- dietary_preference
|
@@ -27,6 +28,8 @@ entities:
|
|
27 |
- restriction
|
28 |
- allergy
|
29 |
- day_of_week
|
|
|
|
|
30 |
|
31 |
slots:
|
32 |
dietary_preference:
|
@@ -106,6 +109,18 @@ slots:
|
|
106 |
mappings:
|
107 |
- type: from_text
|
108 |
intent: inform
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
responses:
|
111 |
utter_greet:
|
@@ -115,19 +130,19 @@ responses:
|
|
115 |
- text: "Goodbye! Feel free to come back anytime for diet advice."
|
116 |
|
117 |
utter_ask_dietary_preference:
|
118 |
-
- text: "What type of diet are you following
|
119 |
|
120 |
utter_ask_health_goal:
|
121 |
-
- text: "What's your health goal
|
122 |
|
123 |
utter_ask_personal_info:
|
124 |
- text: "To provide the most accurate recommendations, I need some basic information. Could you share your age, weight, height, gender, and activity level?\n\nExample format: '35 years old, 70kg, 175cm, male, moderate activity'"
|
125 |
|
126 |
utter_ask_restrictions:
|
127 |
-
- text: "Do you have any dietary restrictions I should be aware of
|
128 |
|
129 |
utter_ask_allergies:
|
130 |
-
- text: "Do you have any food allergies
|
131 |
|
132 |
utter_confirm_information:
|
133 |
- text: "I've collected the following information:\nDietary preference: {dietary_preference}\nHealth goal: {health_goal}\nAge: {age}\nWeight: {weight}\nHeight: {height}\nGender: {gender}\nActivity level: {activity_level}\nRestrictions: {restrictions}\nAllergies: {allergies}\n\nIs this information correct? I'll use it to create your personalized diet plan."
|
@@ -155,11 +170,21 @@ responses:
|
|
155 |
|
156 |
utter_default:
|
157 |
- text: "I'm not sure I understand. Could you rephrase that?"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
actions:
|
160 |
- action_generate_diet_plan
|
161 |
- action_answer_diet_question
|
162 |
- action_update_diet_plan
|
|
|
163 |
|
164 |
forms:
|
165 |
diet_change_form:
|
|
|
15 |
- ask_for_changes
|
16 |
- ask_for_recommendation
|
17 |
- change_diet_day
|
18 |
+
- change_user_info
|
19 |
|
20 |
entities:
|
21 |
- dietary_preference
|
|
|
28 |
- restriction
|
29 |
- allergy
|
30 |
- day_of_week
|
31 |
+
- change_field
|
32 |
+
- new_value
|
33 |
|
34 |
slots:
|
35 |
dietary_preference:
|
|
|
109 |
mappings:
|
110 |
- type: from_text
|
111 |
intent: inform
|
112 |
+
change_field:
|
113 |
+
type: text
|
114 |
+
influence_conversation: false
|
115 |
+
mappings:
|
116 |
+
- type: from_entity
|
117 |
+
entity: change_field
|
118 |
+
new_value:
|
119 |
+
type: text
|
120 |
+
influence_conversation: false
|
121 |
+
mappings:
|
122 |
+
- type: from_entity
|
123 |
+
entity: new_value
|
124 |
|
125 |
responses:
|
126 |
utter_greet:
|
|
|
130 |
- text: "Goodbye! Feel free to come back anytime for diet advice."
|
131 |
|
132 |
utter_ask_dietary_preference:
|
133 |
+
- text: "What type of diet are you following?\n\nExamples: vegetarian, vegan, keto, paleo, gluten-free, or no specific diet"
|
134 |
|
135 |
utter_ask_health_goal:
|
136 |
+
- text: "What's your health goal?\n\nExamples: weight loss, weight gain, maintenance, muscle building, improved energy"
|
137 |
|
138 |
utter_ask_personal_info:
|
139 |
- text: "To provide the most accurate recommendations, I need some basic information. Could you share your age, weight, height, gender, and activity level?\n\nExample format: '35 years old, 70kg, 175cm, male, moderate activity'"
|
140 |
|
141 |
utter_ask_restrictions:
|
142 |
+
- text: "Do you have any dietary restrictions I should be aware of?\n\nExamples: lactose intolerance, low sodium, low sugar"
|
143 |
|
144 |
utter_ask_allergies:
|
145 |
+
- text: "Do you have any food allergies?\n\nExamples: nuts, shellfish, eggs, dairy"
|
146 |
|
147 |
utter_confirm_information:
|
148 |
- text: "I've collected the following information:\nDietary preference: {dietary_preference}\nHealth goal: {health_goal}\nAge: {age}\nWeight: {weight}\nHeight: {height}\nGender: {gender}\nActivity level: {activity_level}\nRestrictions: {restrictions}\nAllergies: {allergies}\n\nIs this information correct? I'll use it to create your personalized diet plan."
|
|
|
170 |
|
171 |
utter_default:
|
172 |
- text: "I'm not sure I understand. Could you rephrase that?"
|
173 |
+
|
174 |
+
utter_ask_which_field_to_change:
|
175 |
+
- text: "Let's update your information. What would you like to change? (dietary preference, health goal, age, weight, height, gender, activity level)"
|
176 |
+
|
177 |
+
utter_ask_new_value:
|
178 |
+
- text: "What would you like to update your {change_field} to?"
|
179 |
+
|
180 |
+
utter_confirm_update:
|
181 |
+
- text: "I've updated your information:\nDietary preference: {dietary_preference}\nHealth goal: {health_goal}\nAge: {age}\nWeight: {weight}\nHeight: {height}\nGender: {gender}\nActivity level: {activity_level}\nRestrictions: {restrictions}\nAllergies: {allergies}\n\nIs this information correct now?"
|
182 |
|
183 |
actions:
|
184 |
- action_generate_diet_plan
|
185 |
- action_answer_diet_question
|
186 |
- action_update_diet_plan
|
187 |
+
- action_update_user_info
|
188 |
|
189 |
forms:
|
190 |
diet_change_form:
|