Skip to content

Commit

Permalink
Merge pull request #598 from Microsoft/daveta-dispatch2
Browse files Browse the repository at this point in the history
Fix missing default.htm and accommodate any underscores in bot name
  • Loading branch information
JasonSowers committed Oct 2, 2018
2 parents 2f6d55a + 98463b3 commit ff915c2
Show file tree
Hide file tree
Showing 2 changed files with 420 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/csharp_dotnetcore/14.nlp-with-dispatch/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private static BotServices InitBotServices(BotConfiguration config)

var app = new LuisApplication(luis.AppId, luis.AuthoringKey, luis.GetEndpoint());
var recognizer = new LuisRecognizer(app);
luisServices.Add(luis.Name.Split("_")[1], recognizer);
luisServices.Add(luis.Name.Split("_").LastOrDefault(), recognizer);
break;
}

Expand Down Expand Up @@ -225,7 +225,7 @@ private static BotServices InitBotServices(BotConfiguration config)

// Since the Dispatch tool generates a LUIS model, we use LuisRecognizer to resolve dispatching of the incoming utterance
var dispatchARecognizer = new LuisRecognizer(dispatchApp);
luisServices.Add(dispatch.Name.Split("_")[1], dispatchARecognizer);
luisServices.Add(dispatch.Name.Split("_").Last(), dispatchARecognizer);
break;

case ServiceTypes.QnA:
Expand Down
Loading

0 comments on commit ff915c2

Please sign in to comment.