Skip to content

Commit

Permalink
add #10137 changes to domain merging (#10589)
Browse files Browse the repository at this point in the history
* add  #10137 changes to domain merging
  • Loading branch information
carlad committed Jan 4, 2022
1 parent da7f5c7 commit 0c5241b
Show file tree
Hide file tree
Showing 20 changed files with 805 additions and 88 deletions.
3 changes: 3 additions & 0 deletions changelog/10570.bugfix.md
@@ -0,0 +1,3 @@
Fixes Domain loading when domain config uses multiple yml files.

Previously not all configures attributes were necessarily known when merging Domains, and in the case of `entities` were not being properly assigned to `intents`.
@@ -0,0 +1,13 @@
version: "3.0"

intents:
- play:
use_entities:
- ball
- chess
- stow_away:
use_entities: true

entities:
- ball
- chess
@@ -0,0 +1,17 @@
version: "3.0"

intents:
- support_encouraging:
use_entities:
- automatic_cupcakes
- anti_freeze_blankets
- certify:
use_entities: true
- vacationing:
ignore_entities:
- tornadoes

entities:
- automatic_cupcakes
- anti_freeze_blankets
- tornadoes
@@ -0,0 +1,4 @@
version: "3.0"

intents:
- question
@@ -0,0 +1,8 @@
version: "3.0"

intents:
- utter_root
- utter_root2

entities:
- pandemic
@@ -0,0 +1,17 @@
version: "3.0"

intents:
- utter_skill_1

entities:
- ball
- chess

responses:
utter_greet:
- text: "Hey! How are you?"

utter_cheer_up:
- text: "Here is something to cheer you up:"
image: "https://i.imgur.com/nGF1K8f.jpg"

@@ -0,0 +1,7 @@
version: "3.0"

intents:
- utter_skill_2

utter_did_that_help:
- text: "Did that help you?"
@@ -0,0 +1,18 @@
version: "3.0"

intents:
- utter_subskill
- utter_subroot

entities:
- cluedo
- monopoly


responses:
utter_greet:
- text: "Hey! How are you?"

utter_cheer_up:
- text: "Here is something to cheer you up:"
image: "https://i.imgur.com/nGF1K8f.jpg"
136 changes: 136 additions & 0 deletions data/test_domains/test_domain_from_multiple_files/drum.yml
@@ -0,0 +1,136 @@
version: "3.0"

intents:
- drum_robot:
use_entities: ["pistachio_robot"]
- drum_robot_chocolate:
ignore_entities:
- caramel_robot
- strawberry_robot
- rum_and_raisin_robot
- vanilla_robot
- other_robot
- drum_wallets:
use_entities:
- caramel_robot
ignore_entities:
- chocolate_robot
- drum_soups:
use_entities: True
- drum_clocks:
use_entities: False
- drum_lampshades:
use_entities: False
- view_offers:
use_entities: True
- delay:
use_entities: ["chocolate_robot", "strawberry_robot"]

entities:
- chocolate_robot
- other_robot
- strawberry_robot
- vanilla_robot

slots:
drumChocolateWallets:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumStrawberryWallets:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumOtherWallets:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumSnareWallets:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumClockCovers:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumClockAdapters:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumMindspace:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumAllLampshades:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumSoupChocolate:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumSoupStrawberry:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumAllSoups:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumClocksChocolate:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumClocksStrawberry:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
drumAllClocks:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot
offers:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_bot

actions:
- action_utter_drum_menu
- action_increase_15
- utter_anythingelse_menu
- utter_std_drum_menu
- utter_drumwallets
- utter_drumlampshades
- utter_drumsoups
- utter_drumclocks
- action_utter_robot_menu
25 changes: 25 additions & 0 deletions data/test_domains/test_domain_from_multiple_files/last_month.yml
@@ -0,0 +1,25 @@
version: "3.0"
session_config:
session_expiration_time: 360
carry_over_slots_to_new_session: True

intents:
- run_finish
- run_finish_recent
- run_finished

actions:
- utter_run_finish
- utter_run_finished
- utter_run_finish_recent

entities:
- pistachio_robot
- caramel_robot
- rum_and_raisin_robot

forms:
robot_form:
required_slots:
- propose_simulation
- display_cure_method
16 changes: 16 additions & 0 deletions data/test_domains/test_domain_from_multiple_files/main_menu.yml
@@ -0,0 +1,16 @@
version: "3.0"

intents:
- main_menu
- self_selection

actions:
- action_utter_main_menu

responses:
utter_greet:
- text: hey there!
utter_goodbye:
- text: goodbye :(
utter_default:
- text: default message
42 changes: 42 additions & 0 deletions data/test_domains/test_domain_from_multiple_files/selection.yml
@@ -0,0 +1,42 @@
version: "3.0"

intents:
- finish_selection
- humble_selection
- selection_troubleshooting
- device_selection_scaffold
- humble_selection_scaffold
- unsure_selection_scaffold
- finish_humble_selection
- finish_selection_line


slots:
humbleSelection:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: vanilla_robot
humbleSelectionManagement:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: some_slot
humbleSelectionStatus:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: some_slot


actions:
- utter_humble_selection
- utter_selection_issues
- utter_horn_selection_scaffold
- utter_humble_selection_scaffold
- utter_finish_selection
- utter_finish_humble_selection
- utter_finish_selection_line
25 changes: 25 additions & 0 deletions data/test_domains/test_domain_from_multiple_files/small_talk.yml
@@ -0,0 +1,25 @@
version: "3.0"

intents:
- bot_challenge
- endless_love
- thanks
- are_you_there
- greeting
- profanity
- affirm
- deny

actions:
- action_utter_previous_message
- action_utter_smalltalk_greeting
- utter_thanks_response
- utter_profanity
- utter_tmo_love
- utter_bot_challenge
- utter_im_here
- utter_smalltalk_greeting

responses:
utter_amazement:
- text: awesomness!
31 changes: 31 additions & 0 deletions data/test_domains/test_domain_from_multiple_files/tomorrow.yml
@@ -0,0 +1,31 @@
version: "3.0"

intents:
- cure_network

slots:
display_method_artwork:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: other_robot
display_cure_method:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: vanilla_robot
display_drum_cure_horns:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: vanilla_robot

actions:
- utter_cure_standard
- utter_cure_specific
- utter_non_standard
- action_utter_cure_standard

0 comments on commit 0c5241b

Please sign in to comment.