如何通过API在Microsoft Luis中创建基于意图的功能?

问题描述

我想为Microsoft Luis应用程序创建意图功能(不是全局的)。要创建功能,我通过调用带有以下正文的 create_list_features documentation for this call)将以下消息发送到我的应用程序:

{
"name": "DaysOfWeek","phrases": "monday,tuesday,wednesday,thursday,friday,saturday,sunday","isExchangeable": true
}

不幸的是,在通话中,我无法指定用于分配功能的intent(或intent_id)。将功能分配给意图还需要执行其他任何电话吗?

解决方法

这是adding intent feature relation的API参考。您可以将意图ID指定为请求参数,并在请求正文中提供功能关系信息。

{
"featureName": "Phraselist1","isRequired": false
}