I haven't been able to create a Session Entity in Inline Editor, using this plugin: actions-on-google-dialogflow-session-entities-plugin.
I declared the variable/package:
const { sessionEntitiesHelper } = require('actions-on-google-dialogflow-session-entities-plugin');
Updated my json package
"dependencies": {
"actions-on-google": "^2.12.0",
"firebase-admin": "^6.4.0",
"firebase-functions": "^2.1.0",
"dialogflow": "^4.0.3",
"dialogflow-fulfillment": "^0.6.1",
"google-auth-library": "^1.6.1",
"googleapis": "^39.2.0",
"actions-on-google-dialogflow-session-entities-plugin": "^1.0.1"
But when I call the the function
let conv = agent.conv();
conv.sessionEntities.add({
name: 'processo',
entities: [{
value: 'descarte',
}, {
value: 'cobrança',
}]
});
conv.sessionEntities.send();
It says that: TypeError: Cannot read property 'sessionEntities' of null
Can't figure out how to make that work. I found lots of examples (even here) but no one implemented in Inline Editor.
Just a reminder, as I'm using Inline Editor, I'm inside these functions context:
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => {
const agent = new WebhookClient({ request, response });
So, examples like this one: https://cloud.google.com/dialogflow/docs/entities-session did not help.
Am I missing something?
Thanks for helping, I appreciate any clue...
Diego Mesquita