forked from RasaHQ/rasa-calm-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
order_pizza.yml
129 lines (113 loc) · 2.9 KB
/
order_pizza.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: "3.1"
intents:
- greet
- request_pizza
- inform_pizza_type
- inform_address
- inform_num_pizza
- correct_order
- correct_num_pizza
- correct_pizza_type
- correct_address
- correct_payment_option
- affirm
- deny
entities:
- pizza_type
- department
slots:
pizza:
type: text
mappings:
- type: from_entity
entity: pizza_type
num_pizza:
type: float
mappings:
- type: from_entity
entity: number # this is defined in the restaurant.yml domain file
intent: inform_num_pizza
conditions:
- active_flow: fill_pizza_order
- type: from_entity
entity: number
intent: correct_num_pizza
conditions:
- active_flow: fill_pizza_order
- active_flow: order_pizza
address:
type: text
mappings:
- type: from_text
intent: inform_address
conditions:
- active_flow: fill_pizza_order
confirmation_order:
type: bool
mappings:
- type: from_intent
intent: affirm
value: true
conditions:
- active_flow: fill_pizza_order
- type: from_intent
intent: deny
value: false
conditions:
- active_flow: fill_pizza_order
membership_points:
type: float
mappings:
- type: custom
action: action_check_points
payment_option:
type: categorical
values:
- card
- membership_points
mappings:
- type: from_llm
card_details:
type: text
mappings:
- type: from_llm
correct_order:
type: bool
mappings:
- type: custom
department:
type: text
mappings:
- type: from_entity
entity: department
responses:
utter_ask_pizza:
- text: What type of pizza would you like to order?
utter_place_order:
- text: Your order for a {pizza} pizza has been placed. It will be delivered to {address} in 30 minutes.
utter_ask_num_pizza:
- text: How many pizzas would you like to order?
utter_ask_address:
- text: What is the delivery address?
utter_confirm:
- text: You have put in a order for {num_pizza} {pizza} pizzas. Please confirm the details above are correct?
utter_cancel_order:
- text: Your order has been cancelled.
utter_use_points:
- text: You have successfully used {membership_points} membership points.
utter_no_points:
- text: You have no membership points.
utter_ask_payment_option:
- text: How would you like to pay for your order?
utter_ask_card_details:
- text: Please provide your card number.
utter_execute_payment:
- text: Your payment has been processed.
utter_ask_department:
- text: Which department would you like to apply to?
actions:
- action_ask_confirmation_order
- action_check_points
- action_ask_correct_order
- action_show_vacancies
- action_correct_address