Fireship · @fireship
Angular Chatbot with Dialogflow (API.ai)
Uploaded October 22, 2017 · Length 11:38
Summary
build an angular chatbot with dialogflow (api.ai) in 10 minutes, using the javascript sdk and angular cli
- angular chatbot
- dialogflow api.ai
- javascript sdk
- angular cli
- conversational experiences
- machine learning
- natural language processing
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
building a chatbot with angular and
- 0:01
dialogue flow is almost too easy
- 0:04
in this video I'm going to show you how
- 0:05
to go from zero to chatbot in about 10
- 0:07
minutes
- 0:08
dialogue flow which was formerly known
- 0:10
as API AI is an engine for building
- 0:13
conversational experiences it harnesses
- 0:15
Google's machine learning and natural
- 0:17
language processing technology then
- 0:19
gives developers a user-friendly
- 0:21
interface to build chat BOTS and deploy
- 0:23
them to any platform including the web
- 0:25
or slack or facebook Messenger in this
- 0:28
episode we're going to use the
- 0:29
JavaScript SDK to build our chat BOTS
- 0:31
directly in angular this is just the
- 0:33
first video of a multi-part series so
- 0:35
make sure to subscribe if you're just
- 0:36
finding me for the first time and head
- 0:38
over to angular firebase comm to grab
- 0:40
the source code for this feature let's
- 0:43
start by building a new angular app from
- 0:44
the command line using ng new chat bot
- 0:47
and then we'll CD into that folder then
- 0:49
we'll install the JavaScript SDK via NPM
- 0:52
in the development environment at this
- 0:54
point the SDK is still called API AI but
- 0:57
that may change to dialogue flow in the
- 0:59
future then I'm going to tell the
- 1:00
angular CLI to not prefix our components
- 1:03
with app so we can just go into the
- 1:05
angular CLI JSON file and replace app
- 1:08
with an empty string so at this point if
- 1:10
you run ng serve you should just have a
- 1:12
basic angular app the next step is to
- 1:14
flesh out a feature module for our code
- 1:16
this step is technically optional but it
- 1:19
is a good practice and it will make your
- 1:20
life a lot easier as your app grows more
- 1:22
complex the first step is to generate a
- 1:24
module called chat and we can add
- 1:27
resources to this module for example a
- 1:29
service and we'll use the M flag to make
- 1:31
sure that it's included in this module
- 1:33
and then we'll also create a component
- 1:35
called chat dialogue and placed that in
- 1:37
the module as well you can see on the
- 1:39
file structure on the Left how all of
- 1:41
our resources are nested under the chat
- 1:43
folder and components and services are
- 1:45
registered inside the chat module the
- 1:47
only extra bit that we need to add is
- 1:49
the angular forms module and then we're
- 1:51
also going to set our chat dialogue
- 1:53
component to exports so it can be used
- 1:55
directly in the app component you might
- 1:57
also do this with the router but our app
- 1:59
doesn't have a router so we're not going


