我尝试添加ms bot的选项(下拉选项)。当我尝试进行API调用时,我无法在显示为空的自适应卡的聊天室(Skype)中获得选择。我应该使用哪种Rest API格式来实现使用ms bot进行的聊天中的选择?
请参考下图,显示聊天内容。
{
"type":"message",
"replyToId":"1546161996823",
"conversation":
{
"id":"29:1nx20fU3aWIiv8P6DFhvS8GI0NRa-NlQ8ofk4i9ETyc0"
},
"from":
{
"id":"28:07807967-5b86-4184-9fae-354edd99eed9",
"name":"incoxtest"
},
"recipient":
{
"id":"29:1nx20fU3aWIiv8P6DFhvS8GI0NRa-NlQ8ofk4i9ETyc0",
"name":"gopal ravipillai"
},
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"body": [
{
"type": "Input.ChoiceSet",
"id": "snooze",
"style": "ListStyle.List",
"choices": [
{
"title": "5 minutes",
"value": "5"
},
{
"title": "15 minutes",
"value": "15"
},
{
"title": "30 minutes",
"value": "30"
}
]
}
]
}
}
]
}
答案 0 :(得分:2)
Skype频道不支持自适应卡。请咨询频道检查员:https://docs.botframework.com/en-us/channel-inspector/channels/Skype?f=AdaptiveCards&e=example1
一种选择是识别通道类型并将功能更改为受支持的功能。例如:当频道类型为Skype而不是自适应卡时,请使用Skype支持的功能,例如缩略图卡。要识别通道类型,请参考: How to get channel name in Bot Framework