Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dialogflow es Google Action基本卡响应锁定在Google Nest Hub上_Dialogflow Es_Actions On Google - Fatal编程技术网

Dialogflow es Google Action基本卡响应锁定在Google Nest Hub上

Dialogflow es Google Action基本卡响应锁定在Google Nest Hub上,dialogflow-es,actions-on-google,Dialogflow Es,Actions On Google,我有一个谷歌操作,返回一张基本卡片作为响应的一部分-例如 "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":

我有一个谷歌操作,返回一张基本卡片作为响应的一部分-例如

  "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上,我开始看到以下行为:

  • 我们通过“与[actionname]对话”启动该操作,然后询问“是/否”问题
  • 在下一个响应发出时,用户说“是”后,它开始显示关联的卡(与第一个响应中的卡相同),并发生以下情况:
  • 当卡片滚动到位时,屏幕锁定 设备放置约10秒钟,然后开始读取响应(在服务器上,我们返回的响应范围为150毫秒) 然后显示建议芯片,但不接收语音输入,最终关闭

    该操作在无屏幕设备、测试线束和手机上运行时不会出现问题,因此问题看起来只局限于设备

    有人见过类似的东西吗?我们有其他的行动,其中卡的文字和图像不同,这些都没有任何问题。正如我之前所说,这在几周前运作良好

    谢谢,
    Sanj

    使用以下命令获取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')
    )
    

    这是发生在任何图像上还是仅仅发生在你的图像上?嗨,德隆,欢迎来到stackoverflow。谢谢你的回答,遗憾的是,我不得不投反对票,因为OP声明这些卡在电话设备上运行良好,所以交换库不太可能是正确的答案。除此之外,Dialogflow库和您使用的代码将创建相同类型的卡响应,因此它可能不会更改任何内容。如果您有更多信息,请随时编辑您的答案,如果您需要更多的帮助,请查看帮助部分。德隆,谢谢你的建议-上面例子中的url只是一个例子-真实的卡片使用真实的图像-只是不包括它来保护我客户的机密性。由于这一切直到最近才开始工作,我怀疑谷歌Nest Hub最近的固件更新可能是罪魁祸首。