ractiv-update-kb-qna
v1.0.3
Published
Update QnA pairs from an excel File
Downloads
5
Maintainers
Readme
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
- Auto formatting in answers like bullet lists and numbered lists
- Wait till the QnA update is succesful.