@ibm-watson/assistant-intermediate
Advanced tools
Comparing version 2.1.0 to 2.1.1
20
app.js
@@ -21,3 +21,3 @@ /** | ||
var bodyParser = require('body-parser'); // parser for post requests | ||
var AssistantV2 = require('watson-developer-cloud/assistant/v2'); // watson sdk | ||
var AssistantV2 = require('ibm-watson/assistant/v2'); // watson sdk | ||
@@ -27,2 +27,5 @@ var Actions = require('./functions/actions'); | ||
var SearchDocs = require('./functions/searchDocs'); | ||
var searchDocs = new SearchDocs(); | ||
var BankFunctions = require('./functions/bankFunctions'); | ||
@@ -82,4 +85,2 @@ var bankFunctions = new BankFunctions(); | ||
//console.log(JSON.stringify(contextWithAcc, null, 2)); | ||
var textIn = ''; | ||
@@ -103,3 +104,3 @@ | ||
}; | ||
// Send the input to the assistant service | ||
@@ -110,6 +111,9 @@ assistant.message(payload, function (err, data) { | ||
} | ||
actions.testForAction(data, req.body.session_id).then(function (d) { | ||
return res.json(d); | ||
}).catch(function (error) { | ||
return res.json(error); | ||
searchDocs.addDocs(data, function () { | ||
actions.testForAction(data, req.body.session_id).then(function (d) { | ||
return res.json(d); | ||
}).catch(function (error) { | ||
return res.json(error); | ||
}); | ||
}); | ||
@@ -116,0 +120,0 @@ }); |
{ | ||
"name": "@ibm-watson/assistant-intermediate", | ||
"description": "A simple Node.js based web app which shows how to use the Watson Assistant API to recognize user intents.", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"main": "server.js", | ||
@@ -23,5 +23,5 @@ "scripts": { | ||
"body-parser": "^1.18.3", | ||
"dotenv": "^6.1.0", | ||
"dotenv": "^6.2.0", | ||
"express": "^4.16.4", | ||
"watson-developer-cloud": "^3.13.1" | ||
"ibm-watson": "4.1.0" | ||
}, | ||
@@ -39,8 +39,8 @@ "publishConfig": { | ||
"casperjs": "^1.1.4", | ||
"codecov": "^3.1.0", | ||
"eslint": "^5.8.0", | ||
"jest": "^23.6.0", | ||
"codecov": "^3.2.0", | ||
"eslint": "^5.14.0", | ||
"jest": "^24.1.0", | ||
"phantomjs-prebuilt": "^2.1.16", | ||
"supertest": "^3.3.0" | ||
"supertest": "^3.4.2" | ||
} | ||
} |
@@ -248,3 +248,3 @@ // The ConversationPanel module is designed to handle | ||
'<br>' + ((res.body.length > 200) ? res.body.substring(0, 120) + '...' : res.body) + | ||
((res.url !== null && res.url.length > 0) ? '<br><a href="' + res.url + '" target="_blank">' + res.url + '</a>': '') + | ||
'<br><a href="docs/doc' + (i + 1)+ '.html" target="_blank">Full document</a>' + | ||
'</div>'; | ||
@@ -251,0 +251,0 @@ } |
@@ -154,7 +154,7 @@ <h1 align="center" style="border-bottom: none;">🚀 Watson Assistant (formerly Conversation) Sample Application</h1> | ||
[demo_url]: https://assistant-intermediate.ng.bluemix.net/ | ||
[doc_intents]: (https://console.bluemix.net/docs/services/conversation/intents-entities.html#planning-your-entities) | ||
[docs]: https://console.bluemix.net/docs/services/conversation/index.html | ||
[docs_landing]: (https://console.bluemix.net/docs/services/conversation/index.html) | ||
[doc_intents]: (https://cloud.ibm.com/docs/services/conversation/intents-entities.html#planning-your-entities) | ||
[docs]: https://cloud.ibm.com/docs/services/assistant?topic=assistant-index | ||
[docs_landing]: (https://cloud.ibm.com/docs/services/assistant?topic=assistant-index) | ||
[node_link]: (http://nodejs.org/) | ||
[npm_link]: (https://www.npmjs.com/) | ||
[sign_up]: bluemix.net/registration | ||
[sign_up]: cloud.ibm.com/registration |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
59147447
49
14162
7
+ Addedibm-watson@4.1.0
+ Added@types/node@11.15.54(transitive)
+ Addedaxios@0.18.1(transitive)
+ Addedfile-type@10.11.0(transitive)
+ Addedfollow-redirects@1.5.10(transitive)
+ Addedform-data@2.5.2(transitive)
+ Addedibm-cloud-sdk-core@0.1.2(transitive)
+ Addedibm-watson@4.1.0(transitive)
+ Addedis-buffer@2.0.5(transitive)
+ Addedvcap_services@0.7.1(transitive)
- Removedwatson-developer-cloud@^3.13.1
- Removed@types/caseless@0.12.5(transitive)
- Removed@types/form-data@2.5.2(transitive)
- Removed@types/request@2.47.1(transitive)
- Removed@types/tough-cookie@4.0.5(transitive)
- Removedajv@5.5.2(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedco@4.6.0(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removedcsv-stringify@1.0.4(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddotenv@2.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@1.1.0(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.34.0.1(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.0.3(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedibm-cloud-sdk-core@0.0.3(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.3.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedlodash.get@4.4.2(transitive)
- Removedoauth-sign@0.8.2(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrequest@2.87.0(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedtough-cookie@2.3.4(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
- Removedwatson-developer-cloud@3.18.4(transitive)
Updateddotenv@^6.2.0