You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All SDK methods are asynchronous, as they are making network requests to Watson services. To handle receiving the data from these requests, the SDK offers support for both Promises and Callback functions. Note that support for Callbacks is being deprecated and will be removed in a future major release. Using Promises is recommended.
225
+
## Promises
228
226
227
+
All SDK methods are asynchronous, as they are making network requests to Watson services. To handle receiving the data from these requests, the SDK offers support with Promises.
asyncfunctioncallDiscovery() { // note that callDiscovery also returns a Promise
247
246
constbody=awaitdiscovery.listEnvironments();
248
247
}
249
-
250
-
// using a Callback function
251
-
discovery.listEnvironments((err, res) => {
252
-
if (err) {
253
-
console.log(err);
254
-
} else {
255
-
console.log(JSON.stringify(res, null, 2));
256
-
}
257
-
});
258
248
```
259
249
260
250
## Sending request headers
@@ -525,6 +515,7 @@ assistant.message(
525
515
```
526
516
527
517
### Compare Comply
518
+
**IBM Watson™ Compare and Comply is discontinued. Existing instances are supported until 30 November 2021, but as of 1 December 2020, you can't create instances. Any instance that exists on 30 November 2021 will be deleted. Consider migrating to Watson Discovery Premium on IBM Cloud for your Compare and Comply use cases. To start the migration process, visit https://ibm.biz/contact-wdc-premium.**
528
519
529
520
Use the Compare Comply service to compare and classify documents.
530
521
@@ -856,6 +847,7 @@ toneAnalyzer.tone(
856
847
```
857
848
858
849
### Visual Recognition v4
850
+
**IBM Watson™ Visual Recognition is discontinued. Existing instances are supported until 1 December 2021, but as of 7 January 2021, you can't create instances. Any instance that is provisioned on 1 December 2021 will be deleted.**
859
851
860
852
Use the [Visual Recognition][visual_recognition] service to recognize the
0 commit comments