Skip to content
Using the Microsoft QnA Maker API -- samples in Node.js.
Branch: master
Clone or download
wiazur Merge pull request #9 from v-jaswel/patch-1
Create knowledgebase_quickstart.js
Latest commit ac9640e Jun 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
documentation-samples Create knowledgebase_quickstart.js Jun 20, 2019
.gitignore Initial commit Jul 16, 2018
CHANGELOG.md Initial commit Jul 16, 2018
CONTRIBUTING.md Initial commit Jul 16, 2018
LICENSE.md Initial commit Jul 16, 2018
README.md remove python from links Oct 2, 2018
delete-knowledge-base.js Added delete knowledge base Sep 12, 2018
download-knowledge-base.js Initial commit Jul 18, 2018
find-kb-id.png Added KB image Sep 12, 2018
replace-knowledge-base.js Initial commit Jul 18, 2018

README.md

Cognitive Services QnA Maker Samples in Node.js

These REST samples show you how to programmatically create, update, publish, and replace a QnA Maker knowledge base, amongst many other ways to interact with it. All samples are in Node.js. To view these same samples in other languages:

cognitive-services-qnamaker-csharp

cognitive-services-qnamaker-java

cognitive-services-qnamaker-python

Features

Included are the following samples:

All REST samples revolve around what you can do with a knowledge base, which is made up of FAQs or product manuals where there is a question and an answer. QnA Maker gives you more control over how to answer questions by allowing you to train a chat bot to give answers in a variety of ways that feels more like natural, conversational exchanges.

Getting Started

Prerequisites

For each sample, a subscription key is required from your Azure Portal account.

With the exception of creating a new knowledge base, these samples will require your QnA Maker account knowledge base ID. To find your knowledge base ID, go to My knowledge bases and select View Code on the right. You'll see the http request and your knowledge base ID is in the topmost line: for example, POST /knowledgebases/2700e6b9-91a1-41e9-a958-6d1a98735b10/.... Use only the ID.

Run the sample

  1. Create a Node.js project in your favorite IDE or create one in Visual Studio 2017 by expanding Javascript in the new project popup and selecting Node.js, then Blank Node.js Console Application.

  2. Copy/paste the sample you want to test in the app.js file.

  3. Add your Azure subscription key for QnA Maker and add your knowledge base ID (if applicable) to the code at the top.

  4. Run the sample.

  5. Check your knowledge bases in qnamaker.ai to see changes.

Quickstart

References

You can’t perform that action at this time.