"Build an Interactive Story App with Swift" was retired on May 31, 2020.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Build a Chatbot with Watson APIs!
You have completed Build a Chatbot with Watson APIs!
Preview
Next we will create a dialog, which is the control structure for how our chatbot responds when given intents and entities are detected.
Documentation
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
We will now create a dialogue,
which is the control structure of how
0:00
our chatbot will respond when given
intents and entities are detected.
0:05
We create a dialogue branch for
each intent and we define,
0:10
then enter a condition for it.
0:15
Like which appliance the intent is for,
and then enter a response.
0:19
In our turning things on example,
0:25
let's plan a dialogue around
the phrases turn on the radio.
0:28
To start we can actually kick off a dialog
with some kind of a simple greeting like
0:33
hi, I'm here to help.
0:37
The user can then say what they want and
0:39
our dialogue will route to
one of the few responses.
0:42
Sometimes our chatbot will need more
information than a user first gives.
0:46
In these scenarios,
0:51
we can use the dialogue flow to
prompt the user for more information.
0:52
This is really helpful for
more complex interactions.
0:57
But we'll demonstrate it in our dialog.
1:00
Then let's close our dialogue box and
let's click the dialogue tab.
1:04
Okay, we're ready to create a new dialog.
1:11
>> All right, I'll click create here.
1:14
>> Notice something, off the bat you
are provided with two dialog boxes.
1:15
A welcome and then anything else.
1:20
The anything else is really a de facto
box in which all others are moved to.
1:23
It's good to have it here.
1:30
We use that, but
let's begin with the welcome dialog box.
1:31
Well, if the dialog box
recognizes welcome,
1:37
perhaps may even want to go back in our
intents and create a few greetings.
1:40
But right now if it does
recognize a welcome entity,
1:45
how would we want to respond?
1:51
Hello, can I help you for example.
1:53
Would you like to add
a variation to this response?
1:55
>> Sure, let's say hi,
what can I do for you?
1:59
Okay, and looks like down here at this
point we will appropriately wait for
2:08
user input.
2:13
Although I guess we could say
that we could jump to other
2:14
nodes in the dialog if
we wanted to specify.
2:17
>> Very good point that you brought up.
2:19
Yes, this helps us to stay
within context and not always
2:21
revert back to the very beginning or
to the root of the tree branch,
2:26
but stay within the nodes and
keep context of the conversation.
2:32
>> Cool, yeah, very important.
2:37
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up