点击Google助手列表始终会首次触发后备意图 [英] Tapping on google assistant list always fires fallback intent for the first time

查看:62
本文介绍了点击Google助手列表始终会首次触发后备意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Dialogflow代理正在使用 Google Rich Message上的操作列表响应对象在Google Assistant平台上显示选项。

My Dialogflow agent is using an 'Actions on Google Rich Message' List response object to display options on the Google Assistant platform.

列表选项在测试时可以完美地工作在Dialogflow控制台上。但是,在移动设备上通过Google Assistant模拟器或Google Assistant应用进行测试时,列表选项在首次尝试时不起作用。仅在第二次选择选项时有效。下面是生成列表的我的意图代码。

The list options work perfectly when testing on the Dialogflow console. However, when testing through the Google Assistant Simulator or Google Assistant app on a mobile device, the list option does not work on the first try. It works only when selecting an option the second time. Below is my intent code which generates the list.

app.intent('Default Welcome Intent', conv => {
    conv.ask('Hi welcome to micro strategy. I am Emily, your virtual assistant. Please tell me how can I help you');
    conv.ask(new List({
        title: 'Please choose',
        items: {
            ['SELECTION_KEY_GET_CALENDAR_EVENTS']: {
                synonyms: [
                    'Get calendar events',
                ],
                title: 'Get calendar events',
                description: 'Lets you retrieve calendar events',
            },
            ['SELECTION_KEY_MODIFY_EVENTS']: {
                synonyms: [
                    'Modify calendar events',
                ],
                title: 'Modify calendar events',
                description: 'Lets you modify calendar events'
            },
        },
    }));
});

任何指导将不胜感激。

推荐答案

这是因为您必须具有处理 actions_intent_OPTION 事件的意图,这是您首次触摸时触发的事件列表中的元素。

This is because you must have an intent that handles the actions_intent_OPTION event, which is what is fired when you touch for the first time an element in the list.

列表/轮播总是触发该事件。如果没有任何意图可以处理 actions_intent_OPTION 事件,则对话将转到回退意图。

Lists / Carousel always fire that event. If no intents can handle the actions_intent_OPTION event, then the conversation goes to the Fallback intent.

请参阅< a href = https://developers.google.com/actions/assistant/responses#list rel = nofollow noreferrer>文档,列表>要求>交互>语音/文字必须有用于处理actions_intent_OPTION事件的触摸输入

让我知道是否有帮助,Marco

Let me know if it helps, Marco

这篇关于点击Google助手列表始终会首次触发后备意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