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

orchestrator-core

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orchestrator-core

Orchestrator for Node.js

  • 4.11.0-dev.20201024.0c5247b
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
85
increased by13.33%
Maintainers
1
Weekly downloads
 
Created
Source

orchestrator-core

This package contains Orchestrator APIs for Node.js. Orchestrator is a transformer based solution for language understanding (LU) needs that is heavily optimized for conversational AI applications. It is built ground-up to run locally with your bot or application.

Prerequisite

Install Bot Framework Orchestrator CLI to download natural language representation model needed to use this library.

npm install -g @microsoft/bf-orchestrator-cli

Install

npm install -g orchestrator-core

Examples

const oc: any = require('orchestrator-core');
const orchestrator = new oc.Orchestrator();

// use bf cli orchestrator:nlr:get command to download Orchestrator model and 
// set nlrPath to where the model is downloaded to locally
if (!orchestrator.loadAsync(nlrPath)) {
    throw new Error('Failed loading Orchestrator model');
}

const example2 = { 
    label: 'schedule', 
    text: 'when is my next appointment?',
};
  
val = labeler.addExample(example2);
if (val == true)
{
    console.log('Added example2!');
}
  
const example3 = { 
   label: 'greeting', 
   text: 'hello there!',
};
  
val = labeler.addExample(example3);
if (val == true)
{
    console.log('Added example3!');
}

var results = labeler.score("hey");
console.log(JSON.stringify(results, null, 4));
var snapshot = labeler.createSnapshot();
  
// Create labeler initialized with previously created snapshot
let labeler2 = orchestrator.createLabelResolver(snapshot); 

// Get Examples
let examples = labeler2.getExamples();
  
// Remove Example
labeler2.removeExample(example3);

// examples should no longer have example3
examples = labeler2.getExamples();

// Get Labels
var labels = labeler2.getLabels();

Keywords

FAQs

Package last updated on 24 Oct 2020

Did you know?

Socket

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.

Install

Related posts

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