azure - LUIS 中的 400 错误请求 : Cannot find the specified subscription

标签 azure azure-cognitive-services azure-language-understanding

我正在使用 LUIS 编程 API 创建 LUIS 应用。成功创建并训练应用程序后,我想使用此端点为应用程序分配 API key :

PUT /luis/api/v2.0/apps/{appId}/versions/{versionId}/assignedkey

我的编程 API key (从 luis.ai 获取)和普通 API key (我尝试分配的 key ,从 Azure 门户获取)都注册到同一电子邮件地址。

但是,当我尝试向上述端点发送请求时,它失败并出现以下错误:

{
  "error": {
    "code": "BadArgument",
    "message": "Cannot find the specified subscription"
  }
}

我不知道自己可能做错了什么,因为完全相同的逻辑以前已经起作用了。

是否有某种方式可以将 Azure 订阅“分配”到我的 LUIS 帐户?

更新:

我没有找到问题的答案,但我找到了解决方法。调用 PUT/luis/api/v2.0/apps/{appId}/settings 会将应用程序设置为“公共(public)”,这意味着您可以使用任何订阅 key 。请参阅docs .

最佳答案

看来这个端点现在已被弃用,因为我得到以下信息:

{
    "error": {
        "code": "DeprecatedException",
        "message": "To assign a subscription key to an app, please go to the LUIS website at https://www.luis.ai and assign it from the app publish page."
    }
}

在路易斯页面中我看到这个:

enter image description here

关于azure - LUIS 中的 400 错误请求 : Cannot find the specified subscription,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47087572/

相关文章:

azure - 尝试安装 'npm' 时的 LUIS 应用程序 : "Kudu Sync" is not recognized as an internal or external command,

azure - 如何使用 ID 参数作为容器将多个文件上传到 Azure Blob 存储?

azure - 我应该传输多少图片才能为人物添加脸部?

text-to-speech - SpeechSynthesizer.speakTextAsync 完成时回调

azure-cognitive-services - LUIS 中似乎不存在 API.ai 上下文

azure - 是否可以在本地使用 LUIS(无需互联网)

python - 如何使用 Active Directory 集成身份验证通过 python SQL alchemy 连接到 Azure sql 数据库

sql-server-2008 - 在两个远程放置的服务器之间同步数据

c# - 每个 Service Fabric 实例的配置

azure-cognitive-services - 有人知道 QNA 制造商 CORS 设置吗?