我有一个示例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
嗨,我已经更新了我的帖子上面。 –