- Hands-On Chatbot Development with Alexa Skills and Amazon Lex
- Sam Williams
- 321字
- 2021-07-16 17:45:07
Creating a conversation flow diagram
Now that we know the parts of a conversation flow diagram, let's create one. We'll use the same pizza order conversation that we used earlier.
Start at the very beginning of the conversation. Create a symbol for the user's first utterance. This first message from the user is a really important one as it will trigger an intent:

Now that the OrderPizza intent has been triggered, our chatbot can start asking the user about the pizza they want to order. We'll start by asking what topping they want and they reply with "Hawaiian":

Later on, we want to remember that they chose Hawaiian as their topping so we need to store this as a slot. We store the information against a slot name, so in this case, it will be topping = Hawaiian. As well as storing the slot, we need to carry on the conversation, asking them what size of pizza they want:

With the response from the user, we store the size in a slot and proceed to the next stage. We repeat the question, answer, slot process for the size of pizza the user wants.
Now that we have all of the information that we need, we need to tell the pizzeria that someone has ordered a medium Hawaiian pizza. For this, we'll use the action symbol and make sure to include the slots that are required. When we include slot information into anything, it is normal to write it as the slot name wrapped in curly braces.
As well as telling the pizzeria about the order, we need to let the user know that their order has been placed and tell them when to collect it. Again, we use the slot name wrapped in curly braces to customize the message with slot information:

- Aptana Studio Beginner's Guide
- 物聯(lián)網(wǎng)短距離無線通信技術(shù)應(yīng)用與開發(fā)
- 物聯(lián)網(wǎng)+BIM:構(gòu)建數(shù)字孿生的未來
- Socket.IO Real-time Web Application Development
- React:Cross-Platform Application Development with React Native
- 區(qū)塊鏈輕松上手:原理、源碼、搭建與應(yīng)用
- 2小時(shí)讀懂物聯(lián)網(wǎng)
- 光纖通信系統(tǒng)與網(wǎng)絡(luò)(修訂版)
- 新手易學(xué):新手學(xué)淘寶開店
- 物聯(lián)網(wǎng)與智能家居
- Guide to NoSQL with Azure Cosmos DB
- 移動(dòng)互聯(lián)網(wǎng)環(huán)境下的核心網(wǎng)剖析及演進(jìn)
- 想象的互動(dòng):網(wǎng)絡(luò)人際傳播中的印象形成
- Migrating to Drupal7
- 加密與解密實(shí)戰(zhàn)全攻略