Bot-docs: add luis to bot doesn't work

Created on 28 Sep 2018  Â·  4Comments  Â·  Source: MicrosoftDocs/bot-docs

Following all instructions, these lines error

// Call LUIS recognizer
                var result = this.Recognizer.RecognizeAsync(context, System.Threading.CancellationToken.None);

                var topIntent = result?.GetTopScoringIntent();

the second "result" errors. if you make it

var result = await Recognizer.RecognizeAsync(stepContext.Context, cancellationToken);

it runs, but it gets and exception Operation returned an invalid status code 'NotFound'.

Please assist and also update the docs.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

platform SDK v4

Most helpful comment

I got it to work by adding the await and updating the endpoint to end at "....Microsoft.com/" . Previously, you had to go all the way, including luis/v2/apps/, so you might want to note exactly where the endpoint ends for future.

All 4 comments

I got it to work by adding the await and updating the endpoint to end at "....Microsoft.com/" . Previously, you had to go all the way, including luis/v2/apps/, so you might want to note exactly where the endpoint ends for future.

I can confirm that the fix by @amthomas46 to no longer add "/luis/v2/apps/" works.

This document will be updated soon with new sample code which instruct the user to get LUIS information from the .bot file.

This topic has been updated. If you find other issues, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hansmbakker picture hansmbakker  Â·  7Comments

wilmol picture wilmol  Â·  3Comments

v-kydela picture v-kydela  Â·  7Comments

montacerdk picture montacerdk  Â·  5Comments

SarahSexton picture SarahSexton  Â·  3Comments