diff --git a/.env.sample b/.env.sample index 0a0d4ba..66e76f3 100644 --- a/.env.sample +++ b/.env.sample @@ -11,4 +11,14 @@ CLOUDANT_URL= LOGGER_LEVEL= # set to true to make the expertise authenticate requests -AUTHENTICATE_REQUESTS=false \ No newline at end of file +AUTHENTICATE_REQUESTS=false + +# set wcs credentials (can also be set in the wcs.json file), you need to set them all for this to work. +WCS_USERNAME = +WCS_URL = +WCS_PASSWORD = +WCS_VERSION_DATE = +WCS_VERSION = +WCS_WORKSPACE_ID = +WCS_WORKSPACE_NAME = +WCS_WORKSPACE_LANGUAGE = \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index ef23f35..f60e617 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -184,7 +184,7 @@ same "printed page" as the copyright notice for easier identification within third party archives. -Copyright IBM Corp. Year 2017 +Copyright IBM Corp. Year 2018 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/index.js b/index.js index 09a7818..3e0a49a 100755 --- a/index.js +++ b/index.js @@ -18,25 +18,23 @@ require('dotenv').config(); if(manifest.nlu.indexOf('wcs') > -1) { handler.initialize(); } -let newManifest = JSON.parse(JSON.stringify(manifest)); -//in case the nlu is handled in the skill - create nlu engines -let index = newManifest.nlu.indexOf('skill'); -newManifest.nlu.splice(index, 1); -if(index > -1) { - if(newManifest.nlu.length < 1) { - console.log('No Nlu engines selected, you need to add the nlu engines you want to use to manifest.nlu (along with "skill") ') - } - else { - factory.getNLUs(newManifest).then(updatedManifest => { - if (updatedManifest.nlu.regexp) { - updatedManifest.intents = require('./res/nlu/intents'); - } - handler.manifest = updatedManifest; - factory.createAll(updatedManifest).then(function (engines) { - handler.engines = engines; - }); +let localManifest = JSON.parse(JSON.stringify(manifest)); +let index = localManifest.nlu.indexOf('skill'); +if(index !== -1) { + localManifest.nlu.splice(index, 1); +} +if (localManifest.nlu.length < 1) { + console.error('No Nlu engines selected, you need to add the nlu engines you want to use to manifest.json nlu field') +} else { + factory.getNLUs(localManifest).then(updatedManifest => { + if (updatedManifest.nlu.regexp) { + updatedManifest.intents = require('./res/nlu/intents'); + } + handler.manifest = updatedManifest; + factory.createAll(updatedManifest).then(function (engines) { + handler.engines = engines; }); - } + }); } // The expertise handler diff --git a/res/assets/manifest.json b/res/assets/manifest.json index eb06fc7..e14e5b2 100755 --- a/res/assets/manifest.json +++ b/res/assets/manifest.json @@ -9,7 +9,7 @@ "en-US" ], "nlu": [ - "skill", "regexp" + "wcs", "regexp", "skill" ], "tags": [ "hello world" diff --git a/skill_debugger_tool/Windows/skill_debugger.exe b/skill_debugger_tool/Windows/skill_debugger.exe index ddc9831..9aa666b 100644 Binary files a/skill_debugger_tool/Windows/skill_debugger.exe and b/skill_debugger_tool/Windows/skill_debugger.exe differ diff --git a/skill_debugger_tool/macOS/skill_debugger b/skill_debugger_tool/macOS/skill_debugger index 22b9f71..9ba4daf 100755 Binary files a/skill_debugger_tool/macOS/skill_debugger and b/skill_debugger_tool/macOS/skill_debugger differ