Skip to content

Commit

Permalink
Merge pull request #33 from Watson-Personal-Assistant/pre-release
Browse files Browse the repository at this point in the history
Merging pre-release with master for 14-jun release
  • Loading branch information
gaynell-gonsalves authored Jun 18, 2018
2 parents ead1fdb + c643e4a commit 880d2a7
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
12 changes: 11 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ CLOUDANT_URL=
LOGGER_LEVEL=

# set to true to make the expertise authenticate requests
AUTHENTICATE_REQUESTS=false
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 =
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
34 changes: 16 additions & 18 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion res/assets/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"en-US"
],
"nlu": [
"skill", "regexp"
"wcs", "regexp", "skill"
],
"tags": [
"hello world"
Expand Down
Binary file modified skill_debugger_tool/Windows/skill_debugger.exe
Binary file not shown.
Binary file modified skill_debugger_tool/macOS/skill_debugger
Binary file not shown.

0 comments on commit 880d2a7

Please sign in to comment.