Closed ChuckkNorris closed 8 years ago
Update: The root cause was that the app had not been published yet - perhaps a better solution would be to throw an exception stating that the "LUIS App need to be published" if the topScoringIntent
is null.
topScoringIntent will be present only if you are using preview mode , it does not exist in production
@tachyons Negative - it does exist. As stated, after I published my LUIS App, the topScoringIntent
was populated just fine. The issue is that the LUIS C# SDK will throw a null reference exception if the app isn't published rather than notifying the developer that the app needs to be published first.
Fixed in latest commit
In
LuisResult.Load()
, ifJToken result["topScoringIntent"]
does not exist (which it did not in my case - not sure why),Intent.Load()
will throw a null reference exception.LuisResult.Load()
requires a null check of thetopScoringIntent
: