【发布时间】:2022-02-25 22:45:33
【问题描述】:
我是机器人框架和学习的新手。在这里,我正在寻找我在用于聊天机器人的自适应卡中面临的解决方案。我了解到我们可以使用adaptivecards.io/designer根据我们的需要设计自适应卡,我们将卡作为json代码获取。
这是我的自适应卡的 json 代码
{
"type": "AdaptiveCard",
"$schema":
"http://adaptivecards.io/schemas/adaptivecard.json",
"version": "1.2",
"msTeams": {
"width": "full"
},
"body": [
{
"type": "TextBlock",
"text": "Adaptive Card Example",
"wrap": true,
"size": "large",
"weight": "bolder",
"id": "title"
},
{
"type": "Input.Text",
"placeholder": "Provide your thoughts",
"separator": true,
"isMultiline": true,
"id": "thoughts"
},
{
"type": "ActionSet",
"separator": true,
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"style": "positive",
"id": "submit"
}
]
}
]
}
所以当我运行我的机器人并在模拟器中看到输出时,我可以看到自适应卡 adaptive card 当我输入并单击提交按钮时,它显示错误为 System.NullReferenceException 对象引用未设置为对象的实例。
请详细说明以解决此问题
【问题讨论】:
-
您是否尝试过查看Using adaptive cards 示例?
-
嗨,这个问题有更新吗?
标签: c# visual-studio botframework chatbot adaptive-cards