1
我已經有一個webhook,我用它來改變助理的答案。 但我不知道如何發送建議卡或鏈接,因爲您可以從API.AI網頁圖形用戶界面(從添加內容按鈕)發送它們。谷歌智能助理高級響應與API.AI
我應該將它們作爲「數據」名稱下的JSON對象發送嗎?
我已經有一個webhook,我用它來改變助理的答案。 但我不知道如何發送建議卡或鏈接,因爲您可以從API.AI網頁圖形用戶界面(從添加內容按鈕)發送它們。谷歌智能助理高級響應與API.AI
我應該將它們作爲「數據」名稱下的JSON對象發送嗎?
用於向API.AI實現網絡掛接電話,其中將包括一個簡單的響應,並在谷歌豐富的響應行動卡的響應的JSON體的一般形式如下。如果您想使用列表或傳送帶,則文檔爲here:
{
"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/"
}
}
]
}
}
]
}
}
}
}