react-native-dialogflow | Native Bridge for the Google Dialogflow | Artificial Intelligence library
kandi X-RAY | react-native-dialogflow Summary
kandi X-RAY | react-native-dialogflow Summary
A React-Native Bridge for the Google Dialogflow (API.AI) SDK
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Add items to Form
- Adds an item to the form .
react-native-dialogflow Key Features
react-native-dialogflow Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-dialogflow
QUESTION
I am building a chatbot app using react native and dialogflow. I have the general chatbot working (code below). My next step is that I want to store the user's name (using react native) on their device (this I know how to do) and also send this name to dialogflow so that the bot can respond with the user's name (No idea how to do this last step). I have done a lot of research on how to accomplish this, and perhaps I am just too new to dialogflow, but I have failed to figure out how to do this. From what I have gathered, I believe I will need to set an entity from my react.js files, which then can be accessed as a parameter in dialogflow. I see that the react native module dialogflow has a setEntity method, but with dialogflow_V2, this has been moved from /setEntity to sessions.setEntityType. I am totally confused on how I would implement this in dialogflow_V2 (and how "/" differs from "sessions."). I noticed that when I send a query request, there is a java object returned that has a session key. Do I need to somehow use this session key to use setEntityType, and if so, would this not only be applied on particular queries? Any clarification or guidance would be very much appreciated. Thank you.
The main screen for my chatbot is provided as code below (note it uses the new functional component style, not yet as commonly seen as using classes). To run this, one would have to connect this screen to the app.js file using react-navigation, and create a env.js file (sensitive information), that can be accessed from dialogflow. A nice tutorial for how to do this using classes is in this link: https://blog.jscrambler.com/build-a-chatbot-with-dialogflow-and-react-native/
...ANSWER
Answered 2020-Jun-04 at 01:32Entities are probably not what you want. These are types that are used to determine possible values for parameters in matched Intents.
Instead, you can pass additional values that the fulfillment webhook might use as a Context parameter.
So your code might look something like
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-dialogflow
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page