I am using a Microsoft bot builder SDKv4 for creating a Chat bot using LUIS.ai for getting the top intent. I used the following code to configure luis in my .net core 2.1 project.
public BotServices(IConfiguration configuration)
{
// Read the setting for cognitive services from the appsettings.json
Dispatch = new LuisRecognizer(new LuisApplication(
configuration["LuisAppId"],
configuration["LuisAPIKey"],
$"https://{configuration["LuisAPIHostName"]}.api.cognitive.microsoft.com"),
new LuisPredictionOptions { IncludeAllIntents = true, IncludeInstanceData = true },
true);
}
But I am getting this warning : "LuisRecognizer,LuisRecognizer ... is obsolete: ... please use LuisRecognizer(LuisRecognizerOptions recognizer)".
I followed this Microsoft tutorial to set it up. Even following the tutorial also gives the same "obsolete" error at line:
Dispatch = new LuisRecognizer(luisApplication);
https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-csharp-tutorial-bf-v4
How can I configure luis in this case?
Thanks :)