Botframework 在MicrosoftBot框架中,如何包含星级反馈

Botframework 在MicrosoftBot框架中,如何包含星级反馈,botframework,bots,Botframework,Bots,我正在使用MicrosoftBot框架。我需要在代码中实现星级反馈机制。如选择明星,应提交机器人的评级。有人能帮我吗?或者有什么建议吗?您可以创建一个带有AdaptiveCard的星级反馈卡,方法是使列的行为类似于提交按钮。首先,向AdaptiveCard添加一个列集,其中包含所需的列数-每列对应一个评级。然后在每一列中,您可以添加一个星形或其他对象的图像以及一个描述该评级的文本字段。接下来,向每列添加一个提交操作,并在数据字段中添加响应的值。最后,您可以呈现卡并将其作为附件发送给用户。当用户单

我正在使用MicrosoftBot框架。我需要在代码中实现星级反馈机制。如选择明星,应提交机器人的评级。有人能帮我吗?或者有什么建议吗?

您可以创建一个带有AdaptiveCard的星级反馈卡,方法是使列的行为类似于提交按钮。首先,向AdaptiveCard添加一个列集,其中包含所需的列数-每列对应一个评级。然后在每一列中,您可以添加一个星形或其他对象的图像以及一个描述该评级的文本字段。接下来,向每列添加一个提交操作,并在数据字段中添加响应的值。最后,您可以呈现卡并将其作为附件发送给用户。当用户单击一列时,它会将数据字段中的值作为用户的消息发送。有关示例,请参见下面的AdaptiveCard JSON和渲染卡的屏幕截图

截图

JSON自适应卡
通过使列的行为类似于提交按钮,您可以使用AdaptiveCard创建星级反馈卡。首先,向AdaptiveCard添加一个列集,其中包含所需的列数-每列对应一个评级。然后在每一列中,您可以添加一个星形或其他对象的图像以及一个描述该评级的文本字段。接下来,向每列添加一个提交操作,并在数据字段中添加响应的值。最后,您可以呈现卡并将其作为附件发送给用户。当用户单击一列时,它会将数据字段中的值作为用户的消息发送。有关示例,请参见下面的AdaptiveCard JSON和渲染卡的屏幕截图

截图

JSON自适应卡
C#显示星级如何?如果你提出一个新问题,我会看一看。注释部分的代码太多了。@t Turnford我已经打开了问题,C#显示星级如何如果你打开一个新问题,我会看一看。注释部分的代码太多了。@tdurnford我已经打开了问题,
{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "size": "Medium",
            "weight": "Bolder",
            "color": "Accent",
            "text": "Rate your experience!"
        },
        {
            "type": "TextBlock",
            "separator": true,
            "text": "Please rate your experience! Your feedback is very appreciated and will help improve your experience in the future. ",
            "wrap": true
        },
        {
            "type": "ColumnSet",
            "spacing": "Medium",
            "columns": [
                {
                    "type": "Column",
                    "selectAction": {
                        "type": "Action.Submit",
                        "data": "awful"
                    },
                    "items": [
                        {
                            "type": "Image",
                            "horizontalAlignment": "Center",
                            "url": "https://upload.wikimedia.org/wikipedia/commons/1/18/Five-pointed_star.svg"
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Center",
                            "text": "Awful"
                        }
                    ],
                    "width": "stretch"
                },
                {
                    "type": "Column",
                    "selectAction": {
                        "type": "Action.Submit",
                        "data": "bad"
                    },
                    "items": [
                        {
                            "type": "Image",
                            "horizontalAlignment": "Center",
                            "url": "https://upload.wikimedia.org/wikipedia/commons/1/18/Five-pointed_star.svg"
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Center",
                            "text": "Bad"
                        }
                    ],
                    "width": "stretch"
                },
                {
                    "type": "Column",
                    "selectAction": {
                        "type": "Action.Submit",
                        "data": "ok"
                    },
                    "items": [
                        {
                            "type": "Image",
                            "horizontalAlignment": "Center",
                            "url": "https://upload.wikimedia.org/wikipedia/commons/1/18/Five-pointed_star.svg"
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Center",
                            "text": "Ok"
                        }
                    ],
                    "width": "stretch"
                },
                {
                    "type": "Column",
                    "selectAction": {
                        "type": "Action.Submit",
                        "data": "good"
                    },
                    "items": [
                        {
                            "type": "Image",
                            "horizontalAlignment": "Center",
                            "url": "https://upload.wikimedia.org/wikipedia/commons/1/18/Five-pointed_star.svg"
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Center",
                            "text": "Good"
                        }
                    ],
                    "width": "stretch"
                },
                {
                    "type": "Column",
                    "selectAction": {
                        "type": "Action.Submit",
                        "data": "terrific"
                    },
                    "items": [
                        {
                            "type": "Image",
                            "horizontalAlignment": "Center",
                            "url": "https://upload.wikimedia.org/wikipedia/commons/1/18/Five-pointed_star.svg"
                        },
                        {
                            "type": "TextBlock",
                            "horizontalAlignment": "Center",
                            "text": "Terrific"
                        }
                    ],
                    "width": "stretch"
                }
            ]
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
}