简体   繁体   English

如何在Google HomeDialogflow中添加进度消息

[英]how to add progress message in google home dialogflow

In my conversation dialogflow, I would like to add some progress messages like hang in with me, I'm looking up for that data or similar in the conversation. 在我的对话对话框中,我想添加一些进度消息,例如hang in with me, I'm looking up for that data在对话中hang in with me, I'm looking up for that data或类似hang in with me, I'm looking up for that data Is there any guidance or best practice to do this? 有任何指导或最佳做法吗?

Unfortunately, there is no good way to do this at this time. 不幸的是,目前尚无好的方法。 If your webhook takes longer than about 5 seconds, Dialogflow will return one of the default responses it is set with. 如果您的Webhook花费的时间超过大约5秒钟,则Dialogflow将返回其设置的默认响应之一。 If you're not using Dialogflow, the Action SDK will say your webhook isn't responding and will close the conversation. 如果您不使用Dialogflow,则Action SDK会说您的Webhook没有响应,并会关闭对话。

There is currently no way to send a reply, and then send another reply without the user saying something first. 当前无法发送答复,然后再发送另一个答复,而无需用户先说些什么。

One workaround might be to have the default response be something like "I'm looking that information up. Ask me again in a few seconds." 一种解决方法是让默认响应为“我正在查找该信息。请在几秒钟后再次询问我”。 When your lookup finally completes, cache the information so when/if the user asks the question again, you can return it more quickly. 当您的查找最终完成时,请缓存信息,以便当/如果用户再次询问该问题,则可以更快地将其返回。

Depending how long it takes, you may also wish to register a dynamic reprompt . 根据所需的时间,您可能还希望注册一个动态提示 This will send an event to your webhook if the user doesn't say anything. 如果用户不说话,这会将事件发送到您的webhook。 In a situation like this, they may say nothing for a few seconds, but that may be long enough for you to have computed the reply. 在这种情况下,他们可能会在几秒钟内什么也没说,但是对于您计算回复的时间可能足够长。 So after a few seconds of silence you can suddenly announce "I've figured it out, the answer you were looking for is..." or something similar. 因此,在沉默了几秒钟之后,您可能会突然宣布“我已经解决了,您正在寻找的答案是……”或类似的内容。 This has some limitations - you can only reprompt twice like this before Google sends you a final reprompt and closes the conversation. 这有一些局限性-在Google向您发送最终提示并结束对话之前,您只能像这样两次提示。

Although the platform does support notifications , these are still in developer preview and don't work with all devices. 尽管该平台支持通知 ,但这些通知仍处于开发人员预览中,并且不适用于所有设备。 They also don't quite continue the conversation (it doesn't just start talking) - they just send a notification to a phone that there is a message and that they can restart the conversation. 他们还没有完全继续进行对话(它不只是开始交谈)-他们只是向电话发送一条通知,告知有消息并且可以重新开始对话。 Depending on your use case, this may be useful combined with the above. 根据您的用例,将其与上述内容结合使用可能会很有用。

Update 更新

The Media Response includes a feature that we can take advantage of to handle this. 媒体响应功能包括我们可以利用的功能。 Similar to the dynamic reprompt method above, you'll get a call automatically when the media you're playing ends. 与上面的动态提示方式类似,当您播放的媒体结束时,您会自动接到一个电话。 So you can play a short "hold music" and your webhook will be called when it is finished. 因此,您可以播放简短的“保持音乐”,并在完成后将调用网络挂钩。 You can then either give the result or say you're still working on it and play more hold music. 然后,您可以给出结果,或者说您仍在处理结果,并播放更多的保持音乐。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在谷歌对话流中添加多个链接建议卡 - How to add multiple linkout suggestion cards in google dialogflow DialogFlow:如何在使用 dialogflow python API 时自动添加参数 - DialogFlow: How to add parameter automatically when using the dialogflow python API 如何从 Google Dialogflow 连接到网站? - How to connect from Google Dialogflow to Website? 如何在dialogflow参数中添加日期选择器 - how to add date picker inside dialogflow parameters 如何在三次回退后使用 Dialogflow 抛出自定义消息 - How to throw a custom message using Dialogflow after three times of fallback DialogFlow ES - 如何让聊天机器人执行“独白”类型的消息 - DialogFlow ES - how to get chatbot to perform a "monologue" type message 无法解析Webhook JSON响应:找不到消息google.cloud.dialogflow.v2.WebhookResponse中的字段:responseId - Failed to parse webhook JSON response: Cannot find field: responseId in message google.cloud.dialogflow.v2.WebhookResponse 如何将 LiveChat Dashboard 与 Google Dialogflow 集成以进行代理交接? - How to integrate LiveChat Dashboard with Google Dialogflow for agents handoff? 如何使用 Dialogflow 将文本响应添加到自定义负载中 - How to add text response into custom payload using Dialogflow Google Dialogflow欢迎意图 - Google Dialogflow welcome intent
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM