-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
domain.yml
102 lines (95 loc) · 2.59 KB
/
domain.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: "3.1"
intents:
- activate_q_form
- inform
- explain
- stopp
- ask_possibilities
- faq
- affirm
- deny
- greet
- switch_faq
- nlu_fallback
entities:
- some_slot
slots:
some_slot:
type: text
influence_conversation: false
mappings:
# Slot mappings can be defined in the domain.
# You can also implement custom slot mappings in your
# `action_validate_slot_mappings` function by returning the desired slot events.
# The slot mappings follow the same syntax as currently in the SDK implementation.
- type: from_entity
entity: some_slot
# Example of a slot mapping which extracts the slot value from the message text if
# the intent is `greet`, the active loop is `loop_q_form` and `requested_slot` is
# the same slot:
# - type: from_text
# intent: greet
# conditions:
# - active_loop: loop_q_form
# requested_slot: some_slot
# Example of a slot mapping which sets the slot to `my value` in case the message
# has an intent `greet`
# - type: from_intent
# intent: greet
# value: "my value"
detailed_faq:
type: bool
mappings:
- type: custom
actions:
- utter_explain_some_slot
- action_stop_q_form
- utter_list_possibilities
- utter_faq
- utter_ask_did_help
- utter_continue
- utter_detailed_faq
- utter_ask_stop
- utter_stop
- utter_greet
- action_switch_faq
- utter_did_you_mean
# You can implement a custom action to validate extracted slots of your form.
# Return a `slot` event which sets the value to `None` in order to make the form request
# the slot again. You can also return `slot` events for other slots which you can
# extract as part of your custom action.
#- validate_loop_q_form
forms:
loop_q_form:
required_slots:
- some_slot
session_config:
session_expiration_time: 60 # value in minutes
carry_over_slots_to_new_session: true
responses:
utter_ask_some_slot:
- text: "utter_ask_some_slot"
utter_explain_some_slot:
- text: "utter_explain_some_slot"
utter_list_possibilities:
- text: "utter_list_possibilities"
utter_faq:
- text: "utter_faq"
utter_ask_did_help:
- text: "utter_ask_did_help"
utter_continue:
- text: "utter_continue"
utter_detailed_faq:
- text: "utter_detailed_faq"
utter_ask_stop:
- text: "utter_ask_stop"
utter_stop:
- text: "utter_stop"
utter_greet:
- text: "utter_greet"
utter_did_you_mean:
- text: "utter_did_you_mean"
utter_revert_fallback_and_reapply_last_intent:
- text: "utter_revert_fallback_and_reapply_last_intent"
utter_default:
- text: "I give up."