Class: IBMWatson::AssistantV1
- Inherits:
-
IBMCloudSdkCore::BaseService
- Object
- IBMCloudSdkCore::BaseService
- IBMWatson::AssistantV1
- Includes:
- Concurrent::Async
- Defined in:
- lib/ibm_watson/assistant_v1.rb
Overview
The Assistant V1 service.
Constant Summary collapse
- DEFAULT_SERVICE_NAME =
"assistant"- DEFAULT_SERVICE_URL =
"https://api.us-south.assistant.watson.cloud.ibm.com"
Instance Attribute Summary collapse
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#bulk_classify(workspace_id: , input: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Identify intents and entities in multiple user utterances.
-
#create_counterexample(workspace_id: , text: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create counterexample.
-
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Create dialog node.
-
#create_entity(workspace_id: , entity: , description: nil, metadata: nil, fuzzy_match: nil, values: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create entity.
-
#create_example(workspace_id: , intent: , text: , mentions: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create user input example.
-
#create_intent(workspace_id: , intent: , description: nil, examples: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create intent.
-
#create_synonym(workspace_id: , entity: , value: , synonym: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create entity value synonym.
-
#create_value(workspace_id: , entity: , value: , metadata: nil, type: nil, synonyms: nil, patterns: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create entity value.
-
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Create workspace.
-
#delete_counterexample(workspace_id: , text: ) ⇒ nil
Delete counterexample.
-
#delete_dialog_node(workspace_id: , dialog_node: ) ⇒ nil
Delete dialog node.
-
#delete_entity(workspace_id: , entity: ) ⇒ nil
Delete entity.
-
#delete_example(workspace_id: , intent: , text: ) ⇒ nil
Delete user input example.
-
#delete_intent(workspace_id: , intent: ) ⇒ nil
Delete intent.
-
#delete_synonym(workspace_id: , entity: , value: , synonym: ) ⇒ nil
Delete entity value synonym.
-
#delete_user_data(customer_id: ) ⇒ nil
Delete labeled data.
-
#delete_value(workspace_id: , entity: , value: ) ⇒ nil
Delete entity value.
-
#delete_workspace(workspace_id: ) ⇒ nil
Delete workspace.
-
#get_counterexample(workspace_id: , text: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get counterexample.
-
#get_dialog_node(workspace_id: , dialog_node: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get dialog node.
-
#get_entity(workspace_id: , entity: , export: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get entity.
-
#get_example(workspace_id: , intent: , text: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get user input example.
-
#get_intent(workspace_id: , intent: , export: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get intent.
-
#get_synonym(workspace_id: , entity: , value: , synonym: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get entity value synonym.
-
#get_value(workspace_id: , entity: , value: , export: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get entity value.
-
#get_workspace(workspace_id: , export: nil, include_audit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get information about a workspace.
-
#initialize(args) ⇒ AssistantV1
constructor
Construct a new client for the Assistant service.
-
#list_all_logs(filter: , sort: nil, page_limit: nil, cursor: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List log events in all workspaces.
-
#list_counterexamples(workspace_id: , page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List counterexamples.
-
#list_dialog_nodes(workspace_id: , page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List dialog nodes.
-
#list_entities(workspace_id: , export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List entities.
-
#list_examples(workspace_id: , intent: , page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List user input examples.
-
#list_intents(workspace_id: , export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List intents.
-
#list_logs(workspace_id: , sort: nil, filter: nil, page_limit: nil, cursor: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List log events in a workspace.
-
#list_mentions(workspace_id: , entity: , export: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List entity mentions.
-
#list_synonyms(workspace_id: , entity: , value: , page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List entity value synonyms.
-
#list_values(workspace_id: , entity: , export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List entity values.
-
#list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List workspaces.
-
#message(workspace_id: , input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, user_id: nil, nodes_visited_details: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get response to user input.
-
#update_counterexample(workspace_id: , text: , new_text: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Update counterexample.
-
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Update dialog node.
-
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Update entity.
-
#update_example(workspace_id: , intent: , text: , new_text: nil, new_mentions: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Update user input example.
-
#update_intent(workspace_id: , intent: , new_intent: nil, new_description: nil, new_examples: nil, append: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Update intent.
-
#update_synonym(workspace_id: , entity: , value: , synonym: , new_synonym: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Update entity value synonym.
-
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Update entity value.
-
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Update workspace.
Constructor Details
#initialize(args) ⇒ AssistantV1
Construct a new client for the Assistant service.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/ibm_watson/assistant_v1.rb', line 52 def initialize(args = {}) @__async_initialized__ = false defaults = {} defaults[:service_url] = DEFAULT_SERVICE_URL defaults[:service_name] = DEFAULT_SERVICE_NAME defaults[:authenticator] = nil defaults[:version] = nil user_service_url = args[:service_url] unless args[:service_url].nil? args = defaults.merge(args) @version = args[:version] raise ArgumentError.new("version must be provided") if @version.nil? args[:authenticator] = IBMCloudSdkCore::ConfigBasedAuthenticatorFactory.new.get_authenticator(service_name: args[:service_name]) if args[:authenticator].nil? super @service_url = user_service_url unless user_service_url.nil? end |
Instance Attribute Details
#version ⇒ Object
Returns the value of attribute version.
39 40 41 |
# File 'lib/ibm_watson/assistant_v1.rb', line 39 def version @version end |
Instance Method Details
#bulk_classify(workspace_id: , input: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Identify intents and entities in multiple user utterances. Send multiple user inputs to a workspace in a single request and receive
information about the intents and entities recognized in each input. This method
is useful for testing and comparing the performance of different workspaces.
This method is available only with Enterprise with Data Isolation plans.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/ibm_watson/assistant_v1.rb', line 161 def bulk_classify(workspace_id:, input: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "bulk_classify") headers.merge!(sdk_headers) params = { "version" => @version } data = { "input" => input } method_url = "/v1/workspaces/%s/bulk_classify" % [ERB::Util.url_encode(workspace_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#create_counterexample(workspace_id: , text: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create counterexample. Add a new counterexample to a workspace. Counterexamples are examples that have
been marked as irrelevant input.
If you want to add multiple counterexamples with a single API call, consider using
the **[Update workspace](#update-workspace)** method instead.
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1012 def create_counterexample(workspace_id:, text:, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("text must be provided") if text.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_counterexample") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "text" => text } method_url = "/v1/workspaces/%s/counterexamples" % [ERB::Util.url_encode(workspace_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Create dialog node. Create a new dialog node.
If you want to create multiple dialog nodes with a single API call, consider using
the **[Update workspace](#update-workspace)** method instead.
2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 |
# File 'lib/ibm_watson/assistant_v1.rb', line 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) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_dialog_node") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "dialog_node" => dialog_node, "description" => description, "conditions" => conditions, "parent" => parent, "previous_sibling" => previous_sibling, "output" => output, "context" => context, "metadata" => , "next_step" => next_step, "title" => title, "type" => type, "event_name" => event_name, "variable" => variable, "actions" => actions, "digress_in" => digress_in, "digress_out" => digress_out, "digress_out_slots" => digress_out_slots, "user_label" => user_label, "disambiguation_opt_out" => disambiguation_opt_out } method_url = "/v1/workspaces/%s/dialog_nodes" % [ERB::Util.url_encode(workspace_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#create_entity(workspace_id: , entity: , description: nil, metadata: nil, fuzzy_match: nil, values: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create entity. Create a new entity, or enable a system entity.
If you want to create multiple entities with a single API call, consider using the
**[Update workspace](#update-workspace)** method instead.
1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1243 def create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("entity must be provided") if entity.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_entity") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "entity" => entity, "description" => description, "metadata" => , "fuzzy_match" => fuzzy_match, "values" => values } method_url = "/v1/workspaces/%s/entities" % [ERB::Util.url_encode(workspace_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#create_example(workspace_id: , intent: , text: , mentions: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create user input example. Add a new user input example to an intent.
If you want to add multiple examples with a single API call, consider using the
**[Update intent](#update-intent)** method instead.
775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 |
# File 'lib/ibm_watson/assistant_v1.rb', line 775 def create_example(workspace_id:, intent:, text:, mentions: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("intent must be provided") if intent.nil? raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("text must be provided") if text.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_example") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "text" => text, "mentions" => mentions } method_url = "/v1/workspaces/%s/intents/%s/examples" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#create_intent(workspace_id: , intent: , description: nil, examples: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create intent. Create a new intent.
If you want to create multiple intents with a single API call, consider using the
**[Update workspace](#update-workspace)** method instead.
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
# File 'lib/ibm_watson/assistant_v1.rb', line 526 def create_intent(workspace_id:, intent:, description: nil, examples: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("intent must be provided") if intent.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_intent") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "intent" => intent, "description" => description, "examples" => examples } method_url = "/v1/workspaces/%s/intents" % [ERB::Util.url_encode(workspace_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#create_synonym(workspace_id: , entity: , value: , synonym: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create entity value synonym. Add a new synonym to an entity value.
If you want to create multiple synonyms with a single API call, consider using the
**[Update entity](#update-entity)** or **[Update entity
value](#update-entity-value)** method instead.
1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1831 def create_synonym(workspace_id:, entity:, value:, synonym:, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("value must be provided") if value.nil? raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("synonym must be provided") if synonym.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_synonym") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "synonym" => synonym } method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#create_value(workspace_id: , entity: , value: , metadata: nil, type: nil, synonyms: nil, patterns: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Create entity value. Create a new value for an entity.
If you want to create multiple entity values with a single API call, consider
using the **[Update entity](#update-entity)** method instead.
1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1556 def create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("value must be provided") if value.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_value") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "value" => value, "metadata" => , "type" => type, "synonyms" => synonyms, "patterns" => patterns } method_url = "/v1/workspaces/%s/entities/%s/values" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Create workspace. Create a workspace based on component objects. You must provide workspace
components defining the content of the new workspace.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/ibm_watson/assistant_v1.rb', line 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) raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_workspace") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "name" => name, "description" => description, "language" => language, "dialog_nodes" => dialog_nodes, "counterexamples" => counterexamples, "metadata" => , "learning_opt_out" => learning_opt_out, "system_settings" => system_settings, "webhooks" => webhooks, "intents" => intents, "entities" => entities } method_url = "/v1/workspaces" response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#delete_counterexample(workspace_id: , text: ) ⇒ nil
Delete counterexample. Delete a counterexample from a workspace. Counterexamples are examples that have
been marked as irrelevant input.
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1141 def delete_counterexample(workspace_id:, text:) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("text must be provided") if text.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_counterexample") headers.merge!(sdk_headers) params = { "version" => @version } method_url = "/v1/workspaces/%s/counterexamples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(text)] request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#delete_dialog_node(workspace_id: , dialog_node: ) ⇒ nil
Delete dialog node. Delete a dialog node from a workspace.
2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 |
# File 'lib/ibm_watson/assistant_v1.rb', line 2311 def delete_dialog_node(workspace_id:, dialog_node:) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_dialog_node") headers.merge!(sdk_headers) params = { "version" => @version } method_url = "/v1/workspaces/%s/dialog_nodes/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(dialog_node)] request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#delete_entity(workspace_id: , entity: ) ⇒ nil
Delete entity. Delete an entity from a workspace, or disable a system entity.
1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1399 def delete_entity(workspace_id:, entity:) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_entity") headers.merge!(sdk_headers) params = { "version" => @version } method_url = "/v1/workspaces/%s/entities/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)] request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#delete_example(workspace_id: , intent: , text: ) ⇒ nil
Delete user input example. Delete a user input example from an intent.
916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 |
# File 'lib/ibm_watson/assistant_v1.rb', line 916 def delete_example(workspace_id:, intent:, text:) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("intent must be provided") if intent.nil? raise ArgumentError.new("text must be provided") if text.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_example") headers.merge!(sdk_headers) params = { "version" => @version } method_url = "/v1/workspaces/%s/intents/%s/examples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent), ERB::Util.url_encode(text)] request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#delete_intent(workspace_id: , intent: ) ⇒ nil
Delete intent. Delete an intent from a workspace.
677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
# File 'lib/ibm_watson/assistant_v1.rb', line 677 def delete_intent(workspace_id:, intent:) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("intent must be provided") if intent.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_intent") headers.merge!(sdk_headers) params = { "version" => @version } method_url = "/v1/workspaces/%s/intents/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)] request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#delete_synonym(workspace_id: , entity: , value: , synonym: ) ⇒ nil
Delete entity value synonym. Delete a synonym from an entity value.
1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1978 def delete_synonym(workspace_id:, entity:, value:, synonym:) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("value must be provided") if value.nil? raise ArgumentError.new("synonym must be provided") if synonym.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_synonym") headers.merge!(sdk_headers) params = { "version" => @version } method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value), ERB::Util.url_encode(synonym)] request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#delete_user_data(customer_id: ) ⇒ nil
Delete labeled data. Deletes all data associated with a specified customer ID. The method has no effect
if no data is associated with the customer ID.
You associate a customer ID with data by passing the `X-Watson-Metadata` header
with a request that passes data. For more information about personal data and
customer IDs, see [Information
security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
**Note:** This operation is intended only for deleting data associated with a
single specific customer, not for deleting data associated with multiple customers
or for any other purpose. For more information, see [Labeling and deleting data in
Watson
Assistant](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security-gdpr-wa).
2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 |
# File 'lib/ibm_watson/assistant_v1.rb', line 2453 def delete_user_data(customer_id:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("customer_id must be provided") if customer_id.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_user_data") headers.merge!(sdk_headers) params = { "version" => @version, "customer_id" => customer_id } method_url = "/v1/user_data" request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#delete_value(workspace_id: , entity: , value: ) ⇒ nil
Delete entity value. Delete a value from an entity.
1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1729 def delete_value(workspace_id:, entity:, value:) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("value must be provided") if value.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_value") headers.merge!(sdk_headers) params = { "version" => @version } method_url = "/v1/workspaces/%s/entities/%s/values/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)] request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#delete_workspace(workspace_id: ) ⇒ nil
Delete workspace. Delete a workspace from the service instance.
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/ibm_watson/assistant_v1.rb', line 429 def delete_workspace(workspace_id:) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "delete_workspace") headers.merge!(sdk_headers) params = { "version" => @version } method_url = "/v1/workspaces/%s" % [ERB::Util.url_encode(workspace_id)] request( method: "DELETE", url: method_url, headers: headers, params: params, accept_json: true ) nil end |
#get_counterexample(workspace_id: , text: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get counterexample. Get information about a counterexample. Counterexamples are examples that have
been marked as irrelevant input.
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1056 def get_counterexample(workspace_id:, text:, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("text must be provided") if text.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_counterexample") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/counterexamples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(text)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#get_dialog_node(workspace_id: , dialog_node: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get dialog node. Get information about a dialog node.
2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 |
# File 'lib/ibm_watson/assistant_v1.rb', line 2171 def get_dialog_node(workspace_id:, dialog_node:, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_dialog_node") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/dialog_nodes/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(dialog_node)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#get_entity(workspace_id: , entity: , export: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get entity. Get information about an entity, optionally including all entity content.
1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1293 def get_entity(workspace_id:, entity:, export: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_entity") headers.merge!(sdk_headers) params = { "version" => @version, "export" => export, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/entities/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#get_example(workspace_id: , intent: , text: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get user input example. Get information about a user input example.
822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 |
# File 'lib/ibm_watson/assistant_v1.rb', line 822 def get_example(workspace_id:, intent:, text:, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("intent must be provided") if intent.nil? raise ArgumentError.new("text must be provided") if text.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_example") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/intents/%s/examples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent), ERB::Util.url_encode(text)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#get_intent(workspace_id: , intent: , export: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get intent. Get information about an intent, optionally including all intent content.
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/ibm_watson/assistant_v1.rb', line 574 def get_intent(workspace_id:, intent:, export: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("intent must be provided") if intent.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_intent") headers.merge!(sdk_headers) params = { "version" => @version, "export" => export, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/intents/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#get_synonym(workspace_id: , entity: , value: , synonym: , include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get entity value synonym. Get information about a synonym of an entity value.
1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1880 def get_synonym(workspace_id:, entity:, value:, synonym:, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("value must be provided") if value.nil? raise ArgumentError.new("synonym must be provided") if synonym.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_synonym") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value), ERB::Util.url_encode(synonym)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#get_value(workspace_id: , entity: , value: , export: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get entity value. Get information about an entity value.
1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1609 def get_value(workspace_id:, entity:, value:, export: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("value must be provided") if value.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_value") headers.merge!(sdk_headers) params = { "version" => @version, "export" => export, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/entities/%s/values/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#get_workspace(workspace_id: , export: nil, include_audit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get information about a workspace. Get information about a workspace, optionally including all workspace content.
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/ibm_watson/assistant_v1.rb', line 316 def get_workspace(workspace_id:, export: nil, include_audit: nil, sort: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "get_workspace") headers.merge!(sdk_headers) params = { "version" => @version, "export" => export, "include_audit" => include_audit, "sort" => sort } method_url = "/v1/workspaces/%s" % [ERB::Util.url_encode(workspace_id)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_all_logs(filter: , sort: nil, page_limit: nil, cursor: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List log events in all workspaces. List the events from the logs of all workspaces in the service instance.
2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 |
# File 'lib/ibm_watson/assistant_v1.rb', line 2402 def list_all_logs(filter:, sort: nil, page_limit: nil, cursor: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("filter must be provided") if filter.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_all_logs") headers.merge!(sdk_headers) params = { "version" => @version, "filter" => filter, "sort" => sort, "page_limit" => page_limit, "cursor" => cursor } method_url = "/v1/logs" response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_counterexamples(workspace_id: , page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List counterexamples. List the counterexamples for a workspace. Counterexamples are examples that have
been marked as irrelevant input.
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 |
# File 'lib/ibm_watson/assistant_v1.rb', line 965 def list_counterexamples(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_counterexamples") headers.merge!(sdk_headers) params = { "version" => @version, "page_limit" => page_limit, "include_count" => include_count, "sort" => sort, "cursor" => cursor, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/counterexamples" % [ERB::Util.url_encode(workspace_id)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_dialog_nodes(workspace_id: , page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List dialog nodes. List the dialog nodes for a workspace.
2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 |
# File 'lib/ibm_watson/assistant_v1.rb', line 2028 def list_dialog_nodes(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_dialog_nodes") headers.merge!(sdk_headers) params = { "version" => @version, "page_limit" => page_limit, "include_count" => include_count, "sort" => sort, "cursor" => cursor, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/dialog_nodes" % [ERB::Util.url_encode(workspace_id)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_entities(workspace_id: , export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List entities. List the entities for a workspace.
1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1190 def list_entities(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_entities") headers.merge!(sdk_headers) params = { "version" => @version, "export" => export, "page_limit" => page_limit, "include_count" => include_count, "sort" => sort, "cursor" => cursor, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/entities" % [ERB::Util.url_encode(workspace_id)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_examples(workspace_id: , intent: , page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List user input examples. List the user input examples for an intent, optionally including contextual entity
mentions.
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 |
# File 'lib/ibm_watson/assistant_v1.rb', line 725 def list_examples(workspace_id:, intent:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("intent must be provided") if intent.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_examples") headers.merge!(sdk_headers) params = { "version" => @version, "page_limit" => page_limit, "include_count" => include_count, "sort" => sort, "cursor" => cursor, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/intents/%s/examples" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_intents(workspace_id: , export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List intents. List the intents for a workspace.
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
# File 'lib/ibm_watson/assistant_v1.rb', line 476 def list_intents(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_intents") headers.merge!(sdk_headers) params = { "version" => @version, "export" => export, "page_limit" => page_limit, "include_count" => include_count, "sort" => sort, "cursor" => cursor, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/intents" % [ERB::Util.url_encode(workspace_id)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_logs(workspace_id: , sort: nil, filter: nil, page_limit: nil, cursor: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List log events in a workspace. List the events from the log of a specific workspace.
This method requires Manager access.
2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 |
# File 'lib/ibm_watson/assistant_v1.rb', line 2357 def list_logs(workspace_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_logs") headers.merge!(sdk_headers) params = { "version" => @version, "sort" => sort, "filter" => filter, "page_limit" => page_limit, "cursor" => cursor } method_url = "/v1/workspaces/%s/logs" % [ERB::Util.url_encode(workspace_id)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_mentions(workspace_id: , entity: , export: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List entity mentions. List mentions for a contextual entity. An entity mention is an occurrence of a
contextual entity in the context of an intent user input example.
1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1443 def list_mentions(workspace_id:, entity:, export: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_mentions") headers.merge!(sdk_headers) params = { "version" => @version, "export" => export, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/entities/%s/mentions" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_synonyms(workspace_id: , entity: , value: , page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List entity value synonyms. List the synonyms for an entity value.
1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1779 def list_synonyms(workspace_id:, entity:, value:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("value must be provided") if value.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_synonyms") headers.merge!(sdk_headers) params = { "version" => @version, "page_limit" => page_limit, "include_count" => include_count, "sort" => sort, "cursor" => cursor, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_values(workspace_id: , entity: , export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List entity values. List the values for an entity.
1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1495 def list_values(workspace_id:, entity:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_values") headers.merge!(sdk_headers) params = { "version" => @version, "export" => export, "page_limit" => page_limit, "include_count" => include_count, "sort" => sort, "cursor" => cursor, "include_audit" => include_audit } method_url = "/v1/workspaces/%s/entities/%s/values" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)] response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
List workspaces. List the workspaces associated with a Watson Assistant service instance.
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/ibm_watson/assistant_v1.rb', line 209 def list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil) raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_workspaces") headers.merge!(sdk_headers) params = { "version" => @version, "page_limit" => page_limit, "include_count" => include_count, "sort" => sort, "cursor" => cursor, "include_audit" => include_audit } method_url = "/v1/workspaces" response = request( method: "GET", url: method_url, headers: headers, params: params, accept_json: true ) response end |
#message(workspace_id: , input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, user_id: nil, nodes_visited_details: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Get response to user input. Send user input to a workspace and receive a response.
**Important:** This method has been superseded by the new v2 runtime API. The v2
API offers significant advantages, including ease of deployment, automatic state
management, versioning, and search capabilities. For more information, see the
[documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overview).
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/ibm_watson/assistant_v1.rb', line 109 def (workspace_id:, input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, user_id: nil, nodes_visited_details: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "message") headers.merge!(sdk_headers) params = { "version" => @version, "nodes_visited_details" => nodes_visited_details } data = { "input" => input, "intents" => intents, "entities" => entities, "alternate_intents" => alternate_intents, "context" => context, "output" => output, "user_id" => user_id } method_url = "/v1/workspaces/%s/message" % [ERB::Util.url_encode(workspace_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#update_counterexample(workspace_id: , text: , new_text: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Update counterexample. Update the text of a counterexample. Counterexamples are examples that have been
marked as irrelevant input.
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1099 def update_counterexample(workspace_id:, text:, new_text: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("text must be provided") if text.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_counterexample") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "text" => new_text } method_url = "/v1/workspaces/%s/counterexamples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(text)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Update dialog node. Update an existing dialog node with new or modified data.
If you want to update multiple dialog nodes with a single API call, consider using
the **[Update workspace](#update-workspace)** method instead.
2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 |
# File 'lib/ibm_watson/assistant_v1.rb', line 2252 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) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_dialog_node") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "dialog_node" => new_dialog_node, "description" => new_description, "conditions" => new_conditions, "parent" => new_parent, "previous_sibling" => new_previous_sibling, "output" => new_output, "context" => new_context, "metadata" => , "next_step" => new_next_step, "title" => new_title, "type" => new_type, "event_name" => new_event_name, "variable" => new_variable, "actions" => new_actions, "digress_in" => new_digress_in, "digress_out" => new_digress_out, "digress_out_slots" => new_digress_out_slots, "user_label" => new_user_label, "disambiguation_opt_out" => new_disambiguation_opt_out } method_url = "/v1/workspaces/%s/dialog_nodes/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(dialog_node)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Update entity. Update an existing entity with new or modified data. You must provide component
objects defining the content of the updated entity.
If you want to update multiple entities with a single API call, consider using the
**[Update workspace](#update-workspace)** method instead.
1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1353 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) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_entity") headers.merge!(sdk_headers) params = { "version" => @version, "append" => append, "include_audit" => include_audit } data = { "entity" => new_entity, "description" => new_description, "metadata" => , "fuzzy_match" => new_fuzzy_match, "values" => new_values } method_url = "/v1/workspaces/%s/entities/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#update_example(workspace_id: , intent: , text: , new_text: nil, new_mentions: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Update user input example. Update the text of a user input example.
If you want to update multiple examples with a single API call, consider using the
**[Update intent](#update-intent)** method instead.
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 |
# File 'lib/ibm_watson/assistant_v1.rb', line 871 def update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("intent must be provided") if intent.nil? raise ArgumentError.new("text must be provided") if text.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_example") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "text" => new_text, "mentions" => new_mentions } method_url = "/v1/workspaces/%s/intents/%s/examples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent), ERB::Util.url_encode(text)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#update_intent(workspace_id: , intent: , new_intent: nil, new_description: nil, new_examples: nil, append: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Update intent. Update an existing intent with new or modified data. You must provide component
objects defining the content of the updated intent.
If you want to update multiple intents with a single API call, consider using the
**[Update workspace](#update-workspace)** method instead.
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
# File 'lib/ibm_watson/assistant_v1.rb', line 633 def update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil, append: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("intent must be provided") if intent.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_intent") headers.merge!(sdk_headers) params = { "version" => @version, "append" => append, "include_audit" => include_audit } data = { "intent" => new_intent, "description" => new_description, "examples" => new_examples } method_url = "/v1/workspaces/%s/intents/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#update_synonym(workspace_id: , entity: , value: , synonym: , new_synonym: nil, include_audit: nil) ⇒ IBMCloudSdkCore::DetailedResponse
Update entity value synonym. Update an existing entity value synonym with new text.
If you want to update multiple synonyms with a single API call, consider using the
**[Update entity](#update-entity)** or **[Update entity
value](#update-entity-value)** method instead.
1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1931 def update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil, include_audit: nil) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("value must be provided") if value.nil? raise ArgumentError.new("synonym must be provided") if synonym.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_synonym") headers.merge!(sdk_headers) params = { "version" => @version, "include_audit" => include_audit } data = { "synonym" => new_synonym } method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value), ERB::Util.url_encode(synonym)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Update entity value. Update an existing entity value with new or modified data. You must provide
component objects defining the content of the updated entity value.
If you want to update multiple entity values with a single API call, consider
using the **[Update entity](#update-entity)** method instead.
1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 |
# File 'lib/ibm_watson/assistant_v1.rb', line 1680 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) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("entity must be provided") if entity.nil? raise ArgumentError.new("value must be provided") if value.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_value") headers.merge!(sdk_headers) params = { "version" => @version, "append" => append, "include_audit" => include_audit } data = { "value" => new_value, "metadata" => , "type" => new_type, "synonyms" => new_synonyms, "patterns" => new_patterns } method_url = "/v1/workspaces/%s/entities/%s/values/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |
#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) ⇒ IBMCloudSdkCore::DetailedResponse
Update workspace. Update an existing workspace with new or modified data. You must provide component
objects defining the content of the updated workspace.
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/ibm_watson/assistant_v1.rb', line 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) raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil? raise ArgumentError.new("version must be provided") if version.nil? headers = { } sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "update_workspace") headers.merge!(sdk_headers) params = { "version" => @version, "append" => append, "include_audit" => include_audit } data = { "name" => name, "description" => description, "language" => language, "dialog_nodes" => dialog_nodes, "counterexamples" => counterexamples, "metadata" => , "learning_opt_out" => learning_opt_out, "system_settings" => system_settings, "webhooks" => webhooks, "intents" => intents, "entities" => entities } method_url = "/v1/workspaces/%s" % [ERB::Util.url_encode(workspace_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, json: data, accept_json: true ) response end |