Google Action Basic卡响应锁定在Google Nest Hub上

问题描述 投票:0回答:1

我有一个Google Action,它会在回复中返回一张基本卡-例如。

  "basicCard": {
    "title": "A bunch of text for the title of this lengthx.",
    "formattedText": "*A bunch of formatted text of the following length xxxx xx xxxx, xxxxxxxxxxxx xxxx.",
    "image": {
      "imageUri": "https://domainname.com/imageurl.png",
      "accessibilityText": "Card Image"
    }

每次通话都归还卡。

最近在Google Nest Hub上,我开始看到以下行为:

  1. 我们通过“与[actionname]对话来启动动作,然后询问”是/否”
  2. [当下一个响应传递时,用户说“是”后,它开始显示关联的卡(与第一个响应中的卡相同),并且发生以下情况:

当卡滚动到位时,屏幕将锁定设备静置约10秒钟,然后开始读取响应(在服务器上,我们将返回150ms范围内的响应)然后显示建议筹码,但不接收语音输入并最终关闭]

该操作在无屏设备,测试装置和电话上运行都没有问题,因此问题似乎仅限于该设备。

有人看见过类似的东西吗?我们还有其他操作,其中显示卡上的文字和图像有所不同,而这些都没有任何问题。正如我之前所说,这在几周前还可以。

谢谢,Sanj

dialogflow actions-on-google
1个回答
0
投票

使用以下命令获取Dialogflow代理实现库(NodeJS):

yarn add dialogflow-fulfillment
OR
npm i --save dialogflow-fulfillment

然后在您的项目中需要它,并使用URL添加图像:

const { WebhookClient, Image } = require('dialogflow-fulfillment')
const agent = new WebhookClient({ request, response })
agent.add(
  new Image('https://avatars1.githubusercontent.com/u/36980416')
)
© www.soinside.com 2019 - 2024. All rights reserved.