Comments (2)
Given where the middleware is called in the Botkit receive pipeline, it doesn't seem practical to do this at the request level; it would need to be applied to all incoming messages consistently.
One option is to accept an array of types
in the middleware config, and skip NLP evaluation if the message.type
is a match. This is sort of how it works today, though the types are hard coded; specifically we bypass the NLP if the text
field is missing, or if the message.type
is self_message
.
By comparison, the Watson connector also filters out the Slack-specific presence_change
and reconnect_url
types. The other NLP connectors are generally naive and send almost everything to the NLP service for evaluation.
It would be cleaner to simply provide a configuration property, with defaults. Usage would be as follows:
var dialogflowMiddleware = require('botkit-middleware-dialogflow')({
token: process.env.dialogflow,
ignoreType: ['self_message', 'facebook_postback']
});
Is that what you had in mind? @peterswimm, any preference?
from botkit-middleware-dialogflow.
Yes, that's what I had in mind 👍 I also see that this should be applied to all messages consistently.
The payload of the postback could be a JSON structure for example (we do this in our case to pass on context information), so passing some JSON data to Dialogflow wouldn't make sense.
from botkit-middleware-dialogflow.
Related Issues (20)
- Update to uuid module HOT 1
- projectId is undefined when passed as a config option HOT 1
- 404 error when getting reply from dialogflow HOT 2
- newlines disappering HOT 1
- outputContexts HOT 1
- Build failed with botkit-middleware-dialogflow module HOT 2
- Reliance on keyfile is a problem for deployment HOT 1
- Doesn't work action() HOT 2
- Unable to do basic web integration, request for example HOT 3
- message bigger than 256 caracters break the pipeline
- Problem accessing dialogflow intent with Botkit v4.0.1 HOT 2
- The module seems to be only detecting whether an agent existing in US (global) location
- suggestions
- Any plans to support the v2 dialogflow api? HOT 2
- This module stops working after updating botkit verion to 0.6.9 HOT 11
- Middleware does not accept regex to match intents HOT 1
- botkit+bot framework+dialogflow HOT 1
- Regarding Dialogflow's V2 API HOT 2
- Images in the readme cannot be loaded HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botkit-middleware-dialogflow.