Skip to content Skip to sidebar Skip to footer

Dialogflow Agent Works In Google Simulator, Failed In Console And Web Link

I am using Dialogflow V2 API. Everything works perfectly in testing via Actions on Google simulator. Please find pic attached. However, when attempted using the console (right colu

Solution 1:

I actually wrote in to Dialogflow's support team to seek help. I spoke with Riel, who was very helpful. Please see his reply below:

Your agent works as expected in Actions on Google Simulator because the library you used is specifically for Actions on Google. The library you've been using is Actions on Google Node.js client library.

If you want to also use the web demo integration for your responses, you can use Dialogflow’s fulfillment library that has an integration with the Google Assistant using AoG client library.

You can refer to this example code for your fulfillment. 'use strict';

const functions = require('firebase-functions');
const { WebhookClient } = require('dialogflow-fulfillment');

process.env.DEBUG = 'dialogflow:debug';

exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => {
const agent = newWebhookClient({ request, response });

functionwelcome(agent) {
let conv = agent.conv();
conv.ask('Welcome to my agent!');
agent.add(conv);
}

let intentMap = newMap();
intentMap.set('Default Welcome Intent', welcome);
agent.handleRequest(intentMap);
});

Dialogflow's support team is very helpful and their replies are very quick. I recommend you to write in since everyone's issue is different and quite specific! You can reach them at support@dialogflow.com

Post a Comment for "Dialogflow Agent Works In Google Simulator, Failed In Console And Web Link"