You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/QnAMaker/Quickstarts/create-new-kb-csharp.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,8 @@ Add the following code block inside the Program class:
62
62
63
63
The following code makes an HTTPS request to the QnA Maker API to create a KB and receives the response:
64
64
65
+
[!code-csharp[Add PostCreateKB to request via POST](~/samples-qnamaker-csharp/documentation-samples/quickstarts/create-knowledge-base/QnaQuickstartCreateKnowledgebase/Program.cs?range=145-165"Add PostCreateKB to request via POST")]
66
+
65
67
[!code-csharp[Add a POST request to create KB](~/samples-qnamaker-csharp/documentation-samples/quickstarts/create-knowledge-base/QnaQuickstartCreateKnowledgebase/Program.cs?range=101-122"Add a POST request to create KB")]
66
68
67
69
This API call returns a JSON response that includes the operation ID. Use the operation ID to determine if the KB is successfully created.
@@ -80,6 +82,8 @@ This API call returns a JSON response that includes the operation ID. Use the op
80
82
81
83
Check the status of the operation.
82
84
85
+
[!code-csharp[Add GetStatus to request via GET](~/samples-qnamaker-csharp/documentation-samples/quickstarts/create-knowledge-base/QnaQuickstartCreateKnowledgebase/Program.cs?range=167-187"Add GetStatus to request via GET")]
86
+
83
87
[!code-csharp[Add GET request to determine creation status](~/samples-qnamaker-csharp/documentation-samples/quickstarts/create-knowledge-base/QnaQuickstartCreateKnowledgebase/Program.cs?range=124-143"Add GET request to determine creation status")]
84
88
85
89
This API call returns a JSON response that includes the operation status:
0 commit comments