This tutorial shows the difference between wait actions and non-wait actions in the Conversation Learner.
This tutorial requires that the general tutorial bot is running
npm run tutorial-general
- Wait action: After the system takes a "wait" action, it will stop taking actions and wait for user input.
- Non-wait action: After the system takes a "non-wait" action, it will immediately choose another action (without waiting for user input).
- In the Web UI, click New Model
- In the "Name" field, type "Wait Non-Wait", hit enter or click the "Create" button.
- On the left panel, click "Actions", then the "New Action" button.
- In the "Bot's response..." field, type "What pizza would you like?".
- This is a Wait action, so leave the "Wait for Response" box checked.
- Click the "Create" button.
- Repeating those steps, create another action with "Pizza on the way!" as the Bot's response.
- On the left panel, click "Train Dialogs", then the "New Train Dialog" button.
- In the chat panel, where it says "Type your message...", type in "Hi".
- This simulates the user's side of the conversation.
- Click the "Score Actions" button.
- Select the response, "What pizza would you like?".
- As the user, respond with, "Margherita".
- Click the "Score Actions" button.
- Select the response, "Pizza on the way!".
- Click the "Save" button.
Although you could create the Non-Wait Action like you did earlier, you can also create it from within a Training session.
- Click the "New Train Dialog" button.
- As the user type in, "Hello".
- Click the "Score Actions" button.
- Click on the "+ Action" button.
- This will take you to the familiar "Create an Action" dialog box.
- Type in the Bot's response as, "Welcome to Pizza Bot!"
- Un-check the "Wait for Response" check-box.
- Click the "Create" button.
- Notice that the Bot responds immediately with, "Welcome to Pizza Bot!" and that you are again prompted for another Bot response. This is because the Bot's response was the Non-Wait Action we just created.
- Select the response, "What pizza would you like?".
- As the user, respond with, "Margherita".
- Click the "Score Actions" button.
- Select the response, "Pizza on the way!".
- Click the "Save" button.
Note
The sequence of the bot responses with regards to wait and non-wait actions.
[!div class="nextstepaction"] Introduction to entities