首页 > 解决方案 > 我们如何通过节点 js 代码中的 API 在 luis 中添加意图和话语

问题描述

我试图通过节点 js 代码添加意图和话语,但我没有得到任何端点,我们可以在其中以 json 格式设置数据意图和话语

标签: azure-language-understanding

解决方案


You'll want to use the Authoring REST API (v3 - Preview) or Authoring REST API (v2).

You can add intents via models > Create Intent. You can add utterances via example utterances > Add label.

Note, that in all of these {endpoint} in the URL refers to the endpoint for the APIs, one of:

  • Australia East - australiaeast.api.cognitive.microsoft.com
  • West Europe - westeurope.api.cognitive.microsoft.com
  • West US - westus.api.cognitive.microsoft.com

...and it's based off of your authoring region.

If you're not familiar with making API requests in Node, take a look at either Axios or Node Fetch to make the API calls.


推荐阅读