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