Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
botbuilder-ai
Advanced tools
Cognitive services extensions for Microsoft BotBuilder.
Cognitive services extensions for Microsoft BotBuilder.
To add the latest version of this package to your bot:
npm install --save botbuilder-ai
To get access to the daily builds of this library, configure npm to use the MyGet feed before installing.
npm config set registry https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/
To reset the registry in order to get the latest published version, run:
npm config set registry https://registry.npmjs.org/
This module contains interfaces for using Microsoft LUIS and Microsoft QnA Maker in your Botbuilder application.
First, import the nessary functionality into your app.
const { LuisRecognizer, QnAMaker } = require('botbuilder-ai');
Configure and instantiate a LuisRecognizer. You will need to acquire values for appId, subscriptionKey and region from the LUIS website.
// Map the contents to the required format for `LuisRecognizer`.
const luisApplication = {
applicationId: process.env.appId,
endpointKey: process.env.subscriptionKey,
azureRegion: process.env.region
}
// Create configuration for LuisRecognizer's runtime behavior.
const luisPredictionOptions = {
includeAllIntents: true,
log: true,
staging: false
}
const luisRecognizer = new LuisRecognizer(luisApplication, luisPredictionOptions, true);
Now, call LUIS into action once you've got a TurnContext object:
// Listen for incoming requests.
server.post('/api/messages', (req, res) => {
adapter.processActivity(req, res, async (turnContext) => {
const results = await luisRecognizer.recognize(turnContext);
// Since the LuisRecognizer was configured to include the raw results, get the `topScoringIntent` as specified by LUIS.
const topIntent = results.luisResult.topScoringIntent;
// Now, use topIntent to decide what action to take.
switch (topIntent) {
case '<some intent>':
// ...
break;
}
});
});
See this module in action in these example apps:
FAQs
Cognitive services extensions for Microsoft BotBuilder.
The npm package botbuilder-ai receives a total of 1,106 weekly downloads. As such, botbuilder-ai popularity was classified as popular.
We found that botbuilder-ai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.