-
Notifications
You must be signed in to change notification settings - Fork 398
/
domain.yml
522 lines (522 loc) · 14.8 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
version: "3.1"
session_config:
session_expiration_time: 0
carry_over_slots_to_new_session: true
intents:
- check_human
- transfer_money:
use_entities: []
- inform
- pay_cc:
use_entities: []
- greet
- goodbye
- affirm
- deny
- thankyou
- ask_transfer_charge
- search_transactions:
use_entities: []
- check_balance:
use_entities:
- credit_card
- account_type
- check_earnings:
use_entities: []
- check_recipients
- out_of_scope
- session_start
- restart
- trigger_handoff
- handoff
- human_handoff
- help
- nlu_fallback
entities:
- amount-of-money
- credit_card
- payment_date
- vendor_name
- time
- PERSON
- number
- account_type
- handoff_to
- search_type
slots:
AA_CONTINUE_FORM:
type: any
influence_conversation: false
mappings:
- intent: affirm
type: from_intent
value: yes
conditions:
- active_loop: cc_payment_form
requested_slot: AA_CONTINUE_FORM
- active_loop: transfer_money_form
requested_slot: AA_CONTINUE_FORM
- active_loop: transaction_search_form
requested_slot: AA_CONTINUE_FORM
- intent: deny
type: from_intent
value: no
conditions:
- active_loop: cc_payment_form
requested_slot: AA_CONTINUE_FORM
- active_loop: transfer_money_form
requested_slot: AA_CONTINUE_FORM
- active_loop: transaction_search_form
requested_slot: AA_CONTINUE_FORM
- intent:
- inform
- cc_payment_form
type: from_text
conditions:
- active_loop: cc_payment_form
requested_slot: AA_CONTINUE_FORM
- intent:
- inform
- transfer_money_form
type: from_text
conditions:
- active_loop: transfer_money_form
requested_slot: AA_CONTINUE_FORM
- intent:
- inform
- transaction_search_form
type: from_text
conditions:
- active_loop: transaction_search_form
requested_slot: AA_CONTINUE_FORM
PERSON:
type: any
influence_conversation: false
mappings:
- entity: PERSON
type: from_entity
conditions:
- active_loop: transfer_money_form
requested_slot: PERSON
- intent:
- inform
- transfer_money_form
type: from_text
conditions:
- active_loop: transfer_money_form
requested_slot: PERSON
- type: from_entity
entity: PERSON
account_type:
type: any
influence_conversation: false
mappings:
- type: from_entity
entity: account_type
amount-of-money:
type: any
influence_conversation: false
mappings:
- entity: amount-of-money
not_intent:
- check_balance
- check_earnings
type: from_entity
conditions:
- active_loop: cc_payment_form
requested_slot: amount-of-money
- active_loop: transfer_money_form
requested_slot: amount-of-money
- entity: number
not_intent:
- check_balance
- check_earnings
type: from_entity
conditions:
- active_loop: cc_payment_form
requested_slot: amount-of-money
- active_loop: transfer_money_form
requested_slot: amount-of-money
- intent:
- inform
- cc_payment_form
type: from_text
conditions:
- active_loop: cc_payment_form
requested_slot: amount-of-money
- intent:
- inform
- transfer_money_form
type: from_text
conditions:
- active_loop: transfer_money_form
requested_slot: amount-of-money
- type: from_entity
entity: amount-of-money
amount_transferred:
type: any
initial_value: 0
influence_conversation: false
mappings:
- type: custom
credit_card:
type: any
influence_conversation: false
mappings:
- entity: credit_card
type: from_entity
conditions:
- active_loop: cc_payment_form
requested_slot: credit_card
- intent:
- inform
- cc_payment_form
type: from_text
conditions:
- active_loop: cc_payment_form
requested_slot: credit_card
- type: from_entity
entity: credit_card
currency:
type: any
influence_conversation: false
initial_value: $
mappings:
- type: custom
end_time:
type: any
influence_conversation: false
mappings:
- type: custom
end_time_formatted:
type: any
influence_conversation: false
mappings:
- type: custom
grain:
type: any
influence_conversation: false
mappings:
- type: custom
handoff_to:
type: any
influence_conversation: false
mappings:
- type: from_entity
entity: handoff_to
next_form_name:
type: text
influence_conversation: true
mappings:
- type: custom
number:
type: any
influence_conversation: false
mappings:
- type: from_entity
entity: number
payment_amount_type:
type: any
initial_value: ''
influence_conversation: false
mappings:
- type: custom
previous_form_name:
type: text
influence_conversation: true
mappings:
- type: custom
repeated_validation_failures:
type: any
influence_conversation: false
mappings:
- type: custom
requested_slot:
type: any
influence_conversation: false
mappings:
- type: custom
search_type:
type: any
influence_conversation: false
mappings:
- intent: search_transactions
type: from_trigger_intent
value: spend
- intent: check_earnings
type: from_trigger_intent
value: deposit
- type: from_entity
entity: search_type
conditions:
- active_loop: transaction_search_form
- type: from_entity
entity: search_type
start_time:
type: any
influence_conversation: false
mappings:
- type: custom
start_time_formatted:
type: any
influence_conversation: false
mappings:
- type: custom
time:
type: any
influence_conversation: false
mappings:
- entity: time
type: from_entity
conditions:
- active_loop: cc_payment_form
requested_slot: time
- active_loop: transaction_search_form
requested_slot: time
- intent:
- inform
- cc_payment_form
type: from_text
conditions:
- active_loop: cc_payment_form
requested_slot: time
- intent:
- inform
- transaction_search_form
type: from_text
conditions:
- active_loop: transaction_search_form
requested_slot: time
- type: from_entity
entity: time
time_formatted:
type: any
influence_conversation: false
mappings:
- type: custom
vendor_name:
type: any
influence_conversation: false
mappings:
- type: from_entity
entity: vendor_name
zz_confirm_form:
type: any
influence_conversation: false
mappings:
- intent: affirm
type: from_intent
value: yes
conditions:
- active_loop: cc_payment_form
requested_slot: zz_confirm_form
- active_loop: transfer_money_form
requested_slot: zz_confirm_form
- active_loop: transaction_search_form
requested_slot: zz_confirm_form
- intent: deny
type: from_intent
value: no
conditions:
- active_loop: cc_payment_form
requested_slot: zz_confirm_form
- active_loop: transfer_money_form
requested_slot: zz_confirm_form
- active_loop: transaction_search_form
requested_slot: zz_confirm_form
- intent:
- inform
- cc_payment_form
type: from_text
conditions:
- active_loop: cc_payment_form
requested_slot: zz_confirm_form
- intent:
- inform
- transfer_money_form
type: from_text
conditions:
- active_loop: transfer_money_form
requested_slot: zz_confirm_form
- intent:
- inform
- transaction_search_form
type: from_text
conditions:
- active_loop: transaction_search_form
requested_slot: zz_confirm_form
responses:
utter_out_of_scope:
- text: Sorry, I'm not sure how to respond to that. Type "help" for assistance.
utter_ask_transfer_money_form_amount-of-money:
- text: How much money do you want to transfer?
utter_ask_transfer_money_form_PERSON:
- text: Who do you want to transfer money to?
utter_goodbye:
- text: Bye
utter_noworries:
- text: You're welcome :)
utter_transfer_complete:
- text: Successfully transferred {currency}{amount-of-money} to {PERSON}.
utter_transfer_charge:
- text: You are entitled to six transfers within a statement cycle before being charged. For subsequent transfers you will be charged {currency}10 per transaction.
utter_ask_cc_payment_form_amount-of-money:
- text: How much do you want to pay?
utter_ask_cc_payment_form_credit_card:
- text: Towards which credit card account do you want to make a payment?
utter_ask_cc_payment_form_time:
- text: For which date would you like to schedule the payment?
utter_ask_transaction_search_form_vendor_name:
- text: For which vendor do you want to see transactions? e.g Starbucks, Target, Amazon
utter_ask_transaction_search_form_time:
- text: In which timeframe would you like to search for transactions?
utter_ask_transaction_search_form_search_type:
- text: Would you like to search incoming or outgoing transactions?
buttons:
- title: Incoming (earnings)
payload: /inform{"search_type":"deposit"}'
- title: Outgoing (spending)
payload: /inform{"search_type":"spend"}'
utter_no_payment_amount:
- text: Sorry, I don't understand that payment amount.
utter_no_paymentdate:
- text: Sorry, that is not a valid payment date.
utter_no_creditcard:
- text: Sorry, that is not a valid credit card account to make payments towards.
utter_no_vendor_name:
- text: Sorry, that's not a recognized vendor.
utter_no_transactdate:
- text: Sorry, that's not a recognized time frame.
utter_cc_pay_scheduled:
- text: Payment of {currency}{amount-of-money}{payment_amount_type} towards your {credit_card} account scheduled to be paid at {time_formatted}.
utter_searching_spend_transactions:
- text: Searching transactions{vendor_name} between {start_time_formatted} and {end_time_formatted}...
utter_found_spend_transactions:
- text: I found {numtransacts} transactions{vendor_name} totalling {currency}{total}.
utter_searching_deposit_transactions:
- text: Searching deposits made to your account between {start_time_formatted} and {end_time_formatted}...
utter_found_deposit_transactions:
- text: I found {numtransacts} deposits made to your account totalling {currency}{total}
utter_ask_rephrase:
- text: I didn't quite understand that. Can you rephrase?
utter_ok:
- text: 👍
utter_ask_continue:
- text: Would you like to continue?
utter_default:
- text: I didn't quite understand that. Could you rephrase?
utter_ask_cc_payment_form_AA_CONTINUE_FORM:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transaction
text: Would you like to continue scheduling the credit card payment?
utter_ask_transfer_money_form_AA_CONTINUE_FORM:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transfer
text: Would you like to continue scheduling the money transfer?
utter_ask_transaction_search_form_AA_CONTINUE_FORM:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the search
text: Would you like to continue the transaction search?
utter_ask_cc_payment_form_zz_confirm_form:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transaction
text: Would you like to schedule a payment of {currency}{amount-of-money}{payment_amount_type} towards your {credit_card} account for {time_formatted}?
utter_ask_transfer_money_form_zz_confirm_form:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transaction
text: Would you like to transfer {currency}{amount-of-money} to {PERSON}?
utter_cc_pay_cancelled:
- text: Credit card account payment cancelled.
utter_transfer_cancelled:
- text: Transfer cancelled.
utter_transaction_search_cancelled:
- text: Transaction search cancelled.
utter_account_balance:
- text: Your bank account balance is {currency}{init_account_balance}.
utter_changed_account_balance:
- text: Your bank account balance was {currency}{init_account_balance} and is now {currency}{account_balance} after transfers and payments.
utter_unknown_recipient:
- text: Sorry, {PERSON} is not in your list of known recipients.
utter_insufficient_funds:
- text: Sorry, you don't have enough money to do that!
utter_insufficient_funds_specific:
- text: The {payment_amount_type} on your {credit_card} credit card is {amount-of-money}, so you have insufficient funds to pay it off.
utter_credit_card_balance:
- text: The current balance for your {credit_card} account is {currency}{credit_card_balance}.
utter_nothing_due:
- text: Your don't owe any money on your {credit_card} credit card bill.
utter_recipients:
- text: These are your known recpients to whom you can send money:{formatted_recipients}
utter_greet:
- text: Hi! I'm your Financial Assistant!
utter_ask_handoff:
- text: It looks like you want to be transferred to a human agent.
utter_handoff:
- text: Alright, I'll try to transfer you.
utter_wouldve_handed_off:
- text: If you were talking to me via chatroom, I would have handed you off to {handoffhost}.
utter_no_handoff:
- text: Since you haven't configured a host to hand off to, I can't send you anywhere!
utter_ask_whatelse:
- text: What else can I help you with?
utter_bot:
- text: I'm a virtual assistant made with Rasa.
utter_help:
- text: "I can help you with your financial accounts. \nYou can ask me things like: \n- What's my account balance? \n- Pay off my credit card \n- What did I spend at Target last month? \n- I need to transfer money"
actions:
- action_session_start
- action_restart
- action_show_balance
- action_show_recipients
- action_show_transfer_charge
- action_handoff
- action_handoff_options
- action_pay_cc
- action_transfer_money
- action_transaction_search
- action_ask_transaction_search_form_zz_confirm_form
- action_switch_forms_ask
- action_switch_forms_deny
- action_switch_forms_affirm
- action_switch_back_ask
- validate_cc_payment_form
- validate_transfer_money_form
- validate_transaction_search_form
forms:
cc_payment_form:
ignored_intents: []
required_slots:
- AA_CONTINUE_FORM
- credit_card
- amount-of-money
- time
- zz_confirm_form
transfer_money_form:
ignored_intents: []
required_slots:
- AA_CONTINUE_FORM
- PERSON
- amount-of-money
- zz_confirm_form
transaction_search_form:
ignored_intents: []
required_slots:
- AA_CONTINUE_FORM
- search_type
- time
- zz_confirm_form