我有一个示例 Telegram Bot,已集成到我的 api.ai 帐户中。我想像下面一样显示键盘按钮,但似乎 api.ai 只是向电报发送正文回复。知道如何实现我刚才描述的内容吗?请告知方向和/或解决方案。谢谢!
我有一个 Fulfillment webhook url,当我的示例 Intent 被调用时返回这个 json
{
"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 格式的回复标记键盘。