【问题标题】:Connecting LUIS dialog to form dialog and mapping builtin fields将 LUIS 对话框连接到窗体对话框并映射内置字段
【发布时间】:2016-09-26 20:54:32
【问题描述】:

我也有类似的问题:Connecting LUIS dialog to form dialog and mapping the right fields

除了我在 LUIS 中使用内置实体,例如 builtin.number,我在 LUIS 中给了它一个名称,例如金额,但映射似乎只在表单类中的字段类型和 LUIS JSON 中的实体类型之间。显然我不能有一个名为 builtin.number 的字段。

如何使用表单字段映射内置的 LUIS 实体?

【问题讨论】:

    标签: bots botframework azure-language-understanding


    【解决方案1】:

    另一种方法是在您的 LuisIntent 方法中使用将映射到您的表单类的 Type 创建一个新的 EntityRecommendation。然后,您可以将该实体添加到您将传递给表单的实体列表中。

    // not checking if entity exists for simplicity
    var builtInEntity = result.Entities.First(x => x.Type == "builtin.number");
    
    var entity = new EntityRecommendation();
    entity.Type = "Amount";
    entity.Entity = builtInEntity.Entity;
    
    result.Entities.Add(entity);
    

    【讨论】:

      猜你喜欢
      • 2016-08-28
      • 1970-01-01
      • 2010-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-01
      • 1970-01-01
      • 2020-04-11
      相关资源
      最近更新 更多