Skip to content

Commit

Permalink
Check QnA service name
Browse files Browse the repository at this point in the history
  • Loading branch information
enzocano committed Oct 3, 2018
1 parent 14df6ac commit 74df125
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public MainDialog(BotServices services, ConversationState conversationState, Use
}
else if (intent == Dispatch.Intent.q_FAQ)
{
var qnaService = _services.QnAServices["EnterpriseBot-FAQ"];
var qnaService = _services.QnAServices["<YOUR_QNA_SERVICE_NAME>"];
var answers = await qnaService.GetAnswersAsync(dc.Context);

if (answers != null && answers.Count() > 0)
Expand Down
8 changes: 6 additions & 2 deletions samples/csharp_dotnetcore/52.enterprise-bot/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,19 @@

5. Update your `appsettings.json` with your .bot file path and .bot file secret (if set).

6. There are two locations that need to be updated in the code.
6. There are two locations that need to be updated in the code to resolve the LUIS service.
In the following files:
MainDialog.cs
EnterpriseDialog.cs
The following line needs to be updated in both files:
var luisService = _services.LuisServices[<YOUR MS BOT NAME>_General];
The <YOUR MS BOT NAME> must be replaced with the <NAME> provided in step 4 above.

7. Check the QnAService name in your `.bot` file and update the following line in MainDialog.cs.
var qnaService = _services.QnAServices[<YOUR_QNA_SERVICE_NAME>];
The <YOUR_QNA_SERVICE_NAME> must be replaced with the <NAME> of your QnA service.

7. Run your bot project and type "hi" to verify your services are correctly configured
8. Run your bot project and type "hi" to verify your services are correctly configured


## Enabling more scenarios
Expand Down

0 comments on commit 74df125

Please sign in to comment.