ibm_watson 2.1.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -39
  3. data/lib/ibm_watson/assistant_v1.rb +5 -4
  4. data/lib/ibm_watson/assistant_v2.rb +3 -3
  5. data/lib/ibm_watson/discovery_v1.rb +7 -14
  6. data/lib/ibm_watson/discovery_v2.rb +109 -108
  7. data/lib/ibm_watson/language_translator_v3.rb +2 -2
  8. data/lib/ibm_watson/natural_language_understanding_v1.rb +12 -14
  9. data/lib/ibm_watson/speech_to_text_v1.rb +581 -402
  10. data/lib/ibm_watson/text_to_speech_v1.rb +87 -166
  11. data/lib/ibm_watson/version.rb +1 -1
  12. data/lib/ibm_watson.rb +0 -6
  13. metadata +2 -20
  14. data/lib/ibm_watson/compare_comply_v1.rb +0 -683
  15. data/lib/ibm_watson/natural_language_classifier_v1.rb +0 -258
  16. data/lib/ibm_watson/personality_insights_v3.rb +0 -223
  17. data/lib/ibm_watson/tone_analyzer_v3.rb +0 -230
  18. data/lib/ibm_watson/visual_recognition_v3.rb +0 -517
  19. data/lib/ibm_watson/visual_recognition_v4.rb +0 -930
  20. data/test/integration/test_compare_comply_v1.rb +0 -105
  21. data/test/integration/test_natural_language_classifier_v1.rb +0 -80
  22. data/test/integration/test_personality_insights_v3.rb +0 -81
  23. data/test/integration/test_tone_analyzer_v3.rb +0 -66
  24. data/test/integration/test_visual_recognition_v3.rb +0 -68
  25. data/test/integration/test_visual_recognition_v4.rb +0 -87
  26. data/test/unit/test_compare_comply_v1.rb +0 -232
  27. data/test/unit/test_natural_language_classifier_v1.rb +0 -191
  28. data/test/unit/test_personality_insights_v3.rb +0 -192
  29. data/test/unit/test_tone_analyzer_v3.rb +0 -217
  30. data/test/unit/test_visual_recognition_v3.rb +0 -300
  31. data/test/unit/test_visual_recognition_v4.rb +0 -422
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4855d1f0d0409f6fcf35241392746eeebf914f291324de8800aa887f9e8ee96c
4
- data.tar.gz: 70ca55c6305cd18b96830799be213fdd2aa33d35252cf7016cb4582e6eafe29c
3
+ metadata.gz: b32319d7160def3e54e70e394e6625a1c7151ab1461a0ad10d71ec003c668f2e
4
+ data.tar.gz: ebf50af3225db592bde39d95a52e948b6afcf7aeb4592e264fb7c042d372da08
5
5
  SHA512:
6
- metadata.gz: 4465338e55529801fb063053aac73c41270d83e258a6bd9f0005f4bdaa511786cfdea38e1b5419d4f276382980f7f1aeb4be376f6ca099266e5d1cf46086f10f
7
- data.tar.gz: 38beeb9ca5a85c78d0419cbae8868d0cfb2f4200ea3e7ee34f897e86b314049977e790d0302d5ebba268bb869ba2f83bdd586f97ad0cf76f1fbaf93308cd491a
6
+ metadata.gz: 2b919569fd64e94902d4443f4f6b223b7cb0275471b45bc3b3910a8049b34d5f6285bb4ab590cef8644223abb87121f747a23d497a98035850a9110665cf705b
7
+ data.tar.gz: 3139ad59f347c4e3d51dec08603b80fccc71200748aeed8c2f9cd7b1fa2087371982f70c6fcc1d0cd50ffc6f21b2803c2454d5b0e3fd6631ce4edb1282780e40
data/README.md CHANGED
@@ -14,48 +14,29 @@
14
14
 
15
15
  Ruby gem to quickly get started with the various [IBM Watson][wdc] services.
16
16
 
