aws-sdk-lex 1.31.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +243 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-lex.rb +2 -2
- data/lib/aws-sdk-lex/client.rb +82 -2
- data/lib/aws-sdk-lex/client_api.rb +39 -4
- data/lib/aws-sdk-lex/errors.rb +1 -1
- data/lib/aws-sdk-lex/resource.rb +1 -1
- data/lib/aws-sdk-lex/types.rb +246 -39
- metadata +10 -7
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.36.0
|
data/lib/aws-sdk-lex.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
4
4
|
#
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-lex/customizations'
|
|
48
48
|
# @!group service
|
49
49
|
module Aws::Lex
|
50
50
|
|
51
|
-
GEM_VERSION = '1.
|
51
|
+
GEM_VERSION = '1.36.0'
|
52
52
|
|
53
53
|
end
|
data/lib/aws-sdk-lex/client.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
4
4
|
#
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
@@ -394,6 +394,7 @@ module Aws::Lex
|
|
394
394
|
# * {Types::GetSessionResponse#session_attributes #session_attributes} => Hash<String,String>
|
395
395
|
# * {Types::GetSessionResponse#session_id #session_id} => String
|
396
396
|
# * {Types::GetSessionResponse#dialog_action #dialog_action} => Types::DialogAction
|
397
|
+
# * {Types::GetSessionResponse#active_contexts #active_contexts} => Array<Types::ActiveContext>
|
397
398
|
#
|
398
399
|
# @example Request syntax with placeholder values
|
399
400
|
#
|
@@ -426,6 +427,12 @@ module Aws::Lex
|
|
426
427
|
# resp.dialog_action.fulfillment_state #=> String, one of "Fulfilled", "Failed", "ReadyForFulfillment"
|
427
428
|
# resp.dialog_action.message #=> String
|
428
429
|
# resp.dialog_action.message_format #=> String, one of "PlainText", "CustomPayload", "SSML", "Composite"
|
430
|
+
# resp.active_contexts #=> Array
|
431
|
+
# resp.active_contexts[0].name #=> String
|
432
|
+
# resp.active_contexts[0].time_to_live.time_to_live_in_seconds #=> Integer
|
433
|
+
# resp.active_contexts[0].time_to_live.turns_to_live #=> Integer
|
434
|
+
# resp.active_contexts[0].parameters #=> Hash
|
435
|
+
# resp.active_contexts[0].parameters["ParameterName"] #=> String
|
429
436
|
#
|
430
437
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSession AWS API Documentation
|
431
438
|
#
|
@@ -639,6 +646,19 @@ module Aws::Lex
|
|
639
646
|
# you get better performance if you stream audio data rather than
|
640
647
|
# buffering the data locally.
|
641
648
|
#
|
649
|
+
# @option params [String] :active_contexts
|
650
|
+
# A list of contexts active for the request. A context can be activated
|
651
|
+
# when a previous intent is fulfilled, or by including the context in
|
652
|
+
# the request,
|
653
|
+
#
|
654
|
+
# If you don't specify a list of contexts, Amazon Lex will use the
|
655
|
+
# current list of contexts for the session. If you specify an empty
|
656
|
+
# list, all contexts for the session are cleared.
|
657
|
+
#
|
658
|
+
# **SDK automatically handles json encoding and base64 encoding for you
|
659
|
+
# when the required value (Hash, Array, etc.) is provided according to
|
660
|
+
# the description.**
|
661
|
+
#
|
642
662
|
# @return [Types::PostContentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
643
663
|
#
|
644
664
|
# * {Types::PostContentResponse#content_type #content_type} => String
|
@@ -649,13 +669,16 @@ module Aws::Lex
|
|
649
669
|
# * {Types::PostContentResponse#session_attributes #session_attributes} => String
|
650
670
|
# * {Types::PostContentResponse#sentiment_response #sentiment_response} => String
|
651
671
|
# * {Types::PostContentResponse#message #message} => String
|
672
|
+
# * {Types::PostContentResponse#encoded_message #encoded_message} => String
|
652
673
|
# * {Types::PostContentResponse#message_format #message_format} => String
|
653
674
|
# * {Types::PostContentResponse#dialog_state #dialog_state} => String
|
654
675
|
# * {Types::PostContentResponse#slot_to_elicit #slot_to_elicit} => String
|
655
676
|
# * {Types::PostContentResponse#input_transcript #input_transcript} => String
|
677
|
+
# * {Types::PostContentResponse#encoded_input_transcript #encoded_input_transcript} => String
|
656
678
|
# * {Types::PostContentResponse#audio_stream #audio_stream} => IO
|
657
679
|
# * {Types::PostContentResponse#bot_version #bot_version} => String
|
658
680
|
# * {Types::PostContentResponse#session_id #session_id} => String
|
681
|
+
# * {Types::PostContentResponse#active_contexts #active_contexts} => String
|
659
682
|
#
|
660
683
|
# @example Request syntax with placeholder values
|
661
684
|
#
|
@@ -668,6 +691,7 @@ module Aws::Lex
|
|
668
691
|
# content_type: "HttpContentType", # required
|
669
692
|
# accept: "Accept",
|
670
693
|
# input_stream: "data", # required
|
694
|
+
# active_contexts: "ActiveContextsString",
|
671
695
|
# })
|
672
696
|
#
|
673
697
|
# @example Response structure
|
@@ -680,13 +704,16 @@ module Aws::Lex
|
|
680
704
|
# resp.session_attributes #=> String
|
681
705
|
# resp.sentiment_response #=> String
|
682
706
|
# resp.message #=> String
|
707
|
+
# resp.encoded_message #=> String
|
683
708
|
# resp.message_format #=> String, one of "PlainText", "CustomPayload", "SSML", "Composite"
|
684
709
|
# resp.dialog_state #=> String, one of "ElicitIntent", "ConfirmIntent", "ElicitSlot", "Fulfilled", "ReadyForFulfillment", "Failed"
|
685
710
|
# resp.slot_to_elicit #=> String
|
686
711
|
# resp.input_transcript #=> String
|
712
|
+
# resp.encoded_input_transcript #=> String
|
687
713
|
# resp.audio_stream #=> IO
|
688
714
|
# resp.bot_version #=> String
|
689
715
|
# resp.session_id #=> String
|
716
|
+
# resp.active_contexts #=> String
|
690
717
|
#
|
691
718
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContent AWS API Documentation
|
692
719
|
#
|
@@ -812,6 +839,15 @@ module Aws::Lex
|
|
812
839
|
# @option params [required, String] :input_text
|
813
840
|
# The text that the user entered (Amazon Lex interprets this text).
|
814
841
|
#
|
842
|
+
# @option params [Array<Types::ActiveContext>] :active_contexts
|
843
|
+
# A list of contexts active for the request. A context can be activated
|
844
|
+
# when a previous intent is fulfilled, or by including the context in
|
845
|
+
# the request,
|
846
|
+
#
|
847
|
+
# If you don't specify a list of contexts, Amazon Lex will use the
|
848
|
+
# current list of contexts for the session. If you specify an empty
|
849
|
+
# list, all contexts for the session are cleared.
|
850
|
+
#
|
815
851
|
# @return [Types::PostTextResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
816
852
|
#
|
817
853
|
# * {Types::PostTextResponse#intent_name #intent_name} => String
|
@@ -827,6 +863,7 @@ module Aws::Lex
|
|
827
863
|
# * {Types::PostTextResponse#response_card #response_card} => Types::ResponseCard
|
828
864
|
# * {Types::PostTextResponse#session_id #session_id} => String
|
829
865
|
# * {Types::PostTextResponse#bot_version #bot_version} => String
|
866
|
+
# * {Types::PostTextResponse#active_contexts #active_contexts} => Array<Types::ActiveContext>
|
830
867
|
#
|
831
868
|
# @example Request syntax with placeholder values
|
832
869
|
#
|
@@ -841,6 +878,18 @@ module Aws::Lex
|
|
841
878
|
# "String" => "String",
|
842
879
|
# },
|
843
880
|
# input_text: "Text", # required
|
881
|
+
# active_contexts: [
|
882
|
+
# {
|
883
|
+
# name: "ActiveContextName", # required
|
884
|
+
# time_to_live: { # required
|
885
|
+
# time_to_live_in_seconds: 1,
|
886
|
+
# turns_to_live: 1,
|
887
|
+
# },
|
888
|
+
# parameters: { # required
|
889
|
+
# "ParameterName" => "Text",
|
890
|
+
# },
|
891
|
+
# },
|
892
|
+
# ],
|
844
893
|
# })
|
845
894
|
#
|
846
895
|
# @example Response structure
|
@@ -874,6 +923,12 @@ module Aws::Lex
|
|
874
923
|
# resp.response_card.generic_attachments[0].buttons[0].value #=> String
|
875
924
|
# resp.session_id #=> String
|
876
925
|
# resp.bot_version #=> String
|
926
|
+
# resp.active_contexts #=> Array
|
927
|
+
# resp.active_contexts[0].name #=> String
|
928
|
+
# resp.active_contexts[0].time_to_live.time_to_live_in_seconds #=> Integer
|
929
|
+
# resp.active_contexts[0].time_to_live.turns_to_live #=> Integer
|
930
|
+
# resp.active_contexts[0].parameters #=> Hash
|
931
|
+
# resp.active_contexts[0].parameters["ParameterName"] #=> String
|
877
932
|
#
|
878
933
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostText AWS API Documentation
|
879
934
|
#
|
@@ -964,6 +1019,15 @@ module Aws::Lex
|
|
964
1019
|
#
|
965
1020
|
# * `text/plain; charset=utf-8`
|
966
1021
|
#
|
1022
|
+
# @option params [Array<Types::ActiveContext>] :active_contexts
|
1023
|
+
# A list of contexts active for the request. A context can be activated
|
1024
|
+
# when a previous intent is fulfilled, or by including the context in
|
1025
|
+
# the request,
|
1026
|
+
#
|
1027
|
+
# If you don't specify a list of contexts, Amazon Lex will use the
|
1028
|
+
# current list of contexts for the session. If you specify an empty
|
1029
|
+
# list, all contexts for the session are cleared.
|
1030
|
+
#
|
967
1031
|
# @return [Types::PutSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
968
1032
|
#
|
969
1033
|
# * {Types::PutSessionResponse#content_type #content_type} => String
|
@@ -971,11 +1035,13 @@ module Aws::Lex
|
|
971
1035
|
# * {Types::PutSessionResponse#slots #slots} => String
|
972
1036
|
# * {Types::PutSessionResponse#session_attributes #session_attributes} => String
|
973
1037
|
# * {Types::PutSessionResponse#message #message} => String
|
1038
|
+
# * {Types::PutSessionResponse#encoded_message #encoded_message} => String
|
974
1039
|
# * {Types::PutSessionResponse#message_format #message_format} => String
|
975
1040
|
# * {Types::PutSessionResponse#dialog_state #dialog_state} => String
|
976
1041
|
# * {Types::PutSessionResponse#slot_to_elicit #slot_to_elicit} => String
|
977
1042
|
# * {Types::PutSessionResponse#audio_stream #audio_stream} => IO
|
978
1043
|
# * {Types::PutSessionResponse#session_id #session_id} => String
|
1044
|
+
# * {Types::PutSessionResponse#active_contexts #active_contexts} => String
|
979
1045
|
#
|
980
1046
|
# @example Request syntax with placeholder values
|
981
1047
|
#
|
@@ -1011,6 +1077,18 @@ module Aws::Lex
|
|
1011
1077
|
# },
|
1012
1078
|
# ],
|
1013
1079
|
# accept: "Accept",
|
1080
|
+
# active_contexts: [
|
1081
|
+
# {
|
1082
|
+
# name: "ActiveContextName", # required
|
1083
|
+
# time_to_live: { # required
|
1084
|
+
# time_to_live_in_seconds: 1,
|
1085
|
+
# turns_to_live: 1,
|
1086
|
+
# },
|
1087
|
+
# parameters: { # required
|
1088
|
+
# "ParameterName" => "Text",
|
1089
|
+
# },
|
1090
|
+
# },
|
1091
|
+
# ],
|
1014
1092
|
# })
|
1015
1093
|
#
|
1016
1094
|
# @example Response structure
|
@@ -1020,11 +1098,13 @@ module Aws::Lex
|
|
1020
1098
|
# resp.slots #=> String
|
1021
1099
|
# resp.session_attributes #=> String
|
1022
1100
|
# resp.message #=> String
|
1101
|
+
# resp.encoded_message #=> String
|
1023
1102
|
# resp.message_format #=> String, one of "PlainText", "CustomPayload", "SSML", "Composite"
|
1024
1103
|
# resp.dialog_state #=> String, one of "ElicitIntent", "ConfirmIntent", "ElicitSlot", "Fulfilled", "ReadyForFulfillment", "Failed"
|
1025
1104
|
# resp.slot_to_elicit #=> String
|
1026
1105
|
# resp.audio_stream #=> IO
|
1027
1106
|
# resp.session_id #=> String
|
1107
|
+
# resp.active_contexts #=> String
|
1028
1108
|
#
|
1029
1109
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSession AWS API Documentation
|
1030
1110
|
#
|
@@ -1048,7 +1128,7 @@ module Aws::Lex
|
|
1048
1128
|
params: params,
|
1049
1129
|
config: config)
|
1050
1130
|
context[:gem_name] = 'aws-sdk-lex'
|
1051
|
-
context[:gem_version] = '1.
|
1131
|
+
context[:gem_version] = '1.36.0'
|
1052
1132
|
Seahorse::Client::Request.new(handlers, context)
|
1053
1133
|
end
|
1054
1134
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
4
4
|
#
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
@@ -14,6 +14,14 @@ module Aws::Lex
|
|
14
14
|
include Seahorse::Model
|
15
15
|
|
16
16
|
Accept = Shapes::StringShape.new(name: 'Accept')
|
17
|
+
ActiveContext = Shapes::StructureShape.new(name: 'ActiveContext')
|
18
|
+
ActiveContextName = Shapes::StringShape.new(name: 'ActiveContextName')
|
19
|
+
ActiveContextParametersMap = Shapes::MapShape.new(name: 'ActiveContextParametersMap')
|
20
|
+
ActiveContextTimeToLive = Shapes::StructureShape.new(name: 'ActiveContextTimeToLive')
|
21
|
+
ActiveContextTimeToLiveInSeconds = Shapes::IntegerShape.new(name: 'ActiveContextTimeToLiveInSeconds')
|
22
|
+
ActiveContextTurnsToLive = Shapes::IntegerShape.new(name: 'ActiveContextTurnsToLive')
|
23
|
+
ActiveContextsList = Shapes::ListShape.new(name: 'ActiveContextsList')
|
24
|
+
ActiveContextsString = Shapes::StringShape.new(name: 'ActiveContextsString')
|
17
25
|
AttributesString = Shapes::StringShape.new(name: 'AttributesString')
|
18
26
|
BadGatewayException = Shapes::StructureShape.new(name: 'BadGatewayException')
|
19
27
|
BadRequestException = Shapes::StructureShape.new(name: 'BadRequestException')
|
@@ -52,6 +60,7 @@ module Aws::Lex
|
|
52
60
|
MessageFormatType = Shapes::StringShape.new(name: 'MessageFormatType')
|
53
61
|
NotAcceptableException = Shapes::StructureShape.new(name: 'NotAcceptableException')
|
54
62
|
NotFoundException = Shapes::StructureShape.new(name: 'NotFoundException')
|
63
|
+
ParameterName = Shapes::StringShape.new(name: 'ParameterName')
|
55
64
|
PostContentRequest = Shapes::StructureShape.new(name: 'PostContentRequest')
|
56
65
|
PostContentResponse = Shapes::StructureShape.new(name: 'PostContentResponse')
|
57
66
|
PostTextRequest = Shapes::StructureShape.new(name: 'PostTextRequest')
|
@@ -61,6 +70,8 @@ module Aws::Lex
|
|
61
70
|
PutSessionResponse = Shapes::StructureShape.new(name: 'PutSessionResponse')
|
62
71
|
RequestTimeoutException = Shapes::StructureShape.new(name: 'RequestTimeoutException')
|
63
72
|
ResponseCard = Shapes::StructureShape.new(name: 'ResponseCard')
|
73
|
+
SensitiveString = Shapes::StringShape.new(name: 'SensitiveString')
|
74
|
+
SensitiveStringUnbounded = Shapes::StringShape.new(name: 'SensitiveStringUnbounded')
|
64
75
|
SentimentLabel = Shapes::StringShape.new(name: 'SentimentLabel')
|
65
76
|
SentimentResponse = Shapes::StructureShape.new(name: 'SentimentResponse')
|
66
77
|
SentimentScore = Shapes::StringShape.new(name: 'SentimentScore')
|
@@ -74,6 +85,20 @@ module Aws::Lex
|
|
74
85
|
genericAttachmentList = Shapes::ListShape.new(name: 'genericAttachmentList')
|
75
86
|
listOfButtons = Shapes::ListShape.new(name: 'listOfButtons')
|
76
87
|
|
88
|
+
ActiveContext.add_member(:name, Shapes::ShapeRef.new(shape: ActiveContextName, required: true, location_name: "name"))
|
89
|
+
ActiveContext.add_member(:time_to_live, Shapes::ShapeRef.new(shape: ActiveContextTimeToLive, required: true, location_name: "timeToLive"))
|
90
|
+
ActiveContext.add_member(:parameters, Shapes::ShapeRef.new(shape: ActiveContextParametersMap, required: true, location_name: "parameters"))
|
91
|
+
ActiveContext.struct_class = Types::ActiveContext
|
92
|
+
|
93
|
+
ActiveContextParametersMap.key = Shapes::ShapeRef.new(shape: ParameterName)
|
94
|
+
ActiveContextParametersMap.value = Shapes::ShapeRef.new(shape: Text)
|
95
|
+
|
96
|
+
ActiveContextTimeToLive.add_member(:time_to_live_in_seconds, Shapes::ShapeRef.new(shape: ActiveContextTimeToLiveInSeconds, location_name: "timeToLiveInSeconds"))
|
97
|
+
ActiveContextTimeToLive.add_member(:turns_to_live, Shapes::ShapeRef.new(shape: ActiveContextTurnsToLive, location_name: "turnsToLive"))
|
98
|
+
ActiveContextTimeToLive.struct_class = Types::ActiveContextTimeToLive
|
99
|
+
|
100
|
+
ActiveContextsList.member = Shapes::ShapeRef.new(shape: ActiveContext)
|
101
|
+
|
77
102
|
BadGatewayException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
|
78
103
|
BadGatewayException.struct_class = Types::BadGatewayException
|
79
104
|
|
@@ -127,6 +152,7 @@ module Aws::Lex
|
|
127
152
|
GetSessionResponse.add_member(:session_attributes, Shapes::ShapeRef.new(shape: StringMap, location_name: "sessionAttributes"))
|
128
153
|
GetSessionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location_name: "sessionId"))
|
129
154
|
GetSessionResponse.add_member(:dialog_action, Shapes::ShapeRef.new(shape: DialogAction, location_name: "dialogAction"))
|
155
|
+
GetSessionResponse.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsList, location_name: "activeContexts"))
|
130
156
|
GetSessionResponse.struct_class = Types::GetSessionResponse
|
131
157
|
|
132
158
|
IntentConfidence.add_member(:score, Shapes::ShapeRef.new(shape: Double, location_name: "score"))
|
@@ -169,6 +195,7 @@ module Aws::Lex
|
|
169
195
|
PostContentRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: HttpContentType, required: true, location: "header", location_name: "Content-Type"))
|
170
196
|
PostContentRequest.add_member(:accept, Shapes::ShapeRef.new(shape: Accept, location: "header", location_name: "Accept"))
|
171
197
|
PostContentRequest.add_member(:input_stream, Shapes::ShapeRef.new(shape: BlobStream, required: true, location_name: "inputStream"))
|
198
|
+
PostContentRequest.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsString, location: "header", location_name: "x-amz-lex-active-contexts", metadata: {"jsonvalue"=>true}))
|
172
199
|
PostContentRequest.struct_class = Types::PostContentRequest
|
173
200
|
PostContentRequest[:payload] = :input_stream
|
174
201
|
PostContentRequest[:payload_member] = PostContentRequest.member(:input_stream)
|
@@ -180,14 +207,17 @@ module Aws::Lex
|
|
180
207
|
PostContentResponse.add_member(:slots, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-slots", metadata: {"jsonvalue"=>true}))
|
181
208
|
PostContentResponse.add_member(:session_attributes, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-session-attributes", metadata: {"jsonvalue"=>true}))
|
182
209
|
PostContentResponse.add_member(:sentiment_response, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-sentiment"))
|
183
|
-
PostContentResponse.add_member(:message, Shapes::ShapeRef.new(shape: Text, location: "header", location_name: "x-amz-lex-message"))
|
210
|
+
PostContentResponse.add_member(:message, Shapes::ShapeRef.new(shape: Text, deprecated: true, location: "header", location_name: "x-amz-lex-message", metadata: {"deprecatedMessage"=>"The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales."}))
|
211
|
+
PostContentResponse.add_member(:encoded_message, Shapes::ShapeRef.new(shape: SensitiveString, location: "header", location_name: "x-amz-lex-encoded-message"))
|
184
212
|
PostContentResponse.add_member(:message_format, Shapes::ShapeRef.new(shape: MessageFormatType, location: "header", location_name: "x-amz-lex-message-format"))
|
185
213
|
PostContentResponse.add_member(:dialog_state, Shapes::ShapeRef.new(shape: DialogState, location: "header", location_name: "x-amz-lex-dialog-state"))
|
186
214
|
PostContentResponse.add_member(:slot_to_elicit, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-slot-to-elicit"))
|
187
|
-
PostContentResponse.add_member(:input_transcript, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-input-transcript"))
|
215
|
+
PostContentResponse.add_member(:input_transcript, Shapes::ShapeRef.new(shape: String, deprecated: true, location: "header", location_name: "x-amz-lex-input-transcript", metadata: {"deprecatedMessage"=>"The inputTranscript field is deprecated, use the encodedInputTranscript field instead. The inputTranscript field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales."}))
|
216
|
+
PostContentResponse.add_member(:encoded_input_transcript, Shapes::ShapeRef.new(shape: SensitiveStringUnbounded, location: "header", location_name: "x-amz-lex-encoded-input-transcript"))
|
188
217
|
PostContentResponse.add_member(:audio_stream, Shapes::ShapeRef.new(shape: BlobStream, location_name: "audioStream"))
|
189
218
|
PostContentResponse.add_member(:bot_version, Shapes::ShapeRef.new(shape: BotVersion, location: "header", location_name: "x-amz-lex-bot-version"))
|
190
219
|
PostContentResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-session-id"))
|
220
|
+
PostContentResponse.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsString, location: "header", location_name: "x-amz-lex-active-contexts", metadata: {"jsonvalue"=>true}))
|
191
221
|
PostContentResponse.struct_class = Types::PostContentResponse
|
192
222
|
PostContentResponse[:payload] = :audio_stream
|
193
223
|
PostContentResponse[:payload_member] = PostContentResponse.member(:audio_stream)
|
@@ -198,6 +228,7 @@ module Aws::Lex
|
|
198
228
|
PostTextRequest.add_member(:session_attributes, Shapes::ShapeRef.new(shape: StringMap, location_name: "sessionAttributes"))
|
199
229
|
PostTextRequest.add_member(:request_attributes, Shapes::ShapeRef.new(shape: StringMap, location_name: "requestAttributes"))
|
200
230
|
PostTextRequest.add_member(:input_text, Shapes::ShapeRef.new(shape: Text, required: true, location_name: "inputText"))
|
231
|
+
PostTextRequest.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsList, location_name: "activeContexts"))
|
201
232
|
PostTextRequest.struct_class = Types::PostTextRequest
|
202
233
|
|
203
234
|
PostTextResponse.add_member(:intent_name, Shapes::ShapeRef.new(shape: IntentName, location_name: "intentName"))
|
@@ -213,6 +244,7 @@ module Aws::Lex
|
|
213
244
|
PostTextResponse.add_member(:response_card, Shapes::ShapeRef.new(shape: ResponseCard, location_name: "responseCard"))
|
214
245
|
PostTextResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location_name: "sessionId"))
|
215
246
|
PostTextResponse.add_member(:bot_version, Shapes::ShapeRef.new(shape: BotVersion, location_name: "botVersion"))
|
247
|
+
PostTextResponse.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsList, location_name: "activeContexts"))
|
216
248
|
PostTextResponse.struct_class = Types::PostTextResponse
|
217
249
|
|
218
250
|
PredictedIntent.add_member(:intent_name, Shapes::ShapeRef.new(shape: IntentName, location_name: "intentName"))
|
@@ -227,18 +259,21 @@ module Aws::Lex
|
|
227
259
|
PutSessionRequest.add_member(:dialog_action, Shapes::ShapeRef.new(shape: DialogAction, location_name: "dialogAction"))
|
228
260
|
PutSessionRequest.add_member(:recent_intent_summary_view, Shapes::ShapeRef.new(shape: IntentSummaryList, location_name: "recentIntentSummaryView"))
|
229
261
|
PutSessionRequest.add_member(:accept, Shapes::ShapeRef.new(shape: Accept, location: "header", location_name: "Accept"))
|
262
|
+
PutSessionRequest.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsList, location_name: "activeContexts"))
|
230
263
|
PutSessionRequest.struct_class = Types::PutSessionRequest
|
231
264
|
|
232
265
|
PutSessionResponse.add_member(:content_type, Shapes::ShapeRef.new(shape: HttpContentType, location: "header", location_name: "Content-Type"))
|
233
266
|
PutSessionResponse.add_member(:intent_name, Shapes::ShapeRef.new(shape: IntentName, location: "header", location_name: "x-amz-lex-intent-name"))
|
234
267
|
PutSessionResponse.add_member(:slots, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-slots", metadata: {"jsonvalue"=>true}))
|
235
268
|
PutSessionResponse.add_member(:session_attributes, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-session-attributes", metadata: {"jsonvalue"=>true}))
|
236
|
-
PutSessionResponse.add_member(:message, Shapes::ShapeRef.new(shape: Text, location: "header", location_name: "x-amz-lex-message"))
|
269
|
+
PutSessionResponse.add_member(:message, Shapes::ShapeRef.new(shape: Text, deprecated: true, location: "header", location_name: "x-amz-lex-message", metadata: {"deprecatedMessage"=>"The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales."}))
|
270
|
+
PutSessionResponse.add_member(:encoded_message, Shapes::ShapeRef.new(shape: SensitiveString, location: "header", location_name: "x-amz-lex-encoded-message"))
|
237
271
|
PutSessionResponse.add_member(:message_format, Shapes::ShapeRef.new(shape: MessageFormatType, location: "header", location_name: "x-amz-lex-message-format"))
|
238
272
|
PutSessionResponse.add_member(:dialog_state, Shapes::ShapeRef.new(shape: DialogState, location: "header", location_name: "x-amz-lex-dialog-state"))
|
239
273
|
PutSessionResponse.add_member(:slot_to_elicit, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-slot-to-elicit"))
|
240
274
|
PutSessionResponse.add_member(:audio_stream, Shapes::ShapeRef.new(shape: BlobStream, location_name: "audioStream"))
|
241
275
|
PutSessionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-session-id"))
|
276
|
+
PutSessionResponse.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsString, location: "header", location_name: "x-amz-lex-active-contexts", metadata: {"jsonvalue"=>true}))
|
242
277
|
PutSessionResponse.struct_class = Types::PutSessionResponse
|
243
278
|
PutSessionResponse[:payload] = :audio_stream
|
244
279
|
PutSessionResponse[:payload_member] = PutSessionResponse.member(:audio_stream)
|
data/lib/aws-sdk-lex/errors.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
4
4
|
#
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
data/lib/aws-sdk-lex/resource.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
4
4
|
#
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
data/lib/aws-sdk-lex/types.rb
CHANGED
@@ -3,13 +3,87 @@
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
4
4
|
#
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
10
10
|
module Aws::Lex
|
11
11
|
module Types
|
12
12
|
|
13
|
+
# A context is a variable that contains information about the current
|
14
|
+
# state of the conversation between a user and Amazon Lex. Context can
|
15
|
+
# be set automatically by Amazon Lex when an intent is fulfilled, or it
|
16
|
+
# can be set at runtime using the `PutContent`, `PutText`, or
|
17
|
+
# `PutSession` operation.
|
18
|
+
#
|
19
|
+
# @note When making an API call, you may pass ActiveContext
|
20
|
+
# data as a hash:
|
21
|
+
#
|
22
|
+
# {
|
23
|
+
# name: "ActiveContextName", # required
|
24
|
+
# time_to_live: { # required
|
25
|
+
# time_to_live_in_seconds: 1,
|
26
|
+
# turns_to_live: 1,
|
27
|
+
# },
|
28
|
+
# parameters: { # required
|
29
|
+
# "ParameterName" => "Text",
|
30
|
+
# },
|
31
|
+
# }
|
32
|
+
#
|
33
|
+
# @!attribute [rw] name
|
34
|
+
# The name of the context.
|
35
|
+
# @return [String]
|
36
|
+
#
|
37
|
+
# @!attribute [rw] time_to_live
|
38
|
+
# The length of time or number of turns that a context remains active.
|
39
|
+
# @return [Types::ActiveContextTimeToLive]
|
40
|
+
#
|
41
|
+
# @!attribute [rw] parameters
|
42
|
+
# State variables for the current context. You can use these values as
|
43
|
+
# default values for slots in subsequent events.
|
44
|
+
# @return [Hash<String,String>]
|
45
|
+
#
|
46
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/ActiveContext AWS API Documentation
|
47
|
+
#
|
48
|
+
class ActiveContext < Struct.new(
|
49
|
+
:name,
|
50
|
+
:time_to_live,
|
51
|
+
:parameters)
|
52
|
+
SENSITIVE = []
|
53
|
+
include Aws::Structure
|
54
|
+
end
|
55
|
+
|
56
|
+
# The length of time or number of turns that a context remains active.
|
57
|
+
#
|
58
|
+
# @note When making an API call, you may pass ActiveContextTimeToLive
|
59
|
+
# data as a hash:
|
60
|
+
#
|
61
|
+
# {
|
62
|
+
# time_to_live_in_seconds: 1,
|
63
|
+
# turns_to_live: 1,
|
64
|
+
# }
|
65
|
+
#
|
66
|
+
# @!attribute [rw] time_to_live_in_seconds
|
67
|
+
# The number of seconds that the context should be active after it is
|
68
|
+
# first sent in a `PostContent` or `PostText` response. You can set
|
69
|
+
# the value between 5 and 86,400 seconds (24 hours).
|
70
|
+
# @return [Integer]
|
71
|
+
#
|
72
|
+
# @!attribute [rw] turns_to_live
|
73
|
+
# The number of conversation turns that the context should be active.
|
74
|
+
# A conversation turn is one `PostContent` or `PostText` request and
|
75
|
+
# the corresponding response from Amazon Lex.
|
76
|
+
# @return [Integer]
|
77
|
+
#
|
78
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/ActiveContextTimeToLive AWS API Documentation
|
79
|
+
#
|
80
|
+
class ActiveContextTimeToLive < Struct.new(
|
81
|
+
:time_to_live_in_seconds,
|
82
|
+
:turns_to_live)
|
83
|
+
SENSITIVE = []
|
84
|
+
include Aws::Structure
|
85
|
+
end
|
86
|
+
|
13
87
|
# Either the Amazon Lex bot is still building, or one of the dependent
|
14
88
|
# services (Amazon Polly, AWS Lambda) failed with an internal service
|
15
89
|
# error.
|
@@ -361,14 +435,24 @@ module Aws::Lex
|
|
361
435
|
# Describes the current state of the bot.
|
362
436
|
# @return [Types::DialogAction]
|
363
437
|
#
|
438
|
+
# @!attribute [rw] active_contexts
|
439
|
+
# A list of active contexts for the session. A context can be set when
|
440
|
+
# an intent is fulfilled or by calling the `PostContent`, `PostText`,
|
441
|
+
# or `PutSession` operation.
|
442
|
+
#
|
443
|
+
# You can use a context to control the intents that can follow up an
|
444
|
+
# intent, or to modify the operation of your application.
|
445
|
+
# @return [Array<Types::ActiveContext>]
|
446
|
+
#
|
364
447
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSessionResponse AWS API Documentation
|
365
448
|
#
|
366
449
|
class GetSessionResponse < Struct.new(
|
367
450
|
:recent_intent_summary_view,
|
368
451
|
:session_attributes,
|
369
452
|
:session_id,
|
370
|
-
:dialog_action
|
371
|
-
|
453
|
+
:dialog_action,
|
454
|
+
:active_contexts)
|
455
|
+
SENSITIVE = [:session_attributes, :active_contexts]
|
372
456
|
include Aws::Structure
|
373
457
|
end
|
374
458
|
|
@@ -577,6 +661,7 @@ module Aws::Lex
|
|
577
661
|
# content_type: "HttpContentType", # required
|
578
662
|
# accept: "Accept",
|
579
663
|
# input_stream: "data", # required
|
664
|
+
# active_contexts: "ActiveContextsString",
|
580
665
|
# }
|
581
666
|
#
|
582
667
|
# @!attribute [rw] bot_name
|
@@ -721,6 +806,16 @@ module Aws::Lex
|
|
721
806
|
# than buffering the data locally.
|
722
807
|
# @return [IO]
|
723
808
|
#
|
809
|
+
# @!attribute [rw] active_contexts
|
810
|
+
# A list of contexts active for the request. A context can be
|
811
|
+
# activated when a previous intent is fulfilled, or by including the
|
812
|
+
# context in the request,
|
813
|
+
#
|
814
|
+
# If you don't specify a list of contexts, Amazon Lex will use the
|
815
|
+
# current list of contexts for the session. If you specify an empty
|
816
|
+
# list, all contexts for the session are cleared.
|
817
|
+
# @return [String]
|
818
|
+
#
|
724
819
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContentRequest AWS API Documentation
|
725
820
|
#
|
726
821
|
class PostContentRequest < Struct.new(
|
@@ -731,8 +826,9 @@ module Aws::Lex
|
|
731
826
|
:request_attributes,
|
732
827
|
:content_type,
|
733
828
|
:accept,
|
734
|
-
:input_stream
|
735
|
-
|
829
|
+
:input_stream,
|
830
|
+
:active_contexts)
|
831
|
+
SENSITIVE = [:session_attributes, :request_attributes, :active_contexts]
|
736
832
|
include Aws::Structure
|
737
833
|
end
|
738
834
|
|
@@ -751,7 +847,7 @@ module Aws::Lex
|
|
751
847
|
# score is between 0.0 and 1.0.
|
752
848
|
#
|
753
849
|
# The score is a relative score, not an absolute score. The score may
|
754
|
-
# change based on improvements to
|
850
|
+
# change based on improvements to Amazon Lex.
|
755
851
|
# @return [String]
|
756
852
|
#
|
757
853
|
# @!attribute [rw] alternative_intents
|
@@ -794,6 +890,33 @@ module Aws::Lex
|
|
794
890
|
# @return [String]
|
795
891
|
#
|
796
892
|
# @!attribute [rw] message
|
893
|
+
# You can only use this field in the de-DE, en-AU, en-GB, en-US,
|
894
|
+
# es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other
|
895
|
+
# locales, the `message` field is null. You should use the
|
896
|
+
# `encodedMessage` field instead.
|
897
|
+
#
|
898
|
+
# The message to convey to the user. The message can come from the
|
899
|
+
# bot's configuration or from a Lambda function.
|
900
|
+
#
|
901
|
+
# If the intent is not configured with a Lambda function, or if the
|
902
|
+
# Lambda function returned `Delegate` as the `dialogAction.type` in
|
903
|
+
# its response, Amazon Lex decides on the next course of action and
|
904
|
+
# selects an appropriate message from the bot's configuration based
|
905
|
+
# on the current interaction context. For example, if Amazon Lex
|
906
|
+
# isn't able to understand user input, it uses a clarification prompt
|
907
|
+
# message.
|
908
|
+
#
|
909
|
+
# When you create an intent you can assign messages to groups. When
|
910
|
+
# messages are assigned to groups Amazon Lex returns one message from
|
911
|
+
# each group in the response. The message field is an escaped JSON
|
912
|
+
# string containing the messages. For more information about the
|
913
|
+
# structure of the JSON string returned, see msg-prompts-formats.
|
914
|
+
#
|
915
|
+
# If the Lambda function returns a message, Amazon Lex passes it to
|
916
|
+
# the client in its response.
|
917
|
+
# @return [String]
|
918
|
+
#
|
919
|
+
# @!attribute [rw] encoded_message
|
797
920
|
# The message to convey to the user. The message can come from the
|
798
921
|
# bot's configuration or from a Lambda function.
|
799
922
|
#
|
@@ -813,6 +936,9 @@ module Aws::Lex
|
|
813
936
|
#
|
814
937
|
# If the Lambda function returns a message, Amazon Lex passes it to
|
815
938
|
# the client in its response.
|
939
|
+
#
|
940
|
+
# The `encodedMessage` field is base-64 encoded. You must decode the
|
941
|
+
# field before you can use the value.
|
816
942
|
# @return [String]
|
817
943
|
#
|
818
944
|
# @!attribute [rw] message_format
|
@@ -885,6 +1011,11 @@ module Aws::Lex
|
|
885
1011
|
# @!attribute [rw] input_transcript
|
886
1012
|
# The text used to process the request.
|
887
1013
|
#
|
1014
|
+
# You can use this field only in the de-DE, en-AU, en-GB, en-US,
|
1015
|
+
# es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other
|
1016
|
+
# locales, the `inputTranscript` field is null. You should use the
|
1017
|
+
# `encodedInputTranscript` field instead.
|
1018
|
+
#
|
888
1019
|
# If the input was an audio stream, the `inputTranscript` field
|
889
1020
|
# contains the text extracted from the audio stream. This is the text
|
890
1021
|
# that is actually processed to recognize intents and slot values. You
|
@@ -892,6 +1023,19 @@ module Aws::Lex
|
|
892
1023
|
# processing the audio that you send.
|
893
1024
|
# @return [String]
|
894
1025
|
#
|
1026
|
+
# @!attribute [rw] encoded_input_transcript
|
1027
|
+
# The text used to process the request.
|
1028
|
+
#
|
1029
|
+
# If the input was an audio stream, the `encodedInputTranscript` field
|
1030
|
+
# contains the text extracted from the audio stream. This is the text
|
1031
|
+
# that is actually processed to recognize intents and slot values. You
|
1032
|
+
# can use this information to determine if Amazon Lex is correctly
|
1033
|
+
# processing the audio that you send.
|
1034
|
+
#
|
1035
|
+
# The `encodedInputTranscript` field is base-64 encoded. You must
|
1036
|
+
# decode the field before you can use the value.
|
1037
|
+
# @return [String]
|
1038
|
+
#
|
895
1039
|
# @!attribute [rw] audio_stream
|
896
1040
|
# The prompt (or statement) to convey to the user. This is based on
|
897
1041
|
# the bot configuration and context. For example, if Amazon Lex did
|
@@ -907,23 +1051,21 @@ module Aws::Lex
|
|
907
1051
|
# The version of the bot that responded to the conversation. You can
|
908
1052
|
# use this information to help determine if one version of a bot is
|
909
1053
|
# performing better than another version.
|
910
|
-
#
|
911
|
-
# If you have enabled the new natural language understanding (NLU)
|
912
|
-
# model, you can use this to determine if the improvement is due to
|
913
|
-
# changes to the bot or changes to the NLU.
|
914
|
-
#
|
915
|
-
# For more information about enabling the new NLU, see the
|
916
|
-
# [enableModelImprovements][1] parameter of the `PutBot` operation.
|
917
|
-
#
|
918
|
-
#
|
919
|
-
#
|
920
|
-
# [1]: https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements
|
921
1054
|
# @return [String]
|
922
1055
|
#
|
923
1056
|
# @!attribute [rw] session_id
|
924
1057
|
# The unique identifier for the session.
|
925
1058
|
# @return [String]
|
926
1059
|
#
|
1060
|
+
# @!attribute [rw] active_contexts
|
1061
|
+
# A list of active contexts for the session. A context can be set when
|
1062
|
+
# an intent is fulfilled or by calling the `PostContent`, `PostText`,
|
1063
|
+
# or `PutSession` operation.
|
1064
|
+
#
|
1065
|
+
# You can use a context to control the intents that can follow up an
|
1066
|
+
# intent, or to modify the operation of your application.
|
1067
|
+
# @return [String]
|
1068
|
+
#
|
927
1069
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContentResponse AWS API Documentation
|
928
1070
|
#
|
929
1071
|
class PostContentResponse < Struct.new(
|
@@ -935,14 +1077,17 @@ module Aws::Lex
|
|
935
1077
|
:session_attributes,
|
936
1078
|
:sentiment_response,
|
937
1079
|
:message,
|
1080
|
+
:encoded_message,
|
938
1081
|
:message_format,
|
939
1082
|
:dialog_state,
|
940
1083
|
:slot_to_elicit,
|
941
1084
|
:input_transcript,
|
1085
|
+
:encoded_input_transcript,
|
942
1086
|
:audio_stream,
|
943
1087
|
:bot_version,
|
944
|
-
:session_id
|
945
|
-
|
1088
|
+
:session_id,
|
1089
|
+
:active_contexts)
|
1090
|
+
SENSITIVE = [:message, :encoded_message, :encoded_input_transcript, :active_contexts]
|
946
1091
|
include Aws::Structure
|
947
1092
|
end
|
948
1093
|
|
@@ -960,6 +1105,18 @@ module Aws::Lex
|
|
960
1105
|
# "String" => "String",
|
961
1106
|
# },
|
962
1107
|
# input_text: "Text", # required
|
1108
|
+
# active_contexts: [
|
1109
|
+
# {
|
1110
|
+
# name: "ActiveContextName", # required
|
1111
|
+
# time_to_live: { # required
|
1112
|
+
# time_to_live_in_seconds: 1,
|
1113
|
+
# turns_to_live: 1,
|
1114
|
+
# },
|
1115
|
+
# parameters: { # required
|
1116
|
+
# "ParameterName" => "Text",
|
1117
|
+
# },
|
1118
|
+
# },
|
1119
|
+
# ],
|
963
1120
|
# }
|
964
1121
|
#
|
965
1122
|
# @!attribute [rw] bot_name
|
@@ -1026,6 +1183,16 @@ module Aws::Lex
|
|
1026
1183
|
# The text that the user entered (Amazon Lex interprets this text).
|
1027
1184
|
# @return [String]
|
1028
1185
|
#
|
1186
|
+
# @!attribute [rw] active_contexts
|
1187
|
+
# A list of contexts active for the request. A context can be
|
1188
|
+
# activated when a previous intent is fulfilled, or by including the
|
1189
|
+
# context in the request,
|
1190
|
+
#
|
1191
|
+
# If you don't specify a list of contexts, Amazon Lex will use the
|
1192
|
+
# current list of contexts for the session. If you specify an empty
|
1193
|
+
# list, all contexts for the session are cleared.
|
1194
|
+
# @return [Array<Types::ActiveContext>]
|
1195
|
+
#
|
1029
1196
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostTextRequest AWS API Documentation
|
1030
1197
|
#
|
1031
1198
|
class PostTextRequest < Struct.new(
|
@@ -1034,8 +1201,9 @@ module Aws::Lex
|
|
1034
1201
|
:user_id,
|
1035
1202
|
:session_attributes,
|
1036
1203
|
:request_attributes,
|
1037
|
-
:input_text
|
1038
|
-
|
1204
|
+
:input_text,
|
1205
|
+
:active_contexts)
|
1206
|
+
SENSITIVE = [:session_attributes, :request_attributes, :input_text, :active_contexts]
|
1039
1207
|
include Aws::Structure
|
1040
1208
|
end
|
1041
1209
|
|
@@ -1050,8 +1218,7 @@ module Aws::Lex
|
|
1050
1218
|
# Scores][1].
|
1051
1219
|
#
|
1052
1220
|
# The score is a relative score, not an absolute score. The score may
|
1053
|
-
# change based on improvements to
|
1054
|
-
# understanding (NLU) model.
|
1221
|
+
# change based on improvements to Amazon Lex.
|
1055
1222
|
#
|
1056
1223
|
#
|
1057
1224
|
#
|
@@ -1202,18 +1369,16 @@ module Aws::Lex
|
|
1202
1369
|
# The version of the bot that responded to the conversation. You can
|
1203
1370
|
# use this information to help determine if one version of a bot is
|
1204
1371
|
# performing better than another version.
|
1372
|
+
# @return [String]
|
1205
1373
|
#
|
1206
|
-
#
|
1207
|
-
#
|
1208
|
-
#
|
1209
|
-
#
|
1210
|
-
# For more information about enabling the new NLU, see the
|
1211
|
-
# [enableModelImprovements][1] parameter of the `PutBot` operation.
|
1212
|
-
#
|
1213
|
-
#
|
1374
|
+
# @!attribute [rw] active_contexts
|
1375
|
+
# A list of active contexts for the session. A context can be set when
|
1376
|
+
# an intent is fulfilled or by calling the `PostContent`, `PostText`,
|
1377
|
+
# or `PutSession` operation.
|
1214
1378
|
#
|
1215
|
-
#
|
1216
|
-
#
|
1379
|
+
# You can use a context to control the intents that can follow up an
|
1380
|
+
# intent, or to modify the operation of your application.
|
1381
|
+
# @return [Array<Types::ActiveContext>]
|
1217
1382
|
#
|
1218
1383
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostTextResponse AWS API Documentation
|
1219
1384
|
#
|
@@ -1230,8 +1395,9 @@ module Aws::Lex
|
|
1230
1395
|
:slot_to_elicit,
|
1231
1396
|
:response_card,
|
1232
1397
|
:session_id,
|
1233
|
-
:bot_version
|
1234
|
-
|
1398
|
+
:bot_version,
|
1399
|
+
:active_contexts)
|
1400
|
+
SENSITIVE = [:slots, :session_attributes, :message, :active_contexts]
|
1235
1401
|
include Aws::Structure
|
1236
1402
|
end
|
1237
1403
|
|
@@ -1299,6 +1465,18 @@ module Aws::Lex
|
|
1299
1465
|
# },
|
1300
1466
|
# ],
|
1301
1467
|
# accept: "Accept",
|
1468
|
+
# active_contexts: [
|
1469
|
+
# {
|
1470
|
+
# name: "ActiveContextName", # required
|
1471
|
+
# time_to_live: { # required
|
1472
|
+
# time_to_live_in_seconds: 1,
|
1473
|
+
# turns_to_live: 1,
|
1474
|
+
# },
|
1475
|
+
# parameters: { # required
|
1476
|
+
# "ParameterName" => "Text",
|
1477
|
+
# },
|
1478
|
+
# },
|
1479
|
+
# ],
|
1302
1480
|
# }
|
1303
1481
|
#
|
1304
1482
|
# @!attribute [rw] bot_name
|
@@ -1378,6 +1556,16 @@ module Aws::Lex
|
|
1378
1556
|
# * `text/plain; charset=utf-8`
|
1379
1557
|
# @return [String]
|
1380
1558
|
#
|
1559
|
+
# @!attribute [rw] active_contexts
|
1560
|
+
# A list of contexts active for the request. A context can be
|
1561
|
+
# activated when a previous intent is fulfilled, or by including the
|
1562
|
+
# context in the request,
|
1563
|
+
#
|
1564
|
+
# If you don't specify a list of contexts, Amazon Lex will use the
|
1565
|
+
# current list of contexts for the session. If you specify an empty
|
1566
|
+
# list, all contexts for the session are cleared.
|
1567
|
+
# @return [Array<Types::ActiveContext>]
|
1568
|
+
#
|
1381
1569
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSessionRequest AWS API Documentation
|
1382
1570
|
#
|
1383
1571
|
class PutSessionRequest < Struct.new(
|
@@ -1387,8 +1575,9 @@ module Aws::Lex
|
|
1387
1575
|
:session_attributes,
|
1388
1576
|
:dialog_action,
|
1389
1577
|
:recent_intent_summary_view,
|
1390
|
-
:accept
|
1391
|
-
|
1578
|
+
:accept,
|
1579
|
+
:active_contexts)
|
1580
|
+
SENSITIVE = [:session_attributes, :active_contexts]
|
1392
1581
|
include Aws::Structure
|
1393
1582
|
end
|
1394
1583
|
|
@@ -1424,6 +1613,18 @@ module Aws::Lex
|
|
1424
1613
|
#
|
1425
1614
|
# @!attribute [rw] message
|
1426
1615
|
# The next message that should be presented to the user.
|
1616
|
+
#
|
1617
|
+
# You can only use this field in the de-DE, en-AU, en-GB, en-US,
|
1618
|
+
# es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other
|
1619
|
+
# locales, the `message` field is null. You should use the
|
1620
|
+
# `encodedMessage` field instead.
|
1621
|
+
# @return [String]
|
1622
|
+
#
|
1623
|
+
# @!attribute [rw] encoded_message
|
1624
|
+
# The next message that should be presented to the user.
|
1625
|
+
#
|
1626
|
+
# The `encodedMessage` field is base-64 encoded. You must decode the
|
1627
|
+
# field before you can use the value.
|
1427
1628
|
# @return [String]
|
1428
1629
|
#
|
1429
1630
|
# @!attribute [rw] message_format
|
@@ -1474,6 +1675,10 @@ module Aws::Lex
|
|
1474
1675
|
# A unique identifier for the session.
|
1475
1676
|
# @return [String]
|
1476
1677
|
#
|
1678
|
+
# @!attribute [rw] active_contexts
|
1679
|
+
# A list of active contexts for the session.
|
1680
|
+
# @return [String]
|
1681
|
+
#
|
1477
1682
|
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSessionResponse AWS API Documentation
|
1478
1683
|
#
|
1479
1684
|
class PutSessionResponse < Struct.new(
|
@@ -1482,12 +1687,14 @@ module Aws::Lex
|
|
1482
1687
|
:slots,
|
1483
1688
|
:session_attributes,
|
1484
1689
|
:message,
|
1690
|
+
:encoded_message,
|
1485
1691
|
:message_format,
|
1486
1692
|
:dialog_state,
|
1487
1693
|
:slot_to_elicit,
|
1488
1694
|
:audio_stream,
|
1489
|
-
:session_id
|
1490
|
-
|
1695
|
+
:session_id,
|
1696
|
+
:active_contexts)
|
1697
|
+
SENSITIVE = [:message, :encoded_message, :active_contexts]
|
1491
1698
|
include Aws::Structure
|
1492
1699
|
end
|
1493
1700
|
|