Oma*_*aei 2 actions-on-google google-assistant-sdk dialogflow-es
我已经有了一个webhook,我用它来改变助手的答案.但我无法弄清楚如何发送建议卡或链接,因为您可以从API.AI Web GUI(从添加内容按钮)发送它们.
我应该JSON object
以data
名义发送它们吗?
响应API.AI实现webhook调用的JSON主体的一般形式,其中包括针对简单响应和卡的Google丰富响应操作,如下所示.如果你想使用列表或轮播,文档在这里:
{
"speech": "This is a API.AI default speech response",
"displayText": "This is a API.AI default display text response",
"data": {
"google": {
"expectUserResponse": true,
"isSsml": false,
"noInputPrompts": [],
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "This is a simple speech response for Actions on Google.",
"displayText": "This is a simple display text response for Action on Google."
}
},
{
"basicCard": {
"title": "Title: this is a title",
"subtitle": "This is a subtitle",
"formattedText": "This is a basic card. Text in a basic card can include \"quotes\" and most other unicode characters including emoji . Basic cards also support some markdown formatting like *emphasis* or _italics_, **strong** or __bold__, and ***bold itallic*** or ___strong emphasis___ as well as other things like line \nbreaks",
"image": {
"url": "https://developers.google.com/actions/images/badges/XPM_BADGING_GoogleAssistant_VER.png",
"accessibilityText": "Image alternate text"
},
"buttons": [
{
"title": "This is a button",
"openUrlAction": {
"url": "https://assistant.google.com/"
}
}
]
}
}
]
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
722 次 |
最近记录: |