LUIS识别器方法停止工作(代码未更改)

时间:2019-03-08 20:42:07

标签: c# .net botframework luis

我没有更改任何代码,并且该方法引发了LUIS.Runtime.Models.APIErrorException

_services.LuisServices[LuisConfiguration].RecognizeAsync(turnContext, cancellationToken);

我尝试使用其他LUIS模型和可以正常使用的旧版bot。似乎BotBuilder中的某些内容已更改,我不知道该怎么办。这是堆栈跟踪:

       Exception caught : Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Models.APIErrorException: Operation returned an invalid status code 'Forbidden'
        at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Prediction.ResolveWithHttpMessagesAsync(String appId, String query, 
        Nullable`1 timezoneOffset, Nullable`1 verbose, 
        Nullable`1 staging, Nullable`1 spellCheck, String bingSpellCheckSubscriptionKey,
 Nullable`1 log, Dictionary`2 customHeaders, CancellationToken cancellationToken)
                 at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.PredictionExtensions.ResolveAsync(IPrediction operations, String appId, String query, 
    Nullable`1 timezoneOffset, Nullable`1 verbose, 
    Nullable`1 staging, 
    Nullable`1 spellCheck, 
    String bingSpellCheckSubscriptionKey, Nullable`1 log, CancellationToken cancellationToken)
                 at Microsoft.Bot.Builder.AI.Luis.LuisRecognizer
    .RecognizeInternalAsync(ITurnContext turnContext, CancellationToken cancellationToken) in D:\a\1\s\libraries\Microsoft.Bot.Builder.AI.LUIS
    \LuisRecognizer.cs:line 421
                 at Microsoft.Bot.Builder.AI.Luis.LuisRecognizer
    .RecognizeAsync(ITurnContext turnContext, CancellationToken cancellationToken) in D:\a\1\s\libraries\Microsoft.Bot.Builder.AI.LUIS
    \LuisRecognizer.cs:line 112
                 at NLPMortBot.BasicBot.OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken) in nlpmortbot\NLPMortBot\BasicBot.cs:line 121
                 at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, 

CancellationToken cancellingToken)D:\ a \ 1 \ s \ libraries \ Microsoft.Bot.Builder \ MiddlewareSet.cs:第55行                      在Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext,BotCallbackHandler回调, D:\ a \ 1 \ s \ libraries \ Microsoft.Bot.Builder \ BotAdapter.cs:第167行中的CancellationToken cancelToken)

先谢谢大家!

0 个答案:

没有答案