【问题标题】:json file formatting correctly, so LUIS can read the datajson 文件格式正确,因此 LUIS 可以读取数据
【发布时间】:2019-12-16 00:46:43
【问题描述】:

我的程序可以正确地从 LUIS 读取 Intent,并使用 LUIS Intent 启动其他自适应卡,但是对于这种列类型,仍然是不可能的。我试图在这里启动的意图是“type”中的“user”和“myEmail”:input.text。我知道不知何故json中的数据字段必须放错位置,或者标题或id。这是文件,有什么帮助...?

{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.0",
  "body": [
    {
      "type": "Image",
      "url": "lalala.png",
      "size": "Medium"
    },
    {
      "type": "ColumnSet",
      "columns": [
        {
          "type": "Column",
          "width": 2,
          "items": [
            {
              "type": "TextBlock",
              "text": "Einloggen",
              "weight": "Bolder",
              "size": "Medium"
            },
            {
              "type": "Input.Text",
              "id": "myName",
              "title": "user",
              "data": "user",
              "placeholder": "Benutzername oder email"
            },
            {
              "type": "Input.Text",
              "id": "myEmail",
              "title": "myEmail",
              "data": "myEmail",
              "placeholder": "Passwort",
              "style": "Email"
            }
          ]
        }
      ]
    }
  ],
  "actions": [
    {
      "type": "Action.Submit",
      "title": "Submit"
    },
    {
      "type": "Action.Submit",
      "title": "Cancel"
    }
  ]
}

【问题讨论】:

  • 顺便说一句,我试图启动的 LUIS 意图是“myEmail”和“user”
  • 我想提供帮助,但不清楚您的问题是什么。请编辑您的问题以包含实际问题。
  • 我要求您提供一个实际问题。你为什么不包括一个实际的问题?问题以问号结尾。
  • 4 分钟前编辑
  • 我要求您提出一个实际问题,以便我们能够回答。在“任何帮助......”之类的句子片段末尾放置问号并不能帮助我们帮助您。为了帮助您,我们需要知道您的要求。请阅读 Stack Overflow 帮助文档并将这些知识应用于您的问题:stackoverflow.com/help/how-to-ask

标签: json botframework azure-language-understanding adaptive-cards


【解决方案1】:

我不能 100% 确定您的问题,因为自适应卡中没有任何内容与 LUIS 真正相关。也就是说,您必须为“记住我”切换指定一个唯一 id - 当前的 null 值将不起作用。

我还推荐adaptivecards.io 设计器作为验证您的卡片的地方。 adaptivecards.io/designer

【讨论】:

  • 也更新了问题和文件。工作意图是“用户”和“我的电子邮件”。
【解决方案2】:

感谢您的建议,在https://blog.botframework.com/2019/07/02/using-adaptive-cards-with-the-microsoft-bot-framework/ 之前没有阅读过是否更好地指定了操作提交和数据之间的问题。

    {
      "type": "ColumnSet",
      "columns": [
        {
          "type": "Column",
          "width": 2,
          "items": [
            {
              "type": "TextBlock",
              "text": "Einloggen",
              "weight": "Bolder",
              "size": "Medium"
            },
            {
              "type": "Input.Text",
              "id": "myName",
              "title": "user",
              "placeholder": "Benutzername oder email"
            },
            {
              "type": "Input.Text",
              "id": "myEmail",
              "title": "myEmail",
              "placeholder": "Passwort"

            }

          ]
        }
      ]
    }
  ],
  "actions": [
    {
      "type": "Action.Submit",
      "title": "Submit",
      "data": {
        "myName": true,
        "myEmail": true
      }
    }


  ] }

【讨论】:

  • 很遗憾没有。我还在做这个项目,这个json仍然不起作用。我只是没有时间更新问题。
  • 请点击复选标记接受此作为您的答案,并在您有空时提出新问题
猜你喜欢
  • 2019-06-09
  • 2020-03-11
  • 1970-01-01
  • 1970-01-01
  • 2016-10-15
  • 1970-01-01
  • 2021-10-22
  • 1970-01-01
相关资源
最近更新 更多