我正在使用Node.js Fulfillment (https://github.com/dialogflow/dialogflow-fulfillment-nodejs),我想集成de DialogflowConversation以访问用户存储。
我试着使用这个简单的代码:
let conv = agent.conv();
conv.ask("HEY");
agent.add(conv);但服务器出现故障,出现以下异常:
Error: No responses defined for platform: ACTIONS_ON_GOOGLE
at V2Agent.sendResponses_ (/srv/node_modules/dialogflow-fulfillment/src/v2-agent.js:243:13)
at WebhookClient.send_ (/srv/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:505:17)
at promise.then (/srv/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:316:38)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)我目前正在使用这个库:
"dependencies": {
"firebase-admin": "^5.13.1",
"firebase-functions": "^2.0.2",
"dialogflow-fulfillment": "^0.6.1",
"actions-on-google": "^2.5.0",
"i18n": "^0.8.3"
}我做错了什么?
谢谢
发布于 2018-12-20 20:37:25
我猜this就是您正在做的事情,导致了所说的错误。试着只在google上使用actions on-google。
这应该可以解决您的错误:
agent.add("HEY");要访问user storage,请使用actions-on-google库,如下所示:
'use strict';
const {
dialogflow,
} = require('actions-on-google'); // Import the firebase-functions package for deployment.
const functions = require('firebase-functions'); // Instantiate the Dialogflow client.
const app = dialogflow({
debug: true
});
app.intent('WELCOME', (conv) => {
conv.data.count = 1;
conv.ask('Hi there, what can I help you with today?');
});发布于 2018-12-21 00:13:34
检查对话框repo fulfillment nodejs github代码库中类似的问题#151和#160。它似乎正在解决您的问题。也许您可以加入其中并提供见解,或者暂时使用可能解决您的问题的分支:https://github.com/dialogflow/dialogflow-fulfillment-nodejs/commit/c5f1555e05d4abbc20dd9b39f6edf88249fe4aa1 (在PR #179中引用)
npm install --save dialogflow/dialogflow-fulfillment-nodejs#c5f155如果你只计划支持Google Assistant作为一个集成,最好使用actions-on-google SDK。它对响应和交互有更丰富的支持。
https://stackoverflow.com/questions/53864255
复制相似问题