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, .
lexruntimeservice(config = list())
A client for the service. You can call the service's operations using
syntax like svc$operation(...)
, where svc
is the name you've assigned
to the client. The available operations are listed in the
Operations section.
Optional configuration of credentials, endpoint, and/or region.
svc <- lexruntimeservice(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string"
),
endpoint = "string",
region = "string"
)
)
delete_session | Removes session information for a specified bot, alias, and user ID |
get_session | Returns session information for a specified bot, alias, and user ID |
post_content | Sends user input (text or speech) to Amazon Lex |
post_text | Sends user input to Amazon Lex |
put_session | Creates a new session or modifies an existing session with an Amazon Lex bot |
if (FALSE) {
svc <- lexruntimeservice()
svc$delete_session(
Foo = 123
)
}
Run the code above in your browser using DataLab