NAME
Paws::LexRuntimeV2 - Perl Interface to AWS Amazon Lex Runtime V2
SYNOPSIS
use Paws;
my $obj = Paws->service('LexRuntimeV2');
my $res = $obj->Method(
Arg1 => $val1,
Arg2 => [ 'V1', 'V2' ],
# if Arg3 is an object, the HashRef will be used as arguments to the constructor
# of the arguments type
Arg3 => { Att1 => 'Val1' },
# if Arg4 is an array of objects, the HashRefs will be passed as arguments to
# the constructor of the arguments type
Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
);
DESCRIPTION
For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/runtime-v2-lex-2020-08-07
METHODS
DeleteSession
Each argument is described in detail in: Paws::LexRuntimeV2::DeleteSession
Returns: a Paws::LexRuntimeV2::DeleteSessionResponse instance
Removes session information for a specified bot, alias, and user ID.
You can use this operation to restart a conversation with a bot. When you remove a session, the entire history of the session is removed so that you can start again.
You don't need to delete a session. Sessions have a time limit and will expire. Set the session time limit when you create the bot. The default is 5 minutes, but you can specify anything between 1 minute and 24 hours.
If you specify a bot or alias ID that doesn't exist, you receive a BadRequestException.
If the locale doesn't exist in the bot, or if the locale hasn't been enables for the alias, you receive a BadRequestException
.
GetSession
Each argument is described in detail in: Paws::LexRuntimeV2::GetSession
Returns: a Paws::LexRuntimeV2::GetSessionResponse instance
Returns session information for a specified bot, alias, and user.
For example, you can use this operation to retrieve session information for a user that has left a long-running session in use.
If the bot, alias, or session identifier doesn't exist, Amazon Lex V2 returns a BadRequestException
. If the locale doesn't exist or is not enabled for the alias, you receive a BadRequestException
.
PutSession
- BotAliasId => Str
- BotId => Str
- LocaleId => Str
- SessionId => Str
- SessionState => Paws::LexRuntimeV2::SessionState
- [Messages => ArrayRef[Paws::LexRuntimeV2::Message]]
- [RequestAttributes => Paws::LexRuntimeV2::StringMap]
- [ResponseContentType => Str]
Each argument is described in detail in: Paws::LexRuntimeV2::PutSession
Returns: a Paws::LexRuntimeV2::PutSessionResponse instance
Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot.
RecognizeText
- BotAliasId => Str
- BotId => Str
- LocaleId => Str
- SessionId => Str
- Text => Str
- [RequestAttributes => Paws::LexRuntimeV2::StringMap]
- [SessionState => Paws::LexRuntimeV2::SessionState]
Each argument is described in detail in: Paws::LexRuntimeV2::RecognizeText
Returns: a Paws::LexRuntimeV2::RecognizeTextResponse instance
Sends user input to Amazon Lex V2. Client applications use this API to send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the machine learning model that it build for the bot.
In response, Amazon Lex V2 returns the next message to convey to the user and an optional response card to display.
RecognizeUtterance
- BotAliasId => Str
- BotId => Str
- LocaleId => Str
- RequestContentType => Str
- SessionId => Str
- [InputStream => Str]
- [RequestAttributes => Str]
- [ResponseContentType => Str]
- [SessionState => Str]
Each argument is described in detail in: Paws::LexRuntimeV2::RecognizeUtterance
Returns: a Paws::LexRuntimeV2::RecognizeUtteranceResponse instance
Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets the user input using the machine learning model built for the bot.
The following request fields must be compressed with gzip and then base64 encoded before you send them to Amazon Lex V2.
requestAttributes
sessionState
The following response fields are compressed using gzip and then base64 encoded by Amazon Lex V2. Before you can use these fields, you must decode and decompress them.
inputTranscript
interpretations
messages
requestAttributes
sessionState
The example contains a Java application that compresses and encodes a Java object to send to Amazon Lex V2, and a second that decodes and decompresses a response from Amazon Lex V2.
StartConversation
- BotAliasId => Str
- BotId => Str
- LocaleId => Str
- RequestEventStream => Paws::LexRuntimeV2::StartConversationRequestEventStream
- SessionId => Str
- [ConversationMode => Str]
Each argument is described in detail in: Paws::LexRuntimeV2::StartConversation
Returns: a Paws::LexRuntimeV2::StartConversationResponse instance
Starts an HTTP/2 bidirectional event stream that enables you to send audio, text, or DTMF input in real time. After your application starts a conversation, users send input to Amazon Lex V2 as a stream of events. Amazon Lex V2 processes the incoming events and responds with streaming text or audio events.
Audio input must be in the following format: audio/lpcm sample-rate=8000 sample-size-bits=16 channel-count=1; is-big-endian=false
.
The StartConversation
operation is supported only in the following SDKs:
AWS SDK for C++ (https://docs.aws.amazon.com/goto/SdkForCpp/runtime.lex.v2-2020-08-07/StartConversation)
AWS SDK for Java V2 (https://docs.aws.amazon.com/goto/SdkForJavaV2/runtime.lex.v2-2020-08-07/StartConversation)
AWS SDK for Ruby V3 (https://docs.aws.amazon.com/goto/SdkForRubyV3/runtime.lex.v2-2020-08-07/StartConversation)
PAGINATORS
Paginator methods are helpers that repetively call methods that return partial results
SEE ALSO
This service class forms part of Paws
BUGS and CONTRIBUTIONS
The source code is located here: https://github.com/pplu/aws-sdk-perl
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues