Skip to content

Commit

Permalink
Bump ibm-watson dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
chughts committed Mar 24, 2022
1 parent f6fe6d0 commit a1520b0
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 11 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Node-RED Watson Nodes for IBM Cloud

### New in version 0.10.0
- Bump of dependencies
- ibm-watson to 6.2.2
- Min version of Node is 12.20.0
- Drop Personality Insights node
- Drop Visual Recognition nodes
- Remove Username / Password fields from all nodes
- Remove Username / Password fields from all nodes
- Bump to latest version of services


### Watson Nodes for Node-RED
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"request": "~2.88.2",
"temp": "^0.9.4",
"qs": "^6.10.3",
"ibm-watson": "^5.2.1",
"ibm-watson": "^6.2.2",
"is-docx": "^0.0.3",
"stream-to-array": "^2.3.0",
"ws": "^8.5.0"
Expand Down
2 changes: 1 addition & 1 deletion services/assistant/v1-workspace-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ module.exports = function (RED) {

function executeMethod(node, method, params, msg) {
let conv = null,
version = '2018-09-20',
version = '2021-11-27',
authSettings = {},
serviceSettings = {
version_date: version,
Expand Down
2 changes: 1 addition & 1 deletion services/assistant/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ module.exports = function(RED) {
let apiKey = sApikey || node.credentials.apikey,
endpoint = '',
optoutLearning = false,
version = '2018-09-20';
version = '2021-11-27';

if (!verifyCredentials(msg, apiKey)) {
reject('Missing Watson Assistant API service credentials');
Expand Down
2 changes: 1 addition & 1 deletion services/assistant/v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
module.exports = function(RED) {
const SERVICE_IDENTIFIER = 'assistant',
OLD_SERVICE_IDENTIFIER = 'conversation',
SERVICE_VERSION = '2018-11-08',
SERVICE_VERSION = '2021-11-27',
AssistantV2 = require('ibm-watson/assistant/v2'),
{ IamAuthenticator } = require('ibm-watson/auth'),
INVALID_SESSION = 'Invalid Session';
Expand Down
2 changes: 1 addition & 1 deletion services/discovery/v1-document-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = function (RED) {
apikey = null,
sApikey = null,
endpoint = '',
sEndpoint = 'https://gateway.watsonplatform.net/discovery/api';
sEndpoint = '';

temp.track();

Expand Down
2 changes: 1 addition & 1 deletion services/discovery/v1-query-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = function(RED) {
sUsername = null,
sPassword = null,
sApikey = null,
sEndpoint = 'https://gateway.watsonplatform.net/discovery/api';
sEndpoint = '';


if (dservice) {
Expand Down
2 changes: 1 addition & 1 deletion services/discovery/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function (RED) {
apikey = null,
sApikey = null,
endpoint = '',
sEndpoint = 'https://gateway.watsonplatform.net/discovery/api';
sEndpoint = '';

const ExecutionList = {
'createEnvrionment': executeCreateEnvrionment,
Expand Down
5 changes: 3 additions & 2 deletions services/natural_language_understanding/v1-model-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = function(RED) {
apikey = '',
service = null,
endpoint = '',
sEndpoint = 'https://gateway.watsonplatform.net/natural-language-understanding/api';
sEndpoint = '';


service = serviceutils.getServiceCreds(SERVICE_IDENTIFIER);
Expand Down Expand Up @@ -124,7 +124,7 @@ module.exports = function(RED) {
let authSettings = {};

var serviceSettings = {
version: '2019-07-12',
version: '2021-08-01',
headers: {
'User-Agent': pkg.name + '-' + pkg.version
}
Expand All @@ -148,6 +148,7 @@ module.exports = function(RED) {
if (!endpoint && config['nlu-service-endpoint']) {
endpoint = config['nlu-service-endpoint'];
}

if (!endpoint) {
return Promise.reject('No endpoint URL has been provided');
}
Expand Down
2 changes: 1 addition & 1 deletion services/natural_language_understanding/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ module.exports = function (RED) {
let nlu = null,
authSettings = {};
serviceSettings = {
version: '2019-07-12',
version: '2021-08-01',
headers: {
'User-Agent': pkg.name + '-' + pkg.version
}
Expand Down

0 comments on commit a1520b0

Please sign in to comment.