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

@nlpjs/slot

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nlpjs/slot - npm Package Compare versions

Comparing version 4.25.0 to 4.26.0

4

package.json
{
"name": "@nlpjs/slot",
"version": "4.25.0",
"version": "4.26.0",
"description": "Slot filling manager",

@@ -27,3 +27,3 @@ "author": {

},
"gitHead": "3065165b42ea2160d2a27c10c412c4b4c491332a"
"gitHead": "5d3f12ccb34890b4f358af85b4617a0d07197027"
}

@@ -148,2 +148,12 @@ /*

/**
* Given an intent return the information if the intent has entities defined
*
* @param {String} intent Name of the intent.
* @returns {boolean} true if intent has defined entities, else false
*/
hasIntentEntities(intent) {
return this.getIntentEntityNames(intent).length > 0;
}
/**
* Clear the slot manager.

@@ -247,3 +257,2 @@ */

const entity = result.entities[i];
console.log('handle entity', entity.option, entity.entity, aliases[i]);
// Remove existing mandatory entities to see what's left

@@ -266,2 +275,3 @@ delete mandatorySlots[entity.entity];

len: result.utterance.length,
isSlotFillingFallback: true,
});

@@ -271,2 +281,5 @@ delete mandatorySlots[context.slotFill.currentSlot];

keys = Object.keys(mandatorySlots);
if (context.slotFill && context.slotFill.currentSlot) {
context.slotFill.latestSlot = context.slotFill.currentSlot;
}
if (!keys || keys.length === 0) {

@@ -286,2 +299,3 @@ // All mandatory slots are filled, so we are done. No further questions needed

srcAnswer: result.srcAnswer,
latestSlot: context.slotFill.latestSlot,
};

@@ -288,0 +302,0 @@ const currentSlot = mandatorySlots[keys[0]];

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