Reputation: 929
I'm trying to connect my web client (written in Reactjs) to DialogFlow. I tried using the soon to be defunct javascript api. When I tried to import ApiAiClient
into my project, the website failed to render, saying that there was no such class in the library I was attempting to import it from, which was api-ai-javascript
. Is there any way to connect the web client directly to DialogFlow? I noticed the V2 libraries include node.js, but importing the node.js library that doesn't seem to work. I'm aware that connecting my client to firebase would enable me to use cloud functions and that's what I could use to connect my web client to dialogflow but I'm trying to set this thing up as cheaply as possible and cloud functions would only be another expense.
Upvotes: 2
Views: 726
Reputation: 159
If you want the dialogflow agent to be incorporated into your React Js web client you have two ways:
One is to incorporate SDK dialogflow into your own website which needs a lot of coding. You do need to build your own user interface to read and view messages after calling the dialogflow API for responses, which is a tedious process
Another option is to use a third-party method to incorporate into the Dialogflow. I would recommend kommunicate where you just need to copy the javascript file and add it in your react js component, also you can enable rich responses for chat widget with Dialogflow bot in your React JS websites. You can also customize the chat widget to suit the colours and theme of your website. Please check the link for more info
Upvotes: 1
Reputation: 929
as far as I know the node.js api must be used. The client can be connected to dialog flow via cloud functions
Upvotes: 0