String name
The name of the context.
ActiveContextTimeToLive timeToLive
Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context is no longer returned in a response.
Map<K,V> contextAttributes
A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request.
If you don't specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.
Integer timeToLiveInSeconds
The number of seconds that the context is active. You can specify between 5 and 86400 seconds (24 hours).
Integer turnsToLive
The number of turns that the context is active. You can specify up to 20 turns. Each request and response from the bot is a turn.
Double score
A score that indicates how confident Amazon Lex V2 is that an intent satisfies the user's intent. Ranges between 0.00 and 1.00. Higher scores indicate higher confidence.
String botId
The identifier of the bot that contains the session data.
String botAliasId
The alias identifier in use for the bot that contains the session data.
String localeId
The locale where the session is in use.
String sessionId
The identifier of the session to delete.
String botId
The identifier of the bot that contained the session data.
String botAliasId
The alias identifier in use for the bot that contained the session data.
String localeId
The locale where the session was used.
String sessionId
The identifier of the deleted session.
String type
The next action that the bot should take in its interaction with the user. The possible values are:
Close - Indicates that there will not be a response from the user. For example, the statement
"Your order has been placed" does not require a response.
ConfirmIntent - The next action is asking the user if the intent is complete and ready to be
fulfilled. This is a yes/no question such as "Place the order?"
Delegate - The next action is determined by Amazon Lex V2.
ElicitSlot - The next action is to elicit a slot value from the user.
String slotToElicit
The name of the slot that should be elicited from the user.
String slotElicitationStyle
Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users can spell out their input to make it clear to your bot.
Spell by letter - "b" "o" "b"
Spell by word - "b as in boy" "o as in oscar" "b as in boy"
For more information, see Using spelling to enter slot values .
String botId
The identifier of the bot that contains the session data.
String botAliasId
The alias identifier in use for the bot that contains the session data.
String localeId
The locale where the session is in use.
String sessionId
The identifier of the session to return.
String sessionId
The identifier of the returned session.
List<E> messages
A list of messages that were last sent to the user. The messages are ordered based on the order that your returned the messages from your Lambda function or the order that messages are defined in the bot.
List<E> interpretations
A list of intents that Amazon Lex V2 determined might satisfy the user's utterance.
Each interpretation includes the intent, a score that indicates how confident Amazon Lex V2 is that the interpretation is the correct one, and an optional sentiment response that indicates the sentiment expressed in the utterance.
SessionState sessionState
Represents the current state of the dialog between the user and the bot.
You can use this to determine the progress of the conversation and what the next action might be.
String title
The title to display on the response card. The format of the title is determined by the platform displaying the response card.
String subtitle
The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
String imageUrl
The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
List<E> buttons
A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
String name
The name of the intent.
Map<K,V> slots
A map of all of the slots for the intent. The name of the slot maps to the value of the slot. If a slot has not been filled, the value is null.
String state
Contains fulfillment information for the intent.
String confirmationState
Contains information about whether fulfillment of the intent has been confirmed.
ConfidenceScore nluConfidence
Determines the threshold where Amazon Lex V2 will insert the AMAZON.FallbackIntent,
AMAZON.KendraSearchIntent, or both when returning alternative intents in a response.
AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are
configured for the bot.
SentimentResponse sentimentResponse
The sentiment expressed in an utterance.
When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains the result of the analysis.
Intent intent
A list of intents that might satisfy the user's utterance. The intents are ordered by the confidence score.
String content
The text of the message.
String contentType
Indicates the type of response.
ImageResponseCard imageResponseCard
String botId
The identifier of the bot that receives the session data.
String botAliasId
The alias identifier of the bot that receives the session data.
String localeId
The locale where the session is in use.
String sessionId
The identifier of the session that receives the session data.
List<E> messages
A list of messages to send to the user. Messages are sent in the order that they are defined in the list.
SessionState sessionState
Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.
Map<K,V> requestAttributes
Request-specific information passed between Amazon Lex V2 and the client application.
The namespace x-amz-lex: is reserved for special attributes. Don't create any request attributes
with the prefix x-amz-lex:.
String responseContentType
The message that Amazon Lex V2 returns in the response can be either text or speech depending on the value of this parameter.
If the value is text/plain; charset=utf-8, Amazon Lex V2 returns text in the response.
String contentType
The type of response. Same as the type specified in the responseContentType field in the request.
String messages
A list of messages that were last sent to the user. The messages are ordered based on how you return the messages from you Lambda function or the order that the messages are defined in the bot.
String sessionState
Represents the current state of the dialog between the user and the bot.
Use this to determine the progress of the conversation and what the next action may be.
String requestAttributes
Request-specific information passed between the client application and Amazon Lex V2. These are the same as the
requestAttribute parameter in the call to the PutSession operation.
String sessionId
The identifier of the session that received the data.
InputStream audioStream
If the requested content type was audio, the audio version of the message to convey to the user.
String botId
The identifier of the bot that processes the request.
String botAliasId
The alias identifier in use for the bot that processes the request.
String localeId
The locale where the session is in use.
String sessionId
The identifier of the user session that is having the conversation.
String text
The text that the user entered. Amazon Lex V2 interprets this text.
SessionState sessionState
The current state of the dialog between the user and the bot.
Map<K,V> requestAttributes
Request-specific information passed between the client application and Amazon Lex V2
The namespace x-amz-lex: is reserved for special attributes. Don't create any request attributes
with the prefix x-amz-lex:.
List<E> messages
A list of messages last sent to the user. The messages are ordered based on the order that you returned the messages from your Lambda function or the order that the messages are defined in the bot.
SessionState sessionState
Represents the current state of the dialog between the user and the bot.
Use this to determine the progress of the conversation and what the next action may be.
List<E> interpretations
A list of intents that Amazon Lex V2 determined might satisfy the user's utterance.
Each interpretation includes the intent, a score that indicates now confident Amazon Lex V2 is that the interpretation is the correct one, and an optional sentiment response that indicates the sentiment expressed in the utterance.
Map<K,V> requestAttributes
The attributes sent in the request.
String sessionId
The identifier of the session in use.
String botId
The identifier of the bot that should receive the request.
String botAliasId
The alias identifier in use for the bot that should receive the request.
String localeId
The locale where the session is in use.
String sessionId
The identifier of the session in use.
String sessionState
Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.
The sessionState field must be compressed using gzip and then base64 encoded before sending to
Amazon Lex V2.
String requestAttributes
Request-specific information passed between the client application and Amazon Lex V2
The namespace x-amz-lex: is reserved for special attributes. Don't create any request attributes for
prefix x-amz-lex:.
The requestAttributes field must be compressed using gzip and then base64 encoded before sending to
Amazon Lex V2.
String requestContentType
Indicates the format for audio input or that the content is text. The header must start with one of the following prefixes:
PCM format, audio data must be in little-endian byte order.
audio/l16; rate=16000; channels=1
audio/x-l16; sample-rate=16000; channel-count=1
audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false
Opus format
audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4
Text format
text/plain; charset=utf-8
String responseContentType
The message that Amazon Lex V2 returns in the response can be either text or speech based on the
responseContentType value.
If the value is text/plain;charset=utf-8, Amazon Lex V2 returns text in the response.
If the value begins with audio/, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses
Amazon Polly to generate the speech using the configuration that you specified in the
requestContentType parameter. For example, if you specify audio/mpeg as the value,
Amazon Lex V2 returns speech in the MPEG format.
If the value is audio/pcm, the speech returned is audio/pcm at 16 KHz in 16-bit,
little-endian format.
The following are the accepted values:
audio/mpeg
audio/ogg
audio/pcm (16 KHz)
audio/* (defaults to mpeg)
text/plain; charset=utf-8
InputStream inputStream
User input in PCM or Opus audio format or text format as described in the requestContentType
parameter.
String inputMode
Indicates whether the input mode to the operation was text or speech.
String contentType
Content type as specified in the responseContentType in the request.
String messages
A list of messages that were last sent to the user. The messages are ordered based on the order that you returned the messages from your Lambda function or the order that the messages are defined in the bot.
The messages field is compressed with gzip and then base64 encoded. Before you can use the contents
of the field, you must decode and decompress the contents. See the example for a simple function to decode and
decompress the contents.
String interpretations
A list of intents that Amazon Lex V2 determined might satisfy the user's utterance.
Each interpretation includes the intent, a score that indicates how confident Amazon Lex V2 is that the interpretation is the correct one, and an optional sentiment response that indicates the sentiment expressed in the utterance.
The interpretations field is compressed with gzip and then base64 encoded. Before you can use the
contents of the field, you must decode and decompress the contents. See the example for a simple function to
decode and decompress the contents.
String sessionState
Represents the current state of the dialog between the user and the bot.
Use this to determine the progress of the conversation and what the next action might be.
The sessionState field is compressed with gzip and then base64 encoded. Before you can use the
contents of the field, you must decode and decompress the contents. See the example for a simple function to
decode and decompress the contents.
String requestAttributes
The attributes sent in the request.
The requestAttributes field is compressed with gzip and then base64 encoded. Before you can use the
contents of the field, you must decode and decompress the contents.
String sessionId
The identifier of the session in use.
String inputTranscript
The text used to process the request.
If the input was an audio stream, the inputTranscript 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 V2 is correctly processing the audio that you send.
The inputTranscript field is compressed with gzip and then base64 encoded. Before you can use the
contents of the field, you must decode and decompress the contents. See the example for a simple function to
decode and decompress the contents.
InputStream audioStream
The prompt or statement to send to the user. This is based on the bot configuration and context. For example, if
Amazon Lex V2 did not understand the user intent, it sends the clarificationPrompt configured for
the bot. If the intent requires confirmation before taking the fulfillment action, it sends the
confirmationPrompt. Another example: Suppose that the Lambda function successfully fulfilled the
intent, and sent a message to convey to the user. Then Amazon Lex V2 sends that message in the response.
Map<K,V> slotHints
A list of the slots in the intent that should have runtime hints added, and the phrases that should be added for each slot.
The first level of the slotHints map is the name of the intent. The second level is the name of the
slot within the intent. For more information, see Using hints to improve accuracy.
The intent name and slot name must exist.
String phrase
The phrase that Amazon Lex V2 should look for in the user's input to the bot.
String sentiment
The overall sentiment expressed in the user's response. This is the sentiment most likely expressed by the user based on the analysis by Amazon Comprehend.
SentimentScore sentimentScore
Double positive
The level of confidence that Amazon Comprehend has in the accuracy of its detection of the POSITIVE
sentiment.
Double negative
The level of confidence that Amazon Comprehend has in the accuracy of its detection of the NEGATIVE
sentiment.
Double neutral
The level of confidence that Amazon Comprehend has in the accuracy of its detection of the NEUTRAL
sentiment.
Double mixed
The level of confidence that Amazon Comprehend has in the accuracy of its detection of the MIXED
sentiment.
DialogAction dialogAction
The next step that Amazon Lex V2 should take in the conversation with a user.
Intent intent
The active intent that Amazon Lex V2 is processing.
List<E> activeContexts
One or more contexts that indicate to Amazon Lex V2 the context of a request. When a context is active, Amazon Lex V2 considers intents with the matching context as a trigger as the next intent in a session.
Map<K,V> sessionAttributes
Map of key/value pairs representing session-specific context information. It contains application information passed between Amazon Lex V2 and a client application.
String originatingRequestId
A unique identifier for a specific request.
RuntimeHints runtimeHints
Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2 uses the hints to help determine the correct value of a slot.
Value value
The current value of the slot.
String shape
When the shape value is List, it indicates that the values field contains
a list of slot values. When the value is Scalar, it indicates that the value field
contains a single value.
List<E> values
A list of one or more values that the user provided for the slot. For example, if a for a slot that elicits pizza toppings, the values might be "pepperoni" and "pineapple."
String originalValue
The text of the utterance from the user that was entered for the slot.
String interpretedValue
The value that Amazon Lex V2 determines for the slot. The actual value depends on the setting of the value
selection strategy for the bot. You can choose to use the value entered by the user, or you can have Amazon Lex
V2 choose the first value in the resolvedValues list.
List<E> resolvedValues
A list of additional values that have been recognized for the slot.
Copyright © 2022. All rights reserved.