几秒钟后自动自动显示评分卡以获取用户反馈

问题描述 投票:0回答:1

我有一个在C#中使用框架v4制作的机器人。我希望我的机器人在机器人闲置后或在用户未响应机器人的情况下获取用户反馈。我还要附上我制作的银行卡代码。还有我的卡的图像。任何人都可以调查一下,并帮助我实现此实现。enter image description here

{
  "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": "normal"
      },
      "items": [
        {
          "type": "Image",
          "horizontalAlignment": "Center",
          "url": "https://upload.wikimedia.org/wikipedia/commons/1/18/Five-pointed_star.svg"
        },
        {
          "type": "TextBlock",
          "horizontalAlignment": "Center",
          "text": "normal"
        }
      ],
      "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"
    }
  ]
},
{
  "type": "Input.Text",
  "id": "comment",
  "placeholder": "Add a comment",
  "isMultiline": true
}
 ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.0",
   "actions":
[
  {
    "type": "Action.Submit",
    "title": "OK",
   // "data":  "ok"
  }
]}
c# botframework luis qnamaker adaptive-cards
1个回答
0
投票
在每条消息上,启动一个异步计时器。您可以在bot中执行此操作,但是最好在bot外部执行此操作,例如使用Azure Functions之类。该答案的其余部分将假定计时器位于机器人外部。确保计时器也跟踪与计时器相关的conversationReference
© www.soinside.com 2019 - 2024. All rights reserved.