Skip to content

Commit 9a18e40

Browse files
author
AWS
committed
Amazon Lex Runtime Service Update: Amazon Lex now supports base64-encoded message and input transcript fields.
1 parent 39375d5 commit 9a18e40

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Lex Runtime Service",
4+
"contributor": "",
5+
"description": "Amazon Lex now supports base64-encoded message and input transcript fields."
6+
}

services/lexruntime/src/main/resources/codegen-resources/service-2.json

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,10 +723,18 @@
723723
},
724724
"message":{
725725
"shape":"Text",
726-
"documentation":"<p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p> <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p> <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <a>msg-prompts-formats</a>.</p> <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>",
726+
"documentation":"<p>You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the <code>message</code> field is null. You should use the <code>encodedMessage</code> field instead.</p> <p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p> <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p> <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <a>msg-prompts-formats</a>.</p> <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p>",
727+
"deprecated":true,
728+
"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.",
727729
"location":"header",
728730
"locationName":"x-amz-lex-message"
729731
},
732+
"encodedMessage":{
733+
"shape":"SensitiveString",
734+
"documentation":"<p>The message to convey to the user. The message can come from the bot's configuration or from a Lambda function.</p> <p>If the intent is not configured with a Lambda function, or if the Lambda function returned <code>Delegate</code> as the <code>dialogAction.type</code> in its response, Amazon Lex decides on the next course of action and selects an appropriate message from the bot's configuration based on the current interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a clarification prompt message.</p> <p>When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex returns one message from each group in the response. The message field is an escaped JSON string containing the messages. For more information about the structure of the JSON string returned, see <a>msg-prompts-formats</a>.</p> <p>If the Lambda function returns a message, Amazon Lex passes it to the client in its response.</p> <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>",
735+
"location":"header",
736+
"locationName":"x-amz-lex-encoded-message"
737+
},
730738
"messageFormat":{
731739
"shape":"MessageFormatType",
732740
"documentation":"<p>The format of the response message. One of the following values:</p> <ul> <li> <p> <code>PlainText</code> - The message contains plain UTF-8 text.</p> </li> <li> <p> <code>CustomPayload</code> - The message is a custom format for the client.</p> </li> <li> <p> <code>SSML</code> - The message contains text formatted for voice output.</p> </li> <li> <p> <code>Composite</code> - The message contains an escaped JSON object containing one or more messages from the groups that messages were assigned to when the intent was created.</p> </li> </ul>",
@@ -747,10 +755,18 @@
747755
},
748756
"inputTranscript":{
749757
"shape":"String",
750-
"documentation":"<p>The text used to process the request.</p> <p>If the input was an audio stream, the <code>inputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>",
758+
"documentation":"<p>The text used to process the request.</p> <p>You can use this field 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. In all other locales, the <code>inputTranscript</code> field is null. You should use the <code>encodedInputTranscript</code> field instead.</p> <p>If the input was an audio stream, the <code>inputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p>",
759+
"deprecated":true,
760+
"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.",
751761
"location":"header",
752762
"locationName":"x-amz-lex-input-transcript"
753763
},
764+
"encodedInputTranscript":{
765+
"shape":"SensitiveStringUnbounded",
766+
"documentation":"<p>The text used to process the request.</p> <p>If the input was an audio stream, the <code>encodedInputTranscript</code> field contains the text extracted from the audio stream. This is the text that is actually processed to recognize intents and slot values. You can use this information to determine if Amazon Lex is correctly processing the audio that you send.</p> <p>The <code>encodedInputTranscript</code> field is base-64 encoded. You must decode the field before you can use the value.</p>",
767+
"location":"header",
768+
"locationName":"x-amz-lex-encoded-input-transcript"
769+
},
754770
"audioStream":{
755771
"shape":"BlobStream",
756772
"documentation":"<p>The prompt (or statement) to convey to the user. This is based on the bot configuration and context. For example, if Amazon Lex did not understand the user intent, it sends the <code>clarificationPrompt</code> configured for the bot. If the intent requires confirmation before taking the fulfillment action, it sends the <code>confirmationPrompt</code>. Another example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message to convey to the user. Then Amazon Lex sends that message in the response. </p>"
@@ -982,10 +998,18 @@
982998
},
983999
"message":{
9841000
"shape":"Text",
985-
"documentation":"<p>The next message that should be presented to the user.</p>",
1001+
"documentation":"<p>The next message that should be presented to the user.</p> <p>You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the <code>message</code> field is null. You should use the <code>encodedMessage</code> field instead.</p>",
1002+
"deprecated":true,
1003+
"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.",
9861004
"location":"header",
9871005
"locationName":"x-amz-lex-message"
9881006
},
1007+
"encodedMessage":{
1008+
"shape":"SensitiveString",
1009+
"documentation":"<p>The next message that should be presented to the user.</p> <p>The <code>encodedMessage</code> field is base-64 encoded. You must decode the field before you can use the value.</p>",
1010+
"location":"header",
1011+
"locationName":"x-amz-lex-encoded-message"
1012+
},
9891013
"messageFormat":{
9901014
"shape":"MessageFormatType",
9911015
"documentation":"<p>The format of the response message. One of the following values:</p> <ul> <li> <p> <code>PlainText</code> - The message contains plain UTF-8 text.</p> </li> <li> <p> <code>CustomPayload</code> - The message is a custom format for the client.</p> </li> <li> <p> <code>SSML</code> - The message contains text formatted for voice output.</p> </li> <li> <p> <code>Composite</code> - The message contains an escaped JSON object containing one or more messages from the groups that messages were assigned to when the intent was created.</p> </li> </ul>",
@@ -1051,6 +1075,16 @@
10511075
},
10521076
"documentation":"<p>If you configure a response card when creating your bots, Amazon Lex substitutes the session attributes and slot values that are available, and then returns it. The response card can also come from a Lambda function ( <code>dialogCodeHook</code> and <code>fulfillmentActivity</code> on an intent).</p>"
10531077
},
1078+
"SensitiveString":{
1079+
"type":"string",
1080+
"max":1366,
1081+
"min":1,
1082+
"sensitive":true
1083+
},
1084+
"SensitiveStringUnbounded":{
1085+
"type":"string",
1086+
"sensitive":true
1087+
},
10541088
"SentimentLabel":{"type":"string"},
10551089
"SentimentResponse":{
10561090
"type":"structure",

0 commit comments

Comments
 (0)