line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Paws::LexRuntime::PostContentResponse; |
3
|
1
|
|
|
1
|
|
612
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
4
|
|
|
|
|
|
|
has AudioStream => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'audioStream'); |
5
|
|
|
|
|
|
|
has ContentType => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'contentType'); |
6
|
|
|
|
|
|
|
has DialogState => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'dialogState'); |
7
|
|
|
|
|
|
|
has InputTranscript => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'inputTranscript'); |
8
|
|
|
|
|
|
|
has IntentName => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'intentName'); |
9
|
|
|
|
|
|
|
has Message => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'message'); |
10
|
|
|
|
|
|
|
has SessionAttributes => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'sessionAttributes'); |
11
|
|
|
|
|
|
|
has Slots => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'slots'); |
12
|
|
|
|
|
|
|
has SlotToElicit => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'slotToElicit'); |
13
|
1
|
|
|
1
|
|
6546
|
use MooseX::ClassAttribute; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
14
|
|
|
|
|
|
|
class_has _stream_param => (is => 'ro', default => 'AudioStream'); |
15
|
|
|
|
|
|
|
has _request_id => (is => 'ro', isa => 'Str'); |
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
### main pod documentation begin ### |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Paws::LexRuntime::PostContentResponse |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 AudioStream => Str |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
The prompt (or statement) to convey to the user. This is based on the |
30
|
|
|
|
|
|
|
bot configuration and context. For example, if Amazon Lex did not |
31
|
|
|
|
|
|
|
understand the user intent, it sends the C<clarificationPrompt> |
32
|
|
|
|
|
|
|
configured for the bot. If the intent requires confirmation before |
33
|
|
|
|
|
|
|
taking the fulfillment action, it sends the C<confirmationPrompt>. |
34
|
|
|
|
|
|
|
Another example: Suppose that the Lambda function successfully |
35
|
|
|
|
|
|
|
fulfilled the intent, and sent a message to convey to the user. Then |
36
|
|
|
|
|
|
|
Amazon Lex sends that message in the response. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 ContentType => Str |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Content type as specified in the C<Accept> HTTP header in the request. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 DialogState => Str |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Identifies the current state of the user interaction. Amazon Lex |
47
|
|
|
|
|
|
|
returns one of the following values as C<dialogState>. The client can |
48
|
|
|
|
|
|
|
optionally use this information to customize the user interface. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=over |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=item * |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
C<ElicitIntent> E<ndash> Amazon Lex wants to elicit the user's intent. |
55
|
|
|
|
|
|
|
Consider the following examples: |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
For example, a user might utter an intent ("I want to order a pizza"). |
58
|
|
|
|
|
|
|
If Amazon Lex cannot infer the user intent from this utterance, it will |
59
|
|
|
|
|
|
|
return this dialog state. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item * |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
C<ConfirmIntent> E<ndash> Amazon Lex is expecting a "yes" or "no" |
64
|
|
|
|
|
|
|
response. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
For example, Amazon Lex wants user confirmation before fulfilling an |
67
|
|
|
|
|
|
|
intent. Instead of a simple "yes" or "no" response, a user might |
68
|
|
|
|
|
|
|
respond with additional information. For example, "yes, but make it a |
69
|
|
|
|
|
|
|
thick crust pizza" or "no, I want to order a drink." Amazon Lex can |
70
|
|
|
|
|
|
|
process such additional information (in these examples, update the |
71
|
|
|
|
|
|
|
crust type slot or change the intent from OrderPizza to OrderDrink). |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item * |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
C<ElicitSlot> E<ndash> Amazon Lex is expecting the value of a slot for |
76
|
|
|
|
|
|
|
the current intent. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
For example, suppose that in the response Amazon Lex sends this |
79
|
|
|
|
|
|
|
message: "What size pizza would you like?". A user might reply with the |
80
|
|
|
|
|
|
|
slot value (e.g., "medium"). The user might also provide additional |
81
|
|
|
|
|
|
|
information in the response (e.g., "medium thick crust pizza"). Amazon |
82
|
|
|
|
|
|
|
Lex can process such additional information appropriately. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
C<Fulfilled> E<ndash> Conveys that the Lambda function has successfully |
87
|
|
|
|
|
|
|
fulfilled the intent. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item * |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
C<ReadyForFulfillment> E<ndash> Conveys that the client has to fullfill |
92
|
|
|
|
|
|
|
the request. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item * |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
C<Failed> E<ndash> Conveys that the conversation with the user failed. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This can happen for various reasons, including that the user does not |
99
|
|
|
|
|
|
|
provide an appropriate response to prompts from the service (you can |
100
|
|
|
|
|
|
|
configure how many times Amazon Lex can prompt a user for specific |
101
|
|
|
|
|
|
|
information), or if the Lambda function fails to fulfill the intent. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=back |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Valid values are: C<"ElicitIntent">, C<"ConfirmIntent">, C<"ElicitSlot">, C<"Fulfilled">, C<"ReadyForFulfillment">, C<"Failed"> |
107
|
|
|
|
|
|
|
=head2 InputTranscript => Str |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Transcript of the voice input to the operation. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 IntentName => Str |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Current user intent that Amazon Lex is aware of. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head2 Message => Str |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Message to convey to the user. It can come from the bot's configuration |
120
|
|
|
|
|
|
|
or a code hook (Lambda function). If the current intent is not |
121
|
|
|
|
|
|
|
configured with a code hook or if the code hook returned C<Delegate> as |
122
|
|
|
|
|
|
|
the C<dialogAction.type> in its response, then Amazon Lex decides the |
123
|
|
|
|
|
|
|
next course of action and selects an appropriate message from the bot |
124
|
|
|
|
|
|
|
configuration based on the current user interaction context. For |
125
|
|
|
|
|
|
|
example, if Amazon Lex is not able to understand the user input, it |
126
|
|
|
|
|
|
|
uses a clarification prompt message (For more information, see the |
127
|
|
|
|
|
|
|
Error Handling section in the Amazon Lex console). Another example: if |
128
|
|
|
|
|
|
|
the intent requires confirmation before fulfillment, then Amazon Lex |
129
|
|
|
|
|
|
|
uses the confirmation prompt message in the intent configuration. If |
130
|
|
|
|
|
|
|
the code hook returns a message, Amazon Lex passes it as-is in its |
131
|
|
|
|
|
|
|
response to the client. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 SessionAttributes => Str |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Map of key/value pairs representing the session-specific context |
137
|
|
|
|
|
|
|
information. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head2 Slots => Str |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Map of zero or more intent slots (name/value pairs) Amazon Lex detected |
143
|
|
|
|
|
|
|
from the user input during the conversation. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 SlotToElicit => Str |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
If the C<dialogState> value is C<ElicitSlot>, returns the name of the |
149
|
|
|
|
|
|
|
slot for which Amazon Lex is eliciting a value. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head2 _request_id => Str |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=cut |
156
|
|
|
|
|
|
|
|