@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public interface AmazonLexRuntimeAsync extends AmazonLexRuntime
AsyncHandler
can be used to receive
notification when an asynchronous operation completes.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonLexRuntimeAsync
instead.
Amazon Lex provides both build and runtime endpoints. Each endpoint provides a set of operations (API). Your application uses the runtime API to understand user utterances (user input text or voice). For example, suppose user says "I want pizza", your application sends this input to Amazon Lex using the runtime API. Amazon Lex recognizes that the user request is for the OrderPizza intent (one of the intents defined in the application). Then Amazon Lex engages in user conversation on behalf of the application to elicit required information (slot values, such as pizza size and crust type), and then performs fulfillment activity (that you configured when you created the application). You use the build-time API to create and manage your Amazon Lex applications. For a list of build-time operations, see the build-time API. .
ENDPOINT_PREFIX
Modifier and Type | Method and Description |
---|---|
Future<PostTextResult> |
postTextAsync(PostTextRequest postTextRequest)
Sends user input text to Amazon Lex at runtime.
|
Future<PostTextResult> |
postTextAsync(PostTextRequest postTextRequest,
AsyncHandler<PostTextRequest,PostTextResult> asyncHandler)
Sends user input text to Amazon Lex at runtime.
|
getCachedResponseMetadata, postText, shutdown
Future<PostTextResult> postTextAsync(PostTextRequest postTextRequest)
Sends user input text to Amazon Lex at runtime. Amazon Lex uses the machine learning model that the service built for the application to interpret user input.
In response, Amazon Lex returns the next message to convey to the user (based on the context of the user
interaction) and whether to expect a user response to the message (dialogState
). For example,
consider the following response messages:
"What pizza toppings would you like?" – In this case, the dialogState
would be
ElicitSlot
(that is, a user response is expected).
"Your order has been placed." – In this case, Amazon Lex returns one of the following dialogState
values depending on how the intent fulfillment is configured (see fulfillmentActivity
in
CreateIntent
):
FulFilled
– The intent fulfillment is configured through a Lambda function.
ReadyForFulfilment
– The intent's fulfillmentActivity
is to simply return the intent
data back to the client application.
postTextRequest
- Future<PostTextResult> postTextAsync(PostTextRequest postTextRequest, AsyncHandler<PostTextRequest,PostTextResult> asyncHandler)
Sends user input text to Amazon Lex at runtime. Amazon Lex uses the machine learning model that the service built for the application to interpret user input.
In response, Amazon Lex returns the next message to convey to the user (based on the context of the user
interaction) and whether to expect a user response to the message (dialogState
). For example,
consider the following response messages:
"What pizza toppings would you like?" – In this case, the dialogState
would be
ElicitSlot
(that is, a user response is expected).
"Your order has been placed." – In this case, Amazon Lex returns one of the following dialogState
values depending on how the intent fulfillment is configured (see fulfillmentActivity
in
CreateIntent
):
FulFilled
– The intent fulfillment is configured through a Lambda function.
ReadyForFulfilment
– The intent's fulfillmentActivity
is to simply return the intent
data back to the client application.
postTextRequest
- asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.