[英]dialogflow - my fulfillment webhook does not receive a post request when testing from “google assistant integrations”
I'm a noob trying to write my first google assistant webhook using nodejs google action library. 我是一个菜鸟,尝试使用Node.js Google Action Library编写我的第一个Google Assistant Webhook。 While I have my service deployed and accessible with a curl command, I just cannot get it to be invoked from dialogFlow -> integrations -> GoogleAssistant -> Test console. 虽然我已经部署了服务并且可以使用curl命令访问它,但是我无法从dialogFlow->集成-> GoogleAssistant->测试控制台中调用它。
Also, please note that I haven't used google cloud functions or heroku for deployment. 另外,请注意,我尚未使用google cloud功能或heroku进行部署。 I have a GKE with fission Serverless functions for kubernetes installed. 我有一个装有裂变无服务器功能的GKE, 用于安装kubernetes 。 The webhook is a fission function Webhook是裂变函数
Some details of what I'm trying to do : 我正在尝试做的一些细节:
- In my dialogFlow app, I've tried to add the exact same intents, actions as mentioned in this post : https://developers.google.com/actions/dialogflow/first-app 在我的dialogFlow应用程序中,我尝试添加与本文中提到的完全相同的意图和操作: https : //developers.google.com/actions/dialogflow/first-app
- PFA screen shots of intents , fulfillment , integration and testing . PFA 意图 , 实现 , 集成和测试的屏幕截图。
- From the testing screen shot, after the app asks for my lucky number, its supposed to move on and ask my favorite color, which it doesnt do. 从测试屏幕截图中,在应用程序询问我的幸运数字之后,该应用程序应该继续运行并询问我最喜欢的颜色,而它不会这样做。
- Also, my function on the kubernetes cluster is not being invoked at all. 另外,我在kubernetes集群上的功能根本没有被调用。
My code, pasted below, for the function is a very small modification of the index.js from this post https://developers.google.com/actions/dialogflow/first-app 我为该函数粘贴的代码是对本文https://developers.google.com/actions/dialogflow/first-app的index.js的很小修改。
'use strict';
process.env.DEBUG = 'actions-on-google:*';
const App = require('actions-on-google').DialogflowApp;
const functions = require('firebase-functions');
// a. the action name from the make_name Dialogflow intent
const NAME_ACTION = 'make_name';
// b. the parameters that are parsed from the make_name intent
const COLOR_ARGUMENT = 'color';
const NUMBER_ARGUMENT = 'number';
module.exports = async function(context) {
const app = new App({request: context.request, response: context.response});
console.log('Request headers: ' + JSON.stringify(context.request.headers));
console.log('Request body: ' + JSON.stringify(context.request.body));
// c. The function that generates the silly name
function makeName (app) {
let number = app.getArgument(NUMBER_ARGUMENT);
let color = app.getArgument(COLOR_ARGUMENT);
app.tell('Alright, your silly name is ' +
color + ' ' + number +
'! I hope you like it. See you next time.');
}
// d. build an action map, which maps intent names to functions
let actionMap = new Map();
actionMap.set(NAME_ACTION, makeName);
app.handleRequest(actionMap);
}
Any input/pointers on how to debug this would be immensely beneficial. 任何有关如何调试它的输入/指针将是非常有益的。
Thanks. 谢谢。
I have the same issue, after posting some text with WebDemo UI. 使用WebDemo UI发布一些文本后,我遇到了同样的问题。 Google assistant start working with exact same text.I have no idea how to fix it. Google助手开始使用完全相同的文本。我不知道如何解决它。 but seems its integration bug, or threshold issue with intents detection for Google assistant 但似乎是其集成错误,或与Google助手的意图检测有关的阈值问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.