-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathupload_intent_lex.py
90 lines (89 loc) · 1.82 KB
/
upload_intent_lex.py
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
import boto3
client = boto3.client("lex-models")
response = client.put_intent(
name="EnableDevice",
description="",
slots=[
{
"name": "device",
"slotConstraint": "Required",
"slotType": "device",
"slotTypeVersion": "$LATEST",
"valueElicitationPrompt": {
"messages": [
{
"contentType": "PlainText",
"content": "What do you want me to {enable}?"
}, {
"contentType": "PlainText",
"content": "What should I {enable}?"
}
],
"maxAttempts": 3,
"responseCard": "string"
},
"priority": 3,
"sampleUtterances": [
"a {device}",
"the {device}"
],
"responseCard": "string"
}, {
"name": "enable",
"slotConstraint": "Required",
"slotType": "enable",
"slotTypeVersion": "$LATEST",
"valueElicitationPrompt": {
"messages": [
{
"contentType": "PlainText",
"content": "What should I do with the {device}?"
}
],
"maxAttempts": 3,
"responseCard": "string"
},
"priority": 3,
"sampleUtterances": [
"{enable} it"
],
"responseCard": "string"
},
],
sampleUtterances=[
"{enable} the {device}",
"{enable} a {device}",
"{enable} something",
"{device}",
"{enable}"
],
confirmationPrompt={
"messages": [
{
"contentType": "PlainText",
"content": "So you want me to {enable} the {device}?"
}
],
"maxAttempts": 3,
"responseCard": "string"
},
rejectionStatement={
"messages": [
{
"contentType": "PlainText",
"content": "Ok, I won't {enable} anything"
}
],
"responseCard": "string"
},
conclusionStatement={
"messages": [
{
"contentType": "PlainText",
"content": "Ok, I will {enable} the {device}!"
}
]
}
# parentIntentSignature="0001",
# checksum = ""
)