我有一個示例Telegram Bot,我已經集成在我的api.ai帳戶中。我想顯示如下所示的鍵盤按鈕,但似乎api.ai只發送正文回覆給電報。任何想法我怎麼能達到我剛纔所描述的?請告知方向和/或解決方案。謝謝!如何在與api.ai集成的電報機器人中顯示鍵盤按鈕?
我有一個配送網絡掛接URL時,我的樣本的意圖是調用
{
"id": "af681b42-9ced-4f8f-ab0c-0559b210dc1a",
"timestamp": "2016-07-15T01:47:30.896Z",
"result": {
"source": "agent",
"resolvedQuery": "Hello",
"action": "show-main",
"actionIncomplete": false,
"parameters": {},
"contexts": [],
"metadata": {
"intentId": "e477976e-2412-4066-b320-48d7dedd5dfe",
"webhookUsed": "true",
"intentName": "Adobo"
},
"fulfillment": {
"speech": "Hello world!",
"source": "index.php",
"data": {
"chat_id": 1,
"text": "hi there",
"parse_mode": "HTML",
"reply_markup": {
"keyboard": [
"A1",
"A2"
],
"one_time_keyboard": true,
"resize_keyboard": true
}
}
},
"score": 1
},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": "4cb02864-9925-4d4c-a0f1-14dbab44add7"
}
我在答覆標記鍵盤JSON格式添加在「數據」返回該JSON。
你能提供你試過的例子嗎? – mhatch
嗨,我已經更新了我的帖子上面。 –