LexRuntimeService class

Amazon Lex provides both build and runtime endpoints. Each endpoint provides a set of operations (API). Your conversational bot uses the runtime API to understand user utterances (user input text or voice). For example, suppose a user says "I want pizza", your bot 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 bot). Then Amazon Lex engages in user conversation on behalf of the bot 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 bot). You use the build-time API to create and manage your Amazon Lex bot. For a list of build-time operations, see the build-time API, .

Constructors

LexRuntimeService({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
deleteSession({required String botAlias, required String botName, required String userId}) Future<DeleteSessionResponse>
Removes session information for a specified bot, alias, and user ID.
getSession({required String botAlias, required String botName, required String userId, String? checkpointLabelFilter}) Future<GetSessionResponse>
Returns session information for a specified bot, alias, and user ID.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postContent({required String botAlias, required String botName, required String contentType, required Uint8List inputStream, required String userId, String? accept, Object? activeContexts, Object? requestAttributes, Object? sessionAttributes}) Future<PostContentResponse>
Sends user input (text or speech) to Amazon Lex. Clients use this API to send text and audio requests to Amazon Lex at runtime. Amazon Lex interprets the user input using the machine learning model that it built for the bot.
postText({required String botAlias, required String botName, required String inputText, required String userId, List<ActiveContext>? activeContexts, Map<String, String>? requestAttributes, Map<String, String>? sessionAttributes}) Future<PostTextResponse>
Sends user input to Amazon Lex. Client applications can use this API to send requests to Amazon Lex at runtime. Amazon Lex then interprets the user input using the machine learning model it built for the bot.
putSession({required String botAlias, required String botName, required String userId, String? accept, List<ActiveContext>? activeContexts, DialogAction? dialogAction, List<IntentSummary>? recentIntentSummaryView, Map<String, String>? sessionAttributes}) Future<PutSessionResponse>
Creates a new session or modifies an existing session with an Amazon Lex bot. Use this operation to enable your application to set the state of the bot.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited