ibm_watson 1.2.0 → 1.3.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 +23 -1
- data/lib/ibm_watson/assistant_v1.rb +140 -60
- data/lib/ibm_watson/assistant_v2.rb +6 -6
- data/lib/ibm_watson/compare_comply_v1.rb +1 -1
- data/lib/ibm_watson/discovery_v1.rb +1 -1
- data/lib/ibm_watson/discovery_v2.rb +1 -1
- data/lib/ibm_watson/language_translator_v3.rb +1 -1
- data/lib/ibm_watson/natural_language_classifier_v1.rb +2 -2
- data/lib/ibm_watson/natural_language_understanding_v1.rb +1 -1
- data/lib/ibm_watson/personality_insights_v3.rb +9 -9
- data/lib/ibm_watson/speech_to_text_v1.rb +104 -104
- data/lib/ibm_watson/text_to_speech_v1.rb +24 -24
- data/lib/ibm_watson/tone_analyzer_v3.rb +3 -3
- data/lib/ibm_watson/version.rb +1 -1
- data/lib/ibm_watson/visual_recognition_v3.rb +3 -3
- data/lib/ibm_watson/visual_recognition_v4.rb +146 -2
- data/test/unit/test_personality_insights_v3.rb +4 -0
- data/test/unit/test_visual_recognition_v4.rb +69 -0
- metadata +4 -5
- data/test/unit/test_vcap_using_personality_insights.rb +0 -161
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e4f5615e3f89cc1797e9bb4462741f3c3542d41576f85443b9cfe88dcb73a1f
|
4
|
+
data.tar.gz: b04dc88c8665380a7da41eb21e49140e63efe4214bdc146ba4e8723f79c2f428
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cda29979ae5976a754db7930b27b2f24bca1eb0017ba7872ef5a3578a2508e8b3cb45e069ef57866e5dc913c87be44e49172a6b58edfc24b37a4907c1f59ba99
|
7
|
+
data.tar.gz: 2ec9b3b9d84aed28c3feb93ad6adc9d89556ba6f3c5f86bcea6949ca386540299136ee9583cd85aa19a05a01c67ad6e1f74a416d87bc68ec1f3bb34d9b29b93c
|
data/README.md
CHANGED
@@ -267,6 +267,28 @@ Headers: "<http response headers>"
|
|
267
267
|
Result: "<response returned by service>"
|
268
268
|
```
|
269
269
|
|
270
|
+
### Transaction IDs
|
271
|
+
|
272
|
+
Every SDK call will return a response which will contain a transaction ID, accessible via the `x-global-transaction-id` header. This transaction ID is useful for troubleshooting and accessing relevant logs from your service instance.
|
273
|
+
|
274
|
+
```ruby
|
275
|
+
require "ibm_watson"
|
276
|
+
include IBMWatson
|
277
|
+
|
278
|
+
assistant = AssistantV1.new(
|
279
|
+
authenticator: "<authenticator>"
|
280
|
+
version: "2017-04-21"
|
281
|
+
)
|
282
|
+
|
283
|
+
begin
|
284
|
+
response = assistant.list_workspaces
|
285
|
+
p "Global transaction id: #{response.headers["X-Global-Transaction-Id"]}"
|
286
|
+
rescue IBMCloudSdkCore::ApiException => e
|
287
|
+
# Global transaction on failed api call is contained in the error message
|
288
|
+
print "Error: ##{e}"
|
289
|
+
end
|
290
|
+
```
|
291
|
+
|
270
292
|
## Configuring the HTTP client
|
271
293
|
|
272
294
|
To set client configs like timeout or proxy use the `configure_http_client` function and pass in the configurations.
|
@@ -399,4 +421,4 @@ We'd love to highlight cool open-source projects that use this SDK! If you'd lik
|
|
399
421
|
[license]: http://www.apache.org/licenses/LICENSE-2.0
|
400
422
|
[vcap_services]: https://cloud.ibm.com/docs/services/watson?topic=watson-vcapServices
|
401
423
|
[ibm-cloud-onboarding]: http://cloud.ibm.com/registration?target=/developer/watson&cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Ruby
|
402
|
-
[ivar]: http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/IVar.html
|
424
|
+
[ivar]: http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/IVar.html
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# (C) Copyright IBM Corp. 2020.
|
3
|
+
# (C) Copyright IBM Corp. 2018, 2020.
|
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.
|
@@ -78,7 +78,7 @@ module IBMWatson
|
|
78
78
|
# **Important:** This method has been superseded by the new v2 runtime API. The v2
|
79
79
|
# API offers significant advantages, including ease of deployment, automatic state
|
80
80
|
# management, versioning, and search capabilities. For more information, see the
|
81
|
-
# [documentation](https://cloud.ibm.com/docs/
|
81
|
+
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overview).
|
82
82
|
#
|
83
83
|
# There is no rate limit for this operation.
|
84
84
|
# @param workspace_id [String] Unique identifier of the workspace.
|
@@ -177,7 +177,7 @@ module IBMWatson
|
|
177
177
|
end
|
178
178
|
|
179
179
|
##
|
180
|
-
# @!method create_workspace(name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil)
|
180
|
+
# @!method create_workspace(name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, include_audit: nil)
|
181
181
|
# Create workspace.
|
182
182
|
# Create a workspace based on component objects. You must provide workspace
|
183
183
|
# components defining the content of the new workspace.
|
@@ -200,15 +200,18 @@ module IBMWatson
|
|
200
200
|
# @param counterexamples [Array[Counterexample]] An array of objects defining input examples that have been marked as irrelevant
|
201
201
|
# input.
|
202
202
|
# @param webhooks [Array[Webhook]]
|
203
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
204
|
+
# the response.
|
203
205
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
204
|
-
def create_workspace(name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil)
|
206
|
+
def create_workspace(name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, include_audit: nil)
|
205
207
|
headers = {
|
206
208
|
}
|
207
209
|
sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_workspace")
|
208
210
|
headers.merge!(sdk_headers)
|
209
211
|
|
210
212
|
params = {
|
211
|
-
"version" => @version
|
213
|
+
"version" => @version,
|
214
|
+
"include_audit" => include_audit
|
212
215
|
}
|
213
216
|
|
214
217
|
data = {
|
@@ -284,7 +287,7 @@ module IBMWatson
|
|
284
287
|
end
|
285
288
|
|
286
289
|
##
|
287
|
-
# @!method update_workspace(workspace_id:, name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, append: nil)
|
290
|
+
# @!method update_workspace(workspace_id:, name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, append: nil, include_audit: nil)
|
288
291
|
# Update workspace.
|
289
292
|
# Update an existing workspace with new or modified data. You must provide component
|
290
293
|
# objects defining the content of the updated workspace.
|
@@ -308,17 +311,20 @@ module IBMWatson
|
|
308
311
|
# @param counterexamples [Array[Counterexample]] An array of objects defining input examples that have been marked as irrelevant
|
309
312
|
# input.
|
310
313
|
# @param webhooks [Array[Webhook]]
|
311
|
-
# @param append [Boolean] Whether the new data is to be appended to the existing data in the
|
314
|
+
# @param append [Boolean] Whether the new data is to be appended to the existing data in the object. If
|
312
315
|
# **append**=`false`, elements included in the new data completely replace the
|
313
316
|
# corresponding existing elements, including all subelements. For example, if the
|
314
|
-
# new data includes **entities** and **append**=`false`, all
|
315
|
-
# the workspace are discarded and replaced with the new
|
317
|
+
# new data for a workspace includes **entities** and **append**=`false`, all
|
318
|
+
# existing entities in the workspace are discarded and replaced with the new
|
319
|
+
# entities.
|
316
320
|
#
|
317
321
|
# If **append**=`true`, existing elements are preserved, and the new elements are
|
318
322
|
# added. If any elements in the new data collide with existing elements, the update
|
319
323
|
# request fails.
|
324
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
325
|
+
# the response.
|
320
326
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
321
|
-
def update_workspace(workspace_id:, name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, append: nil)
|
327
|
+
def update_workspace(workspace_id:, name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, append: nil, include_audit: nil)
|
322
328
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
323
329
|
|
324
330
|
headers = {
|
@@ -328,7 +334,8 @@ module IBMWatson
|
|
328
334
|
|
329
335
|
params = {
|
330
336
|
"version" => @version,
|
331
|
-
"append" => append
|
337
|
+
"append" => append,
|
338
|
+
"include_audit" => include_audit
|
332
339
|
}
|
333
340
|
|
334
341
|
data = {
|
@@ -443,7 +450,7 @@ module IBMWatson
|
|
443
450
|
end
|
444
451
|
|
445
452
|
##
|
446
|
-
# @!method create_intent(workspace_id:, intent:, description: nil, examples: nil)
|
453
|
+
# @!method create_intent(workspace_id:, intent:, description: nil, examples: nil, include_audit: nil)
|
447
454
|
# Create intent.
|
448
455
|
# Create a new intent.
|
449
456
|
#
|
@@ -460,8 +467,10 @@ module IBMWatson
|
|
460
467
|
# @param description [String] The description of the intent. This string cannot contain carriage return,
|
461
468
|
# newline, or tab characters.
|
462
469
|
# @param examples [Array[Example]] An array of user input examples for the intent.
|
470
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
471
|
+
# the response.
|
463
472
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
464
|
-
def create_intent(workspace_id:, intent:, description: nil, examples: nil)
|
473
|
+
def create_intent(workspace_id:, intent:, description: nil, examples: nil, include_audit: nil)
|
465
474
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
466
475
|
|
467
476
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
@@ -472,7 +481,8 @@ module IBMWatson
|
|
472
481
|
headers.merge!(sdk_headers)
|
473
482
|
|
474
483
|
params = {
|
475
|
-
"version" => @version
|
484
|
+
"version" => @version,
|
485
|
+
"include_audit" => include_audit
|
476
486
|
}
|
477
487
|
|
478
488
|
data = {
|
@@ -539,7 +549,7 @@ module IBMWatson
|
|
539
549
|
end
|
540
550
|
|
541
551
|
##
|
542
|
-
# @!method update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil)
|
552
|
+
# @!method update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil, append: nil, include_audit: nil)
|
543
553
|
# Update intent.
|
544
554
|
# Update an existing intent with new or modified data. You must provide component
|
545
555
|
# objects defining the content of the updated intent.
|
@@ -558,8 +568,19 @@ module IBMWatson
|
|
558
568
|
# @param new_description [String] The description of the intent. This string cannot contain carriage return,
|
559
569
|
# newline, or tab characters.
|
560
570
|
# @param new_examples [Array[Example]] An array of user input examples for the intent.
|
571
|
+
# @param append [Boolean] Whether the new data is to be appended to the existing data in the object. If
|
572
|
+
# **append**=`false`, elements included in the new data completely replace the
|
573
|
+
# corresponding existing elements, including all subelements. For example, if the
|
574
|
+
# new data for the intent includes **examples** and **append**=`false`, all existing
|
575
|
+
# examples for the intent are discarded and replaced with the new examples.
|
576
|
+
#
|
577
|
+
# If **append**=`true`, existing elements are preserved, and the new elements are
|
578
|
+
# added. If any elements in the new data collide with existing elements, the update
|
579
|
+
# request fails.
|
580
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
581
|
+
# the response.
|
561
582
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
562
|
-
def update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil)
|
583
|
+
def update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil, append: nil, include_audit: nil)
|
563
584
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
564
585
|
|
565
586
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
@@ -570,7 +591,9 @@ module IBMWatson
|
|
570
591
|
headers.merge!(sdk_headers)
|
571
592
|
|
572
593
|
params = {
|
573
|
-
"version" => @version
|
594
|
+
"version" => @version,
|
595
|
+
"append" => append,
|
596
|
+
"include_audit" => include_audit
|
574
597
|
}
|
575
598
|
|
576
599
|
data = {
|
@@ -679,7 +702,7 @@ module IBMWatson
|
|
679
702
|
end
|
680
703
|
|
681
704
|
##
|
682
|
-
# @!method create_example(workspace_id:, intent:, text:, mentions: nil)
|
705
|
+
# @!method create_example(workspace_id:, intent:, text:, mentions: nil, include_audit: nil)
|
683
706
|
# Create user input example.
|
684
707
|
# Add a new user input example to an intent.
|
685
708
|
#
|
@@ -695,8 +718,10 @@ module IBMWatson
|
|
695
718
|
# - It cannot contain carriage return, newline, or tab characters.
|
696
719
|
# - It cannot consist of only whitespace characters.
|
697
720
|
# @param mentions [Array[Mention]] An array of contextual entity mentions.
|
721
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
722
|
+
# the response.
|
698
723
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
699
|
-
def create_example(workspace_id:, intent:, text:, mentions: nil)
|
724
|
+
def create_example(workspace_id:, intent:, text:, mentions: nil, include_audit: nil)
|
700
725
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
701
726
|
|
702
727
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
@@ -709,7 +734,8 @@ module IBMWatson
|
|
709
734
|
headers.merge!(sdk_headers)
|
710
735
|
|
711
736
|
params = {
|
712
|
-
"version" => @version
|
737
|
+
"version" => @version,
|
738
|
+
"include_audit" => include_audit
|
713
739
|
}
|
714
740
|
|
715
741
|
data = {
|
@@ -773,7 +799,7 @@ module IBMWatson
|
|
773
799
|
end
|
774
800
|
|
775
801
|
##
|
776
|
-
# @!method update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil)
|
802
|
+
# @!method update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil, include_audit: nil)
|
777
803
|
# Update user input example.
|
778
804
|
# Update the text of a user input example.
|
779
805
|
#
|
@@ -790,8 +816,10 @@ module IBMWatson
|
|
790
816
|
# - It cannot contain carriage return, newline, or tab characters.
|
791
817
|
# - It cannot consist of only whitespace characters.
|
792
818
|
# @param new_mentions [Array[Mention]] An array of contextual entity mentions.
|
819
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
820
|
+
# the response.
|
793
821
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
794
|
-
def update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil)
|
822
|
+
def update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil, include_audit: nil)
|
795
823
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
796
824
|
|
797
825
|
raise ArgumentError.new("intent must be provided") if intent.nil?
|
@@ -804,7 +832,8 @@ module IBMWatson
|
|
804
832
|
headers.merge!(sdk_headers)
|
805
833
|
|
806
834
|
params = {
|
807
|
-
"version" => @version
|
835
|
+
"version" => @version,
|
836
|
+
"include_audit" => include_audit
|
808
837
|
}
|
809
838
|
|
810
839
|
data = {
|
@@ -912,7 +941,7 @@ module IBMWatson
|
|
912
941
|
end
|
913
942
|
|
914
943
|
##
|
915
|
-
# @!method create_counterexample(workspace_id:, text:)
|
944
|
+
# @!method create_counterexample(workspace_id:, text:, include_audit: nil)
|
916
945
|
# Create counterexample.
|
917
946
|
# Add a new counterexample to a workspace. Counterexamples are examples that have
|
918
947
|
# been marked as irrelevant input.
|
@@ -927,8 +956,10 @@ module IBMWatson
|
|
927
956
|
# the following restrictions:
|
928
957
|
# - It cannot contain carriage return, newline, or tab characters.
|
929
958
|
# - It cannot consist of only whitespace characters.
|
959
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
960
|
+
# the response.
|
930
961
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
931
|
-
def create_counterexample(workspace_id:, text:)
|
962
|
+
def create_counterexample(workspace_id:, text:, include_audit: nil)
|
932
963
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
933
964
|
|
934
965
|
raise ArgumentError.new("text must be provided") if text.nil?
|
@@ -939,7 +970,8 @@ module IBMWatson
|
|
939
970
|
headers.merge!(sdk_headers)
|
940
971
|
|
941
972
|
params = {
|
942
|
-
"version" => @version
|
973
|
+
"version" => @version,
|
974
|
+
"include_audit" => include_audit
|
943
975
|
}
|
944
976
|
|
945
977
|
data = {
|
@@ -1000,7 +1032,7 @@ module IBMWatson
|
|
1000
1032
|
end
|
1001
1033
|
|
1002
1034
|
##
|
1003
|
-
# @!method update_counterexample(workspace_id:, text:, new_text: nil)
|
1035
|
+
# @!method update_counterexample(workspace_id:, text:, new_text: nil, include_audit: nil)
|
1004
1036
|
# Update counterexample.
|
1005
1037
|
# Update the text of a counterexample. Counterexamples are examples that have been
|
1006
1038
|
# marked as irrelevant input.
|
@@ -1016,8 +1048,10 @@ module IBMWatson
|
|
1016
1048
|
# the following restrictions:
|
1017
1049
|
# - It cannot contain carriage return, newline, or tab characters.
|
1018
1050
|
# - It cannot consist of only whitespace characters.
|
1051
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1052
|
+
# the response.
|
1019
1053
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1020
|
-
def update_counterexample(workspace_id:, text:, new_text: nil)
|
1054
|
+
def update_counterexample(workspace_id:, text:, new_text: nil, include_audit: nil)
|
1021
1055
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1022
1056
|
|
1023
1057
|
raise ArgumentError.new("text must be provided") if text.nil?
|
@@ -1028,7 +1062,8 @@ module IBMWatson
|
|
1028
1062
|
headers.merge!(sdk_headers)
|
1029
1063
|
|
1030
1064
|
params = {
|
1031
|
-
"version" => @version
|
1065
|
+
"version" => @version,
|
1066
|
+
"include_audit" => include_audit
|
1032
1067
|
}
|
1033
1068
|
|
1034
1069
|
data = {
|
@@ -1137,7 +1172,7 @@ module IBMWatson
|
|
1137
1172
|
end
|
1138
1173
|
|
1139
1174
|
##
|
1140
|
-
# @!method create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil)
|
1175
|
+
# @!method create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil, include_audit: nil)
|
1141
1176
|
# Create entity.
|
1142
1177
|
# Create a new entity, or enable a system entity.
|
1143
1178
|
#
|
@@ -1157,8 +1192,10 @@ module IBMWatson
|
|
1157
1192
|
# @param metadata [Hash] Any metadata related to the entity.
|
1158
1193
|
# @param fuzzy_match [Boolean] Whether to use fuzzy matching for the entity.
|
1159
1194
|
# @param values [Array[CreateValue]] An array of objects describing the entity values.
|
1195
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1196
|
+
# the response.
|
1160
1197
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1161
|
-
def create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil)
|
1198
|
+
def create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil, include_audit: nil)
|
1162
1199
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1163
1200
|
|
1164
1201
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
@@ -1169,7 +1206,8 @@ module IBMWatson
|
|
1169
1206
|
headers.merge!(sdk_headers)
|
1170
1207
|
|
1171
1208
|
params = {
|
1172
|
-
"version" => @version
|
1209
|
+
"version" => @version,
|
1210
|
+
"include_audit" => include_audit
|
1173
1211
|
}
|
1174
1212
|
|
1175
1213
|
data = {
|
@@ -1238,7 +1276,7 @@ module IBMWatson
|
|
1238
1276
|
end
|
1239
1277
|
|
1240
1278
|
##
|
1241
|
-
# @!method update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil)
|
1279
|
+
# @!method update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil, append: nil, include_audit: nil)
|
1242
1280
|
# Update entity.
|
1243
1281
|
# Update an existing entity with new or modified data. You must provide component
|
1244
1282
|
# objects defining the content of the updated entity.
|
@@ -1258,8 +1296,19 @@ module IBMWatson
|
|
1258
1296
|
# @param new_metadata [Hash] Any metadata related to the entity.
|
1259
1297
|
# @param new_fuzzy_match [Boolean] Whether to use fuzzy matching for the entity.
|
1260
1298
|
# @param new_values [Array[CreateValue]] An array of objects describing the entity values.
|
1299
|
+
# @param append [Boolean] Whether the new data is to be appended to the existing data in the entity. If
|
1300
|
+
# **append**=`false`, elements included in the new data completely replace the
|
1301
|
+
# corresponding existing elements, including all subelements. For example, if the
|
1302
|
+
# new data for the entity includes **values** and **append**=`false`, all existing
|
1303
|
+
# values for the entity are discarded and replaced with the new values.
|
1304
|
+
#
|
1305
|
+
# If **append**=`true`, existing elements are preserved, and the new elements are
|
1306
|
+
# added. If any elements in the new data collide with existing elements, the update
|
1307
|
+
# request fails.
|
1308
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1309
|
+
# the response.
|
1261
1310
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1262
|
-
def update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil)
|
1311
|
+
def update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil, append: nil, include_audit: nil)
|
1263
1312
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1264
1313
|
|
1265
1314
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
@@ -1270,7 +1319,9 @@ module IBMWatson
|
|
1270
1319
|
headers.merge!(sdk_headers)
|
1271
1320
|
|
1272
1321
|
params = {
|
1273
|
-
"version" => @version
|
1322
|
+
"version" => @version,
|
1323
|
+
"append" => append,
|
1324
|
+
"include_audit" => include_audit
|
1274
1325
|
}
|
1275
1326
|
|
1276
1327
|
data = {
|
@@ -1431,7 +1482,7 @@ module IBMWatson
|
|
1431
1482
|
end
|
1432
1483
|
|
1433
1484
|
##
|
1434
|
-
# @!method create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil)
|
1485
|
+
# @!method create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil, include_audit: nil)
|
1435
1486
|
# Create entity value.
|
1436
1487
|
# Create a new value for an entity.
|
1437
1488
|
#
|
@@ -1456,9 +1507,11 @@ module IBMWatson
|
|
1456
1507
|
# @param patterns [Array[String]] An array of patterns for the entity value. A value can specify either synonyms or
|
1457
1508
|
# patterns (depending on the value type), but not both. A pattern is a regular
|
1458
1509
|
# expression; for more information about how to specify a pattern, see the
|
1459
|
-
# [documentation](https://cloud.ibm.com/docs/
|
1510
|
+
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).
|
1511
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1512
|
+
# the response.
|
1460
1513
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1461
|
-
def create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil)
|
1514
|
+
def create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil, include_audit: nil)
|
1462
1515
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1463
1516
|
|
1464
1517
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
@@ -1471,7 +1524,8 @@ module IBMWatson
|
|
1471
1524
|
headers.merge!(sdk_headers)
|
1472
1525
|
|
1473
1526
|
params = {
|
1474
|
-
"version" => @version
|
1527
|
+
"version" => @version,
|
1528
|
+
"include_audit" => include_audit
|
1475
1529
|
}
|
1476
1530
|
|
1477
1531
|
data = {
|
@@ -1542,7 +1596,7 @@ module IBMWatson
|
|
1542
1596
|
end
|
1543
1597
|
|
1544
1598
|
##
|
1545
|
-
# @!method update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil)
|
1599
|
+
# @!method update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil, append: nil, include_audit: nil)
|
1546
1600
|
# Update entity value.
|
1547
1601
|
# Update an existing entity value with new or modified data. You must provide
|
1548
1602
|
# component objects defining the content of the updated entity value.
|
@@ -1569,9 +1623,21 @@ module IBMWatson
|
|
1569
1623
|
# @param new_patterns [Array[String]] An array of patterns for the entity value. A value can specify either synonyms or
|
1570
1624
|
# patterns (depending on the value type), but not both. A pattern is a regular
|
1571
1625
|
# expression; for more information about how to specify a pattern, see the
|
1572
|
-
# [documentation](https://cloud.ibm.com/docs/
|
1626
|
+
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).
|
1627
|
+
# @param append [Boolean] Whether the new data is to be appended to the existing data in the entity value.
|
1628
|
+
# If **append**=`false`, elements included in the new data completely replace the
|
1629
|
+
# corresponding existing elements, including all subelements. For example, if the
|
1630
|
+
# new data for the entity value includes **synonyms** and **append**=`false`, all
|
1631
|
+
# existing synonyms for the entity value are discarded and replaced with the new
|
1632
|
+
# synonyms.
|
1633
|
+
#
|
1634
|
+
# If **append**=`true`, existing elements are preserved, and the new elements are
|
1635
|
+
# added. If any elements in the new data collide with existing elements, the update
|
1636
|
+
# request fails.
|
1637
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1638
|
+
# the response.
|
1573
1639
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1574
|
-
def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil)
|
1640
|
+
def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil, append: nil, include_audit: nil)
|
1575
1641
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1576
1642
|
|
1577
1643
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
@@ -1584,7 +1650,9 @@ module IBMWatson
|
|
1584
1650
|
headers.merge!(sdk_headers)
|
1585
1651
|
|
1586
1652
|
params = {
|
1587
|
-
"version" => @version
|
1653
|
+
"version" => @version,
|
1654
|
+
"append" => append,
|
1655
|
+
"include_audit" => include_audit
|
1588
1656
|
}
|
1589
1657
|
|
1590
1658
|
data = {
|
@@ -1700,7 +1768,7 @@ module IBMWatson
|
|
1700
1768
|
end
|
1701
1769
|
|
1702
1770
|
##
|
1703
|
-
# @!method create_synonym(workspace_id:, entity:, value:, synonym:)
|
1771
|
+
# @!method create_synonym(workspace_id:, entity:, value:, synonym:, include_audit: nil)
|
1704
1772
|
# Create entity value synonym.
|
1705
1773
|
# Add a new synonym to an entity value.
|
1706
1774
|
#
|
@@ -1716,8 +1784,10 @@ module IBMWatson
|
|
1716
1784
|
# @param synonym [String] The text of the synonym. This string must conform to the following restrictions:
|
1717
1785
|
# - It cannot contain carriage return, newline, or tab characters.
|
1718
1786
|
# - It cannot consist of only whitespace characters.
|
1787
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1788
|
+
# the response.
|
1719
1789
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1720
|
-
def create_synonym(workspace_id:, entity:, value:, synonym:)
|
1790
|
+
def create_synonym(workspace_id:, entity:, value:, synonym:, include_audit: nil)
|
1721
1791
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1722
1792
|
|
1723
1793
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
@@ -1732,7 +1802,8 @@ module IBMWatson
|
|
1732
1802
|
headers.merge!(sdk_headers)
|
1733
1803
|
|
1734
1804
|
params = {
|
1735
|
-
"version" => @version
|
1805
|
+
"version" => @version,
|
1806
|
+
"include_audit" => include_audit
|
1736
1807
|
}
|
1737
1808
|
|
1738
1809
|
data = {
|
@@ -1798,7 +1869,7 @@ module IBMWatson
|
|
1798
1869
|
end
|
1799
1870
|
|
1800
1871
|
##
|
1801
|
-
# @!method update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil)
|
1872
|
+
# @!method update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil, include_audit: nil)
|
1802
1873
|
# Update entity value synonym.
|
1803
1874
|
# Update an existing entity value synonym with new text.
|
1804
1875
|
#
|
@@ -1815,8 +1886,10 @@ module IBMWatson
|
|
1815
1886
|
# @param new_synonym [String] The text of the synonym. This string must conform to the following restrictions:
|
1816
1887
|
# - It cannot contain carriage return, newline, or tab characters.
|
1817
1888
|
# - It cannot consist of only whitespace characters.
|
1889
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
1890
|
+
# the response.
|
1818
1891
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1819
|
-
def update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil)
|
1892
|
+
def update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil, include_audit: nil)
|
1820
1893
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1821
1894
|
|
1822
1895
|
raise ArgumentError.new("entity must be provided") if entity.nil?
|
@@ -1831,7 +1904,8 @@ module IBMWatson
|
|
1831
1904
|
headers.merge!(sdk_headers)
|
1832
1905
|
|
1833
1906
|
params = {
|
1834
|
-
"version" => @version
|
1907
|
+
"version" => @version,
|
1908
|
+
"include_audit" => include_audit
|
1835
1909
|
}
|
1836
1910
|
|
1837
1911
|
data = {
|
@@ -1940,7 +2014,7 @@ module IBMWatson
|
|
1940
2014
|
end
|
1941
2015
|
|
1942
2016
|
##
|
1943
|
-
# @!method 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)
|
2017
|
+
# @!method 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)
|
1944
2018
|
# Create dialog node.
|
1945
2019
|
# Create a new dialog node.
|
1946
2020
|
#
|
@@ -1963,7 +2037,7 @@ module IBMWatson
|
|
1963
2037
|
# node has no previous sibling.
|
1964
2038
|
# @param output [DialogNodeOutput] The output of the dialog node. For more information about how to specify dialog
|
1965
2039
|
# node output, see the
|
1966
|
-
# [documentation](https://cloud.ibm.com/docs/
|
2040
|
+
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
|
1967
2041
|
# @param context [Hash] The context for the dialog node.
|
1968
2042
|
# @param metadata [Hash] The metadata for the dialog node.
|
1969
2043
|
# @param next_step [DialogNodeNextStep] The next step to execute following this dialog node.
|
@@ -1981,8 +2055,10 @@ module IBMWatson
|
|
1981
2055
|
# @param user_label [String] A label that can be displayed externally to describe the purpose of the node to
|
1982
2056
|
# users.
|
1983
2057
|
# @param disambiguation_opt_out [Boolean] Whether the dialog node should be excluded from disambiguation suggestions.
|
2058
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
2059
|
+
# the response.
|
1984
2060
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1985
|
-
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)
|
2061
|
+
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)
|
1986
2062
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
1987
2063
|
|
1988
2064
|
raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
|
@@ -1993,7 +2069,8 @@ module IBMWatson
|
|
1993
2069
|
headers.merge!(sdk_headers)
|
1994
2070
|
|
1995
2071
|
params = {
|
1996
|
-
"version" => @version
|
2072
|
+
"version" => @version,
|
2073
|
+
"include_audit" => include_audit
|
1997
2074
|
}
|
1998
2075
|
|
1999
2076
|
data = {
|
@@ -2071,7 +2148,7 @@ module IBMWatson
|
|
2071
2148
|
end
|
2072
2149
|
|
2073
2150
|
##
|
2074
|
-
# @!method update_dialog_node(workspace_id:, dialog_node:, new_dialog_node: nil, new_description: nil, new_conditions: nil, new_parent: nil, new_previous_sibling: nil, new_output: nil, new_context: nil, new_metadata: nil, new_next_step: nil, new_title: nil, new_type: nil, new_event_name: nil, new_variable: nil, new_actions: nil, new_digress_in: nil, new_digress_out: nil, new_digress_out_slots: nil, new_user_label: nil, new_disambiguation_opt_out: nil)
|
2151
|
+
# @!method update_dialog_node(workspace_id:, dialog_node:, new_dialog_node: nil, new_description: nil, new_conditions: nil, new_parent: nil, new_previous_sibling: nil, new_output: nil, new_context: nil, new_metadata: nil, new_next_step: nil, new_title: nil, new_type: nil, new_event_name: nil, new_variable: nil, new_actions: nil, new_digress_in: nil, new_digress_out: nil, new_digress_out_slots: nil, new_user_label: nil, new_disambiguation_opt_out: nil, include_audit: nil)
|
2075
2152
|
# Update dialog node.
|
2076
2153
|
# Update an existing dialog node with new or modified data.
|
2077
2154
|
#
|
@@ -2095,7 +2172,7 @@ module IBMWatson
|
|
2095
2172
|
# node has no previous sibling.
|
2096
2173
|
# @param new_output [DialogNodeOutput] The output of the dialog node. For more information about how to specify dialog
|
2097
2174
|
# node output, see the
|
2098
|
-
# [documentation](https://cloud.ibm.com/docs/
|
2175
|
+
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
|
2099
2176
|
# @param new_context [Hash] The context for the dialog node.
|
2100
2177
|
# @param new_metadata [Hash] The metadata for the dialog node.
|
2101
2178
|
# @param new_next_step [DialogNodeNextStep] The next step to execute following this dialog node.
|
@@ -2113,8 +2190,10 @@ module IBMWatson
|
|
2113
2190
|
# @param new_user_label [String] A label that can be displayed externally to describe the purpose of the node to
|
2114
2191
|
# users.
|
2115
2192
|
# @param new_disambiguation_opt_out [Boolean] Whether the dialog node should be excluded from disambiguation suggestions.
|
2193
|
+
# @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
|
2194
|
+
# the response.
|
2116
2195
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2117
|
-
def update_dialog_node(workspace_id:, dialog_node:, new_dialog_node: nil, new_description: nil, new_conditions: nil, new_parent: nil, new_previous_sibling: nil, new_output: nil, new_context: nil, new_metadata: nil, new_next_step: nil, new_title: nil, new_type: nil, new_event_name: nil, new_variable: nil, new_actions: nil, new_digress_in: nil, new_digress_out: nil, new_digress_out_slots: nil, new_user_label: nil, new_disambiguation_opt_out: nil)
|
2196
|
+
def update_dialog_node(workspace_id:, dialog_node:, new_dialog_node: nil, new_description: nil, new_conditions: nil, new_parent: nil, new_previous_sibling: nil, new_output: nil, new_context: nil, new_metadata: nil, new_next_step: nil, new_title: nil, new_type: nil, new_event_name: nil, new_variable: nil, new_actions: nil, new_digress_in: nil, new_digress_out: nil, new_digress_out_slots: nil, new_user_label: nil, new_disambiguation_opt_out: nil, include_audit: nil)
|
2118
2197
|
raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
|
2119
2198
|
|
2120
2199
|
raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
|
@@ -2125,7 +2204,8 @@ module IBMWatson
|
|
2125
2204
|
headers.merge!(sdk_headers)
|
2126
2205
|
|
2127
2206
|
params = {
|
2128
|
-
"version" => @version
|
2207
|
+
"version" => @version,
|
2208
|
+
"include_audit" => include_audit
|
2129
2209
|
}
|
2130
2210
|
|
2131
2211
|
data = {
|
@@ -2215,7 +2295,7 @@ module IBMWatson
|
|
2215
2295
|
# reverse the sort order, prefix the parameter value with a minus sign (`-`).
|
2216
2296
|
# @param filter [String] A cacheable parameter that limits the results to those matching the specified
|
2217
2297
|
# filter. For more information, see the
|
2218
|
-
# [documentation](https://cloud.ibm.com/docs/
|
2298
|
+
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
|
2219
2299
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
2220
2300
|
# @param cursor [String] A token identifying the page of results to retrieve.
|
2221
2301
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2259,7 +2339,7 @@ module IBMWatson
|
|
2259
2339
|
# filter. You must specify a filter query that includes a value for `language`, as
|
2260
2340
|
# well as a value for `request.context.system.assistant_id`, `workspace_id`, or
|
2261
2341
|
# `request.context.metadata.deployment`. For more information, see the
|
2262
|
-
# [documentation](https://cloud.ibm.com/docs/
|
2342
|
+
# [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
|
2263
2343
|
# @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
|
2264
2344
|
# reverse the sort order, prefix the parameter value with a minus sign (`-`).
|
2265
2345
|
# @param page_limit [Fixnum] The number of records to return in each page of results.
|
@@ -2305,7 +2385,7 @@ module IBMWatson
|
|
2305
2385
|
# You associate a customer ID with data by passing the `X-Watson-Metadata` header
|
2306
2386
|
# with a request that passes data. For more information about personal data and
|
2307
2387
|
# customer IDs, see [Information
|
2308
|
-
# security](https://cloud.ibm.com/docs/
|
2388
|
+
# security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
|
2309
2389
|
#
|
2310
2390
|
# This operation is limited to 4 requests per minute. For more information, see
|
2311
2391
|
# **Rate limiting**.
|