ractiv-update-kb-qna

1.0.3 • Public • Published

ractiv-update-kb-qna

Add QnA pairs in your knowledge base.

Installation

npm install ractiv-update-kb-qna

Usage

const kbUpdater = require('ractiv-update-kb-qna');

var respose = kbUpdater.updateKnowledgeBase(kbID, kbKey, kbEndpoint, filePath, qnaFileName);
// kbID: This is your Knowledge Base ID.
// kbKey: This is the authoring key for your cognitive services.
// kbEndpoint: This is the endpoint of your cognitive services.
// filePath: Path to excel file from where QnA pairs are to be picked.
//qnaFileName: This is the source name which will be updated as your file name in knowledgebase.

/*Your excel file should strictly follow the following structure:
---------------------------------------------------------------------------------------
1| Main Question        |  Alternative Phrase          |         Answer                |
---------------------------------------------------------------------------------------
2|Is this npm helpful?  | ractiv-update-kb-qna helpful?| That depends on your use case.
----------------------------------------------------------------------------------------
3|                      | first attempt on npm ?       |
----------------------------------------------------------------------------------------
4|                      | another alternative phrase?  |                   
----------------------------------------------------------------------------------------
*/

//If ran correctly you will have 3 questions updated in your KB with the same answer.
//The method also returns the response from qnAMAker that has the operation id as well.
//You can check the status of your update request with the help of operation id. 

Upcoming Features

  1. Auto formatting in answers like bullet lists and numbered lists
  2. Wait till the QnA update is succesful.

License

ISC

Package Sidebar

Install

npm i ractiv-update-kb-qna

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

4.15 kB

Total Files

3

Last publish

Collaborators

  • 8bitthug