New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

watson-developer-cloud

Package Overview
Dependencies
Maintainers
3
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watson-developer-cloud - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

conversation/v1.js

@@ -55,3 +55,3 @@ /**

json: true,
body: pick(params, ['input', 'context']),
body: pick(params, ['input', 'context', 'alternate_intents']),
path: pick(params, ['workspace_id'])

@@ -58,0 +58,0 @@ },

{
"name": "watson-developer-cloud",
"version": "2.0.0",
"version": "2.0.1",
"description": "Client library to use the IBM Watson Services and AlchemyAPI",

@@ -5,0 +5,0 @@ "main": "./lib/index",

@@ -14,3 +14,3 @@ Watson Developer Cloud Node.js SDK

## Table of Contents
* [Major Changes for v2](#breaking-changes-for-v2)
* [Major Changes for v2](#major-changes-for-v2)
* [Installation](#installation)

@@ -41,3 +41,2 @@ * [Usage](#usage)

* [Visual Recognition](#visual-recognition)
* [Running in Bluemix with Alternate Credentials](#running-in-bluemix-with-alternate-credentials)
* [Debug](#debug)

@@ -55,5 +54,7 @@ * [Tests](#tests)

1. User-supplied credentials passed to the service constructor
2. SERVICE_NAME_USERNAME/PASSWORD environment properties (or _API_KEY when appropriate)
3. Bluemix-supplied credentials (via the VCAP_SERVICES JSON-encoded environment property)
1) User-supplied credentials passed to the service constructor
2) `SERVICE_NAME_USERNAME` and `SERVICE_NAME_PASSWORD` environment properties (or `SERVICE_NAME_API_KEY` when appropriate)
3) Bluemix-supplied credentials (via the `VCAP_SERVICES` JSON-encoded environment property)

@@ -80,3 +81,3 @@ * Client-side support via [Browserify](http://browserify.org/)

```js
// Alternate methods using the library.
// Alternate methods of using the library.
// Not recommended, especially for client-side JS.

@@ -251,5 +252,5 @@ var watson = require('watson-developer-cloud');

Use the [Conversation](http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/conversation.html) service to determine the intent of a message.
Use the [Conversation](http://www.ibm.com/watson/developercloud/conversation.html) service to determine the intent of a message.
Note: you must first create a workspace via Bluemix. See [the documentation](http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/conversation/overview.shtml) for details.
Note: you must first create a workspace via Bluemix. See [the documentation](http://www.ibm.com/watson/developercloud/doc/conversation/overview.shtml) for details.

@@ -372,3 +373,3 @@ ```js

Use [Natural Language Classifier](http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/nl-classifier/) service to create a classifier instance by providing a set of representative strings and a set of one or more correct classes for each as training. Then use the trained classifier to classify your new question for best matching answers or to retrieve next actions for your application.
Use [Natural Language Classifier](http://www.ibm.com/watson/developercloud/doc/nl-classifier/) service to create a classifier instance by providing a set of representative strings and a set of one or more correct classes for each as training. Then use the trained classifier to classify your new question for best matching answers or to retrieve next actions for your application.

@@ -632,16 +633,2 @@ ```javascript

## Running in Bluemix with Alternate Credentials
By default, the library tries to use the Bluemix `VCAP_SERVICES` environment variable to get the credentials for a given
service, and if found, it prefers these over user-supplied credentials.
You can disable this by setting `use_vcap_services` to `false`:
```javascript
var watson = require('watson-developer-cloud');
var tone_analyzer = watson.tone_analyzer({
use_vcap_services: false,
/* ... */
});
```
## Unauthenticated requests

@@ -694,14 +681,14 @@ By default, the library tries to use Basic Auth and will ask for `api_key` or `username` and `password` and send an `Authorization: Basic XXXXXXX`. You can avoid this by using:

[personality_insights]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/personality-insights/
[relationship_extraction]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/sireapi/
[retrieve_and_rank]: http://watson.stage1.mybluemix.net/smarterplanet/us/en/ibmwatson/developercloud/retrieve-rank.html
[visual_recognition]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/visual-recognition/
[visual_insights]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/visual-insights/
[personality_insights]: http://www.ibm.com/watson/developercloud/doc/personality-insights/
[relationship_extraction]: http://www.ibm.com/watson/developercloud/doc/sireapi/
[retrieve_and_rank]: http://watson.stage1.mybluemix.net/watson/developercloud/retrieve-rank.html
[visual_recognition]: http://www.ibm.com/watson/developercloud/doc/visual-recognition/
[visual_insights]: http://www.ibm.com/watson/developercloud/doc/visual-insights/
[tone_analyzer]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/tone-analyzer.html
[text_to_speech]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/text-to-speech/
[speech_to_text]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/speech-to-text/
[concept_insights]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/concept-insights/
[tradeoff_analytics]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/tradeoff-analytics/
[language_translator]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/language-translation/
[tone_analyzer]: http://www.ibm.com/watson/developercloud/tone-analyzer.html
[text_to_speech]: http://www.ibm.com/watson/developercloud/doc/text-to-speech/
[speech_to_text]: http://www.ibm.com/watson/developercloud/doc/speech-to-text/
[concept_insights]: http://www.ibm.com/watson/developercloud/doc/concept-insights/
[tradeoff_analytics]: http://www.ibm.com/watson/developercloud/doc/tradeoff-analytics/
[language_translator]: http://www.ibm.com/watson/developercloud/doc/language-translation/

@@ -713,3 +700,3 @@ [alchemy_language]: http://www.alchemyapi.com/products/alchemylanguage

[wdc]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/
[wdc]: http://www.ibm.com/watson/developercloud/
[bluemix]: https://console.ng.bluemix.net

@@ -716,0 +703,0 @@ [npm_link]: https://www.npmjs.com/package/watson-developer-cloud

@@ -467,2 +467,49 @@ /**

/**
* Retrain a existing classifier from example images which are uploaded.
* This call returns before retraining has completed. You'll need to use the
* getClassifer method to make sure the classifier has completed retraining and
* was successful before you can classify any images with the retrained
* classifier.
*
* @example
* {
* "classifier_id": "fruit_679357912",
* "name": "fruit",
* "owner": "a3a48ea7-492b-448b-87d7-9dade8bde5a9",
* "status": "training",
* "created": "2016-05-23T21:50:41.680Z",
* "classes": [{
* "class": "banana"
* }, {
* "class": "apple"
* }]
* }
*
* @param {Object} params
* @param {ReadStream} params.classname_positive_examples <your_class_name>_positive_examples One or more compressed (.zip) files of images that depict the visual subject for a class within the classifier. You may supply multiple files with different class names in the key.
* @param {ReadStream} [params.negative_examples] A compressed (.zip) file of images that do not depict the visual subject of any of the classes of the classifier.
*
* @returns {ReadableStream|undefined}
*/
VisualRecognitionV3.prototype.retrainClassifier = function(params, callback) {
params = params || {};
var allowed_keys = Object.keys(params).filter(function(key) {
return key === NEGATIVE_EXAMPLES || key.match(/^.+_positive_examples$/);
});
var parameters = {
options: {
url: '/v3/classifiers/' + params.classifier_id,
method: 'POST',
json: true,
formData: pick(params, allowed_keys)
},
requiredParams: [],
defaultOptions: this._options
};
return requestFactory(parameters, errorFormatter(callback));
};
/**
* Retrieve a list of all classifiers, including built-in and

@@ -469,0 +516,0 @@ * user-created classifiers.

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