From e8f94725e57df24eefda088e08619492caf8ca15 Mon Sep 17 00:00:00 2001 From: Adam Reis Date: Sun, 7 Oct 2018 19:46:39 +1300 Subject: [PATCH] Expose original response from DialogFlow We need the original response from DialogFlow for further processing. This PR exposes that response (`detection`) in the `event.nlu` object as `original`. --- functionals/botpress-nlu/src/providers/dialogflow.js | 1 + 1 file changed, 1 insertion(+) diff --git a/functionals/botpress-nlu/src/providers/dialogflow.js b/functionals/botpress-nlu/src/providers/dialogflow.js index 9cdd1f2..0c8beac 100644 --- a/functionals/botpress-nlu/src/providers/dialogflow.js +++ b/functionals/botpress-nlu/src/providers/dialogflow.js @@ -75,6 +75,7 @@ export default class DialogflowProvider extends Provider { return { intent, intents: [intent], + original: detection, entities: entities.map(entity => ({ name: entity.name, // usually the entity name, but can be modified type: entity.name, // when parameter name modified dialogflow doesn't give the original entity name