![]() |
![]()
| ![]() |
![]()
NAMEPaws::LexModels::PutIntent - Arguments for method PutIntent on Paws::LexModels DESCRIPTIONThis class represents the parameters used for calling the method PutIntent on the Amazon Lex Model Building Service service. Use the attributes of this class as arguments to method PutIntent. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutIntent. SYNOPSISmy $models.lex = Paws->service('LexModels'); # To create an intent # This example shows how to create an intent for ordering pizzas. my $PutIntentResponse = $models.lex->PutIntent( 'ConclusionStatement' => { 'Messages' => [ { 'Content' => 'All right, I ordered you a {Crust} crust {Type} pizza with {Sauce} sauce.', 'ContentType' => 'PlainText' }, { 'Content' => 'OK, your {Crust} crust {Type} pizza with {Sauce} sauce is on the way.', 'ContentType' => 'PlainText' } ], 'ResponseCard' => 'foo' }, 'ConfirmationPrompt' => { 'MaxAttempts' => 1, 'Messages' => [ { 'Content' => 'Should I order your {Crust} crust {Type} pizza with {Sauce} sauce?', 'ContentType' => 'PlainText' } ] }, 'Description' => 'Order a pizza from a local pizzeria.', 'FulfillmentActivity' => { 'Type' => 'ReturnIntent' }, 'Name' => 'DocOrderPizza', 'RejectionStatement' => { 'Messages' => [ { 'Content' => 'Ok, I'll cancel your order.', 'ContentType' => 'PlainText' }, { 'Content' => 'I cancelled your order.', 'ContentType' => 'PlainText' } ] }, 'SampleUtterances' => [ 'Order me a pizza.', 'Order me a {Type} pizza.', 'I want a {Crust} crust {Type} pizza', 'I want a {Crust} crust {Type} pizza with {Sauce} sauce.' ], 'Slots' => [ { 'Description' => 'The type of pizza to order.', 'Name' => 'Type', 'Priority' => 1, 'SampleUtterances' => [ 'Get me a {Type} pizza.', 'A {Type} pizza please.', 'I'd like a {Type} pizza.' ], 'SlotConstraint' => 'Required', 'SlotType' => 'DocPizzaType', 'SlotTypeVersion' => '$LATEST', 'ValueElicitationPrompt' => { 'MaxAttempts' => 1, 'Messages' => [ { 'Content' => 'What type of pizza would you like?', 'ContentType' => 'PlainText' }, { 'Content' => 'Vegie or cheese pizza?', 'ContentType' => 'PlainText' }, { 'Content' => 'I can get you a vegie or a cheese pizza.', 'ContentType' => 'PlainText' } ] } }, { 'Description' => 'The type of pizza crust to order.', 'Name' => 'Crust', 'Priority' => 2, 'SampleUtterances' => [ 'Make it a {Crust} crust.', 'I'd like a {Crust} crust.' ], 'SlotConstraint' => 'Required', 'SlotType' => 'DocPizzaCrustType', 'SlotTypeVersion' => '$LATEST', 'ValueElicitationPrompt' => { 'MaxAttempts' => 1, 'Messages' => [ { 'Content' => 'What type of crust would you like?', 'ContentType' => 'PlainText' }, { 'Content' => 'Thick or thin crust?', 'ContentType' => 'PlainText' } ] } }, { 'Description' => 'The type of sauce to use on the pizza.', 'Name' => 'Sauce', 'Priority' => 3, 'SampleUtterances' => [ 'Make it {Sauce} sauce.', 'I'd like {Sauce} sauce.' ], 'SlotConstraint' => 'Required', 'SlotType' => 'DocPizzaSauceType', 'SlotTypeVersion' => '$LATEST', 'ValueElicitationPrompt' => { 'MaxAttempts' => 1, 'Messages' => [ { 'Content' => 'White or red sauce?', 'ContentType' => 'PlainText' }, { 'Content' => 'Garlic or tomato sauce?', 'ContentType' => 'PlainText' } ] } } ] ); # Results: my $checksum = $PutIntentResponse->checksum; my $conclusionStatement = $PutIntentResponse->conclusionStatement; my $confirmationPrompt = $PutIntentResponse->confirmationPrompt; my $createdDate = $PutIntentResponse->createdDate; my $description = $PutIntentResponse->description; my $fulfillmentActivity = $PutIntentResponse->fulfillmentActivity; my $lastUpdatedDate = $PutIntentResponse->lastUpdatedDate; my $name = $PutIntentResponse->name; my $rejectionStatement = $PutIntentResponse->rejectionStatement; my $sampleUtterances = $PutIntentResponse->sampleUtterances; my $slots = $PutIntentResponse->slots; my $version = $PutIntentResponse->version; # Returns a Paws::LexModels::PutIntentResponse object. Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see <https://docs.aws.amazon.com/goto/WebAPI/models.lex/PutIntent> ATTRIBUTESChecksum => StrIdentifies a specific revision of the $LATEST version. When you create a new intent, leave the "checksum" field blank. If you specify a checksum you get a "BadRequestException" exception. When you want to update a intent, set the "checksum" field to the checksum of the most recent revision of the $LATEST version. If you don't specify the " checksum" field, or if the checksum does not match the $LATEST version, you get a "PreconditionFailedException" exception. ConclusionStatement => Paws::LexModels::StatementThe statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function. This element is relevant only if you provide a Lambda function in the "fulfillmentActivity". If you return the intent to the client application, you can't specify this element. The "followUpPrompt" and "conclusionStatement" are mutually exclusive. You can specify only one. ConfirmationPrompt => Paws::LexModels::PromptPrompts the user to confirm the intent. This question should have a yes or no answer. Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the "OrderPizza" intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information. You you must provide both the "rejectionStatement" and the "confirmationPrompt", or neither. CreateVersion => BoolWhen set to "true" a new numbered version of the intent is created. This is the same as calling the "CreateIntentVersion" operation. If you do not specify "createVersion", the default is "false". Description => StrA description of the intent. DialogCodeHook => Paws::LexModels::CodeHookSpecifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction. For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, "GlutenIntolerant", to true. You might find John's phone number and set the corresponding session attribute. FollowUpPrompt => Paws::LexModels::FollowUpPromptAmazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the "OrderPizza" intent is fulfilled, you might prompt the user to order a drink. The action that Amazon Lex takes depends on the user's response, as follows:
The "followUpPrompt" field and the "conclusionStatement" field are mutually exclusive. You can specify only one. FulfillmentActivity => Paws::LexModels::FulfillmentActivityRequired. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, "fulfillmentActivity" defines how the bot places an order with a local pizza store. You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria). InputContexts => ArrayRef[Paws::LexModels::InputContext]An array of "InputContext" objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user. KendraConfiguration => Paws::LexModels::KendraConfigurationConfiguration information required to use the "AMAZON.KendraSearchIntent" intent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent (http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html). REQUIRED Name => StrThe name of the intent. The name is not case sensitive. The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called "AMAZON.HelpIntent", you can't create a custom intent called "HelpIntent". For a list of built-in intents, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) in the Alexa Skills Kit. OutputContexts => ArrayRef[Paws::LexModels::OutputContext]An array of "OutputContext" objects that lists the contexts that the intent activates when the intent is fulfilled. ParentIntentSignature => StrA unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) in the Alexa Skills Kit. RejectionStatement => Paws::LexModels::StatementWhen the user answers "no" to the question defined in "confirmationPrompt", Amazon Lex responds with this statement to acknowledge that the intent was canceled. You must provide both the "rejectionStatement" and the "confirmationPrompt", or neither. SampleUtterances => ArrayRef[Str|Undef]An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas". In each utterance, a slot name is enclosed in curly braces. Slots => ArrayRef[Paws::LexModels::Slot]An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works. SEE ALSOThis class forms part of Paws, documenting arguments for method PutIntent in Paws::LexModels BUGS and CONTRIBUTIONSThe source code is located here: <https://github.com/pplu/aws-sdk-perl> Please report bugs to: <https://github.com/pplu/aws-sdk-perl/issues>
|