【问题标题】:Operation returned an invalid status code ‘Forbidden’ at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime操作在 Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime 返回了无效状态代码“Forbidden”
【发布时间】:2019-09-17 22:03:58
【问题描述】:

我的机器人工作正常,但突然开始失败并出现以下错误:操作返回无效状态代码“禁止”

知道发生了什么。 几天前,我注意到一些电子邮件通知指出“您正在接近订阅 LUIS API - 免费产品的配额限制。此配额将于 2019 年 9 月 26 日续订。

此错误是否与我订阅 LUIS API 的配额限制有关?如何升级?

Operation returned an invalid status code ‘Forbidden’
at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Prediction.ResolveWithHttpMessagesAsync(String appId, String query, Nullable1 timezoneOffset, Nullable1 verbose, Nullable1 staging, Nullable1 spellCheck, String bingSpellCheckSubscriptionKey, Nullable1 log, Dictionary2 customHeaders, CancellationToken cancellationToken)
at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.PredictionExtensions.ResolveAsync(IPrediction operations, String appId, String query, Nullable1 timezoneOffset, Nullable1 verbose, Nullable1 staging, Nullable1 spellCheck, String bingSpellCheckSubscriptionKey, Nullable1 log, CancellationToken cancellationToken) at Microsoft.Bot.Builder.AI.Luis.LuisRecognizer.RecognizeInternalAsync(ITurnContext turnContext, Dictionary2 telemetryProperties, Dictionary2 telemetryMetrics, CancellationToken cancellationToken) at Microsoft.Bot.Builder.AI.Luis.LuisRecognizer.RecognizeAsync[T](ITurnContext turnContext, CancellationToken cancellationToken)

更新

我将我的 luis 应用升级到标准层。但我仍然面临同样的错误

【问题讨论】:

  • 与您的配额限制完全相关。

标签: .net .net-core botframework azure-language-understanding


【解决方案1】:

根据异常信息,您的 LUIS API 服务层是免费的,它已达到配额限制,导致403 forbidden error。有关 LUIS API 定价的详细信息,您可以查看here

如果您想对您的 LUIS API 服务层进行分级,请转到 Azure 门户并选择您的 LUIS 服务,单击“定价层”进行升级:

【讨论】:

  • 我实际上升级到标准层,但我仍然收到同样的错误
【解决方案2】:

仅升级到标准层并不能解决此错误。

这是我解决这个问题的方法

--> upgraded LUIS app to standard tier
--> regenerated the primary Key, updated in key vault 
--> Go to Luis.AI >>application settings>>Azure resources >>"Add prediction resource" ,

        pricing tier should show as "standard" and the your expected Region
-> publish your luis app

这个“未经授权”的错误消失后

【讨论】:

    猜你喜欢
    • 2021-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多