-
Notifications
You must be signed in to change notification settings - Fork 280
Error: No responses defined for platform: DIALOGFLOW_CONSOLE #322
Comments
In my case I had to return an agent. Also make sure your Google Development account is activated with billing information. In trial mode remote call's are not allowed. "webhookStatus": { If an error is shown chances are your account is not acitvated. This took me a couple of days myself, billing information was defined but account was still in trial model, once activated the error No responses defined for platform: DIALOGFLOW_CONSOLE was gone! |
I was struggling with this error for hours, only to find out I needed to change these 2 little things:
|
Thanks A LOT! |
Hi guys! I'm new to nodejs and dialogflow and am getting this exact same error when trying to integrate my GPT-J from banana with Dialogflow, below is my codes and I would really appreciate any help 🙏🙏
|
When I tried to use Dialogflow to update google Sheets using Axios. I met the same error, but an expert helps me fix the issue via the following code: const functions = require('firebase-functions'); process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => { function welcome(agent) { function fallback(agent) { function bookkeepingHandler(agent) { |
Pay attention to the code here (`` symbol is very important): |
Hi All,
I am trying to read data from an API in Dialogflow. Below is the code but I am getting the following error and it looks like I have defined my responses in agent.add but still getting the following error. I am not a java expert but trying to learn and maybe I am doing some syntax error. I am not sure but I would appreciate your time and help. Following are errors i am getting:
My code is below:
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs
// for Dialogflow fulfillment library docs, samples, and to report issues
'use strict';
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
const {Card, Suggestion} = require('dialogflow-fulfillment');
const axios = require('axios');
process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => {
const agent = new WebhookClient({ request, response });
console.log('Dialogflow Request headers: ' + JSON.stringify(request.headers));
console.log('Dialogflow Request body: ' + JSON.stringify(request.body));
function getSpreadsheetData(){
return axios.get('https://sheetdb.io/api/v1/y79vpk8pj29cv');
}
function welcome(agent) {
const city =agent.parameters.city;
return getSpreadsheetData().then(res => {
res.data.map(person => {
if(person.City === city)
agent.add(
Here are the details for ${"city"}.CollectionC: ${person.CollectionC}, Address: ${person.Address}, Phone: ${person.Phone}
);});
});
}
function fallback(agent) {
agent.add(
I didn't understand
);agent.add(
I'm sorry, can you try again?
);}
// // Uncomment and edit to make your own intent handler
// // uncomment
intentMap.set('your intent name here', yourFunctionHandler);
// // below to get this function to be run when a Dialogflow intent is matched
// function yourFunctionHandler(agent) {
// agent.add(
This message is from Dialogflow's Cloud Functions for Firebase editor!
);// agent.add(new Card({
// title:
Title: this is a card title
,// imageUrl: 'https://developers.google.com/actions/images/badges/XPM_BADGING_GoogleAssistant_VER.png',
// text:
This is the body text of a card. You can even use line\n breaks and emoji! 💁
,// buttonText: 'This is a button',
// buttonUrl: 'https://assistant.google.com/'
// })
// );
// agent.add(new Suggestion(
Quick Reply
));// agent.add(new Suggestion(
Suggestion
));// agent.setContext({ name: 'weather', lifespan: 2, parameters: { city: 'Rome' }});
// }
// // Uncomment and edit to make your own Google Assistant intent handler
// // uncomment
intentMap.set('your intent name here', googleAssistantHandler);
// // below to get this function to be run when a Dialogflow intent is matched
// function googleAssistantHandler(agent) {
// let conv = agent.conv(); // Get Actions on Google library conv instance
// conv.ask('Hello from the Actions on Google client library!') // Use Actions on Google library
// agent.add(conv); // Add Actions on Google library responses to your agent's response
// }
// // See https://github.com/dialogflow/fulfillment-actions-library-nodejs
// // for a complete Dialogflow fulfillment library Actions on Google client library v2 integration sample
// Run the proper function handler based on the matched Dialogflow intent name
let intentMap = new Map();
intentMap.set('Default Welcome Intent', welcome);
intentMap.set('Default Fallback Intent', fallback);
// intentMap.set('your intent name here', yourFunctionHandler);
// intentMap.set('your intent name here', googleAssistantHandler);
agent.handleRequest(intentMap);
});
The text was updated successfully, but these errors were encountered: