我有一个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上,我开始看到以下行为:
当卡滚动到位时,屏幕将锁定设备静置约10秒钟,然后开始读取响应(在服务器上,我们将返回150ms范围内的响应)然后显示建议筹码,但不接收语音输入并最终关闭]
该操作在无屏设备,测试装置和电话上运行都没有问题,因此问题似乎仅限于该设备。
有人看见过类似的东西吗?我们还有其他操作,其中显示卡上的文字和图像有所不同,而这些都没有任何问题。正如我之前所说,这在几周前还可以。
谢谢,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')
)