17
- <details>
18
- <summary>Table of Contents</summary>
19
-
20
- * [Before you begin](#before-you-begin)
21
- * [Installation](#installation)
22
- * [Examples](#examples)
23
- * [Discovery v2 only on CP4D](#discovery-v2-only-on-cp4d)
24
- * [Running in IBM Cloud](#running-in-ibm-cloud)
25
- * [Authentication](#authentication)
26
- * [Getting credentials](#getting-credentials)
27
- * [IAM](#iam)
28
- * [Username and password](#username-and-password)
29
- * [Sending requests asynchronously](#sending-requests-asynchronously)
30
- * [Sending request headers](#sending-request-headers)
31
- * [Parsing HTTP response info](#parsing-http-response-info)
32
- * [Configuring the HTTP client](#configuring-the-http-client)
33
- * [Using Websockets](#using-websockets)
34
- * [Ruby version](#ruby-version)
35
- * [Contributing](#contributing)
36
- * [License](#license)
37
- * [Featured Projects](#featured-projects)
38
-
39
- </details>
40
-
41
17
  ## Announcements
18
+ ### Tone Analyzer Deprecation
19
+
20
+ As of this major release, 3.0.0, the Tone Analyzer api has been removed in preparation for deprecation. If you wish to continue using this sdk to make calls to Tone Analyzer until its final deprecation, you will have to use a previous version.
21
+
22
+ On 24 February 2022, IBM announced the deprecation of the Tone Analyzer service. The service will no longer be available as of 24 February 2023. As of 24 February 2022, you will not be able to create new instances. Existing instances will be supported until 24 February 2023.
23
+
24
+ As an alternative, we encourage you to consider migrating to the Natural Language Understanding service on IBM Cloud. With Natural Language Understanding, tone analysis is done by using a pre-built classifications model, which provides an easy way to detect language tones in written text. For more information, see [Migrating from Watson Tone Analyzer Customer Engagement endpoint to Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-tone_analytics).
25
+
26
+ ### Natural Language Classifier Deprecation
27
+
28
+ As of this major release, 3.0.0, the NLC api has been removed in preparation for deprecation. If you wish to continue using this sdk to make calls to NLC until its final deprecation, you will have to use a previous version.
29
+
30
+ On 9 August 2021, IBM announced the deprecation of the Natural Language Classifier service. The service will no longer be available from 8 August 2022. As of 9 September 2021, you will not be able to create new instances. Existing instances will be supported until 8 August 2022. Any instance that still exists on that date will be deleted.
31
+
32
+ As an alternative, we encourage you to consider migrating to the Natural Language Understanding service on IBM Cloud that uses deep learning to extract data and insights from text such as keywords, categories, sentiment, emotion, and syntax, along with advanced multi-label text classification capabilities, to provide even richer insights for your business or industry. For more information, see [Migrating to Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-classifier?topic=natural-language-classifier-migrating).
33
+
42
34
  ### Support for 2.7 ruby
43
35
  To support 2.7 the http gem dependency is updated to 4.4.0. Since it conflicted with the dependency in the ruby-sdk-core that gem was also updated. Using 2.0.2 or above ruby sdk will require a core of 1.1.3 or above.
44
36
 
45
37
  ### Updating endpoint URLs from watsonplatform.net
46
38
  Watson API endpoint URLs at watsonplatform.net are changing and will not work after 26 May 2021. Update your calls to use the newer endpoint URLs. For more information, see https://cloud.ibm.com/docs/watson?topic=watson-endpoint-change.
47
39
 
48
- ### Personality Insights deprecation
49
- IBM Watson™ Personality Insights is discontinued. For a period of one year from 1 December 2020, you will still be able to use Watson Personality Insights. However, as of 1 December 2021, the offering will no longer be available.
50
-
51
- As an alternative, we encourage you to consider migrating to IBM Watson™ [Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-understanding), a service on IBM Cloud® that uses deep learning to extract data and insights from text such as keywords, categories, sentiment, emotion, and syntax to provide insights for your business or industry. For more information, see About Natural Language Understanding.
52
-
53
- ### Visual Recognition deprecation
54
- 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.
55
-
56
- ### Compare and Comply deprecation
57
- 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.
58
-
59
40
  ## Before you begin
60
41
 
61
42
  * You need an [IBM Cloud][ibm-cloud-onboarding] account.
@@ -84,10 +65,6 @@ require "ibm_watson"
84
65
 
85
66
  The [examples][examples] folder has basic and advanced examples. The examples within each service assume that you already have [service credentials](#getting-credentials).
86
67
 
87
- ## Discovery v2 only on CP4D
88
-
89
- Discovery v2 is only available on Cloud Pak for Data.
90
-
91
68
  ## Running in IBM Cloud
92
69
 
93
70
  If you run your app in IBM Cloud, the SDK gets credentials from the [`VCAP_SERVICES`][vcap_services] environment variable.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (C) Copyright IBM Corp. 2018, 2020.
3
+ # (C) Copyright IBM Corp. 2018, 2022.
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
  #
17
- # IBM OpenAPI SDK Code Generator Version: 3.31.0-902c9336-20210504-161156
17
+ # IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025
18
18
  #
19
19
  # The IBM Watson&trade; Assistant service combines machine learning, natural language
20
20
  # understanding, and an integrated dialog editor to create conversation flows between your
@@ -43,7 +43,7 @@ module IBMWatson
43
43
  #
44
44
  # @param args [Hash] The args to initialize with
45
45
  # @option args version [String] Release date of the API version you want to use. Specify dates in YYYY-MM-DD
46
- # format. The current version is `2020-04-01`.
46
+ # format. The current version is `2021-11-27`.
47
47
  # @option args service_url [String] The base service URL to use when contacting the service.
48
48
  # The base service_url may differ between IBM Cloud regions.
49
49
  # @option args authenticator [Object] The Authenticator instance to be configured for this service.
@@ -2391,7 +2391,8 @@ module IBMWatson
2391
2391
  # @param filter [String] A cacheable parameter that limits the results to those matching the specified
2392
2392
  # filter. You must specify a filter query that includes a value for `language`, as
2393
2393
  # well as a value for `request.context.system.assistant_id`, `workspace_id`, or
2394
- # `request.context.metadata.deployment`. For more information, see the
2394
+ # `request.context.metadata.deployment`. These required filters must be specified
2395
+ # using the exact match (`::`) operator. For more information, see the
2395
2396
  # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
2396
2397
  # @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
2397
2398
  # reverse the sort order, prefix the parameter value with a minus sign (`-`).
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (C) Copyright IBM Corp. 2018, 2020.
3
+ # (C) Copyright IBM Corp. 2018, 2022.
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
  #
17
- # IBM OpenAPI SDK Code Generator Version: 3.31.0-902c9336-20210504-161156
17
+ # IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025
18
18
  #
19
19
  # The IBM Watson&trade; Assistant service combines machine learning, natural language
20
20
  # understanding, and an integrated dialog editor to create conversation flows between your
@@ -43,7 +43,7 @@ module IBMWatson
43
43
  #
44
44
  # @param args [Hash] The args to initialize with
45
45
  # @option args version [String] Release date of the API version you want to use. Specify dates in YYYY-MM-DD
46
- # format. The current version is `2020-09-24`.
46
+ # format. The current version is `2021-11-27`.
47
47
  # @option args service_url [String] The base service URL to use when contacting the service.
48
48
  # The base service_url may differ between IBM Cloud regions.
49
49
  # @option args authenticator [Object] The Authenticator instance to be configured for this service.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (C) Copyright IBM Corp. 2018, 2020.
3
+ # (C) Copyright IBM Corp. 2018, 2022.
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
  #
17
- # IBM OpenAPI SDK Code Generator Version: 3.31.0-902c9336-20210504-161156
17
+ # IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025
18
18
  #
19
19
  # IBM Watson&trade; Discovery is a cognitive search and content analytics engine that
20
20
  # you can add to applications to identify patterns, trends and actionable insights to
@@ -185,9 +185,8 @@ module IBMWatson
185
185
  # @param environment_id [String] The ID of the environment.
186
186
  # @param name [String] Name that identifies the environment.
187
187
  # @param description [String] Description of the environment.
188
- # @param size [String] Size that the environment should be increased to. Environment size cannot be
189
- # modified when using a Lite plan. Environment size can only increased and not
190
- # decreased.
188
+ # @param size [String] Size to change the environment to. **Note:** Lite plan users cannot change the
189
+ # environment size.
191
190
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
192
191
  def update_environment(environment_id:, name: nil, description: nil, size: nil)
193
192
  raise ArgumentError.new("version must be provided") if version.nil?
@@ -1809,7 +1808,7 @@ module IBMWatson
1809
1808
  # @param environment_id [String] The ID of the environment.
1810
1809
  # @param collection_id [String] The ID of the collection.
1811
1810
  # @param prefix [String] The prefix to use for autocompletion. For example, the prefix `Ho` could
1812
- # autocomplete to `Hot`, `Housing`, or `How do I upgrade`. Possible completions are.
1811
+ # autocomplete to `hot`, `housing`, or `how`.
1813
1812
  # @param field [String] The field in the result documents that autocompletion suggestions are identified
1814
1813
  # from.
1815
1814
  # @param count [Fixnum] The number of autocompletion suggestions to return.
@@ -2649,10 +2648,7 @@ module IBMWatson
2649
2648
  # @param credential_details [CredentialDetails] Object containing details of the stored credentials.
2650
2649
  #
2651
2650
  # Obtain credentials for your source from the administrator of the source.
2652
- # @param status [String] The current status of this set of credentials. `connected` indicates that the
2653
- # credentials are available to use with the source configuration of a collection.
2654
- # `invalid` refers to the credentials (for example, the password provided has
2655
- # expired) and must be corrected before they can be used with a collection.
2651
+ # @param status [StatusDetails] Object that contains details about the status of the authentication process.
2656
2652
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
2657
2653
  def create_credentials(environment_id:, source_type: nil, credential_details: nil, status: nil)
2658
2654
  raise ArgumentError.new("version must be provided") if version.nil?
@@ -2746,10 +2742,7 @@ module IBMWatson
2746
2742
  # @param credential_details [CredentialDetails] Object containing details of the stored credentials.
2747
2743
  #
2748
2744
  # Obtain credentials for your source from the administrator of the source.
2749
- # @param status [String] The current status of this set of credentials. `connected` indicates that the
2750
- # credentials are available to use with the source configuration of a collection.
2751
- # `invalid` refers to the credentials (for example, the password provided has
2752
- # expired) and must be corrected before they can be used with a collection.
2745
+ # @param status [StatusDetails] Object that contains details about the status of the authentication process.
2753
2746
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
2754
2747
  def update_credentials(environment_id:, credential_id:, source_type: nil, credential_details: nil, status: nil)
2755
2748
  raise ArgumentError.new("version must be provided") if version.nil?