Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botbuilder

Package Overview
Dependencies
Maintainers
1
Versions
631
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botbuilder - npm Package Compare versions

Comparing version 3.8.2 to 3.8.3

9

lib/bots/ChatConnector.js

@@ -563,3 +563,3 @@ "use strict";

ChatConnector.prototype.addUserAgent = function (options) {
if (options.headers == null) {
if (!options.headers) {
options.headers = {};

@@ -573,5 +573,6 @@ }

if (!err && token) {
options.headers = {
'Authorization': 'Bearer ' + token
};
if (!options.headers) {
options.headers = {};
}
options.headers['Authorization'] = 'Bearer ' + token;
cb(null);

@@ -578,0 +579,0 @@ }

@@ -5,3 +5,3 @@ "use strict";

var consts = require("../consts");
var simpleTokenizer = /\w+/ig;
var breakingChars = " \n\r~`!@#$%^&*()-+={}|[]\\:\";'<>?,./";
var PromptRecognizers = (function () {

@@ -168,3 +168,3 @@ function PromptRecognizers() {

}
var match = PromptRecognizers.findTopEntity(PromptRecognizers.recognizeValues(utterance, values));
var match = PromptRecognizers.findTopEntity(PromptRecognizers.recognizeValues(utterance, values, options));
if (match) {

@@ -219,3 +219,3 @@ entities.push({

var text = utterance.trim().toLowerCase();
var tokens = matchAll(simpleTokenizer, text);
var tokens = tokenize(text);
var maxDistance = options.hasOwnProperty('maxTokenDistance') ? options.maxTokenDistance : 2;

@@ -225,3 +225,3 @@ values.forEach(function (value, index) {

var topScore = 0.0;
var vTokens = matchAll(simpleTokenizer, value.trim().toLowerCase());
var vTokens = tokenize(value.trim().toLowerCase());
for (var i = 0; i < tokens.length; i++) {

@@ -285,1 +285,23 @@ var score = matchValue(vTokens, i);

}
function tokenize(text) {
var tokens = [];
if (text && text.length > 0) {
var token = '';
for (var i = 0; i < text.length; i++) {
var chr = text[i];
if (breakingChars.indexOf(chr) >= 0) {
if (token.length > 0) {
tokens.push(token);
}
token = '';
}
else {
token += chr;
}
}
if (token.length > 0) {
tokens.push(token);
}
}
return tokens;
}

@@ -5,3 +5,3 @@ {

"description": "Bot Builder is a dialog system for building rich bots on virtually any platform.",
"version": "3.8.2",
"version": "3.8.3",
"license": "MIT",

@@ -8,0 +8,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc