ibm_watson 1.6.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -4
- data/lib/ibm_watson/assistant_v1.rb +277 -81
- data/lib/ibm_watson/assistant_v2.rb +100 -22
- data/lib/ibm_watson/compare_comply_v1.rb +44 -23
- data/lib/ibm_watson/discovery_v1.rb +132 -14
- data/lib/ibm_watson/discovery_v2.rb +234 -18
- data/lib/ibm_watson/language_translator_v3.rb +59 -27
- data/lib/ibm_watson/natural_language_classifier_v1.rb +3 -2
- data/lib/ibm_watson/natural_language_understanding_v1.rb +705 -14
- data/lib/ibm_watson/personality_insights_v3.rb +29 -18
- data/lib/ibm_watson/speech_to_text_v1.rb +278 -121
- data/lib/ibm_watson/text_to_speech_v1.rb +689 -130
- data/lib/ibm_watson/tone_analyzer_v3.rb +11 -13
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +32 -16
- data/lib/ibm_watson/visual_recognition_v4.rb +67 -23
- data/test/integration/test_assistant_v1.rb +9 -0
- data/test/integration/test_assistant_v2.rb +9 -0
- data/test/integration/test_discovery_v2.rb +29 -0
- data/test/integration/test_natural_language_understanding_v1.rb +134 -1
- data/test/integration/test_text_to_speech_v1.rb +60 -3
- data/test/unit/test_assistant_v1.rb +52 -1
- data/test/unit/test_assistant_v2.rb +51 -0
- data/test/unit/test_discovery_v2.rb +30 -1
- data/test/unit/test_natural_language_understanding_v1.rb +231 -0
- data/test/unit/test_text_to_speech_v1.rb +152 -7
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a856f95170a6ba51cbb7ea7dc4e04e9e5f99ed57d292c642b566e1c9017c3e9e
|
4
|
+
data.tar.gz: e81652472da29d3032abef05ebd539b639f73be51f0e91455d19bea389c29105
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b63bfa564a2e2ddefd1de282f0e0d228211fcfcd8f662136c8fe77a870f39e28b6e88772460aa9b43a652e523c16f116449de79c340bb72d94e3a9f962b95992
|
7
|
+
data.tar.gz: 7d5ec257697c47db06505a8948ed27e434eab18bb56171d298d9569a3c1cd7cae2711a7a19cb63d78d97ba32fa54a8d1da60db8716e5e3c04b3e2ad2a3517235
|
data/README.md
CHANGED
@@ -1,13 +1,17 @@
|
|
1
1
|
# IBM Watson Ruby SDK
|
2
2
|
|
3
|
-
[![Build
|
4
|
-
[![
|
3
|
+
[![Build and Test](https://github.com/watson-developer-cloud/ruby-sdk/workflows/Build%20and%20Test/badge.svg?branch=master)](https://github.com/watson-developer-cloud/ruby-sdk/actions?query=workflow%3A"Build+and+Test")
|
4
|
+
[![Deploy and Publish](https://github.com/watson-developer-cloud/ruby-sdk/workflows/Deploy%20and%20Publish/badge.svg?branch=master)](https://github.com/watson-developer-cloud/ruby-sdk/actions?query=workflow%3A%22Deploy+and+Publish%22)
|
5
5
|
[![Slack](https://wdc-slack-inviter.mybluemix.net/badge.svg)](https://wdc-slack-inviter.mybluemix.net)
|
6
6
|
[![codecov.io](https://codecov.io/github/watson-developer-cloud/ruby-sdk/coverage.svg)](https://codecov.io/github/watson-developer-cloud/ruby-sdk)
|
7
7
|
[![Gem Version](https://badge.fury.io/rb/ibm_watson.svg)](https://badge.fury.io/rb/ibm_watson)
|
8
8
|
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
|
9
9
|
[![CLA assistant](https://cla-assistant.io/readme/badge/watson-developer-cloud/ruby-sdk)](https://cla-assistant.io/watson-developer-cloud/ruby-sdk)
|
10
10
|
|
11
|
+
## Deprecated builds
|
12
|
+
[![Build Status](https://travis-ci.org/watson-developer-cloud/ruby-sdk.svg)](https://travis-ci.org/watson-developer-cloud/ruby-sdk)
|
13
|
+
[![Build status](https://ci.appveyor.com/api/projects/status/ir3k0ue138o4u67e?svg=true)](https://ci.appveyor.com/project/maxnussbaum/ruby-sdk)
|
14
|
+
|
11
15
|
Ruby gem to quickly get started with the various [IBM Watson][wdc] services.
|
12
16
|
|
13
17
|
<details>
|
@@ -34,6 +38,24 @@ Ruby gem to quickly get started with the various [IBM Watson][wdc] services.
|
|
34
38
|
|
35
39
|
</details>
|
36
40
|
|
41
|
+
## Announcements
|
42
|
+
### Support for 2.7 ruby
|
43
|
+
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
|
+
|
45
|
+
### Updating endpoint URLs from watsonplatform.net
|
46
|
+
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
|
+
|
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
|
+
|
37
59
|
## Before you begin
|
38
60
|
|
39
61
|
* You need an [IBM Cloud][ibm-cloud-onboarding] account.
|
@@ -106,7 +128,7 @@ The file downloaded will be called `ibm-credentials.env`. This is the name the S
|
|
106
128
|
discovery = DiscoveryV1(version: "2018-08-01")
|
107
129
|
```
|
108
130
|
|
109
|
-
And that's it!
|
131
|
+
And that's it!
|
110
132
|
|
111
133
|
If you're using more than one service at a time in your code and get two different `ibm-credentials.env` files, just put the contents together in one `ibm-credentials.env` file and the SDK will handle assigning credentials to their appropriate services.
|
112
134
|
|
@@ -269,7 +291,7 @@ Result: "<response returned by service>"
|
|
269
291
|
|
270
292
|
### Transaction IDs
|
271
293
|
|
272
|
-
Every SDK call
|
294
|
+
Every SDK call returns a response with a transaction ID in the `X-Global-Transaction-Id` header. Together the service instance region, this ID helps support teams troubleshoot issues from relevant logs.
|
273
295
|
|
274
296
|
```ruby
|
275
297
|
require "ibm_watson"
|
@@ -289,6 +311,22 @@ rescue IBMCloudSdkCore::ApiException => e
|
|
289
311
|
end
|
290
312
|
```
|
291
313
|
|
314
|
+
However, the transaction ID isn't available when the API doesn't return a response for some reason. In that case, you can set your own transaction ID in the request. For example, replace `<my-unique-transaction-id>` in the following example with a unique transaction ID.
|
315
|
+
|
316
|
+
```ruby
|
317
|
+
require "ibm_watson"
|
318
|
+
include IBMWatson
|
319
|
+
|
320
|
+
assistant = AssistantV1.new(
|
321
|
+
authenticator: "<authenticator>"
|
322
|
+
version: "2017-04-21"
|
323
|
+
)
|
324
|
+
|
325
|
+
response = assistant.headers(
|
326
|
+
"X-Global-Transaction-Id" => "<my-unique-transaction-id>"
|
327
|
+
).list_workspaces
|
328
|
+
```
|
329
|
+
|
292
330
|
## Configuring the HTTP client
|
293
331
|
|
294
332
|
To set client configs like timeout or proxy use the `configure_http_client` function and pass in the configurations.
|
@@ -13,7 +13,9 @@
|
|
13
13
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
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
|
18
|
+
#
|
17
19
|
# The IBM Watson™ Assistant service combines machine learning, natural language
|
18
20
|
# understanding, and an integrated dialog editor to create conversation flows between your
|
19
21
|
# apps and your users.
|
@@ -27,7 +29,6 @@ require "json"
|
|
27
29
|
require "ibm_cloud_sdk_core"
|
28
30
|
require_relative "./common.rb"
|
29
31
|
|
30
|
-
# Module for the Watson APIs
|
31
32
|
module IBMWatson
|
32
33
|
##
|
33
34
|
# The Assistant V1 service.
|
@@ -35,21 +36,14 @@ module IBMWatson
|
|
35
36
|
include Concurrent::Async
|
36
37
|
DEFAULT_SERVICE_NAME = "assistant"
|
37
38
|
DEFAULT_SERVICE_URL = "https://api.us-south.assistant.watson.cloud.ibm.com"
|
39
|
+
attr_accessor :version
|
38
40
|
##
|
39
41
|
# @!method initialize(args)
|
40
42
|
# Construct a new client for the Assistant service.
|
41
43
|
#
|
42
44
|
# @param args [Hash] The args to initialize with
|
43
|
-
# @option args version [String]
|
44
|
-
#
|
45
|
-
# incompatible way, a new minor version of the API is released.
|
46
|
-
# The service uses the API version for the date you specify, or
|
47
|
-
# the most recent version before that date. Note that you should
|
48
|
-
# not programmatically specify the current date at runtime, in
|
49
|
-
# case the API has been updated since your application's release.
|
50
|
-
# Instead, specify a version date that is compatible with your
|
51
|
-
# application, and don't change it until your application is
|
52
|
-
# ready for a later version.
|
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`.
|
53
47
|
# @option args service_url [String] The base service URL to use when contacting the service.
|
54
48
|
# The base service_url may differ between IBM Cloud regions.
|
55
49
|
# @option args authenticator [Object] The Authenticator instance to be configured for this service.
|
@@ -58,10 +52,10 @@ module IBMWatson
|
|
58
52
|
def initialize(args = {})
|
59
53
|
@__async_initialized__ = false
|
60
54
|
defaults = {}
|
61
|
-
defaults[:version] = nil
|
62
55
|
defaults[:service_url] = DEFAULT_SERVICE_URL
|
63
56
|
defaults[:service_name] = DEFAULT_SERVICE_NAME
|
64
57
|
defaults[:authenticator] = nil
|
58
|
+
defaults[:version] = nil
|
65
59
|
user_service_url = args[:service_url] unless args[:service_url].nil?
|
66
60
|
args = defaults.merge(args)
|
67
61
|
@version = args[:version]
|
@@ -77,7 +71,7 @@ module IBMWatson
|
|
77
71
|
#########################
|
78
72
|
|
79
73
|
##
|
80
|
-
# @!method message(workspace_id:, input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, nodes_visited_details: nil)
|
74
|
+
# @!method message(workspace_id:, input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, user_id: nil, nodes_visited_details: nil)
|
81
75
|
# Get response to user input.
|
82
76
|
# Send user input to a workspace and receive a response.
|
83
77
|
#
|
@@ -99,12 +93,24 @@ module IBMWatson
|
|
99
93
|
# from the previous response.
|
100
94
|
# @param output [OutputData] An output object that includes the response to the user, the dialog nodes that
|
101
95
|
# were triggered, and messages from the log.
|
96
|
+
# @param user_id [String] A string value that identifies the user who is interacting with the workspace. The
|
97
|
+
# client must provide a unique identifier for each individual end user who accesses
|
98
|
+
# the application. For user-based plans, this user ID is used to identify unique
|
99
|
+
# users for billing purposes. This string cannot contain carriage return, newline,
|
100
|
+
# or tab characters. If no value is specified in the input, **user_id** is
|
101
|
+
# automatically set to the value of **context.conversation_id**.
|
102
|
+
#
|
103
|
+
# **Note:** This property is the same as the **user_id** property in the context
|
104
|
+
# metadata. If **user_id** is specified in both locations in a message request, the
|
105
|
+
# value specified at the root is used.
|
102
106
|
# @param nodes_visited_details [Boolean] Whether to include additional diagnostic information about the dialog nodes that
|
103
107
|
# were visited during processing of the message.
|
104
108
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
105
|
-
def message(workspace_id:, input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, nodes_visited_details: nil)
|
109
|
+
def message(workspace_id:, input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, user_id: nil, nodes_visited_details: nil)
|
106
110
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
107
111
|
|
112
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
113
|
+
|
108
114
|
headers = {
|
109
115
|
}
|
110
116
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "message")
|
@@ -121,7 +127,8 @@ module IBMWatson
|
|
121
127
|
"entities" => entities,
|
122
128
|
"alternate_intents" => alternate_intents,
|
123
129
|
"context" => context,
|
124
|
-
"output" => output
|
130
|
+
"output" => output,
|
131
|
+
"user_id" => user_id
|
125
132
|
}
|
126
133
|
|
127
134
|
method_url = "/v1/workspaces/%s/message" % [ERB::Util.url_encode(workspace_id)]
|
@@ -137,21 +144,71 @@ module IBMWatson
|
|
137
144
|
response
|
138
145
|
end
|
139
146
|
#########################
|
147
|
+
# Bulk classify
|
148
|
+
#########################
|
149
|
+
|
150
|
+
##
|
151
|
+
# @!method bulk_classify(workspace_id:, input: nil)
|
152
|
+
# Identify intents and entities in multiple user utterances.
|
153
|
+
# Send multiple user inputs to a workspace in a single request and receive
|
154
|
+
# information about the intents and entities recognized in each input. This method
|
155
|
+
# is useful for testing and comparing the performance of different workspaces.
|
156
|
+
#
|
157
|
+
# This method is available only with Enterprise with Data Isolation plans.
|
158
|
+
# @param workspace_id [String] Unique identifier of the workspace.
|
159
|
+
# @param input [Array[BulkClassifyUtterance]] An array of input utterances to classify.
|
160
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
161
|
+
def bulk_classify(workspace_id:, input: nil)
|
162
|
+
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
163
|
+
|
164
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
165
|
+
|
166
|
+
headers = {
|
167
|
+
}
|
168
|
+
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "bulk_classify")
|
169
|
+
headers.merge!(sdk_headers)
|
170
|
+
|
171
|
+
params = {
|
172
|
+
"version" => @version
|
173
|
+
}
|
174
|
+
|
175
|
+
data = {
|
176
|
+
"input" => input
|
177
|
+
}
|
178
|
+
|
179
|
+
method_url = "/v1/workspaces/%s/bulk_classify" % [ERB::Util.url_encode(workspace_id)]
|
180
|
+
|
181
|
+
response = request(
|
182
|
+
method: "POST",
|
183
|
+
url: method_url,
|
184
|
+
headers: headers,
|
185
|
+
params: params,
|
186
|
+
json: data,
|
187
|
+
accept_json: true
|
188
|
+
)
|
189
|
+
response
|
190
|
+
end
|
191
|
+
#########################
|
140
192
|
# Workspaces
|
141
193
|
#########################
|
142
194
|
|
143
195
|
##
|
144
|
-
# @!method list_workspaces(page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
196
|
+
# @!method list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
145
197
|
# List workspaces.
|
146
198
|
# List the workspaces associated with a Watson Assistant service instance.
|
147
199
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
200
|
+
# @param include_count [Boolean] Whether to include information about the number of records that satisfy the
|
201
|
+
# request, regardless of the page limit. If this parameter is `true`, the
|
202
|
+
# `pagination` object in the response includes the `total` property.
|
148
203
|
# @param sort [String] The attribute by which returned workspaces will be sorted. To reverse the sort
|
149
204
|
# order, prefix the value with a minus sign (`-`).
|
150
205
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
151
206
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
152
207
|
# the response.
|
153
208
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
154
|
-
def list_workspaces(page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
209
|
+
def list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
210
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
211
|
+
|
155
212
|
headers = {
|
156
213
|
}
|
157
214
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_workspaces")
|
@@ -160,6 +217,7 @@ module IBMWatson
|
|
160
217
|
params = {
|
161
218
|
"version" => @version,
|
162
219
|
"page_limit" => page_limit,
|
220
|
+
"include_count" => include_count,
|
163
221
|
"sort" => sort,
|
164
222
|
"cursor" => cursor,
|
165
223
|
"include_audit" => include_audit
|
@@ -178,7 +236,7 @@ module IBMWatson
|
|
178
236
|
end
|
179
237
|
|
180
238
|
##
|
181
|
-
# @!method create_workspace(name: nil, description: nil, language: nil,
|
239
|
+
# @!method create_workspace(name: nil, description: nil, language: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, webhooks: nil, intents: nil, entities: nil, include_audit: nil)
|
182
240
|
# Create workspace.
|
183
241
|
# Create a workspace based on component objects. You must provide workspace
|
184
242
|
# components defining the content of the new workspace.
|
@@ -187,21 +245,23 @@ module IBMWatson
|
|
187
245
|
# @param description [String] The description of the workspace. This string cannot contain carriage return,
|
188
246
|
# newline, or tab characters.
|
189
247
|
# @param language [String] The language of the workspace.
|
248
|
+
# @param dialog_nodes [Array[DialogNode]] An array of objects describing the dialog nodes in the workspace.
|
249
|
+
# @param counterexamples [Array[Counterexample]] An array of objects defining input examples that have been marked as irrelevant
|
250
|
+
# input.
|
190
251
|
# @param metadata [Hash] Any metadata related to the workspace.
|
191
252
|
# @param learning_opt_out [Boolean] Whether training data from the workspace (including artifacts such as intents and
|
192
253
|
# entities) can be used by IBM for general service improvements. `true` indicates
|
193
254
|
# that workspace training data is not to be used.
|
194
255
|
# @param system_settings [WorkspaceSystemSettings] Global settings for the workspace.
|
256
|
+
# @param webhooks [Array[Webhook]]
|
195
257
|
# @param intents [Array[CreateIntent]] An array of objects defining the intents for the workspace.
|
196
258
|
# @param entities [Array[CreateEntity]] An array of objects describing the entities for the workspace.
|
197
|
-
# @param dialog_nodes [Array[DialogNode]] An array of objects describing the dialog nodes in the workspace.
|
198
|
-
# @param counterexamples [Array[Counterexample]] An array of objects defining input examples that have been marked as irrelevant
|
199
|
-
# input.
|
200
|
-
# @param webhooks [Array[Webhook]]
|
201
259
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
202
260
|
# the response.
|
203
261
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
204
|
-
def create_workspace(name: nil, description: nil, language: nil,
|
262
|
+
def create_workspace(name: nil, description: nil, language: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, webhooks: nil, intents: nil, entities: nil, include_audit: nil)
|
263
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
264
|
+
|
205
265
|
headers = {
|
206
266
|
}
|
207
267
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_workspace")
|
@@ -216,14 +276,14 @@ module IBMWatson
|
|
216
276
|
"name" => name,
|
217
277
|
"description" => description,
|
218
278
|
"language" => language,
|
279
|
+
"dialog_nodes" => dialog_nodes,
|
280
|
+
"counterexamples" => counterexamples,
|
219
281
|
"metadata" => metadata,
|
220
282
|
"learning_opt_out" => learning_opt_out,
|
221
283
|
"system_settings" => system_settings,
|
284
|
+
"webhooks" => webhooks,
|
222
285
|
"intents" => intents,
|
223
|
-
"entities" => entities
|
224
|
-
"dialog_nodes" => dialog_nodes,
|
225
|
-
"counterexamples" => counterexamples,
|
226
|
-
"webhooks" => webhooks
|
286
|
+
"entities" => entities
|
227
287
|
}
|
228
288
|
|
229
289
|
method_url = "/v1/workspaces"
|
@@ -256,6 +316,8 @@ module IBMWatson
|
|
256
316
|
def get_workspace(workspace_id:, export: nil, include_audit: nil, sort: nil)
|
257
317
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
258
318
|
|
319
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
320
|
+
|
259
321
|
headers = {
|
260
322
|
}
|
261
323
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_workspace")
|
@@ -281,7 +343,7 @@ module IBMWatson
|
|
281
343
|
end
|
282
344
|
|
283
345
|
##
|
284
|
-
# @!method update_workspace(workspace_id:, name: nil, description: nil, language: nil,
|
346
|
+
# @!method update_workspace(workspace_id:, name: nil, description: nil, language: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, webhooks: nil, intents: nil, entities: nil, append: nil, include_audit: nil)
|
285
347
|
# Update workspace.
|
286
348
|
# Update an existing workspace with new or modified data. You must provide component
|
287
349
|
# objects defining the content of the updated workspace.
|
@@ -291,17 +353,17 @@ module IBMWatson
|
|
291
353
|
# @param description [String] The description of the workspace. This string cannot contain carriage return,
|
292
354
|
# newline, or tab characters.
|
293
355
|
# @param language [String] The language of the workspace.
|
356
|
+
# @param dialog_nodes [Array[DialogNode]] An array of objects describing the dialog nodes in the workspace.
|
357
|
+
# @param counterexamples [Array[Counterexample]] An array of objects defining input examples that have been marked as irrelevant
|
358
|
+
# input.
|
294
359
|
# @param metadata [Hash] Any metadata related to the workspace.
|
295
360
|
# @param learning_opt_out [Boolean] Whether training data from the workspace (including artifacts such as intents and
|
296
361
|
# entities) can be used by IBM for general service improvements. `true` indicates
|
297
362
|
# that workspace training data is not to be used.
|
298
363
|
# @param system_settings [WorkspaceSystemSettings] Global settings for the workspace.
|
364
|
+
# @param webhooks [Array[Webhook]]
|
299
365
|
# @param intents [Array[CreateIntent]] An array of objects defining the intents for the workspace.
|
300
366
|
# @param entities [Array[CreateEntity]] An array of objects describing the entities for the workspace.
|
301
|
-
# @param dialog_nodes [Array[DialogNode]] An array of objects describing the dialog nodes in the workspace.
|
302
|
-
# @param counterexamples [Array[Counterexample]] An array of objects defining input examples that have been marked as irrelevant
|
303
|
-
# input.
|
304
|
-
# @param webhooks [Array[Webhook]]
|
305
367
|
# @param append [Boolean] Whether the new data is to be appended to the existing data in the object. If
|
306
368
|
# **append**=`false`, elements included in the new data completely replace the
|
307
369
|
# corresponding existing elements, including all subelements. For example, if the
|
@@ -315,9 +377,11 @@ module IBMWatson
|
|
315
377
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
316
378
|
# the response.
|
317
379
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
318
|
-
def update_workspace(workspace_id:, name: nil, description: nil, language: nil,
|
380
|
+
def update_workspace(workspace_id:, name: nil, description: nil, language: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, webhooks: nil, intents: nil, entities: nil, append: nil, include_audit: nil)
|
319
381
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
320
382
|
|
383
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
384
|
+
|
321
385
|
headers = {
|
322
386
|
}
|
323
387
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_workspace")
|
@@ -333,14 +397,14 @@ module IBMWatson
|
|
333
397
|
"name" => name,
|
334
398
|
"description" => description,
|
335
399
|
"language" => language,
|
400
|
+
"dialog_nodes" => dialog_nodes,
|
401
|
+
"counterexamples" => counterexamples,
|
336
402
|
"metadata" => metadata,
|
337
403
|
"learning_opt_out" => learning_opt_out,
|
338
404
|
"system_settings" => system_settings,
|
405
|
+
"webhooks" => webhooks,
|
339
406
|
"intents" => intents,
|
340
|
-
"entities" => entities
|
341
|
-
"dialog_nodes" => dialog_nodes,
|
342
|
-
"counterexamples" => counterexamples,
|
343
|
-
"webhooks" => webhooks
|
407
|
+
"entities" => entities
|
344
408
|
}
|
345
409
|
|
346
410
|
method_url = "/v1/workspaces/%s" % [ERB::Util.url_encode(workspace_id)]
|
@@ -365,6 +429,8 @@ module IBMWatson
|
|
365
429
|
def delete_workspace(workspace_id:)
|
366
430
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
367
431
|
|
432
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
433
|
+
|
368
434
|
headers = {
|
369
435
|
}
|
370
436
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_workspace")
|
@@ -390,7 +456,7 @@ module IBMWatson
|
|
390
456
|
#########################
|
391
457
|
|
392
458
|
##
|
393
|
-
# @!method list_intents(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
459
|
+
# @!method list_intents(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
394
460
|
# List intents.
|
395
461
|
# List the intents for a workspace.
|
396
462
|
# @param workspace_id [String] Unique identifier of the workspace.
|
@@ -398,15 +464,20 @@ module IBMWatson
|
|
398
464
|
# **export**=`false`, the returned data includes only information about the element
|
399
465
|
# itself. If **export**=`true`, all content, including subelements, is included.
|
400
466
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
467
|
+
# @param include_count [Boolean] Whether to include information about the number of records that satisfy the
|
468
|
+
# request, regardless of the page limit. If this parameter is `true`, the
|
469
|
+
# `pagination` object in the response includes the `total` property.
|
401
470
|
# @param sort [String] The attribute by which returned intents will be sorted. To reverse the sort order,
|
402
471
|
# prefix the value with a minus sign (`-`).
|
403
472
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
404
473
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
405
474
|
# the response.
|
406
475
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
407
|
-
def list_intents(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
476
|
+
def list_intents(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
408
477
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
409
478
|
|
479
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
480
|
+
|
410
481
|
headers = {
|
411
482
|
}
|
412
483
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_intents")
|
@@ -416,6 +487,7 @@ module IBMWatson
|
|
416
487
|
"version" => @version,
|
417
488
|
"export" => export,
|
418
489
|
"page_limit" => page_limit,
|
490
|
+
"include_count" => include_count,
|
419
491
|
"sort" => sort,
|
420
492
|
"cursor" => cursor,
|
421
493
|
"include_audit" => include_audit
|
@@ -454,6 +526,8 @@ module IBMWatson
|
|
454
526
|
def create_intent(workspace_id:, intent:, description: nil, examples: nil, include_audit: nil)
|
455
527
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
456
528
|
|
529
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
530
|
+
|
457
531
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
458
532
|
|
459
533
|
headers = {
|
@@ -502,6 +576,8 @@ module IBMWatson
|
|
502
576
|
|
503
577
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
504
578
|
|
579
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
580
|
+
|
505
581
|
headers = {
|
506
582
|
}
|
507
583
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_intent")
|
@@ -559,6 +635,8 @@ module IBMWatson
|
|
559
635
|
|
560
636
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
561
637
|
|
638
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
639
|
+
|
562
640
|
headers = {
|
563
641
|
}
|
564
642
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_intent")
|
@@ -601,6 +679,8 @@ module IBMWatson
|
|
601
679
|
|
602
680
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
603
681
|
|
682
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
683
|
+
|
604
684
|
headers = {
|
605
685
|
}
|
606
686
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_intent")
|
@@ -626,24 +706,29 @@ module IBMWatson
|
|
626
706
|
#########################
|
627
707
|
|
628
708
|
##
|
629
|
-
# @!method list_examples(workspace_id:, intent:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
709
|
+
# @!method list_examples(workspace_id:, intent:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
630
710
|
# List user input examples.
|
631
711
|
# List the user input examples for an intent, optionally including contextual entity
|
632
712
|
# mentions.
|
633
713
|
# @param workspace_id [String] Unique identifier of the workspace.
|
634
714
|
# @param intent [String] The intent name.
|
635
715
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
716
|
+
# @param include_count [Boolean] Whether to include information about the number of records that satisfy the
|
717
|
+
# request, regardless of the page limit. If this parameter is `true`, the
|
718
|
+
# `pagination` object in the response includes the `total` property.
|
636
719
|
# @param sort [String] The attribute by which returned examples will be sorted. To reverse the sort
|
637
720
|
# order, prefix the value with a minus sign (`-`).
|
638
721
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
639
722
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
640
723
|
# the response.
|
641
724
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
642
|
-
def list_examples(workspace_id:, intent:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
725
|
+
def list_examples(workspace_id:, intent:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
643
726
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
644
727
|
|
645
728
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
646
729
|
|
730
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
731
|
+
|
647
732
|
headers = {
|
648
733
|
}
|
649
734
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_examples")
|
@@ -652,6 +737,7 @@ module IBMWatson
|
|
652
737
|
params = {
|
653
738
|
"version" => @version,
|
654
739
|
"page_limit" => page_limit,
|
740
|
+
"include_count" => include_count,
|
655
741
|
"sort" => sort,
|
656
742
|
"cursor" => cursor,
|
657
743
|
"include_audit" => include_audit
|
@@ -691,6 +777,8 @@ module IBMWatson
|
|
691
777
|
|
692
778
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
693
779
|
|
780
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
781
|
+
|
694
782
|
raise ArgumentError.new("text must be provided") if text.nil?
|
695
783
|
|
696
784
|
headers = {
|
@@ -738,6 +826,8 @@ module IBMWatson
|
|
738
826
|
|
739
827
|
raise ArgumentError.new("text must be provided") if text.nil?
|
740
828
|
|
829
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
830
|
+
|
741
831
|
headers = {
|
742
832
|
}
|
743
833
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_example")
|
@@ -785,6 +875,8 @@ module IBMWatson
|
|
785
875
|
|
786
876
|
raise ArgumentError.new("text must be provided") if text.nil?
|
787
877
|
|
878
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
879
|
+
|
788
880
|
headers = {
|
789
881
|
}
|
790
882
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_example")
|
@@ -828,6 +920,8 @@ module IBMWatson
|
|
828
920
|
|
829
921
|
raise ArgumentError.new("text must be provided") if text.nil?
|
830
922
|
|
923
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
924
|
+
|
831
925
|
headers = {
|
832
926
|
}
|
833
927
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_example")
|
@@ -853,21 +947,26 @@ module IBMWatson
|
|
853
947
|
#########################
|
854
948
|
|
855
949
|
##
|
856
|
-
# @!method list_counterexamples(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
950
|
+
# @!method list_counterexamples(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
857
951
|
# List counterexamples.
|
858
952
|
# List the counterexamples for a workspace. Counterexamples are examples that have
|
859
953
|
# been marked as irrelevant input.
|
860
954
|
# @param workspace_id [String] Unique identifier of the workspace.
|
861
955
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
956
|
+
# @param include_count [Boolean] Whether to include information about the number of records that satisfy the
|
957
|
+
# request, regardless of the page limit. If this parameter is `true`, the
|
958
|
+
# `pagination` object in the response includes the `total` property.
|
862
959
|
# @param sort [String] The attribute by which returned counterexamples will be sorted. To reverse the
|
863
960
|
# sort order, prefix the value with a minus sign (`-`).
|
864
961
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
865
962
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
866
963
|
# the response.
|
867
964
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
868
|
-
def list_counterexamples(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
965
|
+
def list_counterexamples(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
869
966
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
870
967
|
|
968
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
969
|
+
|
871
970
|
headers = {
|
872
971
|
}
|
873
972
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_counterexamples")
|
@@ -876,6 +975,7 @@ module IBMWatson
|
|
876
975
|
params = {
|
877
976
|
"version" => @version,
|
878
977
|
"page_limit" => page_limit,
|
978
|
+
"include_count" => include_count,
|
879
979
|
"sort" => sort,
|
880
980
|
"cursor" => cursor,
|
881
981
|
"include_audit" => include_audit
|
@@ -912,6 +1012,8 @@ module IBMWatson
|
|
912
1012
|
def create_counterexample(workspace_id:, text:, include_audit: nil)
|
913
1013
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
914
1014
|
|
1015
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1016
|
+
|
915
1017
|
raise ArgumentError.new("text must be provided") if text.nil?
|
916
1018
|
|
917
1019
|
headers = {
|
@@ -956,6 +1058,8 @@ module IBMWatson
|
|
956
1058
|
|
957
1059
|
raise ArgumentError.new("text must be provided") if text.nil?
|
958
1060
|
|
1061
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1062
|
+
|
959
1063
|
headers = {
|
960
1064
|
}
|
961
1065
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_counterexample")
|
@@ -997,6 +1101,8 @@ module IBMWatson
|
|
997
1101
|
|
998
1102
|
raise ArgumentError.new("text must be provided") if text.nil?
|
999
1103
|
|
1104
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1105
|
+
|
1000
1106
|
headers = {
|
1001
1107
|
}
|
1002
1108
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_counterexample")
|
@@ -1037,6 +1143,8 @@ module IBMWatson
|
|
1037
1143
|
|
1038
1144
|
raise ArgumentError.new("text must be provided") if text.nil?
|
1039
1145
|
|
1146
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1147
|
+
|
1040
1148
|
headers = {
|
1041
1149
|
}
|
1042
1150
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_counterexample")
|
@@ -1062,7 +1170,7 @@ module IBMWatson
|
|
1062
1170
|
#########################
|
1063
1171
|
|
1064
1172
|
##
|
1065
|
-
# @!method list_entities(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
1173
|
+
# @!method list_entities(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
1066
1174
|
# List entities.
|
1067
1175
|
# List the entities for a workspace.
|
1068
1176
|
# @param workspace_id [String] Unique identifier of the workspace.
|
@@ -1070,15 +1178,20 @@ module IBMWatson
|
|
1070
1178
|
# **export**=`false`, the returned data includes only information about the element
|
1071
1179
|
# itself. If **export**=`true`, all content, including subelements, is included.
|
1072
1180
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
1181
|
+
# @param include_count [Boolean] Whether to include information about the number of records that satisfy the
|
1182
|
+
# request, regardless of the page limit. If this parameter is `true`, the
|
1183
|
+
# `pagination` object in the response includes the `total` property.
|
1073
1184
|
# @param sort [String] The attribute by which returned entities will be sorted. To reverse the sort
|
1074
1185
|
# order, prefix the value with a minus sign (`-`).
|
1075
1186
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
1076
1187
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1077
1188
|
# the response.
|
1078
1189
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1079
|
-
def list_entities(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
1190
|
+
def list_entities(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
1080
1191
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1081
1192
|
|
1193
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1194
|
+
|
1082
1195
|
headers = {
|
1083
1196
|
}
|
1084
1197
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_entities")
|
@@ -1088,6 +1201,7 @@ module IBMWatson
|
|
1088
1201
|
"version" => @version,
|
1089
1202
|
"export" => export,
|
1090
1203
|
"page_limit" => page_limit,
|
1204
|
+
"include_count" => include_count,
|
1091
1205
|
"sort" => sort,
|
1092
1206
|
"cursor" => cursor,
|
1093
1207
|
"include_audit" => include_audit
|
@@ -1129,6 +1243,8 @@ module IBMWatson
|
|
1129
1243
|
def create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil, include_audit: nil)
|
1130
1244
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1131
1245
|
|
1246
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1247
|
+
|
1132
1248
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
1133
1249
|
|
1134
1250
|
headers = {
|
@@ -1179,6 +1295,8 @@ module IBMWatson
|
|
1179
1295
|
|
1180
1296
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
1181
1297
|
|
1298
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1299
|
+
|
1182
1300
|
headers = {
|
1183
1301
|
}
|
1184
1302
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_entity")
|
@@ -1237,6 +1355,8 @@ module IBMWatson
|
|
1237
1355
|
|
1238
1356
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
1239
1357
|
|
1358
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1359
|
+
|
1240
1360
|
headers = {
|
1241
1361
|
}
|
1242
1362
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_entity")
|
@@ -1281,6 +1401,8 @@ module IBMWatson
|
|
1281
1401
|
|
1282
1402
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
1283
1403
|
|
1404
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1405
|
+
|
1284
1406
|
headers = {
|
1285
1407
|
}
|
1286
1408
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_entity")
|
@@ -1323,6 +1445,8 @@ module IBMWatson
|
|
1323
1445
|
|
1324
1446
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
1325
1447
|
|
1448
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1449
|
+
|
1326
1450
|
headers = {
|
1327
1451
|
}
|
1328
1452
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_mentions")
|
@@ -1350,7 +1474,7 @@ module IBMWatson
|
|
1350
1474
|
#########################
|
1351
1475
|
|
1352
1476
|
##
|
1353
|
-
# @!method list_values(workspace_id:, entity:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
1477
|
+
# @!method list_values(workspace_id:, entity:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
1354
1478
|
# List entity values.
|
1355
1479
|
# List the values for an entity.
|
1356
1480
|
# @param workspace_id [String] Unique identifier of the workspace.
|
@@ -1359,17 +1483,22 @@ module IBMWatson
|
|
1359
1483
|
# **export**=`false`, the returned data includes only information about the element
|
1360
1484
|
# itself. If **export**=`true`, all content, including subelements, is included.
|
1361
1485
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
1486
|
+
# @param include_count [Boolean] Whether to include information about the number of records that satisfy the
|
1487
|
+
# request, regardless of the page limit. If this parameter is `true`, the
|
1488
|
+
# `pagination` object in the response includes the `total` property.
|
1362
1489
|
# @param sort [String] The attribute by which returned entity values will be sorted. To reverse the sort
|
1363
1490
|
# order, prefix the value with a minus sign (`-`).
|
1364
1491
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
1365
1492
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1366
1493
|
# the response.
|
1367
1494
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1368
|
-
def list_values(workspace_id:, entity:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
1495
|
+
def list_values(workspace_id:, entity:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
1369
1496
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1370
1497
|
|
1371
1498
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
1372
1499
|
|
1500
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1501
|
+
|
1373
1502
|
headers = {
|
1374
1503
|
}
|
1375
1504
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_values")
|
@@ -1379,6 +1508,7 @@ module IBMWatson
|
|
1379
1508
|
"version" => @version,
|
1380
1509
|
"export" => export,
|
1381
1510
|
"page_limit" => page_limit,
|
1511
|
+
"include_count" => include_count,
|
1382
1512
|
"sort" => sort,
|
1383
1513
|
"cursor" => cursor,
|
1384
1514
|
"include_audit" => include_audit
|
@@ -1428,6 +1558,8 @@ module IBMWatson
|
|
1428
1558
|
|
1429
1559
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
1430
1560
|
|
1561
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1562
|
+
|
1431
1563
|
raise ArgumentError.new("value must be provided") if value.nil?
|
1432
1564
|
|
1433
1565
|
headers = {
|
@@ -1481,6 +1613,8 @@ module IBMWatson
|
|
1481
1613
|
|
1482
1614
|
raise ArgumentError.new("value must be provided") if value.nil?
|
1483
1615
|
|
1616
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1617
|
+
|
1484
1618
|
headers = {
|
1485
1619
|
}
|
1486
1620
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_value")
|
@@ -1550,6 +1684,8 @@ module IBMWatson
|
|
1550
1684
|
|
1551
1685
|
raise ArgumentError.new("value must be provided") if value.nil?
|
1552
1686
|
|
1687
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1688
|
+
|
1553
1689
|
headers = {
|
1554
1690
|
}
|
1555
1691
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_value")
|
@@ -1597,6 +1733,8 @@ module IBMWatson
|
|
1597
1733
|
|
1598
1734
|
raise ArgumentError.new("value must be provided") if value.nil?
|
1599
1735
|
|
1736
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1737
|
+
|
1600
1738
|
headers = {
|
1601
1739
|
}
|
1602
1740
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_value")
|
@@ -1622,26 +1760,31 @@ module IBMWatson
|
|
1622
1760
|
#########################
|
1623
1761
|
|
1624
1762
|
##
|
1625
|
-
# @!method list_synonyms(workspace_id:, entity:, value:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
1763
|
+
# @!method list_synonyms(workspace_id:, entity:, value:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
1626
1764
|
# List entity value synonyms.
|
1627
1765
|
# List the synonyms for an entity value.
|
1628
1766
|
# @param workspace_id [String] Unique identifier of the workspace.
|
1629
1767
|
# @param entity [String] The name of the entity.
|
1630
1768
|
# @param value [String] The text of the entity value.
|
1631
1769
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
1770
|
+
# @param include_count [Boolean] Whether to include information about the number of records that satisfy the
|
1771
|
+
# request, regardless of the page limit. If this parameter is `true`, the
|
1772
|
+
# `pagination` object in the response includes the `total` property.
|
1632
1773
|
# @param sort [String] The attribute by which returned entity value synonyms will be sorted. To reverse
|
1633
1774
|
# the sort order, prefix the value with a minus sign (`-`).
|
1634
1775
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
1635
1776
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1636
1777
|
# the response.
|
1637
1778
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1638
|
-
def list_synonyms(workspace_id:, entity:, value:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
1779
|
+
def list_synonyms(workspace_id:, entity:, value:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
1639
1780
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1640
1781
|
|
1641
1782
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
1642
1783
|
|
1643
1784
|
raise ArgumentError.new("value must be provided") if value.nil?
|
1644
1785
|
|
1786
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1787
|
+
|
1645
1788
|
headers = {
|
1646
1789
|
}
|
1647
1790
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_synonyms")
|
@@ -1650,6 +1793,7 @@ module IBMWatson
|
|
1650
1793
|
params = {
|
1651
1794
|
"version" => @version,
|
1652
1795
|
"page_limit" => page_limit,
|
1796
|
+
"include_count" => include_count,
|
1653
1797
|
"sort" => sort,
|
1654
1798
|
"cursor" => cursor,
|
1655
1799
|
"include_audit" => include_audit
|
@@ -1691,6 +1835,8 @@ module IBMWatson
|
|
1691
1835
|
|
1692
1836
|
raise ArgumentError.new("value must be provided") if value.nil?
|
1693
1837
|
|
1838
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1839
|
+
|
1694
1840
|
raise ArgumentError.new("synonym must be provided") if synonym.nil?
|
1695
1841
|
|
1696
1842
|
headers = {
|
@@ -1740,6 +1886,8 @@ module IBMWatson
|
|
1740
1886
|
|
1741
1887
|
raise ArgumentError.new("synonym must be provided") if synonym.nil?
|
1742
1888
|
|
1889
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1890
|
+
|
1743
1891
|
headers = {
|
1744
1892
|
}
|
1745
1893
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_synonym")
|
@@ -1789,6 +1937,8 @@ module IBMWatson
|
|
1789
1937
|
|
1790
1938
|
raise ArgumentError.new("synonym must be provided") if synonym.nil?
|
1791
1939
|
|
1940
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1941
|
+
|
1792
1942
|
headers = {
|
1793
1943
|
}
|
1794
1944
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_synonym")
|
@@ -1834,6 +1984,8 @@ module IBMWatson
|
|
1834
1984
|
|
1835
1985
|
raise ArgumentError.new("synonym must be provided") if synonym.nil?
|
1836
1986
|
|
1987
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
1988
|
+
|
1837
1989
|
headers = {
|
1838
1990
|
}
|
1839
1991
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_synonym")
|
@@ -1859,20 +2011,25 @@ module IBMWatson
|
|
1859
2011
|
#########################
|
1860
2012
|
|
1861
2013
|
##
|
1862
|
-
# @!method list_dialog_nodes(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
2014
|
+
# @!method list_dialog_nodes(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
1863
2015
|
# List dialog nodes.
|
1864
2016
|
# List the dialog nodes for a workspace.
|
1865
2017
|
# @param workspace_id [String] Unique identifier of the workspace.
|
1866
2018
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
2019
|
+
# @param include_count [Boolean] Whether to include information about the number of records that satisfy the
|
2020
|
+
# request, regardless of the page limit. If this parameter is `true`, the
|
2021
|
+
# `pagination` object in the response includes the `total` property.
|
1867
2022
|
# @param sort [String] The attribute by which returned dialog nodes will be sorted. To reverse the sort
|
1868
2023
|
# order, prefix the value with a minus sign (`-`).
|
1869
2024
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
1870
2025
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1871
2026
|
# the response.
|
1872
2027
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1873
|
-
def list_dialog_nodes(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
|
2028
|
+
def list_dialog_nodes(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
|
1874
2029
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1875
2030
|
|
2031
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
2032
|
+
|
1876
2033
|
headers = {
|
1877
2034
|
}
|
1878
2035
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_dialog_nodes")
|
@@ -1881,6 +2038,7 @@ module IBMWatson
|
|
1881
2038
|
params = {
|
1882
2039
|
"version" => @version,
|
1883
2040
|
"page_limit" => page_limit,
|
2041
|
+
"include_count" => include_count,
|
1884
2042
|
"sort" => sort,
|
1885
2043
|
"cursor" => cursor,
|
1886
2044
|
"include_audit" => include_audit
|
@@ -1906,27 +2064,34 @@ module IBMWatson
|
|
1906
2064
|
# If you want to create multiple dialog nodes with a single API call, consider using
|
1907
2065
|
# the **[Update workspace](#update-workspace)** method instead.
|
1908
2066
|
# @param workspace_id [String] Unique identifier of the workspace.
|
1909
|
-
# @param dialog_node [String] The dialog node
|
1910
|
-
#
|
1911
|
-
#
|
2067
|
+
# @param dialog_node [String] The unique ID of the dialog node. This is an internal identifier used to refer to
|
2068
|
+
# the dialog node from other dialog nodes and in the diagnostic information included
|
2069
|
+
# with message responses.
|
2070
|
+
#
|
2071
|
+
# This string can contain only Unicode alphanumeric, space, underscore, hyphen, and
|
2072
|
+
# dot characters.
|
1912
2073
|
# @param description [String] The description of the dialog node. This string cannot contain carriage return,
|
1913
2074
|
# newline, or tab characters.
|
1914
2075
|
# @param conditions [String] The condition that will trigger the dialog node. This string cannot contain
|
1915
2076
|
# carriage return, newline, or tab characters.
|
1916
|
-
# @param parent [String] The ID of the parent dialog node. This property is omitted if the dialog
|
1917
|
-
# no parent.
|
1918
|
-
# @param previous_sibling [String] The ID of the previous sibling dialog node. This property is omitted if the
|
1919
|
-
# node has no previous sibling.
|
2077
|
+
# @param parent [String] The unique ID of the parent dialog node. This property is omitted if the dialog
|
2078
|
+
# node has no parent.
|
2079
|
+
# @param previous_sibling [String] The unique ID of the previous sibling dialog node. This property is omitted if the
|
2080
|
+
# dialog node has no previous sibling.
|
1920
2081
|
# @param output [DialogNodeOutput] The output of the dialog node. For more information about how to specify dialog
|
1921
2082
|
# node output, see the
|
1922
2083
|
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
|
1923
|
-
# @param context [
|
2084
|
+
# @param context [DialogNodeContext] The context for the dialog node.
|
1924
2085
|
# @param metadata [Hash] The metadata for the dialog node.
|
1925
2086
|
# @param next_step [DialogNodeNextStep] The next step to execute following this dialog node.
|
1926
|
-
# @param title [String]
|
1927
|
-
#
|
1928
|
-
#
|
1929
|
-
#
|
2087
|
+
# @param title [String] A human-readable name for the dialog node. If the node is included in
|
2088
|
+
# disambiguation, this title is used to populate the **label** property of the
|
2089
|
+
# corresponding suggestion in the `suggestion` response type (unless it is
|
2090
|
+
# overridden by the **user_label** property). The title is also used to populate the
|
2091
|
+
# **topic** property in the `connect_to_agent` response type.
|
2092
|
+
#
|
2093
|
+
# This string can contain only Unicode alphanumeric, space, underscore, hyphen, and
|
2094
|
+
# dot characters.
|
1930
2095
|
# @param type [String] How the dialog node is processed.
|
1931
2096
|
# @param event_name [String] How an `event_handler` node is processed.
|
1932
2097
|
# @param variable [String] The location in the dialog context where output is stored.
|
@@ -1935,7 +2100,8 @@ module IBMWatson
|
|
1935
2100
|
# @param digress_out [String] Whether this dialog node can be returned to after a digression.
|
1936
2101
|
# @param digress_out_slots [String] Whether the user can digress to top-level nodes while filling out slots.
|
1937
2102
|
# @param user_label [String] A label that can be displayed externally to describe the purpose of the node to
|
1938
|
-
# users.
|
2103
|
+
# users. If set, this label is used to identify the node in disambiguation responses
|
2104
|
+
# (overriding the value of the **title** property).
|
1939
2105
|
# @param disambiguation_opt_out [Boolean] Whether the dialog node should be excluded from disambiguation suggestions. Valid
|
1940
2106
|
# only when **type**=`standard` or `frame`.
|
1941
2107
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
@@ -1944,6 +2110,8 @@ module IBMWatson
|
|
1944
2110
|
def create_dialog_node(workspace_id:, dialog_node:, description: nil, conditions: nil, parent: nil, previous_sibling: nil, output: nil, context: nil, metadata: nil, next_step: nil, title: nil, type: nil, event_name: nil, variable: nil, actions: nil, digress_in: nil, digress_out: nil, digress_out_slots: nil, user_label: nil, disambiguation_opt_out: nil, include_audit: nil)
|
1945
2111
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1946
2112
|
|
2113
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
2114
|
+
|
1947
2115
|
raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
|
1948
2116
|
|
1949
2117
|
headers = {
|
@@ -1996,7 +2164,7 @@ module IBMWatson
|
|
1996
2164
|
# Get dialog node.
|
1997
2165
|
# Get information about a dialog node.
|
1998
2166
|
# @param workspace_id [String] Unique identifier of the workspace.
|
1999
|
-
# @param dialog_node [String] The dialog node ID (for example, `
|
2167
|
+
# @param dialog_node [String] The dialog node ID (for example, `node_1_1479323581900`).
|
2000
2168
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
2001
2169
|
# the response.
|
2002
2170
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2005,6 +2173,8 @@ module IBMWatson
|
|
2005
2173
|
|
2006
2174
|
raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
|
2007
2175
|
|
2176
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
2177
|
+
|
2008
2178
|
headers = {
|
2009
2179
|
}
|
2010
2180
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_dialog_node")
|
@@ -2035,28 +2205,35 @@ module IBMWatson
|
|
2035
2205
|
# If you want to update multiple dialog nodes with a single API call, consider using
|
2036
2206
|
# the **[Update workspace](#update-workspace)** method instead.
|
2037
2207
|
# @param workspace_id [String] Unique identifier of the workspace.
|
2038
|
-
# @param dialog_node [String] The dialog node ID (for example, `
|
2039
|
-
# @param new_dialog_node [String] The dialog node
|
2040
|
-
#
|
2041
|
-
#
|
2208
|
+
# @param dialog_node [String] The dialog node ID (for example, `node_1_1479323581900`).
|
2209
|
+
# @param new_dialog_node [String] The unique ID of the dialog node. This is an internal identifier used to refer to
|
2210
|
+
# the dialog node from other dialog nodes and in the diagnostic information included
|
2211
|
+
# with message responses.
|
2212
|
+
#
|
2213
|
+
# This string can contain only Unicode alphanumeric, space, underscore, hyphen, and
|
2214
|
+
# dot characters.
|
2042
2215
|
# @param new_description [String] The description of the dialog node. This string cannot contain carriage return,
|
2043
2216
|
# newline, or tab characters.
|
2044
2217
|
# @param new_conditions [String] The condition that will trigger the dialog node. This string cannot contain
|
2045
2218
|
# carriage return, newline, or tab characters.
|
2046
|
-
# @param new_parent [String] The ID of the parent dialog node. This property is omitted if the dialog
|
2047
|
-
# no parent.
|
2048
|
-
# @param new_previous_sibling [String] The ID of the previous sibling dialog node. This property is omitted if the
|
2049
|
-
# node has no previous sibling.
|
2219
|
+
# @param new_parent [String] The unique ID of the parent dialog node. This property is omitted if the dialog
|
2220
|
+
# node has no parent.
|
2221
|
+
# @param new_previous_sibling [String] The unique ID of the previous sibling dialog node. This property is omitted if the
|
2222
|
+
# dialog node has no previous sibling.
|
2050
2223
|
# @param new_output [DialogNodeOutput] The output of the dialog node. For more information about how to specify dialog
|
2051
2224
|
# node output, see the
|
2052
2225
|
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
|
2053
|
-
# @param new_context [
|
2226
|
+
# @param new_context [DialogNodeContext] The context for the dialog node.
|
2054
2227
|
# @param new_metadata [Hash] The metadata for the dialog node.
|
2055
2228
|
# @param new_next_step [DialogNodeNextStep] The next step to execute following this dialog node.
|
2056
|
-
# @param new_title [String]
|
2057
|
-
#
|
2058
|
-
#
|
2059
|
-
#
|
2229
|
+
# @param new_title [String] A human-readable name for the dialog node. If the node is included in
|
2230
|
+
# disambiguation, this title is used to populate the **label** property of the
|
2231
|
+
# corresponding suggestion in the `suggestion` response type (unless it is
|
2232
|
+
# overridden by the **user_label** property). The title is also used to populate the
|
2233
|
+
# **topic** property in the `connect_to_agent` response type.
|
2234
|
+
#
|
2235
|
+
# This string can contain only Unicode alphanumeric, space, underscore, hyphen, and
|
2236
|
+
# dot characters.
|
2060
2237
|
# @param new_type [String] How the dialog node is processed.
|
2061
2238
|
# @param new_event_name [String] How an `event_handler` node is processed.
|
2062
2239
|
# @param new_variable [String] The location in the dialog context where output is stored.
|
@@ -2065,7 +2242,8 @@ module IBMWatson
|
|
2065
2242
|
# @param new_digress_out [String] Whether this dialog node can be returned to after a digression.
|
2066
2243
|
# @param new_digress_out_slots [String] Whether the user can digress to top-level nodes while filling out slots.
|
2067
2244
|
# @param new_user_label [String] A label that can be displayed externally to describe the purpose of the node to
|
2068
|
-
# users.
|
2245
|
+
# users. If set, this label is used to identify the node in disambiguation responses
|
2246
|
+
# (overriding the value of the **title** property).
|
2069
2247
|
# @param new_disambiguation_opt_out [Boolean] Whether the dialog node should be excluded from disambiguation suggestions. Valid
|
2070
2248
|
# only when **type**=`standard` or `frame`.
|
2071
2249
|
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
@@ -2076,6 +2254,8 @@ module IBMWatson
|
|
2076
2254
|
|
2077
2255
|
raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
|
2078
2256
|
|
2257
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
2258
|
+
|
2079
2259
|
headers = {
|
2080
2260
|
}
|
2081
2261
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_dialog_node")
|
@@ -2126,13 +2306,15 @@ module IBMWatson
|
|
2126
2306
|
# Delete dialog node.
|
2127
2307
|
# Delete a dialog node from a workspace.
|
2128
2308
|
# @param workspace_id [String] Unique identifier of the workspace.
|
2129
|
-
# @param dialog_node [String] The dialog node ID (for example, `
|
2309
|
+
# @param dialog_node [String] The dialog node ID (for example, `node_1_1479323581900`).
|
2130
2310
|
# @return [nil]
|
2131
2311
|
def delete_dialog_node(workspace_id:, dialog_node:)
|
2132
2312
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
2133
2313
|
|
2134
2314
|
raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
|
2135
2315
|
|
2316
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
2317
|
+
|
2136
2318
|
headers = {
|
2137
2319
|
}
|
2138
2320
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_dialog_node")
|
@@ -2161,6 +2343,8 @@ module IBMWatson
|
|
2161
2343
|
# @!method list_logs(workspace_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil)
|
2162
2344
|
# List log events in a workspace.
|
2163
2345
|
# List the events from the log of a specific workspace.
|
2346
|
+
#
|
2347
|
+
# This method requires Manager access.
|
2164
2348
|
# @param workspace_id [String] Unique identifier of the workspace.
|
2165
2349
|
# @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
|
2166
2350
|
# reverse the sort order, prefix the parameter value with a minus sign (`-`).
|
@@ -2173,6 +2357,8 @@ module IBMWatson
|
|
2173
2357
|
def list_logs(workspace_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil)
|
2174
2358
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
2175
2359
|
|
2360
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
2361
|
+
|
2176
2362
|
headers = {
|
2177
2363
|
}
|
2178
2364
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_logs")
|
@@ -2213,6 +2399,8 @@ module IBMWatson
|
|
2213
2399
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
2214
2400
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2215
2401
|
def list_all_logs(filter:, sort: nil, page_limit: nil, cursor: nil)
|
2402
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
2403
|
+
|
2216
2404
|
raise ArgumentError.new("filter must be provided") if filter.nil?
|
2217
2405
|
|
2218
2406
|
headers = {
|
@@ -2253,9 +2441,17 @@ module IBMWatson
|
|
2253
2441
|
# with a request that passes data. For more information about personal data and
|
2254
2442
|
# customer IDs, see [Information
|
2255
2443
|
# security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
|
2444
|
+
#
|
2445
|
+
# **Note:** This operation is intended only for deleting data associated with a
|
2446
|
+
# single specific customer, not for deleting data associated with multiple customers
|
2447
|
+
# or for any other purpose. For more information, see [Labeling and deleting data in
|
2448
|
+
# Watson
|
2449
|
+
# Assistant](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security-gdpr-wa).
|
2256
2450
|
# @param customer_id [String] The customer ID for which all data is to be deleted.
|
2257
2451
|
# @return [nil]
|
2258
2452
|
def delete_user_data(customer_id:)
|
2453
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
2454
|
+
|
2259
2455
|
raise ArgumentError.new("customer_id must be provided") if customer_id.nil?
|
2260
2456
|
|
2261
2457
|
headers = {
|