Tech Tips

  1. プログラミング
  2. 681 view

How to switch next slot by Lambda function with Amazon Lex V2

lex-branch-test
Recently I touch Amazon Lex (V2) and I wanted to switch next slot by Lambda function, but I couldn’t find any document about it. So, I left this memo to keep how to do it. The following screen shots are Bot behavior in Lex V2 console.

Setting slot in Lex V2 console

I set 3 slots. 1st one is to let user select phone number or email address. 1st one’s slot type is custom. I disabled PhoneNumber and EmailAddress slot’s option “Required for this intent”.
I wanted to show buttons to choose phone number or email address. So, I set card and buttons for 1st slot.

Lambda function code

Flow is controlled by Lambda function. Code is the following. By these settings and code, I could build a bot like above screen shots.

プログラミング recent post

  1. Run Amazon FreeRTOS on M5Stack Core2 for AWS …

  2. Udacity Self-Driving Car Engineer Nanodegree …

  3. How to draw circle/line/text, show tooltip an…

  4. I read Software Systems Architecture 2nd Edit…

  5. How to define my environment with TF-Agents

関連記事

PAGE TOP