我们如何通过节点js代码中的API在luis中添加意图和话语

问题描述

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

解决方法

您将要使用Authoring REST API (v3 - Preview)Authoring REST API (v2)

您可以通过models > Create Intent添加意图。您可以通过example utterances > Add label添加语音。

请注意,URL中所有这些{endpoint}均指的是API的端点,其中之一:

  • 澳大利亚东部-australiaeast.api.cognitive.microsoft.com
  • 西欧-westeurope.api.cognitive.microsoft.com
  • 美国西部-westus.api.cognitive.microsoft.com

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

如果您不熟悉在Node中发出API请求,请查看AxiosNode Fetch进行API调用。