diff --git a/.rasa/cache/cache.db b/.rasa/cache/cache.db index 38ef27a263a7e012bac6e7312a5a9065ca11a3bb..be952420a983f79370e914fb7116e413ab8557e5 100644 Binary files a/.rasa/cache/cache.db and b/.rasa/cache/cache.db differ diff --git a/actions/__pycache__/actions.cpython-310.pyc b/actions/__pycache__/actions.cpython-310.pyc index e48bb80000bd2cbafa5a70abf845e870a3650cc7..e8c5ecbabb451fcf537373ee166a2145427c5d13 100644 Binary files a/actions/__pycache__/actions.cpython-310.pyc and b/actions/__pycache__/actions.cpython-310.pyc differ diff --git a/data/nlu.yml b/data/nlu.yml index e0fe5dcd0a12f67d3fda9c99973fc8c7281b85e2..75b3e67f61ebe609ec38ab7742c38953196a5941 100644 --- a/data/nlu.yml +++ b/data/nlu.yml @@ -16,8 +16,7 @@ nlu: - Greetings - Howdy - Yo - -- intent: insult +- intent: insult examples: | - idiot - fuck you @@ -30,7 +29,6 @@ nlu: - worthless - you suck - fool - - intent: ask_capability examples: | - What can you do? @@ -45,7 +43,6 @@ nlu: - What kind of support do you give? - What tasks can you perform? - What can you assist with? - - intent: ask_cuisine_recommendation examples: | - Can you recommend a cuisine? @@ -63,8 +60,7 @@ nlu: - What cuisine is good for dinner? - What's a good cuisine for lunch? - Can you suggest something to eat? - - + - Recommend a cuisine - intent: ask_dish_recommendation examples: | - What should I cook from [Italian](cuisine_type) cuisine? @@ -89,14 +85,12 @@ nlu: - Suggest a dish from [Korean](cuisine_type) cuisine - Suggest a dish from [Latin American](cuisine_type) cuisine - Suggest a dish from [Mediterranean](cuisine_type) cuisine - - Suggest a dish from [Mexican](cuisine_type) cuisine - Suggest a dish from [Middle Eastern](cuisine_type) cuisine - Suggest [Nordic](cuisine_type) dishes - What is a dish from [Spanish](cuisine_type) cuisine - Suggest a dish from [Thai](cuisine_type) cuisine - Suggest a dish from [Vietnamese](cuisine_type) cuisine - What are some [Southern](cuisine_type) dishes - - Suggest a dish from [Indian](cuisine_type) cuisine - What should I cook from [Japanese](cuisine_type) cuisine? - Recommend a dish from [Thai](cuisine_type) cuisine - What's a traditional dish from [Mexican](cuisine_type) cuisine? @@ -104,7 +98,7 @@ nlu: - What should I make from [Greek](cuisine_type) cuisine? - Name a dish from [Spanish](cuisine_type) cuisine - Suggest something from [Mediterranean](cuisine_type) cuisine - + - What are some [Italian](cuisine_type) dishes? - intent: ask_recipe_steps examples: | - How do I make [Pizza](dish_name)? @@ -138,7 +132,9 @@ nlu: - How to make [Broccolini Quinoa Pilaf](dish_name)? - How to make [Pork Fried Rice](dish_name)? - How to make [mango fried rice](dish_name)? - + - How do i make [Mushroom Hummus Crostini](dish_name)? + - How do I make Salmon [Quinoa](dish_name) [Risotto](dish_name)?[]{"entity": "dish_name", "value": "Salmon Quinoa Risotto"} + - How do i make Roma Tomato [Bruschetta](dish_name)?[]{"entity": "dish_name", "value": "Roma Tomato Bruschetta"} - intent: ask_nutrition_analysis examples: | - What's the nutritional information for [Pizza](dish_name)? @@ -155,7 +151,6 @@ nlu: - What's the fiber content in [Soup](dish_name)? - How many sugars are in [Pasta](dish_name)? - Give me the nutrition breakdown for [Steak](dish_name) - - intent: ask_cost_breakdown examples: | - What's the cost breakdown for [Pizza](dish_name)? @@ -173,7 +168,6 @@ nlu: - Can you give me the cost details for [Soup](dish_name)? - What's the price estimate for [Pasta](dish_name)? - What's the financial breakdown for [Steak](dish_name)? - - intent: ask_cooking_tips examples: | - Can you give me cooking tips for [Pizza](dish_name)? @@ -191,8 +185,6 @@ nlu: - How can I improve my [Soup](dish_name)? - What are the best methods for making [Pasta](dish_name)? - Do you have any suggestions for [Steak](dish_name)? - - - intent: ask_related_recipes examples: | - What are some recipes related to [Pizza](dish_name)? @@ -210,7 +202,6 @@ nlu: - What dishes are related to [Soup](dish_name)? - Suggest recipes that are like [Pasta](dish_name) - What recipes are similar to [Steak](dish_name)? - - intent: ask_show_picture examples: | - Can you show me pictures? @@ -228,7 +219,6 @@ nlu: - I want to see [Soup](dish_name) - Can I see photos of [Pasta](dish_name)? - Do you have images of [Steak](dish_name)? - - intent: goodbye examples: | - Goodbye @@ -245,7 +235,6 @@ nlu: - Bye for now - Talk to you later - See you soon - - intent: thanks examples: | - Thanks @@ -260,7 +249,7 @@ nlu: - Many thanks - I owe you one - Grateful for your help - + - THanks - intent: affirm examples: | - Yes @@ -277,7 +266,6 @@ nlu: - That's correct - Sure thing - Indeed - - intent: deny examples: | - No @@ -295,7 +283,6 @@ nlu: - Not for me - No chance - Certainly not - - intent: smalltalk examples: | - How are you? @@ -315,12 +302,11 @@ nlu: - What's going on? - What have you been up to? - Any plans for today? - - lookup: dish_name examples: | - Salmon Quinoa Risotto - - Chipotle Chili + - Chipotle Chili - Vegetable Minestrone Soup - vegetable minestrone soup - Italian Tuna Pasta - - Moussaka + - Moussaka diff --git a/data/rules.yml b/data/rules.yml index d1d2e01b3c468249379addd6475fe2a80dbe2af1..abbd04569822ecf13e49a739b5d4233c001edcc6 100644 --- a/data/rules.yml +++ b/data/rules.yml @@ -1,9 +1,7 @@ version: "3.1" rules: -- rule: +- rule: get_back_at_insult steps: - intent: insult - - action: utter_capability - - + - action: utter_capability \ No newline at end of file diff --git a/data/stories.yml b/data/stories.yml index d9cbd8799199037c8aa582f1c5f505c0b66d0495..c0bd08be560d3d43faf3e00200403b8bd7f698bc 100644 --- a/data/stories.yml +++ b/data/stories.yml @@ -89,3 +89,42 @@ stories: steps: - intent: smalltalk - action: utter_smalltalk + +- story: interactive_story_1 + steps: + - intent: greet + - action: utter_greet + - intent: ask_capability + - action: utter_capability + - action: utter_capability2 + - intent: ask_cuisine_recommendation + - action: action_recommend_cuisine + - intent: ask_dish_recommendation + entities: + - cuisine_type: Italian + - slot_was_set: + - cuisine_type: Italian + - action: action_recommend_dish + - intent: ask_recipe_steps + entities: + - dish_name: Quinoa + - dish_name: Risotto + - slot_was_set: + - dish_name: Risotto + - intent: ask_recipe_steps + entities: + - dish_name: Salmon Quinoa Risotto + - action: action_provide_recipe_steps + - intent: ask_recipe_steps + entities: + - dish_name: Bruschetta + - slot_was_set: + - dish_name: Bruschetta + - intent: ask_recipe_steps + entities: + - dish_name: Roma Tomato Bruschetta + - action: action_provide_recipe_steps + - intent: thanks + - action: utter_thanks + - intent: goodbye + - action: utter_goodbye diff --git a/domain.yml b/domain.yml index b7de30b2f015669b402eccc423050b34d4958aeb..6c535230ae7b2763b18c26b55b4af651640868ce 100644 --- a/domain.yml +++ b/domain.yml @@ -1,26 +1,24 @@ -version: "3.1" - +version: '3.1' intents: - - greet - - ask_cuisine_recommendation - - ask_dish_recommendation - - ask_recipe_steps - - ask_nutrition_analysis - - ask_cost_breakdown - - ask_cooking_tips - - ask_related_recipes - - ask_show_picture - - goodbye - - thanks - - affirm - - deny - - smalltalk - - ask_capability - +- affirm +- ask_capability +- ask_cooking_tips +- ask_cost_breakdown +- ask_cuisine_recommendation +- ask_dish_recommendation +- ask_nutrition_analysis +- ask_recipe_steps +- ask_related_recipes +- ask_show_picture +- deny +- goodbye +- greet +- insult +- smalltalk +- thanks entities: - - cuisine_type - - dish_name - +- cuisine_type +- dish_name slots: cuisine_type: type: text @@ -32,51 +30,50 @@ slots: mappings: - type: from_entity entity: dish_name - actions: - - action_recommend_cuisine - - action_recommend_dish - - action_provide_recipe_steps - - action_show_picture - - action_nutrition_analysis - - action_cost_breakdown - - action_cooking_tips - - action_related_recipes - +- utter_capability +- utter_capability2 +- utter_goodbye +- action_provide_recipe_steps +- action_recommend_cuisine +- action_recommend_dish +- utter_greet +- utter_thanks +- utter_deny +- action_show_picture +- action_nutrition_analysis +- action_cost_breakdown +- action_cooking_tips +- action_related_recipes responses: utter_greet: - - text: "Hello! How can I assist you today?" - - text: "Hi! What can I do for you?" - - text: "Good day! How can I help you?" - + - text: Hello! How can I assist you today? + - text: Hi! What can I do for you? + - text: Good day! How can I help you? utter_goodbye: - - text: "Goodbye! Have a great day!" - - text: "Bye! See you soon!" - - text: "Goodbye! Take care!" - + - text: Goodbye! Have a great day! + - text: Bye! See you soon! + - text: Goodbye! Take care! utter_thanks: - - text: "You're welcome!" - - text: "No problem!" - - text: "My pleasure!" - + - text: You're welcome! + - text: No problem! + - text: My pleasure! utter_affirm: - - text: "Great!" - - text: "Awesome!" - - text: "Perfect!" - + - text: Great! + - text: Awesome! + - text: Perfect! utter_deny: - - text: "No problem. Let me know if you need anything else." - - text: "Okay. I'm here if you have any other questions." - - text: "Understood. If you need more help, just let me know." - + - text: No problem. Let me know if you need anything else. + - text: Okay. I'm here if you have any other questions. + - text: Understood. If you need more help, just let me know. utter_smalltalk: - - text: "That sounds interesting! Tell me more." - - text: "Oh, that's nice to hear!" - - text: "Sounds good! What else do you have planned?" - + - text: That sounds interesting! Tell me more. + - text: Oh, that's nice to hear! + - text: Sounds good! What else do you have planned? utter_capability: - - text: I can give you cuisine and recipe recommendations. - + - text: I can give you cuisine and recipe recommendations. utter_capability2: - - text: I could also tell you any info that you might need on recipes from Spooncular. - \ No newline at end of file + - text: I could also tell you any info that you might need on recipes from Spooncular. +session_config: + session_expiration_time: 60 + carry_over_slots_to_new_session: true diff --git a/story_graph.dot b/story_graph.dot new file mode 100644 index 0000000000000000000000000000000000000000..e3102238076ea2fd0c02ee7d64f5fbe5dc1430d4 --- /dev/null +++ b/story_graph.dot @@ -0,0 +1,42 @@ +digraph { +0 [class="start active", fillcolor=green, fontsize=12, label=START, style=filled]; +"-1" [class=end, fillcolor=red, fontsize=12, label=END, style=filled]; +1 [class=active, fontsize=12, label=action_session_start]; +2 [class=active, fontsize=12, label=utter_greet]; +3 [class=active, fontsize=12, label=utter_capability]; +4 [class=active, fontsize=12, label=utter_capability2]; +5 [class=active, fontsize=12, label=action_recommend_cuisine]; +6 [class=active, fontsize=12, label=action_recommend_dish]; +7 [class=active, fontsize=12, label=action_provide_recipe_steps]; +9 [class=active, fontsize=12, label=utter_thanks]; +10 [class=active, fontsize=12, label=utter_goodbye]; +11 [class="intent dashed active", label=" ? ", shape=rect]; +12 [class="intent active", fillcolor=lightblue, label="/greet", shape=rect, style=filled]; +13 [class="intent active", fillcolor=lightblue, label="/ask_capability", shape=rect, style=filled]; +14 [class="intent active", fillcolor=lightblue, label="/ask_cuisine_recommendation", shape=rect, style=filled]; +15 [class="intent active", fillcolor=lightblue, label="/ask_dish_recommendation", shape=rect, style=filled]; +16 [class="intent active", fillcolor=lightblue, label="/ask_recipe_steps", shape=rect, style=filled]; +17 [class="intent active", fillcolor=lightblue, label="/thanks", shape=rect, style=filled]; +18 [class="intent active", fillcolor=lightblue, label="/ask_recipe_steps", shape=rect, style=filled]; +19 [class="intent active", fillcolor=lightblue, label="/goodbye", shape=rect, style=filled]; +0 -> "-1" [class="", key=NONE, label=""]; +0 -> 1 [class=active, key=NONE, label=""]; +1 -> 12 [class=active, key=0]; +2 -> 13 [class=active, key=0]; +3 -> 4 [class=active, key=NONE, label=""]; +4 -> 14 [class=active, key=0]; +5 -> 15 [class=active, key=0]; +6 -> 16 [class=active, key=0]; +7 -> 17 [class=active, key=0]; +7 -> 18 [class=active, key=0]; +9 -> 19 [class=active, key=0]; +10 -> 11 [class=active, key=NONE, label=""]; +12 -> 2 [class=active, key=0]; +13 -> 3 [class=active, key=0]; +14 -> 5 [class=active, key=0]; +15 -> 6 [class=active, key=0]; +16 -> 7 [class=active, key=0]; +17 -> 9 [class=active, key=0]; +18 -> 7 [class=active, key=0]; +19 -> 10 [class=active, key=0]; +}