Skip to content

Commit 26552a2

Browse files
committed
edits and acrolynx
1 parent f7e26af commit 26552a2

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

articles/cognitive-services/QnAMaker/includes/quickstart-sdk-csharp.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ ms.date: 04/27/2020
77
Use the QnA Maker client library for .NET to:
88

99
* Create a knowledge base
10-
* Manage a knowledge base
10+
* Update a knowledge base
1111
* Publish a knowledge base
12-
* Generate an answer from the knowledge base
12+
* Get published endpoint key
13+
* Wait for long-running task
14+
* Delete knowledge base
1315

1416
[Reference documentation](https://docs.microsoft.com/dotnet/api/microsoft.azure.cognitiveservices.knowledge.qnamaker?view=azure-dotnet) | [Library source code](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/cognitiveservices/Knowledge.QnAMaker) | [Package (NuGet)](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker/) | [C# Samples](https://github.com/Azure-Samples/cognitive-services-qnamaker-csharp)
1517

@@ -18,15 +20,18 @@ Use the QnA Maker client library for .NET to:
1820
## Prerequisites
1921

2022
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/)
21-
* The current version of [.NET Core](https://dotnet.microsoft.com/download/dotnet-core).
23+
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) or current version of [.NET Core](https://dotnet.microsoft.com/download/dotnet-core).
24+
* Once you have your Azure subscription, create a [QnA Maker resource](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesQnAMaker) in the Azure portal to get your authoring key and endpoint. After it deploys, select **Go to resource**.
25+
* You will need the key and endpoint from the resource you create to connect your application to the QnA Maker API. You'll paste your key and endpoint into the code below later in the quickstart.
26+
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
2227

2328
## Setting up
2429

2530
### Create a QnA Maker Azure resource
2631

2732
Azure Cognitive Services are represented by Azure resources that you subscribe to. Create a resource for QnA Maker using the [Azure portal](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account) or [Azure CLI](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli) on your local machine.
2833

29-
After getting a key and endpoint for your resource, [create environment variables](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for the key, named `QNAMAKER_SUBSCRIPTION_KEY`. The resource name is used as part of the endpoint URL.
34+
After getting a key and endpoint for your resource, [create an environment variable](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for the key, named `QNAMAKER_SUBSCRIPTION_KEY`. The resource name is used as custom subdomain of the endpoint URL.
3035

3136
### Create a new C# application
3237

@@ -115,7 +120,7 @@ In the **main** method, create a variable for your resource's authentication pul
115120

116121
Create a [QnAMakerRuntimeClient](https://docs.microsoft.com/dotnet/api/microsoft.azure.cognitiveservices.knowledge.qnamaker.qnamakerruntimeclient?view=azure-dotnet) to query the knowledge base to generate an answer or train from active learning.
117122

118-
[!code-csharp[Authenticate the runtime](~/samples-qnamaker-csharp/documentation-samples/quickstarts/Knowledgebase_Quickstart/Program.cs?name=EndpointKey)]
123+
[!code-csharp[Authenticate the runtime](~/samples-qnamaker-csharp/documentation-samples/quickstarts/Knowledgebase_Quickstart/Program.cs?name=EndpointKey&highlight=3)]
119124

120125
## Create a knowledge base
121126

@@ -129,7 +134,7 @@ Call the [CreateAsync](https://docs.microsoft.com/dotnet/api/microsoft.azure.cog
129134

130135
The final line of the following code returns the knowledge base ID from the response from MonitorOoperation.
131136

132-
[!code-csharp[Create a knowledge base](~/samples-qnamaker-csharp/documentation-samples/quickstarts/Knowledgebase_Quickstart/Program.cs?name=CreateKB&highlight=29,30)]
137+
[!code-csharp[Create a knowledge base](~/samples-qnamaker-csharp/documentation-samples/quickstarts/Knowledgebase_Quickstart/Program.cs?name=CreateKB&highlight=30)]
133138

134139
Make sure the include the [`MonitorOperation`](#get-status-of-an-operation) function, referenced in the above code, in order to successfully create a knowledge base.
135140

articles/cognitive-services/QnAMaker/includes/quickstart-sdk-nodejs.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Use the QnA Maker client library for Node.js to:
2121

2222
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/)
2323
* The current version of [Node.js](https://nodejs.org).
24+
* Once you have your Azure subscription, create a [QnA Maker resource](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesQnAMaker) in the Azure portal to get your authoring key and endpoint. After it deploys, select **Go to resource**.
25+
* You will need the key and endpoint from the resource you create to connect your application to the QnA Maker API. You'll paste your key and endpoint into the code below later in the quickstart.
26+
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
2427

2528
## Setting up
2629

@@ -126,7 +129,7 @@ Make sure the include the [`wait_for_operation`](#get-status-of-an-operation) fu
126129

127130
## Publish a knowledge base
128131

129-
Publish the knowledge base using the [publish](https://docs.microsoft.com/javascript/api/@azure/cognitiveservices-qnamaker/knowledgebase?view=azure-node-latest#publish-string--msrest-requestoptionsbase-) method. This takes the current saved and trained model, referenced by the knowledge base ID, and publishes that at an endpoint. Check the HTTP response code to validate publish succeeded.
132+
Publish the knowledge base using the [publish](https://docs.microsoft.com/javascript/api/@azure/cognitiveservices-qnamaker/knowledgebase?view=azure-node-latest#publish-string--msrest-requestoptionsbase-) method. This takes the current saved and trained model, referenced by the knowledge base ID, and publishes that at an endpoint. Check the HTTP response code to validate that the publish succeeded.
130133

131134
[!code-javascript[Publish a knowledge base](~/cognitive-services-quickstart-code/javascript/QnAMaker/sdk/qnamaker_quickstart.js?name=publishKnowledgeBase&highlight=3)]
132135

articles/cognitive-services/QnAMaker/includes/quickstart-sdk-python.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ ms.date: 04/27/2020
77
Use the QnA Maker client library for python to:
88

99
* Create a knowledge base
10-
* Manage a knowledge base
10+
* Update a knowledge base
1111
* Publish a knowledge base
12+
* Get published endpoint key
13+
* Wait for long-running task
14+
* Delete knowledge base
1215

1316
[Reference documentation](https://docs.microsoft.com/python/api/azure-cognitiveservices-knowledge-qnamaker/azure.cognitiveservices.knowledge.qnamaker?view=azure-python) | [Library source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker) | [Package (pypi)](https://pypi.org/project/azure-cognitiveservices-knowledge-qnamaker/) | [Python samples](https://github.com/Azure-Samples/cognitive-services-qnamaker-python/blob/master/documentation-samples/quickstarts/knowledgebase_quickstart/knowledgebase_quickstart.py)
1417

@@ -18,6 +21,9 @@ Use the QnA Maker client library for python to:
1821

1922
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/)
2023
* [Python 3.x](https://www.python.org/)
24+
* Once you have your Azure subscription, create a [QnA Maker resource](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesQnAMaker) in the Azure portal to get your authoring key and endpoint. After it deploys, select **Go to resource**.
25+
* You will need the key and endpoint from the resource you create to connect your application to the QnA Maker API. You'll paste your key and endpoint into the code below later in the quickstart.
26+
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
2127

2228
## Setting up
2329

0 commit comments

Comments
 (0)