Skip to content

Commit bad14bb

Browse files
jamesemannKaiqb
authored andcommitted
Updated middleware registration in line with 4.0.1-preview (#186)
1 parent e0427bd commit bad14bb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

articles/v4sdk/bot-builder-howto-qna.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ public void ConfigureServices(IServiceCollection services)
9191
options.CredentialProvider = new ConfigurationCredentialProvider(Configuration);
9292

9393
var endpoint = new QnAMakerEndpoint
94-
{
95-
knowledgebaseId = "YOUR-KB-ID",
96-
// Get the Host from the HTTP request example at https://www.qnamaker.ai
97-
// For GA services: https://<Service-Name>.azurewebsites.net/qnamaker
98-
// For Preview services: https://westus.api.cognitive.microsoft.com/qnamaker/v2.0
99-
Host = "YOUR-HTTP-REQUEST-HOST",
100-
EndpointKey = "YOUR-QNA-MAKER-SUBSCRIPTION-KEY"
101-
};
102-
options.Middleware.Add(new QnAMakerMiddleware(new QnAMakerEndpoint(endpoint)));
94+
{
95+
KnowledgeBaseId = "YOUR-KB-ID",
96+
// Get the Host from the HTTP request example at https://www.qnamaker.ai
97+
// For GA services: https://<Service-Name>.azurewebsites.net/qnamaker
98+
// For Preview services: https://westus.api.cognitive.microsoft.com/qnamaker/v2.0
99+
Host = "YOUR-HTTP-REQUEST-HOST",
100+
EndpointKey = "YOUR-QNA-MAKER-SUBSCRIPTION-KEY"
101+
};
102+
options.Middleware.Add(new QnAMakerMiddleware(endpoint));
103103
});
104104
}
105105
```

0 commit comments

Comments
 (0)