问题描述
我正在使用Dialogflow V2 API。
在通过Google模拟器上的Actions进行测试时,所有功能都能完美运行。请找到所附图片。
但是,当尝试使用Dialogflow中的控制台(右列)以及Web集成链接时,它不起作用。
Agent可以从用户输入中检测到适当的实体,但无法调用在webhook中声明的intent。
公共链接代理的图像(失败):
在webhook js文件和控制台中声明的响应图像:
请在下面找到我的index.js Webhook的一部分。我正在使用Dialogflow的嵌入式编辑器。
'use strict'; const functions = require('firebase-functions')const {dialogflow} = require('actions-on-google')const app = dialogflow()app.intent('Default Welcome Intent',conv => {conv.ask('Welcome to Zera!我们提供药物和药品方面的建议。今天似乎困扰您的是'?}})app.intent('QSpecific Problem',(conv,{SpecificProb})=> {conv.contexts.set('specificprob ',10,{SpecificProb:SpecificProb})conv.ask(`您以前有过这些问题吗?`)})app.intent('QRecurring',(conv,{Recurring})=> {conv.contexts.set ('recurring',10,{Recurring:Recurring})if(Recurring === Recur){conv.ask(`您是否为此服用了药物?);} else {const specProb = conv.contexts。 get('specificprob')conv.ask(`How l和你有没有这个$ {specProb.parameters.SpecificProb}?`}})exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app)
我实际上写信给Dialogflow的支持团队以寻求帮助。我和瑞尔(Riel)进行了交谈,后者非常有帮助。请在下面查看他的答复:
Dialogflow的支持团队非常有帮助,他们的回复很快。我建议您写信,因为每个人的问题都不一样,而且很具体!您可以通过
与他们联系。
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 column) within Dialogflow, and also the web integration link, it does not work.
Agent is able to detect appropriate entity from user input, but unable to call intent declared in webhook.https://bot.dialogflow.com/acc64a26-8d1d-4459-8ce0-24c890acb6d7
I have attempted to post in Dialogflow forum but there was an error posting. Similar case for raising support withing Dialogflow.
Image of Google simulator agent (works):
Image of public link agent (fails):
Image of Response declared in both webhook js file and within console:
Please find part of my index.js webhook below. I am using Dialogflow's inline editor.
'use strict';
const functions = require('firebase-functions')
const { dialogflow } = require('actions-on-google')
const app = dialogflow()
app.intent('Default Welcome Intent', conv => {
conv.ask('Welcome to Zera! We provide medicine and drug advice. What seems to be bothering you today?')
})
app.intent('QSpecific Problem', (conv, {SpecificProb}) => {
conv.contexts.set('specificprob', 10, {SpecificProb: SpecificProb})
conv.ask(`Do you have these problems before?`)
})
app.intent('QRecurring', (conv, {Recurring}) => {
conv.contexts.set('recurring', 10, {Recurring: Recurring})
if (Recurring === "Recur") {
conv.ask(`Have you taken any medication for this?`);
} else {
const specProb = conv.contexts.get('specificprob')
conv.ask(`How long have you been having this ${specProb.parameters.SpecificProb}?`)
}
})
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app)
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:
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 [email protected]
这篇关于Dialogflow代理可在Google模拟器中使用,在控制台和Web链接中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!