
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
@ads-vdh/qnamaker-api
Advanced tools
Provides a wrapper around the Cognitive Services APIs for QnaMaker
Install on npm
npm install @ads-vdh/qnamaker-api --save
Initialize the Client:
let qnaMakerApi = require("@ads-vdh/qnamaker-api");
let client = qnaMakerApi({
endpoint: endpoint,
apiKey: ocpApimSubscriptionKey,
kbId: kbId, // optional (sets default for each method)
});
Knowledge Base Methods:
let knowledgeBases = await client.knowledgeBase.listAll();
let knowledgeBase = await client.knowledgeBase.download(kbId);
let kbDetails = await client.knowledgeBase.getDetails(kbId);
await client.knowledgeBase.publish(kbId);
await client.knowledgeBase.replace(kbId, qnaList);
await client.knowledgeBase.replace(kbId, qnaUpdates);
Alterations Methods:
let alterations = await client.alterations.get();
await client.alterations.replace(alterations);
Store your environment variables in a file named .env
that looks something like this:
Endpoint=https://***.cognitiveservices.azure.com
kbId=***
OcpApimSubscriptionKey=***
Then use the dot-env
package to read them in like this:
require("dotenv").config();
which should then make the environment variables available like this:
let client = qnaMakerApi({
endpoint: process.env.Endpoint,
apiKey: process.env.OcpApimSubscriptionKey,
kbId: process.env.kbId,
});
FAQs
An unofficial node wrapper for the Microsoft QnAMaker API
We found that @ads-vdh/qnamaker-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.