From cdf28b2ab4ae6ff326a8caa051323595aa44b05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20R=C3=B6hrig?= <54274238+jridfe@users.noreply.github.com> Date: Tue, 29 Jun 2021 17:30:16 +0200 Subject: [PATCH] Release 1.0.0 (#8) --- MIGRATION-V0.3.0.md | 26 - MIGRATION-V1.0.0.md | 85 + README.md | 95 +- .../zibmc/classes/zcl_ibmc_assistant_v1.html | 392 ++- .../zibmc/classes/zcl_ibmc_assistant_v2.html | 181 +- .../classes/zcl_ibmc_compare_comply_v1.html | 20 +- .../zibmc/classes/zcl_ibmc_discovery_v1.html | 22 +- .../classes/zcl_ibmc_lang_translator_v3.html | 198 +- .../classes/zcl_ibmc_nat_lang_class_v1.html | 2 +- .../zcl_ibmc_nat_lang_undrstnd_v1.html | 55 +- .../zcl_ibmc_personal_insights_v3.html | 27 +- .../zibmc/classes/zcl_ibmc_service.html | 2 +- .../zibmc/classes/zcl_ibmc_service_arch.html | 2 +- .../zibmc/classes/zcl_ibmc_service_ext.html | 2 +- .../classes/zcl_ibmc_speech_to_text_v1.html | 293 ++- .../classes/zcl_ibmc_text_to_speech_v1.html | 436 ++-- .../classes/zcl_ibmc_tone_analyzer_v3.html | 2 +- .../abapdoc/zibmc/classes/zcl_ibmc_util.html | 2 +- .../zcl_ibmc_visual_recognition_v3.html | 16 +- .../zcl_ibmc_visual_recognition_v4.html | 39 +- .../classes/zcx_ibmc_service_exception.html | 2 +- .../interfaces/zif_ibmc_service_arch.html | 2 +- docs/ABAPDoc/htmldesign/stylesheet.css | 2 +- src/zcl_ibmc_assistant_v1.clas.abap | 2129 ++++++++++------- src/zcl_ibmc_assistant_v1.clas.xml | 6 + src/zcl_ibmc_assistant_v2.clas.abap | 1770 ++++++++++---- src/zcl_ibmc_assistant_v2.clas.xml | 26 +- src/zcl_ibmc_compare_comply_v1.clas.abap | 142 +- src/zcl_ibmc_discovery_v1.clas.abap | 379 ++- src/zcl_ibmc_lang_translator_v3.clas.abap | 461 +++- src/zcl_ibmc_lang_translator_v3.clas.xml | 6 + src/zcl_ibmc_nat_lang_class_v1.clas.abap | 61 +- src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap | 420 ++-- src/zcl_ibmc_personal_insights_v3.clas.abap | 95 +- src/zcl_ibmc_service.clas.abap | 81 +- src/zcl_ibmc_service.clas.xml | 6 + src/zcl_ibmc_speech_to_text_v1.clas.abap | 469 ++-- src/zcl_ibmc_text_to_speech_v1.clas.abap | 681 +++--- src/zcl_ibmc_text_to_speech_v1.clas.xml | 32 +- src/zcl_ibmc_tone_analyzer_v3.clas.abap | 70 +- src/zcl_ibmc_visual_recognition_v3.clas.abap | 58 +- src/zcl_ibmc_visual_recognition_v4.clas.abap | 261 +- src/zcl_ibmc_visual_recognition_v4.clas.xml | 6 + 43 files changed, 5648 insertions(+), 3414 deletions(-) delete mode 100644 MIGRATION-V0.3.0.md create mode 100644 MIGRATION-V1.0.0.md diff --git a/MIGRATION-V0.3.0.md b/MIGRATION-V0.3.0.md deleted file mode 100644 index bcc81ed..0000000 --- a/MIGRATION-V0.3.0.md +++ /dev/null @@ -1,26 +0,0 @@ -# Upgrading to ABAP SDK version 0.3.0 - -## Breaking changes - -### Breaking changes by service -#### Factory Method -- Parameter `I_PROXY_SERVICE` of method `ZCL_IBMC_SERVICE_EXT=>GET_INSTANCE` is renamed to `I_PROXY_PORT`. - -#### Visual Recognition V4 -- Parameter `I_UPDATEOBJECTMETADATA` of method `UPDATE_OBJECT_METADATA` is required (previously this was optional). - -## -## Special instructions when directly upgrading from versions earlier than 0.2.0 - -### Table conversion necessary after pull - -The ABAP SDK for IBM Watson is now enabled to separate configuration data by storing data into client-specific tables. To achieve this tables `ZIBMC_TOKEN` and `ZIBMC_CONFIG` were made client-specific by adding a column holding the SAP client number. - -This change may result in an error when trying to activate the tables. To fix the error please execute the following steps: -1. Call transaction SE14 (Data Dictionary Database Utility). -2. Enter `ZIBMC_TOKEN` for "Object name" and click "Edit". -3. Click "Activate and adjust database" (ensure that radio button "Persist data" is selected). -4. Confirm "adjust" request. -5. Repeat the steps above for table `ZIBMC_CONFIG`. - -After this fix, the table content is available only in the SAP client where these steps have been performed. If you want to use configuration data in table `ZIBMC_CONFIG` in another SAP client, you have to copy the records to that SAP client. diff --git a/MIGRATION-V1.0.0.md b/MIGRATION-V1.0.0.md new file mode 100644 index 0000000..54dec9d --- /dev/null +++ b/MIGRATION-V1.0.0.md @@ -0,0 +1,85 @@ +# Upgrading to ABAP SDK version 1.0.0 + +Note: If migrating from a version less than v0.3.0, also see the +[v0.3.0 migration guide +wiki](https://github.com/watson-developer-cloud/abap-sdk-nwas/blob/0.3.0/MIGRATION-V0.3.0.md). + +
+ Table of Contents + +- [Breaking changes](#breaking-changes) + - [Breaking changes by service](#breaking-changes-by-service) + - [Watson Assistant V1](#watson-assistant-v1) + - [Watson Assistant V2](#watson-assistant-v2) + - [Compare and Comply V1](#compare-and-comply-v1) + - [Discovery V2](#discovery-v2) + - [Text to Speech V1](#text-to-speech-v1) + - [Discontinued services](#discontinued-services) + - [Compare and Comply V1](#compare-and-comply-v1-1) + - [Personality Insights V3](#personality-insights-v3) + - [Visual Recognition V3 and V4](#visual-recognition-v3-and-v4) + +
+ +## Breaking changes + +### Breaking changes by service + +#### Watson Assistant V1 + +Data types `t_Dialog_Node_Output_Generic` and `t_Runtime_Response_Generic` were changed from structures with several components (`RESPONSE_TYPE`, `TEXT`, `VALUES`, ...) to data type `JSONOBJECT`. Depending on the expected data type, data type `JSONOBJECT` must be mapped to the corresponding data structure, for example `t_Dia_Nd_Otpt_Gnrc_Dia_Nd_Otp1` (dialog node output generic) or `t_Rt_Resp_Gnrc_Rt_Resp_Typ_Txt` (runtime response generic). + +When you fill in one of these structures and want to assign this structure to a variable of type `JSONOBJECT`, you can use the reference operator `REF` or the deprecated form `GET REFERENCE OF` to perform the mapping. When you receive data in a variable of type `JSONOBJECT` and need to map it to one of these structures, you can use method `move_data_reference_to_abap`, which is provided in the service class `zcl_ibmc_service`. + +#### Watson Assistant V2 + +Data type `t_Runtime_Response_Generic` was changed from a structure with several components (`RESPONSE_TYPE`, `TEXT`, ...) to data type `JSONOBJECT`. Depending on the expected data type, data type `JSONOBJECT` must be mapped to the corresponding data structure, for example `t_Rt_Resp_Gnrc_Rt_Resp_Typ_Txt`. + +When you fill in one of these structures and want to assign this structure to a variable of type `JSONOBJECT`, you can use the reference operator `REF` or the deprecated form `GET REFERENCE OF` to perform the mapping. When you receive data in a variable of type `JSONOBJECT` and need to map it to one of these structures, you can use method `move_data_reference_to_abap`, which is provided in the service class `zcl_ibmc_service`. + +#### Compare and Comply V1 + +Parameters `I_BEFORE` and `I_AFTER` have been removed from method `LIST_FEEDBACK`. + +#### Discovery V2 + +The Discovery V2 interface is available for Premium Discovery instances only and not supported by the ABAP SDK. + +#### Text to Speech V1 + +The following types were renamed: + +| Old name | New name | +|:-----------------------|:------------------------| +| `t_Voice_Model` | `t_Custom_Model` | +| `t_Voice_Models` | `t_Custom_Models` | +| `t_Create_Voice_Model` | `t_Create_Custom_Model` | +| `t_Update_Voice_Model` | `t_Update_Custom_Model` | + +The following methods were renamed: + +| Old name | New name | +|:---------------------|:----------------------| +| `create_Voice_Model` | `create_Custom_Model` | +| `get_Voice_Model` | `get_Custom_Model` | +| `update_Voice_Model` | `update_Custom_Model` | +| `delete_Voice_Model` | `delete_Custom_Model` | +| `list_Voice_Models` | `list_Custom_Models` | + + +### Discontinued services + +The following services are discontinued. New service instances cannot be created anymore. The ABAP SDK still includes interfaces to these services, which cannot be used anymore when IBM support of the corresponding service ends. + +#### Compare and Comply V1 + +Existing instances are supported until 30 November 2021 and will be deleted afterwards. + +#### Personality Insights V3 + +Existing instances are supported until 1 December 2021 and will be deleted afterwards. + +#### Visual Recognition V3 and V4 + +Existing instances are supported until 1 December 2021 and will be deleted afterwards. + diff --git a/README.md b/README.md index 8fba6bf..6d3de46 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ Additionally, as the ABAP SDK is a community release it is not updated with the ## ANNOUNCEMENTS -### Minor version 0.3.0 released -Version v0.3.0 of the SDK has been released and includes one breaking change - see what's changed in the [migration guide](MIGRATION-V0.3.0.md). +### Major version 1.0.0 released +Version v1.0.0 of the SDK has been released and includes breaking changes - see what's changed in the [migration guide](MIGRATION-V1.0.0.md). ## Before you begin * You need an [IBM Cloud][ibm_cloud_onboarding] account. @@ -184,21 +184,23 @@ Afterwards, service methods can be called as long as the provided token is valid The client library is delivered as package *ZIBMC*. Once the Git Repository has been cloned to the SAP system, a Watson service instance is wrapped by an ABAP class instance.
The following Watson services are currently supported: -| Service | ABAP Class Name | -|:------------------------------ |:------------------------------ | -| Compare and Comply | ZCL_IBMC_COMPARE_COMPLY_V1 | -| Discovery | ZCL_IBMC_DISCOVERY_V1 | -| Language Translator | ZCL_IBMC_LANG_TRANSLATOR_V3 | -| Natural Language Classifier | ZCL_IBMC_NAT_LANG_CLASS_V1 | -| Natural Language Understanding | ZCL_IBMC_NAT_LANG_UNDRSTND_V1 | -| Personality Insights | ZCL_IBMC_PERSONAL_INSIGHTS_V3 | -| Speech to Text | ZCL_IBMC_SPEECH_TO_TEXT_V1 | -| Text to Speech | ZCL_IBMC_TEXT_TO_SPEECH_V1 | -| Tone Analyzer | ZCL_IBMC_TONE_ANALYZER_V3 | -| Visual Recognition | ZCL_IBMC_VISUAL_RECOGNITION_V3 | -| | ZCL_IBMC_VISUAL_RECOGNITION_V4 | -| Watson Assistant | ZCL_IBMC_ASSISTANT_V1 | -| | ZCL_IBMC_ASSISTANT_V2 | +| Service | ABAP Class Name | +|:------------------------------ |:----------------------------------- | +| Compare and Comply | ZCL_IBMC_COMPARE_COMPLY_V1 (\*) | +| Discovery | ZCL_IBMC_DISCOVERY_V1 | +| Language Translator | ZCL_IBMC_LANG_TRANSLATOR_V3 | +| Natural Language Classifier | ZCL_IBMC_NAT_LANG_CLASS_V1 | +| Natural Language Understanding | ZCL_IBMC_NAT_LANG_UNDRSTND_V1 | +| Personality Insights | ZCL_IBMC_PERSONAL_INSIGHTS_V3 (\*) | +| Speech to Text | ZCL_IBMC_SPEECH_TO_TEXT_V1 | +| Text to Speech | ZCL_IBMC_TEXT_TO_SPEECH_V1 | +| Tone Analyzer | ZCL_IBMC_TONE_ANALYZER_V3 | +| Visual Recognition | ZCL_IBMC_VISUAL_RECOGNITION_V3 (\*) | +| | ZCL_IBMC_VISUAL_RECOGNITION_V4 (\*) | +| Watson Assistant | ZCL_IBMC_ASSISTANT_V1 | +| | ZCL_IBMC_ASSISTANT_V2 | + +(\*) Deprecated service; will be discontinued in the future. Using the client library requires two steps: @@ -318,63 +320,6 @@ Using the client library requires two steps: -
- Personality Insights Example - -```abap -* Analyze profile using example text using Watson Personality Insights - - " declare variables - data: - lv_apikey type string value '...', - lo_personality_insights type ref to zcl_ibmc_personal_insights_v3, - lo_service_exception type ref to zcx_ibmc_service_exception, - ls_content_item type zcl_ibmc_personal_insights_v3=>t_content_item, - ls_response type zcl_ibmc_personal_insights_v3=>t_profile, - ls_content type zcl_ibmc_personal_insights_v3=>t_content, - lv_content_language type string value 'en', - lv_accept_language type string value 'en', - lv_raw_scores type boolean value 'C_BOOLEAN_FALSE', - lv_csv_headers type boolean valiue 'C_BOOLEAN_FALSE', - lv_consumption_preferences type boolean value 'C_BOOLEAN_FALSE', - lv_accept type string value 'text/csv'. - - " get Watson Personality Insights service instance - zcl_ibmc_service_ext=>get_instance( - exporting - i_url = 'https://api.eu-gb.personality-insights.watson.cloud.ibm.com/instances/' - i_apikey = lv_apikey - i_version = '2018-05-01' - importing - eo_instance = lo_personality_insights ). - - " store text to be analyzed into ls_content - " concatenate ... into ls_content_item-content - " append ls_content_item to ls_content-contentitems - - " call Watson Personality Insights service to analyze text in ls_content - try. - lo_personality_insights->profile( - exporting - i_content = ls_content - i_content_language = lv_content_language - i_accept_language = lv_accept_language - i_raw_scores = lv_raw_scores - i_csv_headers = lv_csv_headers - i_consumption_preferences = lv_consumption_preferences - importing - e_response = ls_response ). - - catch zcx_ibmc_service_exception into lo_service_exception. - message lo_service_exception type 'E'. - endtry. - - " retreive profile analysis results from ls_response - -``` - -
-
Language Translator Example @@ -434,7 +379,7 @@ GitHub Pages contain the [ABAP Client Library for Watson API Reference](https:// The ABAP SDK is a Community SDK for IBM Watson, created by the IBM Watson development community and SAP's ABAP development community - written by ABAPers from IBM Cloud, IBM Services and IBM Systems. Therefore as a community release it is not updated with the same schedule as IBM-supported SDKs, and does not include support by IBM. For more information on IBM-supported SDKs and the update policy, please see https://cloud.ibm.com/docs/watson?topic=watson-using-sdks -If you have questions about the IBM Watson services or are having difficulties using the APIs, please ask a question at [dW Answers](https://developer.ibm.com/answers/questions/ask/?topics=watson) or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson-cognitive). +If you have questions about the IBM Watson services or are having difficulties using the APIs, please ask a question at [IBM Support Forums](https://www.ibm.com/mysupport/s/forumshome) or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson-cognitive). ## License diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v1.html index 834e8f8..622d3f4 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v1.html @@ -4,26 +4,52 @@ flows between your apps and your users.

The Assistant v1 API provides authoring methods your application can use to - create or update a workspace.

Types

Visibility and LevelNameDocumentation
publict_audit_properties (structured type) No documentation available.
publict_base_counterexample (structured type) No documentation available.
publict_base_dialog_node (structured type) No documentation available.
publict_base_entity (structured type) No documentation available.
publict_base_example (structured type) No documentation available.
publict_base_intent (structured type) No documentation available.
publict_base_message (structured type) No documentation available.
publict_base_output (structured type)

+ create or update a workspace.

Types

Visibility and LevelNameDocumentation
publict_agent_availability_message (structured type) No documentation available.
publict_audit_properties (structured type) No documentation available.
publict_base_counterexample (structured type) No documentation available.
publict_base_dialog_node (structured type) No documentation available.
publict_base_entity (structured type) No documentation available.
publict_base_example (structured type) No documentation available.
publict_base_intent (structured type) No documentation available.
publict_base_message (structured type) No documentation available.
publict_base_output (structured type)

An output object that includes the response to the user, the

- dialog nodes that were triggered, and messages from the log.
publict_base_synonym (structured type) No documentation available.
publict_base_value (structured type) No documentation available.
publict_base_workspace (structured type) No documentation available.
publict_capture_group (structured type)

+ dialog nodes that were triggered, and messages from the log.

publict_base_synonym (structured type) No documentation available.
publict_base_value (structured type) No documentation available.
publict_base_workspace (structured type) No documentation available.
publict_bulk_classify_input (structured type) No documentation available.
publict_bulk_classify_output (structured type) No documentation available.
publict_bulk_classify_response (structured type) No documentation available.
publict_bulk_classify_utterance (structured type)

+ The user input utterance to classify.

publict_capture_group (structured type)

A recognized capture group for a pattern-based entity.

publict_context (structured type)

State information for the conversation. To maintain state,

include the context from the previous response.
publict_counterexample (structured type) No documentation available.
publict_counterexample_collection (structured type) No documentation available.
publict_create_entity (structured type) No documentation available.
publict_create_intent (structured type) No documentation available.
publict_create_value (structured type) No documentation available.
publict_create_workspace (structured type) No documentation available.
publict_dialog_node (structured type) No documentation available.
publict_dialog_node_action (structured type) No documentation available.
publict_dialog_node_collection (structured type)

- An array of dialog nodes.

publict_dialog_node_next_step (structured type)

+ An array of dialog nodes.

publict_dialog_node_context (structured type)

+ The context for the dialog node.

publict_dialog_node_next_step (structured type)

The next step to execute following this dialog node.

publict_dialog_node_output (structured type)

The output of the dialog node. For more information about

how to specify dialog node output, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-ove - rview#dialog-overview-responses).
publict_dialog_node_output_generic (structured type) No documentation available.
publict_dialog_node_output_modifiers (structured type)

- Options that modify how specified output is handled.

publict_dialog_node_visited_details (structured type) No documentation available.
publict_dialog_suggestion (structured type) No documentation available.
publict_dialog_suggestion_output (structured type)

- The dialog output that will be returned from the Watson

- Assistant service if the user selects the corresponding option.
publict_dialog_suggestion_value (structured type)

+ rview#dialog-overview-responses).

publict_dialog_node_output_generic type JSONOBJECT No documentation available.
publict_dialog_node_output_modifiers (structured type)

+ Options that modify how specified output is handled.

publict_dialog_node_visited_details (structured type) No documentation available.
publict_dialog_suggestion (structured type) No documentation available.
publict_dialog_suggestion_value (structured type)

An object defining the message input, intents, and entities

to be sent to the Watson Assistant service if the user selects the - corresponding disambiguation option.
publict_dia_nd_otpt_resp_type_pause (structured type) No documentation available.
publict_dia_nd_otpt_resp_typ_cnnct_1 (structured type) No documentation available.
publict_dia_nd_otpt_resp_typ_srch_s1 (structured type) No documentation available.
publict_dia_nd_otpt_text_values_elem (structured type) No documentation available.
publict_dia_nd_output_opt_elem_value (structured type)

+ corresponding disambiguation option.

publict_dia_nd_otpt_cnnct_t_agnt_tr1 (structured type)

+ Routing or other contextual information to be used by target

+ service desk systems.
publict_dia_nd_otpt_gnrc_dia_nd_otp1 (structured type)

+ An object that describes a response with response type

+ `text`.
publict_dia_nd_otpt_gnrc_dia_nd_otp2 (structured type)

+ An object that describes a response with response type

+ `pause`.
publict_dia_nd_otpt_gnrc_dia_nd_otp3 (structured type)

+ An object that describes a response with response type

+ `image`.
publict_dia_nd_otpt_gnrc_dia_nd_otp4 (structured type)

+ An object that describes a response with response type

+ `option`.
publict_dia_nd_otpt_gnrc_dia_nd_otp5 (structured type)

+ An object that describes a response with response type

+ `connect_to_agent`.
publict_dia_nd_otpt_gnrc_dia_nd_otp6 (structured type)

+ An object that describes a response with response type

+ `search_skill`.
publict_dia_nd_otpt_resp_type_pause (structured type)

+ An object that describes a response with response type

+ `pause`.
publict_dia_nd_otpt_resp_typ_cnnct_1 (structured type)

+ An object that describes a response with response type

+ `connect_to_agent`.
publict_dia_nd_otpt_resp_typ_srch_s1 (structured type)

+ An object that describes a response with response type

+ `search_skill`.
publict_dia_nd_otpt_text_values_elem (structured type) No documentation available.
publict_dia_nd_output_opt_elem_value (structured type)

An object defining the message input to be sent to the

- Watson Assistant service if the user selects the corresponding option.
publict_dia_nd_output_resp_type_img (structured type) No documentation available.
publict_dia_nd_output_resp_type_opt (structured type) No documentation available.
publict_dia_nd_output_resp_type_text (structured type) No documentation available.
publict_dia_node_output_opt_element (structured type) No documentation available.
publict_dia_suggestion_resp_generic (structured type) No documentation available.
publict_empty_response type JSONOBJECT No documentation available.
publict_entity (structured type) No documentation available.
publict_entity_collection (structured type)

+ Watson Assistant service if the user selects the corresponding option.

publict_dia_nd_output_resp_type_img (structured type)

+ An object that describes a response with response type

+ `image`.
publict_dia_nd_output_resp_type_opt (structured type)

+ An object that describes a response with response type

+ `option`.
publict_dia_nd_output_resp_type_text (structured type)

+ An object that describes a response with response type

+ `text`.
publict_dia_node_output_opt_element (structured type) No documentation available.
publict_empty_response type JSONOBJECT No documentation available.
publict_entity (structured type) No documentation available.
publict_entity_collection (structured type)

An array of objects describing the entities for the

workspace.
publict_entity_mention (structured type)

An object describing a contextual entity mention.

publict_entity_mention_collection (structured type) No documentation available.
publict_error_detail (structured type) No documentation available.
publict_error_response (structured type) No documentation available.
publict_example (structured type) No documentation available.
publict_example_collection (structured type) No documentation available.
publict_intent (structured type) No documentation available.
publict_intent_collection (structured type) No documentation available.
publict_log (structured type) No documentation available.
publict_log_collection (structured type) No documentation available.
publict_log_message (structured type)

@@ -38,38 +64,72 @@ text, detected intents and entities, and context.

publict_output_data (structured type)

An output object that includes the response to the user, the

dialog nodes that were triggered, and messages from the log.
publict_pagination (structured type)

- The pagination data for the returned objects.

publict_rt_entity_interpretation (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_date (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_num (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_time (structured type) No documentation available.
publict_rt_response_type_suggestion (structured type) No documentation available.
publict_rt_resp_typ_connect_to_agent (structured type) No documentation available.
publict_runtime_entity (structured type)

+ The pagination data for the returned objects.

publict_rt_entity_interpretation (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_date (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_num (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_time (structured type) No documentation available.
publict_rt_response_type_suggestion (structured type)

+ An object that describes a response with response type

+ `suggestion`.
publict_rt_resp_gnrc_rt_resp_typ_cn1 (structured type)

+ An object that describes a response with response type

+ `connect_to_agent`.
publict_rt_resp_gnrc_rt_resp_typ_img (structured type)

+ An object that describes a response with response type

+ `image`.
publict_rt_resp_gnrc_rt_resp_typ_opt (structured type)

+ An object that describes a response with response type

+ `option`.
publict_rt_resp_gnrc_rt_resp_typ_ps (structured type)

+ An object that describes a response with response type

+ `pause`.
publict_rt_resp_gnrc_rt_resp_typ_sg1 (structured type)

+ An object that describes a response with response type

+ `suggestion`.
publict_rt_resp_gnrc_rt_resp_typ_txt (structured type)

+ An object that describes a response with response type

+ `text`.
publict_rt_resp_typ_connect_to_agent (structured type)

+ An object that describes a response with response type

+ `connect_to_agent`.
publict_runtime_entity (structured type)

A term from the request that was identified as an entity.

publict_runtime_entity_alternative (structured type)

An alternative value for the recognized entity.

publict_runtime_entity_role (structured type)

An object describing the role played by a system entity that

is specifies the beginning or end of a range recognized in the user input. This property is included only if the new system entities are enabled for the workspace.
publict_runtime_intent (structured type)

- An intent identified in the user input.

publict_runtime_response_generic (structured type) No documentation available.
publict_runtime_response_type_image (structured type) No documentation available.
publict_runtime_response_type_option (structured type) No documentation available.
publict_runtime_response_type_pause (structured type) No documentation available.
publict_runtime_response_type_text (structured type) No documentation available.
publict_synonym (structured type) No documentation available.
publict_synonym_collection (structured type) No documentation available.
publict_system_response type MAP

+ An intent identified in the user input.

publict_runtime_response_generic type JSONOBJECT No documentation available.
publict_runtime_response_type_image (structured type)

+ An object that describes a response with response type

+ `image`.
publict_runtime_response_type_option (structured type)

+ An object that describes a response with response type

+ `option`.
publict_runtime_response_type_pause (structured type)

+ An object that describes a response with response type

+ `pause`.
publict_runtime_response_type_text (structured type)

+ An object that describes a response with response type

+ `text`.
publict_synonym (structured type) No documentation available.
publict_synonym_collection (structured type) No documentation available.
publict_system_response type MAP

For internal use only.

publict_update_counterexample (structured type) No documentation available.
publict_update_dialog_node (structured type) No documentation available.
publict_update_entity (structured type) No documentation available.
publict_update_example (structured type) No documentation available.
publict_update_intent (structured type) No documentation available.
publict_update_synonym (structured type) No documentation available.
publict_update_value (structured type) No documentation available.
publict_update_workspace (structured type) No documentation available.
publict_value (structured type) No documentation available.
publict_value_collection (structured type) No documentation available.
publict_webhook (structured type)

A webhook that can be used by dialog nodes to make

programmatic calls to an external function.

**Note:** Currently, only a single webhook named `main_webhook` is supported.
publict_webhook_header (structured type)

- A key/value pair defining an HTTP header and a value.

publict_workspace (structured type) No documentation available.
publict_workspace_collection (structured type) No documentation available.
publict_workspace_system_settings (structured type)

+ A key/value pair defining an HTTP header and a value.

publict_workspace (structured type) No documentation available.
publict_workspace_collection (structured type) No documentation available.
publict_workspace_reference (structured type) No documentation available.
publict_workspace_system_settings (structured type)

Global settings for the workspace.

publict_ws_system_settings_off_topic (structured type)

Workspace settings related to detection of irrelevant input.

publict_ws_system_settings_tooling (structured type)

Workspace settings related to the Watson Assistant user

- interface.
publict_ws_systm_sttngs_dsmbgtn (structured type)

- Workspace settings related to the disambiguation

- feature.
-
- **Note:** This feature is available only to Plus and Premium users.
publict_ws_systm_sttngs_systm_entts (structured type)

+ interface.

publict_ws_systm_settings_auto_learn type JSONOBJECT

+ For internal use only.

publict_ws_systm_sttngs_dsmbgtn (structured type)

+ Workspace settings related to the disambiguation feature.

publict_ws_systm_sttngs_systm_entts (structured type)

Workspace settings related to the behavior of system

- entities.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)

Map ABAP identifiers to service identifiers.

public staticc_required_fields (structured type)

List of required fields per type.

Methods

Visibility and LevelNameDocumentation
public instance
create_counterexample
importingi_workspace_idtype STRING
i_bodytype T_COUNTEREXAMPLE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE
raisingzcx_ibmc_service_exception

Create counterexample

+ entities.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)

Map ABAP identifiers to service identifiers.

public staticc_required_fields (structured type)

List of required fields per type.

Methods

Visibility and LevelNameDocumentation
public instance
bulk_classify
importingi_workspace_idtype STRING
i_requesttype T_BULK_CLASSIFY_INPUT optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_BULK_CLASSIFY_RESPONSE
raisingzcx_ibmc_service_exception

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 Premium plans. + +
Parameters
i_workspace_id + Unique identifier of the workspace. +
i_request + An input object that includes the text to classify. +
e_response + Service return value of type T_BULK_CLASSIFY_RESPONSE +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
create_counterexample
importingi_workspace_idtype STRING
i_bodytype T_COUNTEREXAMPLE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE
raisingzcx_ibmc_service_exception

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.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + using the **[Update workspace](#update-workspace)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -85,10 +145,7 @@ 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.
-
- This operation is limited to 500 requests per 30 minutes. For more information, - see **Rate limiting**. + using the **[Update workspace](#update-workspace)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -104,10 +161,7 @@ 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.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + the **[Update workspace](#update-workspace)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -122,11 +176,8 @@
public instance
create_example
importingi_workspace_idtype STRING
i_intenttype STRING
i_bodytype T_EXAMPLE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EXAMPLE
raisingzcx_ibmc_service_exception

Create user input example

Add a new user input example to an intent.

- If you want to add multiple exaples with a single API call, consider using the - **[Update intent](#update-intent)** method instead.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + If you want to add multiple examples with a single API call, consider using the + **[Update intent](#update-intent)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -144,10 +195,7 @@ 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.
-
- This operation is limited to 2000 requests per 30 minutes. For more information, - see **Rate limiting**. + the **[Update workspace](#update-workspace)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -164,10 +212,7 @@
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.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + value](#update-entity-value)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -187,10 +232,7 @@ 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.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + using the **[Update entity](#update-entity)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -206,17 +248,10 @@
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
create_workspace
importingi_bodytype T_CREATE_WORKSPACE optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE
raisingzcx_ibmc_service_exception

Create workspace

Create a workspace based on component objects. You must provide workspace - components defining the content of the new workspace.
-
- This operation is limited to 30 requests per 30 minutes. For more information, - see **Rate limiting**. + components defining the content of the new workspace.
Parameters
i_body - The content of the new workspace.
-
- The maximum size for this data is 50MB. If you need to import a larger - workspace, consider importing the workspace without intents and entities and - then adding them separately. + No documentation available.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response. @@ -225,10 +260,7 @@
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_counterexample
importingi_workspace_idtype STRING
i_texttype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Delete counterexample

Delete a counterexample from a workspace. Counterexamples are examples that have - been marked as irrelevant input.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + been marked as irrelevant input.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -236,10 +268,7 @@ The text of a user input counterexample (for example, `What are you wearing?`).
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_dialog_node
importingi_workspace_idtype STRING
i_dialog_nodetype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Delete dialog node

- Delete a dialog node from a workspace.
-
- This operation is limited to 500 requests per 30 minutes. For more information, - see **Rate limiting**. + Delete a dialog node from a workspace.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -247,10 +276,7 @@ The dialog node ID (for example, `get_order`).
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_entity
importingi_workspace_idtype STRING
i_entitytype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Delete entity

- Delete an entity from a workspace, or disable a system entity.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + Delete an entity from a workspace, or disable a system entity.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -258,10 +284,7 @@ The name of the entity.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_example
importingi_workspace_idtype STRING
i_intenttype STRING
i_texttype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Delete user input example

- Delete a user input example from an intent.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + Delete a user input example from an intent.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -271,10 +294,7 @@ The text of the user input example.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_intent
importingi_workspace_idtype STRING
i_intenttype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Delete intent

- Delete an intent from a workspace.
-
- This operation is limited to 2000 requests per 30 minutes. For more information, - see **Rate limiting**. + Delete an intent from a workspace.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -282,10 +302,7 @@ The intent name.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_synonym
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_synonymtype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Delete entity value synonym

- Delete a synonym from an entity value.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + Delete a synonym from an entity value.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -304,19 +321,13 @@ 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-secu - rity#information-security).
-
- This operation is limited to 4 requests per minute. For more information, see - **Rate limiting**. + rity#information-security).
Parameters
i_customer_id The customer ID for which all data is to be deleted.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_value
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Delete entity value

- Delete a value from an entity.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + Delete a value from an entity.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -326,20 +337,14 @@ The text of the entity value.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_workspace
importingi_workspace_idtype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Delete workspace

- Delete a workspace from the service instance.
-
- This operation is limited to 30 requests per 30 minutes. For more information, - see **Rate limiting**. + Delete a workspace from the service instance.
Parameters
i_workspace_id Unique identifier of the workspace.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instanceget_appname redefinition 
public instance
get_counterexample
importingi_workspace_idtype STRING
i_texttype STRING
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE
raisingzcx_ibmc_service_exception

Get counterexample

Get information about a counterexample. Counterexamples are examples that have - been marked as irrelevant input.
-
- This operation is limited to 6000 requests per 5 minutes. For more information, - see **Rate limiting**. + been marked as irrelevant input.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -352,10 +357,7 @@ Service return value of type T_COUNTEREXAMPLE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_dialog_node
importingi_workspace_idtype STRING
i_dialog_nodetype STRING
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DIALOG_NODE
raisingzcx_ibmc_service_exception

Get dialog node

- Get information about a dialog node.
-
- This operation is limited to 6000 requests per 5 minutes. For more information, - see **Rate limiting**. + Get information about a dialog node.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -368,11 +370,7 @@ Service return value of type T_DIALOG_NODE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_entity
importingi_workspace_idtype STRING
i_entitytype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ENTITY
raisingzcx_ibmc_service_exception

Get entity

- Get information about an entity, optionally including all entity content.
-
- With **export**=`false`, this operation is limited to 6000 requests per 5 - minutes. With **export**=`true`, the limit is 200 requests per 30 minutes. For - more information, see **Rate limiting**. + Get information about an entity, optionally including all entity content.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -390,10 +388,7 @@ Service return value of type T_ENTITY
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_example
importingi_workspace_idtype STRING
i_intenttype STRING
i_texttype STRING
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EXAMPLE
raisingzcx_ibmc_service_exception

Get user input example

- Get information about a user input example.
-
- This operation is limited to 6000 requests per 5 minutes. For more information, - see **Rate limiting**. + Get information about a user input example.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -408,11 +403,7 @@ Service return value of type T_EXAMPLE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_intent
importingi_workspace_idtype STRING
i_intenttype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_INTENT
raisingzcx_ibmc_service_exception

Get intent

- Get information about an intent, optionally including all intent content.
-
- With **export**=`false`, this operation is limited to 6000 requests per 5 - minutes. With **export**=`true`, the limit is 400 requests per 30 minutes. For - more information, see **Rate limiting**. + Get information about an intent, optionally including all intent content.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -430,10 +421,7 @@ Service return value of type T_INTENT
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
get_synonym
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_synonymtype STRING
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SYNONYM
raisingzcx_ibmc_service_exception

Get entity value synonym

- Get information about a synonym of an entity value.
-
- This operation is limited to 6000 requests per 5 minutes. For more information, - see **Rate limiting**. + Get information about a synonym of an entity value.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -450,10 +438,7 @@ Service return value of type T_SYNONYM
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_value
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VALUE
raisingzcx_ibmc_service_exception

Get entity value

- Get information about an entity value.
-
- This operation is limited to 6000 requests per 5 minutes. For more information, - see **Rate limiting**. + Get information about an entity value.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -473,12 +458,7 @@ Service return value of type T_VALUE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_workspace
importingi_workspace_idtype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE
raisingzcx_ibmc_service_exception

Get information about a workspace

- Get information about a workspace, optionally including all workspace - content.
-
- With **export**=`false`, this operation is limited to 6000 requests per 5 - minutes. With **export**=`true`, the limit is 20 requests per 30 minutes. For - more information, see **Rate limiting**. + Get information about a workspace, optionally including all workspace content.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -498,11 +478,7 @@ Service return value of type T_WORKSPACE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_all_logs
importingi_filtertype STRING
i_sorttype STRING optional
i_page_limittype INTEGER optional
i_cursortype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_LOG_COLLECTION
raisingzcx_ibmc_service_exception

List log events in all workspaces

- List the events from the logs of all workspaces in the service instance.
-
- If **cursor** is not specified, this operation is limited to 40 requests per 30 - minutes. If **cursor** is specified, the limit is 120 requests per minute. For - more information, see **Rate limiting**. + List the events from the logs of all workspaces in the service instance.
Parameters
i_filter A cacheable parameter that limits the results to those matching the specified @@ -521,17 +497,18 @@
e_response Service return value of type T_LOG_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_counterexamples
importingi_workspace_idtype STRING
i_page_limittype INTEGER optional
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE_COLLECTION
raisingzcx_ibmc_service_exception

List counterexamples

+
public instance
list_counterexamples
importingi_workspace_idtype STRING
i_page_limittype INTEGER optional
i_include_counttype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE_COLLECTION
raisingzcx_ibmc_service_exception

List counterexamples

List the counterexamples for a workspace. Counterexamples are examples that have - been marked as irrelevant input.
-
- This operation is limited to 2500 requests per 30 minutes. For more information, - see **Rate limiting**. + been marked as irrelevant input.
Parameters
i_workspace_id Unique identifier of the workspace.
i_page_limit The number of records to return in each page of results. +
i_include_count + Whether to include information about the number of records that satisfy the + request, regardless of the page limit. If this parameter is `true`, the + `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned counterexamples will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). @@ -543,16 +520,17 @@
e_response Service return value of type T_COUNTEREXAMPLE_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_dialog_nodes
importingi_workspace_idtype STRING
i_page_limittype INTEGER optional
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DIALOG_NODE_COLLECTION
raisingzcx_ibmc_service_exception

List dialog nodes

- List the dialog nodes for a workspace.
-
- This operation is limited to 2500 requests per 30 minutes. For more information, - see **Rate limiting**. +
public instance
list_dialog_nodes
importingi_workspace_idtype STRING
i_page_limittype INTEGER optional
i_include_counttype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DIALOG_NODE_COLLECTION
raisingzcx_ibmc_service_exception

List dialog nodes

+ List the dialog nodes for a workspace.
Parameters
i_workspace_id Unique identifier of the workspace.
i_page_limit The number of records to return in each page of results. +
i_include_count + Whether to include information about the number of records that satisfy the + request, regardless of the page limit. If this parameter is `true`, the + `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned dialog nodes will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). @@ -564,12 +542,8 @@
e_response Service return value of type T_DIALOG_NODE_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_entities
importingi_workspace_idtype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_page_limittype INTEGER optional
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ENTITY_COLLECTION
raisingzcx_ibmc_service_exception

List entities

- List the entities for a workspace.
-
- With **export**=`false`, this operation is limited to 1000 requests per 30 - minutes. With **export**=`true`, the limit is 200 requests per 30 minutes. For - more information, see **Rate limiting**. +
public instance
list_entities
importingi_workspace_idtype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_page_limittype INTEGER optional
i_include_counttype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ENTITY_COLLECTION
raisingzcx_ibmc_service_exception

List entities

+ List the entities for a workspace.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -580,6 +554,10 @@ included.
i_page_limit The number of records to return in each page of results. +
i_include_count + Whether to include information about the number of records that satisfy the + request, regardless of the page limit. If this parameter is `true`, the + `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned entities will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). @@ -591,12 +569,9 @@
e_response Service return value of type T_ENTITY_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_examples
importingi_workspace_idtype STRING
i_intenttype STRING
i_page_limittype INTEGER optional
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EXAMPLE_COLLECTION
raisingzcx_ibmc_service_exception

List user input examples

+
public instance
list_examples
importingi_workspace_idtype STRING
i_intenttype STRING
i_page_limittype INTEGER optional
i_include_counttype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EXAMPLE_COLLECTION
raisingzcx_ibmc_service_exception

List user input examples

List the user input examples for an intent, optionally including contextual - entity mentions.
-
- This operation is limited to 2500 requests per 30 minutes. For more information, - see **Rate limiting**. + entity mentions.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -604,6 +579,10 @@ The intent name.
i_page_limit The number of records to return in each page of results. +
i_include_count + Whether to include information about the number of records that satisfy the + request, regardless of the page limit. If this parameter is `true`, the + `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned examples will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). @@ -615,12 +594,8 @@
e_response Service return value of type T_EXAMPLE_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_intents
importingi_workspace_idtype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_page_limittype INTEGER optional
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_INTENT_COLLECTION
raisingzcx_ibmc_service_exception

List intents

- List the intents for a workspace.
-
- With **export**=`false`, this operation is limited to 2000 requests per 30 - minutes. With **export**=`true`, the limit is 400 requests per 30 minutes. For - more information, see **Rate limiting**. +
public instance
list_intents
importingi_workspace_idtype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_page_limittype INTEGER optional
i_include_counttype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_INTENT_COLLECTION
raisingzcx_ibmc_service_exception

List intents

+ List the intents for a workspace.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -631,6 +606,10 @@ included.
i_page_limit The number of records to return in each page of results. +
i_include_count + Whether to include information about the number of records that satisfy the + request, regardless of the page limit. If this parameter is `true`, the + `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned intents will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). @@ -643,11 +622,7 @@ Service return value of type T_INTENT_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_logs
importingi_workspace_idtype STRING
i_sorttype STRING optional
i_filtertype STRING optional
i_page_limittype INTEGER optional
i_cursortype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_LOG_COLLECTION
raisingzcx_ibmc_service_exception

List log events in a workspace

- List the events from the log of a specific workspace.
-
- If **cursor** is not specified, this operation is limited to 40 requests per 30 - minutes. If **cursor** is specified, the limit is 120 requests per minute. For - more information, see **Rate limiting**. + List the events from the log of a specific workspace.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -668,10 +643,7 @@
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_mentions
importingi_workspace_idtype STRING
i_entitytype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ENTITY_MENTION_COLLECTION
raisingzcx_ibmc_service_exception

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.
-
- This operation is limited to 200 requests per 30 minutes. For more information, - see **Rate limiting**. + contextual entity in the context of an intent user input example.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -688,11 +660,8 @@
e_response Service return value of type T_ENTITY_MENTION_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_synonyms
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_page_limittype INTEGER optional
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SYNONYM_COLLECTION
raisingzcx_ibmc_service_exception

List entity value synonyms

- List the synonyms for an entity value.
-
- This operation is limited to 2500 requests per 30 minutes. For more information, - see **Rate limiting**. +
public instance
list_synonyms
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_page_limittype INTEGER optional
i_include_counttype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SYNONYM_COLLECTION
raisingzcx_ibmc_service_exception

List entity value synonyms

+ List the synonyms for an entity value.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -702,6 +671,10 @@ The text of the entity value.
i_page_limit The number of records to return in each page of results. +
i_include_count + Whether to include information about the number of records that satisfy the + request, regardless of the page limit. If this parameter is `true`, the + `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned entity value synonyms will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). @@ -713,11 +686,8 @@
e_response Service return value of type T_SYNONYM_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_values
importingi_workspace_idtype STRING
i_entitytype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_page_limittype INTEGER optional
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VALUE_COLLECTION
raisingzcx_ibmc_service_exception

List entity values

- List the values for an entity.
-
- This operation is limited to 2500 requests per 30 minutes. For more information, - see **Rate limiting**. +
public instance
list_values
importingi_workspace_idtype STRING
i_entitytype STRING
i_exporttype BOOLEAN default C_BOOLEAN_FALSE
i_page_limittype INTEGER optional
i_include_counttype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VALUE_COLLECTION
raisingzcx_ibmc_service_exception

List entity values

+ List the values for an entity.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -730,6 +700,10 @@ included.
i_page_limit The number of records to return in each page of results. +
i_include_count + Whether to include information about the number of records that satisfy the + request, regardless of the page limit. If this parameter is `true`, the + `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned entity values will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). @@ -741,14 +715,15 @@
e_response Service return value of type T_VALUE_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_workspaces
importingi_page_limittype INTEGER optional
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE_COLLECTION
raisingzcx_ibmc_service_exception

List workspaces

- List the workspaces associated with a Watson Assistant service instance.
-
- This operation is limited to 500 requests per 30 minutes. For more information, - see **Rate limiting**. +
public instance
list_workspaces
importingi_page_limittype INTEGER optional
i_include_counttype BOOLEAN default C_BOOLEAN_FALSE
i_sorttype STRING optional
i_cursortype STRING optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE_COLLECTION
raisingzcx_ibmc_service_exception

List workspaces

+ List the workspaces associated with a Watson Assistant service instance.
Parameters
i_page_limit The number of records to return in each page of results. +
i_include_count + Whether to include information about the number of records that satisfy the + request, regardless of the page limit. If this parameter is `true`, the + `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned workspaces will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`). @@ -768,9 +743,7 @@ state management, versioning, and search capabilities. For more information, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overvi - ew).
-
- There is no rate limit for this operation. + ew).
Parameters
i_workspace_id Unique identifier of the workspace. @@ -785,13 +758,7 @@
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
update_counterexample
importingi_workspace_idtype STRING
i_texttype STRING
i_bodytype T_UPDATE_COUNTEREXAMPLE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE
raisingzcx_ibmc_service_exception

Update counterexample

Update the text of a counterexample. Counterexamples are examples that have been - marked as irrelevant input.
-
- If you want to update multiple counterexamples with a single API call, consider - using the **[Update workspace](#update-workspace)** method instead.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + marked as irrelevant input.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -809,10 +776,7 @@ 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.
-
- This operation is limited to 500 requests per 30 minutes. For more information, - see **Rate limiting**. + using the **[Update workspace](#update-workspace)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -837,10 +801,7 @@ 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.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + the **[Update workspace](#update-workspace)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -874,10 +835,7 @@ 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.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + the **[Update intent](#update-intent)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -898,10 +856,7 @@ 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.
-
- This operation is limited to 2000 requests per 30 minutes. For more information, - see **Rate limiting**. + the **[Update workspace](#update-workspace)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -938,10 +893,7 @@
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.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + value](#update-entity-value)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -964,10 +916,7 @@ 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.
-
- This operation is limited to 1000 requests per 30 minutes. For more information, - see **Rate limiting**. + using the **[Update entity](#update-entity)** method instead.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -1003,10 +952,7 @@
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
update_workspace
importingi_workspace_idtype STRING
i_bodytype T_UPDATE_WORKSPACE optional
i_appendtype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE
raisingzcx_ibmc_service_exception

Update workspace

Update an existing workspace with new or modified data. You must provide - component objects defining the content of the updated workspace.
-
- This operation is limited to 30 request per 30 minutes. For more information, - see **Rate limiting**. + component objects defining the content of the updated workspace.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -1033,4 +979,4 @@
e_response Service return value of type T_WORKSPACE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v2.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v2.html index 3e1dd19..d216bee 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v2.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v2.html @@ -4,41 +4,116 @@ flows between your apps and your users.

The Assistant v2 API provides runtime methods your client application can use to - send user input to an assistant and receive a response.

Types

Visibility and LevelNameDocumentation
publict_capture_group (structured type) No documentation available.
publict_dialog_log_message (structured type)

+ send user input to an assistant and receive a response.

Types

Visibility and LevelNameDocumentation
publict_agent_availability_message (structured type) No documentation available.
publict_base_message_context_global (structured type)

+ Session context data that is shared by all skills used by

+ the Assistant.
publict_base_message_input (structured type)

+ An input object that includes the input text.

publict_base_message_input_options (structured type)

+ Optional properties that control how the assistant responds.

publict_bulk_classify_input (structured type) No documentation available.
publict_bulk_classify_output (structured type) No documentation available.
publict_bulk_classify_response (structured type) No documentation available.
publict_bulk_classify_utterance (structured type)

+ The user input utterance to classify.

publict_capture_group (structured type) No documentation available.
publict_dialog_log_message (structured type)

Dialog log message details.

publict_dialog_nodes_visited (structured type) No documentation available.
publict_dialog_node_action (structured type) No documentation available.
publict_dialog_suggestion (structured type) No documentation available.
publict_dialog_suggestion_value (structured type)

An object defining the message input to be sent to the

- assistant if the user selects the corresponding disambiguation option.
publict_dia_nd_output_opt_elem_value (structured type)

+ assistant if the user selects the corresponding disambiguation option.

publict_dia_nd_otpt_cnnct_t_agnt_tr1 (structured type)

+ Routing or other contextual information to be used by target

+ service desk systems.
publict_dia_nd_output_opt_elem_value (structured type)

An object defining the message input to be sent to the

- assistant if the user selects the corresponding option.
publict_dia_node_output_opt_element (structured type) No documentation available.
publict_empty_response type JSONOBJECT No documentation available.
publict_error_detail (structured type) No documentation available.
publict_error_response (structured type) No documentation available.
publict_message_context (structured type) No documentation available.
publict_message_context_global (structured type)

- Information that is shared by all skills used by the

- Assistant.
publict_message_context_skill (structured type)

+ assistant if the user selects the corresponding option.

publict_dia_node_output_opt_element (structured type) No documentation available.
publict_empty_response type JSONOBJECT No documentation available.
publict_error_detail (structured type) No documentation available.
publict_error_response (structured type) No documentation available.
publict_log (structured type) No documentation available.
publict_log_collection (structured type) No documentation available.
publict_log_pagination (structured type)

+ The pagination data for the returned objects.

publict_message_context (structured type) No documentation available.
publict_message_context_global (structured type)

+ Session context data that is shared by all skills used by

+ the Assistant.
publict_message_context_skill (structured type)

Contains information specific to a particular skill used by

- the Assistant.
publict_message_context_skills type MAP

+ the Assistant. The property name must be the same as the name of the skill (for + example, `main skill`).

publict_message_context_skills type MAP

Information specific to particular skills used by the

- Assistant.
+ assistant.

- **Note:** Currently, only a single property named `main skill` is supported. - This object contains variables that apply to the dialog skill used by the - assistant.
publict_message_input (structured type)

+ **Note:** Currently, only a single child property is supported, containing + variables that apply to the dialog skill used by the assistant.

publict_message_context_skill_system (structured type)

+ System context data used by the skill.

publict_message_context_stateless (structured type) No documentation available.
publict_message_input (structured type)

An input object that includes the input text.

publict_message_input_options (structured type)

- Optional properties that control how the assistant responds.

publict_message_output (structured type)

+ Optional properties that control how the assistant responds.

publict_message_input_opt_auto_learn (structured type)

+ Autolearning options for the message.


+
+ **Note:** Autolearning is a beta feature.
publict_message_input_opt_spelling (structured type)

+ Spelling correction options for the message. Any options

+ specified on an individual message override the settings configured for the + skill.
publict_message_input_opt_stateless (structured type)

+ Optional properties that control how the assistant responds.

publict_message_input_stateless (structured type)

+ An input object that includes the input text.

publict_message_output (structured type)

Assistant output to be rendered or processed by the client.

publict_message_output_debug (structured type)

Additional detailed information about a message response and

- how it was generated.
publict_message_request (structured type)

- A request formatted for the Watson Assistant service.

publict_message_response (structured type)

- A response from the Watson Assistant service.

publict_mssg_context_global_system (structured type)

+ how it was generated.

publict_message_output_spelling (structured type)

+ Properties describing any spelling corrections in the user

+ input that was received.
publict_message_request (structured type)

+ A stateful message request formatted for the Watson

+ Assistant service.
publict_message_request_stateless (structured type)

+ A stateless message request formatted for the Watson

+ Assistant service.
publict_message_response (structured type)

+ A response from the Watson Assistant service.

publict_message_response_stateless (structured type)

+ A stateless response from the Watson Assistant service.

publict_mssg_cntxt_global_stateless (structured type)

+ Session context data that is shared by all skills used by

+ the Assistant.
publict_mssg_context_global_system (structured type)

Built-in system properties that apply to all skills used by

- the assistant.
publict_rt_entity_interpretation (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_date (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_num (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_time (structured type) No documentation available.
publict_rt_response_type_suggestion (structured type) No documentation available.
publict_rt_resp_typ_connect_to_agent (structured type) No documentation available.
publict_runtime_entity (structured type)

+ the assistant.

publict_mssg_otpt_dbg_at_learn_model (structured type)

+ Detailed information about how an autolearned model affected

+ the response.
publict_mssg_output_debug_auto_learn (structured type)

+ Detailed information about how autolearning (if enabled)

+ affected the response.
+
+ **Note:** Autolearning is a beta feature.
publict_rt_entity_interpretation (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_date (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_num (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_time (structured type) No documentation available.
publict_rt_response_type_suggestion (structured type)

+ An object that describes a response with response type

+ `suggestion`.
publict_rt_resp_gnrc_rt_resp_typ_cn1 (structured type)

+ An object that describes a response with response type

+ `connect_to_agent`.
publict_rt_resp_gnrc_rt_resp_typ_img (structured type)

+ An object that describes a response with response type

+ `image`.
publict_rt_resp_gnrc_rt_resp_typ_opt (structured type)

+ An object that describes a response with response type

+ `option`.
publict_rt_resp_gnrc_rt_resp_typ_ps (structured type)

+ An object that describes a response with response type

+ `pause`.
publict_rt_resp_gnrc_rt_resp_typ_sg1 (structured type)

+ An object that describes a response with response type

+ `suggestion`.
publict_rt_resp_gnrc_rt_resp_typ_sr1 (structured type)

+ An object that describes a response with response type

+ `search`.
publict_rt_resp_gnrc_rt_resp_typ_txt (structured type)

+ An object that describes a response with response type

+ `text`.
publict_rt_resp_typ_connect_to_agent (structured type)

+ An object that describes a response with response type

+ `connect_to_agent`.
publict_runtime_entity (structured type)

The entity value that was recognized in the user input.

publict_runtime_entity_alternative (structured type)

An alternative value for the recognized entity.

publict_runtime_entity_role (structured type)

An object describing the role played by a system entity that

is specifies the beginning or end of a range recognized in the user input. This property is included only if the new system entities are enabled for the skill.
publict_runtime_intent (structured type)

- An intent identified in the user input.

publict_runtime_response_generic (structured type) No documentation available.
publict_runtime_response_type_image (structured type) No documentation available.
publict_runtime_response_type_option (structured type) No documentation available.
publict_runtime_response_type_pause (structured type) No documentation available.
publict_runtime_response_type_search (structured type) No documentation available.
publict_runtime_response_type_text (structured type) No documentation available.
publict_search_result (structured type) No documentation available.
publict_search_result_highlight (structured type)

+ An intent identified in the user input.

publict_runtime_response_generic type JSONOBJECT No documentation available.
publict_runtime_response_type_image (structured type)

+ An object that describes a response with response type

+ `image`.
publict_runtime_response_type_option (structured type)

+ An object that describes a response with response type

+ `option`.
publict_runtime_response_type_pause (structured type)

+ An object that describes a response with response type

+ `pause`.
publict_runtime_response_type_search (structured type)

+ An object that describes a response with response type

+ `search`.
publict_runtime_response_type_text (structured type)

+ An object that describes a response with response type

+ `text`.
publict_search_result (structured type) No documentation available.
publict_search_result_highlight (structured type)

An object containing segments of text from search results

- with query-matching text highlighted using HTML <em> tags.
publict_search_result_metadata (structured type)

+ with query-matching text highlighted using HTML `<em>` tags.

publict_search_result_metadata (structured type)

An object containing search result metadata from the

- Discovery service.
publict_session_response (structured type) No documentation available.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)

Map ABAP identifiers to service identifiers.

public staticc_required_fields (structured type)

List of required fields per type.

Methods

Visibility and LevelNameDocumentation
public instance
create_session
importingi_assistant_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SESSION_RESPONSE
raisingzcx_ibmc_service_exception

Create a session

+ Discovery service.
publict_session_response (structured type) No documentation available.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)

Map ABAP identifiers to service identifiers.

public staticc_required_fields (structured type)

List of required fields per type.

Methods

Visibility and LevelNameDocumentation
public instance
bulk_classify
importingi_skill_idtype STRING
i_requesttype T_BULK_CLASSIFY_INPUT optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_BULK_CLASSIFY_RESPONSE
raisingzcx_ibmc_service_exception

Identify intents and entities in multiple user utterances

+ Send multiple user inputs to a dialog skill 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 skills + or skill versions.
+
+ This method is available only with Premium plans. + +
Parameters
i_skill_id + Unique identifier of the skill. To find the skill ID in the Watson Assistant + user interface, open the skill settings and click **API Details**. +
i_request + An input object that includes the text to classify. +
e_response + Service return value of type T_BULK_CLASSIFY_RESPONSE +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
create_session
importingi_assistant_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SESSION_RESPONSE
raisingzcx_ibmc_service_exception

Create a session

Create a new session. A session is used to send user input to a skill and receive responses. It also maintains the state of the conversation. A session persists until it is deleted, or until it times out because of inactivity. (For @@ -74,10 +149,54 @@
i_session_id Unique identifier of the session.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instanceget_appname redefinition 
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
message
importingi_assistant_idtype STRING
i_session_idtype STRING
i_requesttype T_MESSAGE_REQUEST optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_MESSAGE_RESPONSE
raisingzcx_ibmc_service_exception

Send user input to assistant

- Send user input to an assistant and receive a response.
+
public instance
delete_user_data
importingi_customer_idtype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

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-secu + rity#information-security).
+
+ This operation is limited to 4 requests per minute. For more information, see + **Rate limiting**. + +
Parameters
i_customer_id + The customer ID for which all data is to be deleted. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instanceget_appname redefinition 
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
list_logs
importingi_assistant_idtype STRING
i_sorttype STRING optional
i_filtertype STRING optional
i_page_limittype INTEGER optional
i_cursortype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_LOG_COLLECTION
raisingzcx_ibmc_service_exception

List log events for an assistant

+ List the events from the log of an assistant.
+
+ This method is available only with Premium plans. + +
Parameters
i_assistant_id + Unique identifier of the assistant. To find the assistant ID in the Watson + Assistant user interface, open the assistant settings and click **API + Details**. For information about creating assistants, see the + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + add#assistant-add-task).

- There is no rate limit for this operation. + **Note:** Currently, the v2 API does not support creating assistants. +
i_sort + How to sort the returned log events. You can sort by **request_timestamp**. To + reverse the sort order, prefix the parameter value with a minus sign (`-`). +
i_filter + A cacheable parameter that limits the results to those matching the specified + filter. For more information, see the + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-ref + erence#filter-reference). +
i_page_limit + The number of records to return in each page of results. +
i_cursor + A token identifying the page of results to retrieve. +
e_response + Service return value of type T_LOG_COLLECTION +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
message
importingi_assistant_idtype STRING
i_session_idtype STRING
i_requesttype T_MESSAGE_REQUEST optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_MESSAGE_RESPONSE
raisingzcx_ibmc_service_exception

Send user input to assistant (stateful)

+ Send user input to an assistant and receive a response, with conversation state + (including context data) stored by Watson Assistant for the duration of the + session.
Parameters
i_assistant_id Unique identifier of the assistant. To find the assistant ID in the Watson @@ -95,4 +214,22 @@
e_response Service return value of type T_MESSAGE_RESPONSE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file +
public instance
message_stateless
importingi_assistant_idtype STRING
i_requesttype T_MESSAGE_REQUEST_STATELESS optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_MESSAGE_RESPONSE_STATELESS
raisingzcx_ibmc_service_exception

Send user input to assistant (stateless)

+ Send user input to an assistant and receive a response, with conversation state + (including context data) managed by your application. + +
Parameters
i_assistant_id + Unique identifier of the assistant. To find the assistant ID in the Watson + Assistant user interface, open the assistant settings and click **API + Details**. For information about creating assistants, see the + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + add#assistant-add-task).
+
+ **Note:** Currently, the v2 API does not support creating assistants. +
i_request + The message to be sent. This includes the user's input, context data, and + optional content such as intents and entities. +
e_response + Service return value of type T_MESSAGE_RESPONSE_STATELESS +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_compare_comply_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_compare_comply_v1.html index f12dd88..2f18e02 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_compare_comply_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_compare_comply_v1.html @@ -172,11 +172,11 @@
**Important:** Batch processing requires the use of the [IBM Cloud Object Storage - service](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=cloud-o - bject-storage-about#about-ibm-cloud-object-storage). The use of IBM Cloud Object - Storage with Compare and Comply is discussed at [Using batch - processing](https://cloud.ibm.com/docs/services/compare-comply?topic=compare-co - mply-batching#before-you-batch). + service](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-sto + rage-about#about-ibm-cloud-object-storage). The use of IBM Cloud Object Storage + with Compare and Comply is discussed at [Using batch + processing](https://cloud.ibm.com/docs/compare-comply?topic=compare-comply-batc + hing#before-you-batch).
Parameters
i_function The Compare and Comply method to run across the submitted input documents. @@ -267,18 +267,12 @@
Parameters
e_response Service return value of type T_BATCHES
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_feedback
importingi_feedback_typetype STRING optional
i_beforetype DATE optional
i_aftertype DATE optional
i_document_titletype STRING optional
i_model_idtype STRING optional
i_model_versiontype STRING optional
i_category_removedtype STRING optional
i_category_addedtype STRING optional
i_category_not_changedtype STRING optional
i_type_removedtype STRING optional
i_type_addedtype STRING optional
i_type_not_changedtype STRING optional
i_page_limittype INTEGER optional
i_cursortype STRING optional
i_sorttype STRING optional
i_include_totaltype BOOLEAN optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_FEEDBACK_LIST
raisingzcx_ibmc_service_exception

List the feedback in a document

+
public instance
list_feedback
importingi_feedback_typetype STRING optional
i_document_titletype STRING optional
i_model_idtype STRING optional
i_model_versiontype STRING optional
i_category_removedtype STRING optional
i_category_addedtype STRING optional
i_category_not_changedtype STRING optional
i_type_removedtype STRING optional
i_type_addedtype STRING optional
i_type_not_changedtype STRING optional
i_page_limittype INTEGER optional
i_cursortype STRING optional
i_sorttype STRING optional
i_include_totaltype BOOLEAN optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_FEEDBACK_LIST
raisingzcx_ibmc_service_exception

List the feedback in a document

Lists the feedback in a document.
Parameters
i_feedback_type An optional string that filters the output to include only feedback with the specified feedback type. The only permitted value is `element_classification`. -
i_before - An optional string in the format `YYYY-MM-DD` that filters the output to include - only feedback that was added before the specified date. -
i_after - An optional string in the format `YYYY-MM-DD` that filters the output to include - only feedback that was added after the specified date.
i_document_title An optional string that filters the output to include only feedback from the document with the specified `document_title`. @@ -347,4 +341,4 @@
e_response Service return value of type T_BATCH_STATUS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_discovery_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_discovery_v1.html index 311dac6..700fea0 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_discovery_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_discovery_v1.html @@ -522,8 +522,8 @@ 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/services/discovery?topic=discovery-informa - tion-security#information-security). + security](https://cloud.ibm.com/docs/discovery?topic=discovery-information-secu + rity#information-security).
Parameters
i_customer_id The customer ID for which all data is to be deleted. @@ -531,8 +531,8 @@
public instance
federated_query
importingi_environment_idtype STRING
i_query_longtype T_FED_QUERY_LARGE
i_x_watson_logging_opt_outtype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_QUERY_RESPONSE
raisingzcx_ibmc_service_exception

Query multiple collections

By using this method, you can construct long queries that search multiple collection. For details, see the [Discovery - documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-qu - ery-concepts#query-concepts). + documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-conce + pts#query-concepts).
Parameters
i_environment_id The ID of the environment. @@ -547,8 +547,8 @@ Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when ingesting documents and performing relevance training. See the [Discovery - documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-qu - ery-concepts#query-concepts) for more details on the query language. + documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-conce + pts#query-concepts) for more details on the query language.
Parameters
i_environment_id The ID of the environment. @@ -923,8 +923,8 @@
public instance
query
importingi_environment_idtype STRING
i_collection_idtype STRING
i_query_longtype T_COLL_QUERY_LARGE optional
i_x_watson_logging_opt_outtype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_QUERY_RESPONSE
raisingzcx_ibmc_service_exception

Query a collection

By using this method, you can construct long queries. For details, see the [Discovery - documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-qu - ery-concepts#query-concepts). + documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-conce + pts#query-concepts).
Parameters
i_environment_id The ID of the environment. @@ -969,8 +969,8 @@ Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when ingesting documents and performing relevance training. See the [Discovery - documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-qu - ery-concepts#query-concepts) for more details on the query language. + documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-conce + pts#query-concepts) for more details on the query language.
Parameters
i_environment_id The ID of the environment. @@ -1161,4 +1161,4 @@
e_response Service return value of type T_TRAINING_EXAMPLE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_lang_translator_v3.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_lang_translator_v3.html index 89838b8..0c0178d 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_lang_translator_v3.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_lang_translator_v3.html @@ -1,6 +1,6 @@ Class ZCL_IBMC_LANG_TRANSLATOR_V3

Class ZCL_IBMC_LANG_TRANSLATOR_V3

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Language Translator

IBM Watson™ Language Translator translates text from one language to - another. The service offers multiple IBM provided translation models that you + another. The service offers multiple IBM-provided translation models that you can customize based on your unique terminology and language. Use Language Translator to take news from across the globe and present it in your language, communicate with your customers in their own language, and more.

Types

Visibility and LevelNameDocumentation
publict_base_model_id type STRING

@@ -9,7 +9,9 @@ string.

publict_delete_model_result (structured type) No documentation available.
publict_document_id type STRING

System generated ID identifying a document being translated

using one specific translation model.
publict_document_list (structured type) No documentation available.
publict_document_status (structured type)

- Document information, including translation status.

publict_error_response (structured type) No documentation available.
publict_identifiable_language (structured type) No documentation available.
publict_identifiable_languages (structured type) No documentation available.
publict_identified_language (structured type) No documentation available.
publict_identified_languages (structured type) No documentation available.
publict_inline_object (structured type) No documentation available.
publict_inline_object1 (structured type) No documentation available.
publict_model_id type STRING

+ Document information, including translation status.

publict_error_response (structured type) No documentation available.
publict_get_translated_doc_response type FILE No documentation available.
publict_identifiable_language (structured type) No documentation available.
publict_identifiable_languages (structured type) No documentation available.
publict_identified_language (structured type) No documentation available.
publict_identified_languages (structured type) No documentation available.
publict_inline_object (structured type) No documentation available.
publict_inline_object1 (structured type) No documentation available.
publict_language (structured type)

+ Response payload for languages.

publict_languages (structured type)

+ The response type for listing supported languages.

publict_model_id type STRING

A globally unique string that identifies the underlying

model that is used for translation.
publict_source type STRING

Translation source language code.

publict_target type STRING

@@ -18,45 +20,112 @@ The response type for listing existing translation models.

publict_translation_result (structured type) No documentation available.
publict_translation_status type STRING

The status of the translation job associated with a

submitted document.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)

Map ABAP identifiers to service identifiers.

public staticc_required_fields (structured type)

List of required fields per type.

Methods

Visibility and LevelNameDocumentation
public instance
create_model
importingi_base_model_idtype STRING
i_forced_glossarytype FILE optional
i_parallel_corpustype FILE optional
i_nametype STRING optional
i_forced_glossary_cttype STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL
i_parallel_corpus_cttype STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRANSLATION_MODEL
raisingzcx_ibmc_service_exception

Create model

- Uploads Translation Memory eXchange (TMX) files to customize a translation - model.
+ Uploads training files to customize a translation model. You can customize a + model with a forced glossary or with a parallel corpus:
+ * Use a *forced glossary* to force certain terms and phrases to be translated in + a specific way. You can upload only a single forced glossary file for a model. + The size of a forced glossary file for a custom model is limited to 10 MB.
+ * Use a *parallel corpus* when you want your custom model to learn from general + translation patterns in parallel sentences in your samples. What your model + learns from a parallel corpus can improve translation results for input text + that the model has not been trained on. You can upload multiple parallel + corpora files with a request. To successfully train with parallel corpora, the + corpora files must contain a cumulative total of at least 5000 parallel + sentences. The cumulative size of all uploaded corpus files for a custom model + is limited to 250 MB.

- You can either customize a model with a forced glossary or with a corpus that - contains parallel sentences. To create a model that is customized with a - parallel corpus <b>and</b> a forced glossary, proceed in two steps: - customize with a parallel corpus first and then customize the resulting model - with a glossary. Depending on the type of customization and the size of the - uploaded corpora, training can range from minutes for a glossary to several - hours for a large parallel corpus. You can upload a single forced glossary file - and this file must be less than <b>10 MB</b>. You can upload - multiple parallel corpora tmx files. The cumulative file size of all uploaded - files is limited to <b>250 MB</b>. To successfully train with a - parallel corpus you must have at least <b>5,000 parallel - sentences</b> in your corpus.
+ Depending on the type of customization and the size of the uploaded files, + training time can range from minutes for a glossary to several hours for a + large parallel corpus. To create a model that is customized with a parallel + corpus and a forced glossary, customize the model with a parallel corpus first + and then customize the resulting model with a forced glossary.

- You can have a <b>maximum of 10 custom models per language pair</b>. - + You can create a maximum of 10 custom models per language pair. For more + information about customizing a translation model, including the formatting and + character restrictions for data files, see [Customizing your + model](https://cloud.ibm.com/docs/language-translator?topic=language-translator + -customizing).
+
+ #### Supported file formats
+
+ You can provide your training data for customization in the following document + formats:
+ * **TMX** (`.tmx`) - Translation Memory eXchange (TMX) is an XML specification + for the exchange of translation memories.
+ * **XLIFF** (`.xliff`) - XML Localization Interchange File Format (XLIFF) is an + XML specification for the exchange of translation memories.
+ * **CSV** (`.csv`) - Comma-separated values (CSV) file with two columns for + aligned sentences and phrases. The first row must have two language codes. The + first column is for the source language code, and the second column is for the + target language code.
+ * **TSV** (`.tsv` or `.tab`) - Tab-separated values (TSV) file with two columns + for aligned sentences and phrases. The first row must have two language codes. + The first column is for the source language code, and the second column is for + the target language code.
+ * **JSON** (`.json`) - Custom JSON format for specifying aligned sentences and + phrases.
+ * **Microsoft Excel** (`.xls` or `.xlsx`) - Excel file with the first two + columns for aligned sentences and phrases. The first row contains the language + code.
+
+ You must encode all text data in UTF-8 format. For more information, see + [Supported document formats for training + data](https://cloud.ibm.com/docs/language-translator?topic=language-translator- + customizing#supported-document-formats-for-training-data).
+
+ #### Specifying file formats
+
+ You can indicate the format of a file by including the file extension with the + file name. Use the file extensions shown in **Supported file formats**.
+
+ Alternatively, you can omit the file extension and specify one of the following + `content-type` specifications for the file:
+ * **TMX** - `application/x-tmx+xml`
+ * **XLIFF** - `application/xliff+xml`
+ * **CSV** - `text/csv`
+ * **TSV** - `text/tab-separated-values`
+ * **JSON** - `application/json`
+ * **Microsoft Excel** - + `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
+
+ For example, with `curl`, use the following `content-type` specification to + indicate the format of a CSV file named **glossary**:
+
+ `--form "forced_glossary=@glossary;type=text/csv"`
Parameters
i_base_model_id - The model ID of the model to use as the base for customization. To see available - models, use the `List models` method. Usually all IBM provided models are - customizable. In addition, all your models that have been created via parallel - corpus customization, can be further customized with a forced glossary. + The ID of the translation model to use as the base for customization. To see + available models and IDs, use the `List models` method. Most models that are + provided with the service are customizable. In addition, all models that you + create with parallel corpora customization can be further customized with a + forced glossary.
i_forced_glossary - A TMX file with your customizations. The customizations in the file completely - overwrite the domain translaton data, including high frequency or high - confidence phrase translations. You can upload only one glossary with a file - size less than 10 MB per call. A forced glossary should contain single words or - short phrases. + A file with forced glossary terms for the source and target languages. The + customizations in the file completely overwrite the domain translation data, + including high frequency or high confidence phrase translations.
+
+ You can upload only one glossary file for a custom model, and the glossary can + have a maximum size of 10 MB. A forced glossary must contain single words or + short phrases. For more information, see **Supported file formats** in the + method description.
+
+ *With `curl`, use `--form forced_glossary=@{filename}`.*.
i_parallel_corpus - A TMX file with parallel sentences for source and target language. You can - upload multiple parallel_corpus files in one request. All uploaded - parallel_corpus files combined, your parallel corpus must contain at least - 5,000 parallel sentences to train successfully. + A file with parallel sentences for the source and target languages. You can + upload multiple parallel corpus files in one request by repeating the + parameter. All uploaded parallel corpus files combined must contain at least + 5000 parallel sentences to train successfully. You can provide a maximum of + 500,000 parallel sentences across all corpora.
+
+ A single entry in a corpus file can contain a maximum of 80 words. All corpora + files for a custom model can have a cumulative maximum size of 250 MB. For more + information, see **Supported file formats** in the method description.
+
+ *With `curl`, use `--form parallel_corpus=@{filename}`.*.
i_name An optional model name that you can use to identify the model. Valid characters - are letters, numbers, dashes, underscores, spaces and apostrophes. The maximum - length is 32 characters. + are letters, numbers, dashes, underscores, spaces, and apostrophes. The maximum + length of the name is 32 characters.
e_response Service return value of type T_TRANSLATION_MODEL
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. @@ -85,7 +154,7 @@
public instance
get_model
importingi_model_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRANSLATION_MODEL
raisingzcx_ibmc_service_exception

Get model details

Gets information about a translation model, including training status for custom models. Use this API call to poll the status of your customization request. A - successfully completed training will have a status of `available`. + successfully completed training has a status of `available`.
Parameters
i_model_id Model ID of the model to get. @@ -135,6 +204,17 @@
Parameters
e_response Service return value of type T_IDENTIFIABLE_LANGUAGES
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
list_languages
importingi_accepttype STRING default 'application/json'
exportinge_responsetype T_LANGUAGES
raisingzcx_ibmc_service_exception

List supported languages

+ Lists all supported languages for translation. The method returns an array of + supported languages with information about each language. Languages are listed + in alphabetical order by language code (for example, `af`, `ar`). In addition + to basic information about each language, the response indicates whether the + language is `supported_as_source` for translation and `supported_as_target` for + translation. It also lists whether the language is `identifiable`. + +
Parameters
e_response + Service return value of type T_LANGUAGES +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_models
importingi_sourcetype STRING optional
i_targettype STRING optional
i_defaulttype BOOLEAN optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRANSLATION_MODELS
raisingzcx_ibmc_service_exception

List models

Lists available translation models. @@ -143,16 +223,24 @@
i_target Specify a language code to filter results by target language.
i_default - If the default parameter isn't specified, the service will return all - models (default and non-default) for each language pair. To return only default - models, set this to `true`. To return only non-default models, set this to - `false`. There is exactly one default model per language pair, the IBM provided - base model. + If the `default` parameter isn't specified, the service returns all models + (default and non-default) for each language pair. To return only default + models, set this parameter to `true`. To return only non-default models, set + this parameter to `false`. There is exactly one default model, the IBM-provided + base model, per language pair.
e_response Service return value of type T_TRANSLATION_MODELS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
translate
importingi_requesttype T_TRANSLATE_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRANSLATION_RESULT
raisingzcx_ibmc_service_exception

Translate

Translates the input text from the source language to the target language. + Specify a model ID that indicates the source and target languages, or specify + the source and target languages individually. You can omit the source language + to have the service attempt to detect the language from the input text. If you + omit the source language, the request must contain sufficient input text for + the service to identify the source language.
+
+ You can translate a maximum of 50 KB (51,200 bytes) of text with a single + request. All input text must be encoded in UTF-8 format.
Parameters
i_request The translate request containing the text, and either a model ID or source and @@ -163,31 +251,37 @@
public instance
translate_document
importingi_filetype FILE
i_filenametype STRING
i_file_content_typetype STRING optional
i_model_idtype STRING optional
i_sourcetype STRING optional
i_targettype STRING optional
i_document_idtype STRING optional
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DOCUMENT_STATUS
raisingzcx_ibmc_service_exception

Translate document

Submit a document for translation. You can submit the document contents in the `file` parameter, or you can reference a previously submitted document by - document ID. + document ID. The maximum file size for document translation is
+ * 20 MB for service instances on the Standard, Advanced, and Premium plans
+ * 2 MB for service instances on the Lite plan
Parameters
i_file - The contents of the source file to translate.
-
- [Supported file - types](https://cloud.ibm.com/docs/services/language-translator?topic=language-t - ranslator-document-translator-tutorial#supported-file-formats)
-
- Maximum file size: **20 MB**. + The contents of the source file to translate. The maximum file size for document + translation is 20 MB for service instances on the Standard, Advanced, and + Premium plans, and 2 MB for service instances on the Lite plan. For more + information, see [Supported file formats + (Beta)](https://cloud.ibm.com/docs/language-translator?topic=language-translato + r-document-translator-tutorial#supported-file-formats).
i_filename The filename for file.
i_file_content_type The content type of file.
i_model_id - The model to use for translation. `model_id` or both `source` and `target` are - required. + The model to use for translation. For example, `en-de` selects the IBM-provided + base model for English-to-German translation. A model ID overrides the `source` + and `target` parameters and is required if you use a custom model. If no model + ID is specified, you must specify at least a target language.
i_source - Language code that specifies the language of the source document. + Language code that specifies the language of the source document. If omitted, + the service derives the source language from the input text. The input must + contain sufficient text for the service to identify the language reliably.
i_target - Language code that specifies the target language for translation. + Language code that specifies the target language for translation. Required if + model ID is not specified.
i_document_id To use a previously submitted document as the source for a new translation, enter the `document_id` of the document.
e_response Service return value of type T_DOCUMENT_STATUS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_class_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_class_v1.html index 0c66769..daaa2d3 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_class_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_class_v1.html @@ -75,4 +75,4 @@
Parameters
e_response Service return value of type T_CLASSIFIER_LIST
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_undrstnd_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_undrstnd_v1.html index 79f493f..6aa2b5a 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_undrstnd_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_undrstnd_v1.html @@ -6,14 +6,15 @@ content.

You can create [custom - models](https://cloud.ibm.com/docs/services/natural-language-understanding?topi - c=natural-language-understanding-customizing) with Watson Knowledge Studio to - detect custom entities and relations in Natural Language Understanding.

Types

Visibility and LevelNameDocumentation
publict_analysis_results (structured type)

- Results of the analysis, organized by feature.

publict_analysis_results_metadata (structured type)

- Webpage metadata, such as the author and the title of the

- page.
publict_analysis_results_usage (structured type)

+ models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural + -language-understanding-customizing) with Watson Knowledge Studio to detect + custom entities and relations in Natural Language Understanding.

Types

Visibility and LevelNameDocumentation
publict_advanced_rules_model (structured type)

+ Advanced rules model.

publict_advanced_rules_model_list (structured type)

+ List of advanced rules models.

publict_advncd_rls_analysis_results type JSONOBJECT No documentation available.
publict_analysis_results (structured type)

+ Results of the analysis, organized by feature.

publict_analysis_results_usage (structured type)

API usage information for the request.

publict_author (structured type)

- The author of the analyzed content.

publict_categories_options (structured type)

+ The author of the analyzed content.

publict_base_advanced_rules_model (structured type)

+ Advanced rules model.

publict_categories_options (structured type)

Returns a five-level taxonomy of the content. The top three

categories are returned.

@@ -45,9 +46,9 @@ conveyed by the content. Emotion information can be returned for detected entities, keywords, or user-specified target phrases found in the text.
publict_emotion_scores (structured type) No documentation available.
publict_entities_options (structured type)

Identifies people, cities, organizations, and other entities

- in the content. See [Entity types and - subtypes](https://cloud.ibm.com/docs/services/natural-language-understanding?to - pic=natural-language-understanding-entity-types).
+ in the content. For more information, see [Entity types and + subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natur + al-language-understanding-entity-types).

Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported @@ -58,7 +59,8 @@ Analysis results for each requested feature.

publict_features_results_metadata (structured type)

Webpage metadata, such as the author and the title of the

page.
publict_feature_sentiment_results (structured type) No documentation available.
publict_feed (structured type)

- RSS or ATOM feed found on the webpage.

publict_keywords_options (structured type)

+ RSS or ATOM feed found on the webpage.

publict_file_and_metadata (structured type)

+ Metadata associated with this custom model.

publict_keywords_options (structured type)

Returns important keywords in the content.



Supported languages: English, French, German, Italian, Japanese, Korean, @@ -76,9 +78,10 @@ An object containing request parameters.

publict_relations_options (structured type)

Recognizes when two entities are related and identifies the

type of relation. For example, an `awardedTo` relation might connect the - entities "Nobel Prize" and "Albert Einstein". See [Relation - types](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - =natural-language-understanding-relations).
+ entities "Nobel Prize" and "Albert Einstein". For more + information, see [Relation + types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural- + language-understanding-relations).

Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and Portuguese custom models are also @@ -91,7 +94,7 @@ The object containing the actions and the objects the

actions act upon.
publict_semantic_roles_result_action (structured type)

The extracted action from the sentence.

publict_semantic_roles_result_object (structured type)

- The extracted object from the sentence.

publict_semantic_roles_subject (structured type) No documentation available.
publict_semantic_roles_verb (structured type) No documentation available.
publict_sentence_result (structured type) No documentation available.
publict_sentiment_options (structured type)

+ The extracted object from the sentence.

publict_semantic_roles_subject (structured type) No documentation available.
publict_semantic_roles_verb (structured type) No documentation available.
publict_sentence_result (structured type) No documentation available.
publict_sentiment_model (structured type) No documentation available.
publict_sentiment_options (structured type)

Analyzes the general sentiment of your content or the

sentiment toward specific target phrases. You can analyze sentiment for detected entities with `entities.sentiment` and for keywords with @@ -100,7 +103,12 @@ Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish.
publict_sentiment_result (structured type)

The sentiment of the content.

publict_smntc_roles_result_subject (structured type)

- The extracted subject from the sentence.

publict_syntax_options (structured type)

+ The extracted subject from the sentence.

publict_sntmnt_mdl_file_and_metadata (structured type)

+ Metadata associated with this custom model.

publict_summarization_options (structured type)

+ (Experimental) Returns a summary of content.


+
+ Supported languages: English only.
publict_summarization_result (structured type)

+ (Experimental) Summary of content.

publict_syntax_options (structured type)

Returns tokens and sentences from the input text.

publict_syntax_options_tokens (structured type)

Tokenization options.

publict_syntax_result (structured type)

Tokens and sentences returned from syntax analysis.

publict_targeted_emotion_results (structured type)

@@ -116,12 +124,13 @@ - Relations
- Semantic roles
- Sentiment
- - Syntax (Experimental).
+ - Syntax
+ - Summarization (Experimental)

If a language for the input text is not specified with the `language` parameter, the service [automatically detects the - language](https://cloud.ibm.com/docs/services/natural-language-understanding?to - pic=natural-language-understanding-detectable-languages). + language](https://cloud.ibm.com/docs/natural-language-understanding?topic=natur + al-language-understanding-detectable-languages).

Parameters
i_parameters An object containing request parameters. The `features` object and one of the @@ -139,11 +148,11 @@
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instanceget_appname redefinition 
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
list_models
importingi_accepttype STRING default 'application/json'
exportinge_responsetype T_LIST_MODELS_RESULTS
raisingzcx_ibmc_service_exception

List models

Lists Watson Knowledge Studio [custom entities and relations - models](https://cloud.ibm.com/docs/services/natural-language-understanding?topi - c=natural-language-understanding-customizing) that are deployed to your Natural - Language Understanding service. + models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural + -language-understanding-customizing) that are deployed to your Natural Language + Understanding service.
Parameters
e_response Service return value of type T_LIST_MODELS_RESULTS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_personal_insights_v3.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_personal_insights_v3.html index 7eb8ca8..7df4116 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_personal_insights_v3.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_personal_insights_v3.html @@ -1,10 +1,23 @@ Class ZCL_IBMC_PERSONAL_INSIGHTS_V3

Class ZCL_IBMC_PERSONAL_INSIGHTS_V3

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Personality Insights

- The IBM Watson™ Personality Insights service enables applications to - derive insights from social media, enterprise data, or other digital - communications. The service uses linguistic analytics to infer - individuals' intrinsic personality characteristics, including Big Five, - Needs, and Values, from digital communications such as email, text messages, - tweets, and forum posts.
+ IBM® will begin sunsetting IBM Watson™ Personality Insights on 1 + December 2020. For a period of one year from this date, you will still be able + to use Watson Personality Insights. However, as of 1 December 2021, the + offering will no longer be available.<br/><br/>As an alternative, + we encourage you to consider migrating to IBM Watson™ Natural Language + Understanding, a service on IBM Cloud® that uses deep learning to extract + data and insights from text such as keywords, categories, sentiment, emotion, + and syntax to provide insights for your business or industry. For more + information, see [About Natural Language + Understanding](https://cloud.ibm.com/docs/natural-language-understanding?topic= + natural-language-understanding-about).
+ {: deprecated}
+
+ The IBM Watson Personality Insights service enables applications to derive + insights from social media, enterprise data, or other digital communications. + The service uses linguistic analytics to infer individuals' intrinsic + personality characteristics, including Big Five, Needs, and Values, from + digital communications such as email, text messages, tweets, and forum + posts.

The service can automatically infer, from potentially noisy social media, portraits of individuals that reflect their personality characteristics. The @@ -214,4 +227,4 @@
e_response Service return value of type STRING
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service.html index 5fd606f..d1f1bd6 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service.html @@ -112,4 +112,4 @@ public instance
set_access_token
importingi_access_tokentype TS_ACCESS_TOKEN

Sets an access token explicitly.

Parameters
i_access_token Access token. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_arch.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_arch.html index 69ffed0..32334f9 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_arch.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_arch.html @@ -78,4 +78,4 @@
Parameters
i_client HTTP/REST client
it_form_part Table of form parts
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_ext.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_ext.html index a5381ab..98e9e8f 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_ext.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_ext.html @@ -42,4 +42,4 @@
Parameters
e_sdk_version_date Built data in format YYYYMMDD.
public instance
set_bearer_token
importingi_bearer_tokentype STRING

Method for internal use.

-
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_speech_to_text_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_speech_to_text_v1.html index 9b1b71a..bcc2faa 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_speech_to_text_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_speech_to_text_v1.html @@ -1,5 +1,5 @@ Class ZCL_IBMC_SPEECH_TO_TEXT_V1

Class ZCL_IBMC_SPEECH_TO_TEXT_V1

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Speech to Text

- The IBM® Speech to Text service provides APIs that use IBM's + The IBM Watson™ Speech to Text service provides APIs that use IBM's speech-recognition capabilities to produce transcripts of spoken audio. The service can transcribe speech from various languages and audio formats. In addition to basic transcription, the service can produce detailed information @@ -20,9 +20,10 @@ service also supports grammars. A grammar is a formal language specification that lets you restrict the phrases that the service can recognize.

- Language model customization is generally available for production use with most - supported languages. Acoustic model customization is beta functionality that is - available for all supported languages.

Types

Visibility and LevelNameDocumentation
publict_acoustic_model (structured type)

+ Language model customization and acoustic model customization are generally + available for production use with all language models that are generally + available. Grammars are beta functionality for all language models that support + language model customization.

Types

Visibility and LevelNameDocumentation
publict_acoustic_model (structured type)

Information about an existing custom acoustic model.

publict_acoustic_models (structured type)

Information about existing custom acoustic models.

publict_audio_details (structured type)

Information about an audio resource from a custom acoustic

@@ -112,14 +113,14 @@ that has the same name as an existing audio resource, set the `allow_overwrite` parameter to `true`; otherwise, the request fails.

- The method is asynchronous. It can take several seconds to complete depending on - the duration of the audio and, in the case of an archive file, the total number - of audio files being processed. The service returns a 201 response code if the - audio is valid. It then asynchronously analyzes the contents of the audio file - or files and automatically extracts information about the audio such as its - length, sampling rate, and encoding. You cannot submit requests to train or - upgrade the model until the service's analysis of all audio resources for - current requests completes.
+ The method is asynchronous. It can take several seconds or minutes to complete + depending on the duration of the audio and, in the case of an archive file, the + total number of audio files being processed. The service returns a 201 response + code if the audio is valid. It then asynchronously analyzes the contents of the + audio file or files and automatically extracts information about the audio such + as its length, sampling rate, and encoding. You cannot submit requests to train + or upgrade the model until the service's analysis of all audio resources + for current requests completes.

To determine the status of the service's analysis of the audio, use the **Get an audio resource** method to poll the status of the audio. The method @@ -264,19 +265,21 @@
The call returns an HTTP 201 response code if the corpus is valid. The service then asynchronously processes the contents of the corpus and automatically - extracts new words that it finds. This can take on the order of a minute or two - to complete depending on the total number of words and the number of new words - in the corpus, as well as the current load on the service. You cannot submit - requests to add additional resources to the custom model or to train the model - until the service's analysis of the corpus for the current request + extracts new words that it finds. This operation can take on the order of + minutes to complete depending on the total number of words and the number of + new words in the corpus, as well as the current load on the service. You cannot + submit requests to add additional resources to the custom model or to train the + model until the service's analysis of the corpus for the current request completes. Use the **List a corpus** method to check the status of the analysis.

The service auto-populates the model's words resource with words from the - corpus that are not found in its base vocabulary. These are referred to as - out-of-vocabulary (OOV) words. You can use the **List custom words** method to - examine the words resource. You can use other words method to eliminate typos - and modify how words are pronounced as needed.
+ corpus that are not found in its base vocabulary. These words are referred to + as out-of-vocabulary (OOV) words. After adding a corpus, you must validate the + words resource to ensure that each OOV word's definition is complete and + valid. You can use the **List custom words** method to examine the words + resource. You can use other words method to eliminate typos and modify how + words are pronounced as needed.

To add a corpus file that has the same name as an existing corpus, set the `allow_overwrite` parameter to `true`; otherwise, the request fails. @@ -294,12 +297,15 @@ directly.

**See also:**
+ * [Add a corpus to the custom language + model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC + reate#addCorpus)
* [Working with corpora](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corpora Words#workingCorpora)
- * [Add a corpus to the custom language - model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC - reate#addCorpus) + * [Validating a words + resource](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corpor + aWords#validateModel)
Parameters
i_customization_id The customization ID (GUID) of the custom language model that is to be used for @@ -350,12 +356,12 @@
The call returns an HTTP 201 response code if the grammar is valid. The service then asynchronously processes the contents of the grammar and automatically - extracts new words that it finds. This can take a few seconds to complete - depending on the size and complexity of the grammar, as well as the current - load on the service. You cannot submit requests to add additional resources to - the custom model or to train the model until the service's analysis of the - grammar for the current request completes. Use the **Get a grammar** method to - check the status of the analysis.
+ extracts new words that it finds. This operation can take a few seconds or + minutes to complete depending on the size and complexity of the grammar, as + well as the current load on the service. You cannot submit requests to add + additional resources to the custom model or to train the model until the + service's analysis of the grammar for the current request completes. Use + the **Get a grammar** method to check the status of the analysis.

The service populates the model's words resource with any word that is recognized by the grammar that is not found in the model's base @@ -449,7 +455,10 @@ Use the parameter for words that are difficult to pronounce, foreign words, acronyms, and so on. For example, you might specify that the word `IEEE` can sound like `i triple e`. You can specify a maximum of five sounds-like - pronunciations for a word.
+ pronunciations for a word. If you omit the `sounds_like` field, the service + attempts to set the field to its pronunciation of the word. It cannot generate + a pronunciation for all words, so you must review the word's definition to + ensure that it is complete and valid.
* The `display_as` field provides a different way of spelling the word in a transcript. Use the parameter when you want the word to appear different from its usual representation or from its spelling in training data. For example, @@ -463,12 +472,15 @@ add.

**See also:**
+ * [Add words to the custom language + model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC + reate#addWords)
* [Working with custom words](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWo rds#workingWords)
- * [Add words to the custom language - model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC - reate#addWords) + * [Validating a words + resource](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corpor + aWords#validateModel)
Parameters
i_customization_id The customization ID (GUID) of the custom language model that is to be used for @@ -509,7 +521,10 @@ Use the parameter for words that are difficult to pronounce, foreign words, acronyms, and so on. For example, you might specify that the word `IEEE` can sound like `i triple e`. You can specify a maximum of five sounds-like - pronunciations for a word.
+ pronunciations for a word. If you omit the `sounds_like` field, the service + attempts to set the field to its pronunciation of the word. It cannot generate + a pronunciation for all words, so you must review the word's definition to + ensure that it is complete and valid.
* The `display_as` field provides a different way of spelling the word in a transcript. Use the parameter when you want the word to appear different from its usual representation or from its spelling in training data. For example, @@ -541,12 +556,15 @@ as needed.

**See also:**
+ * [Add words to the custom language + model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC + reate#addWords)
* [Working with custom words](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWo rds#workingWords)
- * [Add words to the custom language - model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC - reate#addWords) + * [Validating a words + resource](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corpor + aWords#validateModel)
Parameters
i_customization_id The customization ID (GUID) of the custom language model that is to be used for @@ -619,7 +637,7 @@
e_response Service return value of type T_ACOUSTIC_MODEL
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
create_job
importingi_audiotype FILE
i_content_typetype STRING default 'application/octet-stream'
i_modeltype STRING default 'en-US_BroadbandModel'
i_callback_urltype STRING optional
i_eventstype STRING optional
i_user_tokentype STRING optional
i_results_ttltype INTEGER optional
i_language_customization_idtype STRING optional
i_acoustic_customization_idtype STRING optional
i_base_model_versiontype STRING optional
i_customization_weighttype DOUBLE optional
i_inactivity_timeouttype INTEGER optional
i_keywordstype TT_STRING optional
i_keywords_thresholdtype FLOAT optional
i_max_alternativestype INTEGER optional
i_word_alternatives_thresholdtype FLOAT optional
i_word_confidencetype BOOLEAN default C_BOOLEAN_FALSE
i_timestampstype BOOLEAN default C_BOOLEAN_FALSE
i_profanity_filtertype BOOLEAN default C_BOOLEAN_TRUE
i_smart_formattingtype BOOLEAN default C_BOOLEAN_FALSE
i_speaker_labelstype BOOLEAN default C_BOOLEAN_FALSE
i_customization_idtype STRING optional
i_grammar_nametype STRING optional
i_redactiontype BOOLEAN default C_BOOLEAN_FALSE
i_processing_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_processing_metrics_intervaltype FLOAT optional
i_audio_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_end_of_phrase_silence_timetype DOUBLE optional
i_splt_trnscrpt_at_phrase_endtype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_RECOGNITION_JOB
raisingzcx_ibmc_service_exception

Create a job

+
public instance
create_job
importingi_audiotype FILE
i_content_typetype STRING default 'application/octet-stream'
i_modeltype STRING default 'en-US_BroadbandModel'
i_callback_urltype STRING optional
i_eventstype STRING optional
i_user_tokentype STRING optional
i_results_ttltype INTEGER optional
i_language_customization_idtype STRING optional
i_acoustic_customization_idtype STRING optional
i_base_model_versiontype STRING optional
i_customization_weighttype DOUBLE optional
i_inactivity_timeouttype INTEGER optional
i_keywordstype TT_STRING optional
i_keywords_thresholdtype FLOAT optional
i_max_alternativestype INTEGER optional
i_word_alternatives_thresholdtype FLOAT optional
i_word_confidencetype BOOLEAN default C_BOOLEAN_FALSE
i_timestampstype BOOLEAN default C_BOOLEAN_FALSE
i_profanity_filtertype BOOLEAN default C_BOOLEAN_TRUE
i_smart_formattingtype BOOLEAN default C_BOOLEAN_FALSE
i_speaker_labelstype BOOLEAN default C_BOOLEAN_FALSE
i_customization_idtype STRING optional
i_grammar_nametype STRING optional
i_redactiontype BOOLEAN default C_BOOLEAN_FALSE
i_processing_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_processing_metrics_intervaltype FLOAT optional
i_audio_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_end_of_phrase_silence_timetype DOUBLE optional
i_splt_trnscrpt_at_phrase_endtype BOOLEAN default C_BOOLEAN_FALSE
i_speech_detector_sensitivitytype FLOAT optional
i_background_audio_suppressiontype FLOAT optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_RECOGNITION_JOB
raisingzcx_ibmc_service_exception

Create a job

Creates a job for a new asynchronous recognition request. The job is owned by the instance of the service whose credentials are used to create it. How you learn the status and results of a job depends on the parameters you include @@ -732,13 +750,14 @@ The format (MIME type) of the audio. For more information about specifying an audio format, see **Audio formats (content types)** in the method description.
i_model - The identifier of the model that is to be used for the recognition request. See - [Languages and + The identifier of the model that is to be used for the recognition request. + (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use + `ar-MS_BroadbandModel` instead.) See [Languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models#m odels).
i_callback_url A URL to which callback notifications are to be sent. The URL must already be - successfully white-listed by using the **Register a callback** method. You can + successfully allowlisted by using the **Register a callback** method. You can include the same callback URL with any number of job creation requests. Omit the parameter to poll the service for job completion and results.

@@ -833,9 +852,15 @@ An array of keyword strings to spot in the audio. Each keyword string can include one or more string tokens. Keywords are spotted only in the final results, not in interim hypotheses. If you specify any keywords, you must also - specify a keywords threshold. You can spot a maximum of 1000 keywords. Omit the - parameter or specify an empty array if you do not need to spot keywords. See - [Keyword + specify a keywords threshold. Omit the parameter or specify an empty array if + you do not need to spot keywords.
+
+ You can spot a maximum of 1000 keywords with a single request. A single keyword + can have a maximum length of 1024 characters, though the maximum effective + length for double-byte languages might be shorter. Keywords are + case-insensitive.
+
+ See [Keyword spotting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output #keyword_spotting).
i_keywords_threshold @@ -898,11 +923,9 @@ parameter to be `true`, regardless of whether you specify `false` for the parameter.

- **Note:** Applies to US English, Japanese, and Spanish (both broadband and - narrowband models) and UK English (narrowband model) transcription only. To - determine whether a language model supports speaker labels, you can also use - the **Get a model** method and check that the attribute `speaker_labels` is set - to `true`.
+ **Note:** Applies to US English, Australian English, German, Japanese, Korean, + and Spanish (both broadband and narrowband models) and UK English (narrowband + model) transcription only.

See [Speaker labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#s @@ -1003,6 +1026,36 @@ See [Split transcript at phrase end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#spli t_transcript). +
i_speech_detector_sensitivity + The sensitivity of speech activity detection that the service is to perform. Use + the parameter to suppress word insertions from music, coughing, and other + non-speech events. The service biases the audio it passes for speech + recognition by evaluating the input audio against prior models of speech and + non-speech activity.
+
+ Specify a value between 0.0 and 1.0:
+ * 0.0 suppresses all audio (no speech is transcribed).
+ * 0.5 (the default) provides a reasonable compromise for the level of + sensitivity.
+ * 1.0 suppresses no audio (speech detection sensitivity is disabled).
+
+ The values increase on a monotonic curve. See [Speech Activity + Detection](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-input + #detection). +
i_background_audio_suppression + The level to which the service is to suppress background audio based on its + volume to prevent it from being transcribed as speech. Use the parameter to + suppress side conversations or background noise.
+
+ Specify a value in the range of 0.0 to 1.0:
+ * 0.0 (the default) provides no suppression (background audio suppression is + disabled).
+ * 0.5 provides a reasonable level of audio suppression for general usage.
+ * 1.0 suppresses all audio (no audio is transcribed).
+
+ The values increase on a monotonic curve. See [Speech Activity + Detection](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-input + #detection).
e_response Service return value of type T_RECOGNITION_JOB
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. @@ -1144,10 +1197,15 @@ information was added. The method has no effect if no data is associated with the customer ID. You must issue the request with credentials for the same instance of the service that was used to associate the customer ID with the - data.
+ data. You associate a customer ID with data by passing the `X-Watson-Metadata` + header with a request that passes the data.

- You associate a customer ID with data by passing the `X-Watson-Metadata` header - with a request that passes the data.
+ **Note:** If you delete an instance of the service from the service console, all + data associated with that service instance is automatically deleted. This + includes all custom language models, corpora, grammars, and words; all custom + acoustic models and audio resources; all registered endpoints for the + asynchronous HTTP interface; and all data related to speech recognition + requests.

**See also:** [Information security](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-inform @@ -1298,7 +1356,8 @@
Parameters
i_model_id The identifier of the model in the form of its name from the output of the **Get - a model** method. + a model** method. (**Note:** The model `ar-AR_BroadbandModel` is deprecated; + use `ar-MS_BroadbandModel` instead.).
e_response Service return value of type T_SPEECH_MODEL
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. @@ -1337,9 +1396,14 @@
Parameters
i_language The identifier of the language for which custom language or custom acoustic - models are to be returned (for example, `en-US`). Omit the parameter to see all - custom language or custom acoustic models that are owned by the requesting - credentials. + models are to be returned. Omit the parameter to see all custom language or + custom acoustic models that are owned by the requesting credentials. (**Note:** + The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
+
+ To determine the languages for which customization is available, see [Language + support for + customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-c + ustomization#languageSupport).
e_response Service return value of type T_ACOUSTIC_MODELS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. @@ -1410,16 +1474,22 @@
Parameters
i_language The identifier of the language for which custom language or custom acoustic - models are to be returned (for example, `en-US`). Omit the parameter to see all - custom language or custom acoustic models that are owned by the requesting - credentials. + models are to be returned. Omit the parameter to see all custom language or + custom acoustic models that are owned by the requesting credentials. (**Note:** + The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
+
+ To determine the languages for which customization is available, see [Language + support for + customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-c + ustomization#languageSupport).
e_response Service return value of type T_LANGUAGE_MODELS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_models
importingi_accepttype STRING default 'application/json'
exportinge_responsetype T_SPEECH_MODELS
raisingzcx_ibmc_service_exception

List models

Lists all language models that are available for use with the service. The information includes the name of the model and its minimum sampling rate in - Hertz, among other things.
+ Hertz, among other things. The ordering of the list of models can change from + call to call; do not rely on an alphabetized or static list of models.

**See also:** [Languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models#m @@ -1466,7 +1536,7 @@
e_response Service return value of type T_WORDS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
recognize
importingi_audiotype FILE
i_content_typetype STRING default 'application/octet-stream'
i_modeltype STRING default 'en-US_BroadbandModel'
i_language_customization_idtype STRING optional
i_acoustic_customization_idtype STRING optional
i_base_model_versiontype STRING optional
i_customization_weighttype DOUBLE optional
i_inactivity_timeouttype INTEGER optional
i_keywordstype TT_STRING optional
i_keywords_thresholdtype FLOAT optional
i_max_alternativestype INTEGER optional
i_word_alternatives_thresholdtype FLOAT optional
i_word_confidencetype BOOLEAN default C_BOOLEAN_FALSE
i_timestampstype BOOLEAN default C_BOOLEAN_FALSE
i_profanity_filtertype BOOLEAN default C_BOOLEAN_TRUE
i_smart_formattingtype BOOLEAN default C_BOOLEAN_FALSE
i_speaker_labelstype BOOLEAN default C_BOOLEAN_FALSE
i_customization_idtype STRING optional
i_grammar_nametype STRING optional
i_redactiontype BOOLEAN default C_BOOLEAN_FALSE
i_audio_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_end_of_phrase_silence_timetype DOUBLE optional
i_splt_trnscrpt_at_phrase_endtype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SPEECH_RECOGNITION_RESULTS
raisingzcx_ibmc_service_exception

Recognize audio

+
public instance
recognize
importingi_audiotype FILE
i_content_typetype STRING default 'application/octet-stream'
i_modeltype STRING default 'en-US_BroadbandModel'
i_language_customization_idtype STRING optional
i_acoustic_customization_idtype STRING optional
i_base_model_versiontype STRING optional
i_customization_weighttype DOUBLE optional
i_inactivity_timeouttype INTEGER optional
i_keywordstype TT_STRING optional
i_keywords_thresholdtype FLOAT optional
i_max_alternativestype INTEGER optional
i_word_alternatives_thresholdtype FLOAT optional
i_word_confidencetype BOOLEAN default C_BOOLEAN_FALSE
i_timestampstype BOOLEAN default C_BOOLEAN_FALSE
i_profanity_filtertype BOOLEAN default C_BOOLEAN_TRUE
i_smart_formattingtype BOOLEAN default C_BOOLEAN_FALSE
i_speaker_labelstype BOOLEAN default C_BOOLEAN_FALSE
i_customization_idtype STRING optional
i_grammar_nametype STRING optional
i_redactiontype BOOLEAN default C_BOOLEAN_FALSE
i_audio_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_end_of_phrase_silence_timetype DOUBLE optional
i_splt_trnscrpt_at_phrase_endtype BOOLEAN default C_BOOLEAN_FALSE
i_speech_detector_sensitivitytype FLOAT optional
i_background_audio_suppressiontype FLOAT optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SPEECH_RECOGNITION_RESULTS
raisingzcx_ibmc_service_exception

Recognize audio

Sends audio and returns transcription results for a recognition request. You can pass a maximum of 100 MB and a minimum of 100 bytes of audio with a request. The service automatically detects the endianness of the incoming audio and, for @@ -1570,8 +1640,9 @@ The format (MIME type) of the audio. For more information about specifying an audio format, see **Audio formats (content types)** in the method description.
i_model - The identifier of the model that is to be used for the recognition request. See - [Languages and + The identifier of the model that is to be used for the recognition request. + (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use + `ar-MS_BroadbandModel` instead.) See [Languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models#m odels).
i_language_customization_id @@ -1633,9 +1704,15 @@ An array of keyword strings to spot in the audio. Each keyword string can include one or more string tokens. Keywords are spotted only in the final results, not in interim hypotheses. If you specify any keywords, you must also - specify a keywords threshold. You can spot a maximum of 1000 keywords. Omit the - parameter or specify an empty array if you do not need to spot keywords. See - [Keyword + specify a keywords threshold. Omit the parameter or specify an empty array if + you do not need to spot keywords.
+
+ You can spot a maximum of 1000 keywords with a single request. A single keyword + can have a maximum length of 1024 characters, though the maximum effective + length for double-byte languages might be shorter. Keywords are + case-insensitive.
+
+ See [Keyword spotting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output #keyword_spotting).
i_keywords_threshold @@ -1698,11 +1775,9 @@ parameter to be `true`, regardless of whether you specify `false` for the parameter.

- **Note:** Applies to US English, Japanese, and Spanish (both broadband and - narrowband models) and UK English (narrowband model) transcription only. To - determine whether a language model supports speaker labels, you can also use - the **Get a model** method and check that the attribute `speaker_labels` is set - to `true`.
+ **Note:** Applies to US English, Australian English, German, Japanese, Korean, + and Spanish (both broadband and narrowband models) and UK English (narrowband + model) transcription only.

See [Speaker labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#s @@ -1777,12 +1852,42 @@ See [Split transcript at phrase end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#spli t_transcript). +
i_speech_detector_sensitivity + The sensitivity of speech activity detection that the service is to perform. Use + the parameter to suppress word insertions from music, coughing, and other + non-speech events. The service biases the audio it passes for speech + recognition by evaluating the input audio against prior models of speech and + non-speech activity.
+
+ Specify a value between 0.0 and 1.0:
+ * 0.0 suppresses all audio (no speech is transcribed).
+ * 0.5 (the default) provides a reasonable compromise for the level of + sensitivity.
+ * 1.0 suppresses no audio (speech detection sensitivity is disabled).
+
+ The values increase on a monotonic curve. See [Speech Activity + Detection](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-input + #detection). +
i_background_audio_suppression + The level to which the service is to suppress background audio based on its + volume to prevent it from being transcribed as speech. Use the parameter to + suppress side conversations or background noise.
+
+ Specify a value in the range of 0.0 to 1.0:
+ * 0.0 (the default) provides no suppression (background audio suppression is + disabled).
+ * 0.5 provides a reasonable level of audio suppression for general usage.
+ * 1.0 suppresses all audio (no audio is transcribed).
+
+ The values increase on a monotonic curve. See [Speech Activity + Detection](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-input + #detection).
e_response Service return value of type T_SPEECH_RECOGNITION_RESULTS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
register_callback
importingi_callback_urltype STRING
i_user_secrettype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_REGISTER_STATUS
raisingzcx_ibmc_service_exception

Register a callback

Registers a callback URL with the service for use with subsequent asynchronous - recognition requests. The service attempts to register, or white-list, the + recognition requests. The service attempts to register, or allowlist, the callback URL if it is not already registered by sending a `GET` request to the callback URL. The service passes a random alphanumeric challenge string via the `challenge_string` parameter of the request. The request includes an `Accept` @@ -1797,9 +1902,9 @@ The service sends only a single `GET` request to the callback URL. If the service does not receive a reply with a response code of 200 and a body that echoes the challenge string sent by the service within five seconds, it does - not white-list the URL; it instead sends status code 400 in response to the + not allowlist the URL; it instead sends status code 400 in response to the **Register a callback** request. If the requested callback URL is already - white-listed, the service responds to the initial registration request with + allowlisted, the service responds to the initial registration request with response code 200.

If you specify a user secret with the request, the service uses it as a key to @@ -1820,7 +1925,7 @@
Parameters
i_callback_url An HTTP or HTTPS URL to which callback notifications are to be sent. To be - white-listed, the URL must successfully echo the challenge string during URL + allowlisted, the URL must successfully echo the challenge string during URL verification. During verification, the client can also check the signature that the service sends in the `X-Callback-Signature` header to verify the origin of the request. @@ -1877,14 +1982,14 @@ you train it. You must use credentials for the instance of the service that owns a model to train it.

- The training method is asynchronous. It can take on the order of minutes or - hours to complete depending on the total amount of audio data on which the - custom acoustic model is being trained and the current load on the service. - Typically, training a custom acoustic model takes approximately two to four - times the length of its audio data. The range of time depends on the model - being trained and the nature of the audio, such as whether the audio is clean - or noisy. The method returns an HTTP 200 response code to indicate that the - training process has begun.
+ The training method is asynchronous. Training time depends on the cumulative + amount of audio data that the custom acoustic model contains and the current + load on the service. When you train or retrain a model, the service uses all of + the model's audio data in the training. Training a custom acoustic model + takes approximately as long as the length of its cumulative audio data. For + example, it takes approximately 2 hours to train a model that contains a total + of 2 hours of audio. The method returns an HTTP 200 response code to indicate + that the training process has begun.

You can monitor the status of the training by using the **Get a custom acoustic model** method to poll the model's status. Use a loop to check the status @@ -1900,8 +2005,9 @@ training. Train with a custom language model if you have verbatim transcriptions of the audio files that you have added to the custom model or you have either corpora (text files) or a list of words that are relevant to - the contents of the audio files. Both of the custom models must be based on the - same version of the same base model for training to succeed.
+ the contents of the audio files. For training to succeed, both of the custom + models must be based on the same version of the same base model, and the custom + language model must be fully trained and available.

**See also:**
* [Train the custom acoustic @@ -1919,6 +2025,9 @@ model.
* The custom model contains less than 10 minutes or more than 200 hours of audio data.
+ * You passed a custom language model with the `custom_language_model_id` query + parameter that is not in the available state. A custom language model must be + fully trained and available to be used to train a custom acoustic model.
* You passed an incompatible custom language model with the `custom_language_model_id` query parameter. Both custom models must be based on the same version of the same base model.
@@ -1937,8 +2046,9 @@ been trained with verbatim transcriptions of the audio resources or that contains words that are relevant to the contents of the audio resources. The custom language model must be based on the same version of the same base model - as the custom acoustic model. The credentials specified with the request must - own both custom models. + as the custom acoustic model, and the custom language model must be fully + trained and available. The credentials specified with the request must own both + custom models.
e_response Service return value of type T_TRAINING_RESPONSE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. @@ -2014,7 +2124,7 @@ Service return value of type T_TRAINING_RESPONSE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
unregister_callback
importingi_callback_urltype STRING
raisingzcx_ibmc_service_exception

Unregister a callback

- Unregisters a callback URL that was previously white-listed with a **Register a + Unregisters a callback URL that was previously allowlisted with a **Register a callback** request for use with the asynchronous interface. Once unregistered, the URL can no longer be used with asynchronous recognition requests.

@@ -2065,7 +2175,8 @@ If the custom acoustic model was trained with a custom language model, the customization ID (GUID) of that custom language model. The custom language model must be upgraded before the custom acoustic model can be upgraded. The - credentials specified with the request must own both custom models. + custom language model must be fully trained and available. The credentials + specified with the request must own both custom models.
i_force If `true`, forces the upgrade of a custom acoustic model for which no input data has been modified since it was last trained. Use this parameter only to force @@ -2102,4 +2213,4 @@ the request. You must make the request with credentials for the instance of the service that owns the custom model.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_text_to_speech_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_text_to_speech_v1.html index de5a6ba..62d64e7 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_text_to_speech_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_text_to_speech_v1.html @@ -1,24 +1,28 @@ Class ZCL_IBMC_TEXT_TO_SPEECH_V1

Class ZCL_IBMC_TEXT_TO_SPEECH_V1

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Text to Speech

- The IBM® Text to Speech service provides APIs that use IBM's + The IBM Watson™ Text to Speech service provides APIs that use IBM's speech-synthesis capabilities to synthesize text into natural-sounding speech in a variety of languages, dialects, and voices. The service supports at least one male or female voice, sometimes both, for each language. The audio is streamed back to the client with minimal delay.

For speech synthesis, the service supports a synchronous HTTP Representational - State Transfer (REST) interface. It also supports a WebSocket interface that - provides both plain text and SSML input, including the SSML <mark> - element and word timings. SSML is an XML-based markup language that provides - text annotation for speech-synthesis applications.
+ State Transfer (REST) interface and a WebSocket interface. Both interfaces + support plain text and SSML input. SSML is an XML-based markup language that + provides text annotation for speech-synthesis applications. The WebSocket + interface also supports the SSML <code><mark></code> element + and word timings.

- The service also offers a customization interface. You can use the interface to - define sounds-like or phonetic translations for words. A sounds-like - translation consists of one or more words that, when combined, sound like the - word. A phonetic translation is based on the SSML phoneme format for - representing a word. You can specify a phonetic translation in standard - International Phonetic Alphabet (IPA) representation or in the proprietary IBM - Symbolic Phonetic Representation (SPR).

Types

Visibility and LevelNameDocumentation
publict_create_voice_model (structured type)

- Information about the new custom voice model.

publict_empty_response_body type JSONOBJECT

+ The service offers a customization interface that you can use to define + sounds-like or phonetic translations for words. A sounds-like translation + consists of one or more words that, when combined, sound like the word. A + phonetic translation is based on the SSML phoneme format for representing a + word. You can specify a phonetic translation in standard International Phonetic + Alphabet (IPA) representation or in the proprietary IBM Symbolic Phonetic + Representation (SPR). The Arabic, Chinese, Dutch, Australian English, and + Korean languages support only IPA.

Types

Visibility and LevelNameDocumentation
publict_create_custom_model (structured type)

+ Information about the new custom model.

publict_custom_model (structured type)

+ Information about an existing custom model.

publict_custom_models (structured type)

+ Information about existing custom models.

publict_empty_response_body type JSONOBJECT

The empty response from a request.

publict_error_model (structured type)

The error response from a failed request.

publict_pronunciation (structured type)

The pronunciation of the specified text.

publict_supported_features (structured type)

@@ -28,24 +32,22 @@ subset of SSML. SSML is an XML-based markup language that provides text annotation for speech-synthesis applications. Pass a maximum of 5 KB of input text.

publict_translation (structured type)

- Information about the translation for the specified text.

publict_update_voice_model (structured type)

- Information about the updated custom voice model.

publict_voice (structured type)

- Information about an available voice model.

publict_voices (structured type)

- Information about all available voice models.

publict_voice_model (structured type)

- Information about an existing custom voice model.

publict_voice_models (structured type)

- Information about existing custom voice models.

publict_word (structured type)

- Information about a word for the custom voice model.

publict_words (structured type)

+ Information about the translation for the specified text.

publict_update_custom_model (structured type)

+ Information about the updated custom model.

publict_voice (structured type)

+ Information about an available voice.

publict_voices (structured type)

+ Information about all available voices.

publict_word (structured type)

+ Information about a word for the custom model.

publict_words (structured type)

For the **Add custom words** method, one or more words that

- are to be added or updated for the custom voice model and the translation for - each specified word.
+ are to be added or updated for the custom model and the translation for each + specified word.

For the **List custom words** method, the words and their translations from the - custom voice model.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)

Map ABAP identifiers to service identifiers.

public staticc_required_fields (structured type)

List of required fields per type.

Methods

Visibility and LevelNameDocumentation
public instance
add_word
importingi_customization_idtype STRING
i_wordtype STRING
i_translationtype T_TRANSLATION
i_contenttypetype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Add a custom word

- Adds a single word and its translation to the specified custom voice model. - Adding a new translation for a word that already exists in a custom model - overwrites the word's existing translation. A custom model can contain no - more than 20,000 entries. You must use credentials for the instance of the - service that owns a model to add a word to it.
+ custom model.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)

Map ABAP identifiers to service identifiers.

public staticc_required_fields (structured type)

List of required fields per type.

Methods

Visibility and LevelNameDocumentation
public instance
add_word
importingi_customization_idtype STRING
i_wordtype STRING
i_translationtype T_TRANSLATION
i_contenttypetype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Add a custom word

+ Adds a single word and its translation to the specified custom model. Adding a + new translation for a word that already exists in a custom model overwrites the + word's existing translation. A custom model can contain no more than + 20,000 entries. You must use credentials for the instance of the service that + owns a model to add a word to it.

You can define sounds-like or phonetic translations for words. A sounds-like translation consists of one or more words that, when combined, sound like the @@ -61,8 +63,6 @@ <code><phoneme alphabet="ibm" ph="1gAstroEntxrYFXs"></phoneme></code>

- **Note:** This method is currently a beta release.
-
**See also:**
* [Adding a single word to a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor @@ -75,19 +75,19 @@ ustomIntro#customIntro)
Parameters
i_customization_id - The customization ID (GUID) of the custom voice model. You must make the request - with credentials for the instance of the service that owns the custom model. + The customization ID (GUID) of the custom model. You must make the request with + credentials for the instance of the service that owns the custom model.
i_word - The word that is to be added or updated for the custom voice model. + The word that is to be added or updated for the custom model.
i_translation The translation for the word that is to be added or updated.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
add_words
importingi_customization_idtype STRING
i_custom_wordstype T_WORDS
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Add custom words

- Adds one or more words and their translations to the specified custom voice - model. Adding a new translation for a word that already exists in a custom - model overwrites the word's existing translation. A custom model can - contain no more than 20,000 entries. You must use credentials for the instance - of the service that owns a model to add words to it.
+ Adds one or more words and their translations to the specified custom model. + Adding a new translation for a word that already exists in a custom model + overwrites the word's existing translation. A custom model can contain no + more than 20,000 entries. You must use credentials for the instance of the + service that owns a model to add words to it.

You can define sounds-like or phonetic translations for words. A sounds-like translation consists of one or more words that, when combined, sound like the @@ -103,8 +103,6 @@ <code><phoneme alphabet="ibm" ph="1gAstroEntxrYFXs"></phoneme></code>

- **Note:** This method is currently a beta release.
-
**See also:**
* [Adding multiple words to a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor @@ -117,29 +115,63 @@ ustomIntro#customIntro)
Parameters
i_customization_id - The customization ID (GUID) of the custom voice model. You must make the request - with credentials for the instance of the service that owns the custom model. + The customization ID (GUID) of the custom model. You must make the request with + credentials for the instance of the service that owns the custom model.
i_custom_words No documentation available.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
create_voice_model
importingi_create_voice_modeltype T_CREATE_VOICE_MODEL
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VOICE_MODEL
raisingzcx_ibmc_service_exception

Create a custom model

- Creates a new empty custom voice model. You must specify a name for the new - custom model. You can optionally specify the language and a description for the - new model. The model is owned by the instance of the service whose credentials - are used to create it.
-
- **Note:** This method is currently a beta release. The service does not support - voice model customization for the Arabic, Chinese, and Dutch languages.
+
public instance
create_custom_model
importingi_create_voice_modeltype T_CREATE_CUSTOM_MODEL
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_CUSTOM_MODEL
raisingzcx_ibmc_service_exception

Create a custom model

+ Creates a new empty custom model. You must specify a name for the new custom + model. You can optionally specify the language and a description for the new + model. The model is owned by the instance of the service whose credentials are + used to create it.

**See also:** [Creating a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod - els#cuModelsCreate). + els#cuModelsCreate).
+
+ ### Important voice updates
+
+ The service's voices underwent significant change on 2 December 2020.
+ * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now + neural instead of concatenative.
+ * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice + instead.
+ * The `ar-AR` language identifier cannot be used to create a custom model. Use + the `ar-MS` identifier instead.
+ * The standard concatenative voices for the following languages are now + deprecated: Brazilian Portuguese, United Kingdom and United States English, + French, German, Italian, Japanese, and Spanish (all dialects).
+ * The features expressive SSML, voice transformation SSML, and use of the + `volume` attribute of the `<prosody>` element are deprecated and are not + supported with any of the service's neural voices.
+ * All of the service's voices are now customizable and generally available + (GA) for production use.
+
+ The deprecated voices and features will continue to function for at least one + year but might be removed at a future date. You are encouraged to migrate to + the equivalent neural voices at your earliest convenience. For more information + about all voice updates, see the [2 December 2020 service + update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release- + notes#December2020) in the release notes.
Parameters
i_create_voice_model - A `CreateVoiceModel` object that contains information about the new custom voice + A `CreateCustomModel` object that contains information about the new custom model.
e_response - Service return value of type T_VOICE_MODEL + Service return value of type T_CUSTOM_MODEL +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
delete_custom_model
importingi_customization_idtype STRING
raisingzcx_ibmc_service_exception

Delete a custom model

+ Deletes the specified custom model. You must use credentials for the instance of + the service that owns a model to delete it.
+
+ **See also:** [Deleting a custom + model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod + els#cuModelsDelete). + +
Parameters
i_customization_id + The customization ID (GUID) of the custom model. You must make the request with + credentials for the instance of the service that owns the custom model.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_user_data
importingi_customer_idtype STRING
raisingzcx_ibmc_service_exception

Delete labeled data

Deletes all data that is associated with a specified customer ID. The method @@ -147,10 +179,13 @@ information was added. The method has no effect if no data is associated with the customer ID. You must issue the request with credentials for the same instance of the service that was used to associate the customer ID with the - data.
+ data. You associate a customer ID with data by passing the `X-Watson-Metadata` + header with a request that passes the data.

- You associate a customer ID with data by passing the `X-Watson-Metadata` header - with a request that passes the data.
+ **Note:** If you delete an instance of the service from the service console, all + data associated with that service instance is automatically deleted. This + includes all custom models and word/translation pairs, and all data related to + speech synthesis requests.

**See also:** [Information security](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-inform @@ -159,182 +194,208 @@
Parameters
i_customer_id The customer ID for which all data is to be deleted.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
delete_voice_model
importingi_customization_idtype STRING
raisingzcx_ibmc_service_exception

Delete a custom model

- Deletes the specified custom voice model. You must use credentials for the - instance of the service that owns a model to delete it.
-
- **Note:** This method is currently a beta release.
-
- **See also:** [Deleting a custom - model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod - els#cuModelsDelete). - -
Parameters
i_customization_id - The customization ID (GUID) of the custom voice model. You must make the request - with credentials for the instance of the service that owns the custom model. -
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_word
importingi_customization_idtype STRING
i_wordtype STRING
raisingzcx_ibmc_service_exception

Delete a custom word

- Deletes a single word from the specified custom voice model. You must use - credentials for the instance of the service that owns a model to delete its - words.
-
- **Note:** This method is currently a beta release.
+ Deletes a single word from the specified custom model. You must use credentials + for the instance of the service that owns a model to delete its words.

**See also:** [Deleting a word from a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor ds#cuWordDelete).
Parameters
i_customization_id - The customization ID (GUID) of the custom voice model. You must make the request - with credentials for the instance of the service that owns the custom model. + The customization ID (GUID) of the custom model. You must make the request with + credentials for the instance of the service that owns the custom model.
i_word - The word that is to be deleted from the custom voice model. + The word that is to be deleted from the custom model.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instanceget_appname redefinition 
public instance
get_pronunciation
importingi_texttype STRING
i_voicetype STRING default 'en-US_MichaelVoice'
i_formattype STRING default 'ipa'
i_customization_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_PRONUNCIATION
raisingzcx_ibmc_service_exception

Get pronunciation

+
public instanceget_appname redefinition public instance
get_custom_model
importingi_customization_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_CUSTOM_MODEL
raisingzcx_ibmc_service_exception

Get a custom model

+ Gets all information about a specified custom model. In addition to metadata + such as the name and description of the custom model, the output includes the + words and their translations as defined in the model. To see just the metadata + for a model, use the **List custom models** method.
+
+ **See also:** [Querying a custom + model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod + els#cuModelsQuery). + +
Parameters
i_customization_id + The customization ID (GUID) of the custom model. You must make the request with + credentials for the instance of the service that owns the custom model. +
e_response + Service return value of type T_CUSTOM_MODEL +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
get_pronunciation
importingi_texttype STRING
i_voicetype STRING default 'en-US_MichaelV3Voice'
i_formattype STRING default 'ipa'
i_customization_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_PRONUNCIATION
raisingzcx_ibmc_service_exception

Get pronunciation

Gets the phonetic pronunciation for the specified word. You can request the pronunciation for a specific format. You can also request the pronunciation for a specific voice to see the default translation for the language of that voice - or for a specific custom voice model to see the translation for that voice - model.
-
- **Note:** This method is currently a beta release. The method does not support - the Arabic, Chinese, and Dutch languages.
+ or for a specific custom model to see the translation for that model.

**See also:** [Querying a word from a language](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-custom - Words#cuWordsQueryLanguage). + Words#cuWordsQueryLanguage).
+
+ ### Important voice updates
+
+ The service's voices underwent significant change on 2 December 2020.
+ * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now + neural instead of concatenative.
+ * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice + instead.
+ * The `ar-AR` language identifier cannot be used to create a custom model. Use + the `ar-MS` identifier instead.
+ * The standard concatenative voices for the following languages are now + deprecated: Brazilian Portuguese, United Kingdom and United States English, + French, German, Italian, Japanese, and Spanish (all dialects).
+ * The features expressive SSML, voice transformation SSML, and use of the + `volume` attribute of the `<prosody>` element are deprecated and are not + supported with any of the service's neural voices.
+ * All of the service's voices are now customizable and generally available + (GA) for production use.
+
+ The deprecated voices and features will continue to function for at least one + year but might be removed at a future date. You are encouraged to migrate to + the equivalent neural voices at your earliest convenience. For more information + about all voice updates, see the [2 December 2020 service + update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release- + notes#December2020) in the release notes.
Parameters
i_text The word for which the pronunciation is requested.
i_voice A voice that specifies the language in which the pronunciation is to be returned. All voices for the same language (for example, `en-US`) return the - same translation. + same translation. For more information about specifying a voice, see + **Important voice updates** in the method description.
i_format - The phoneme format in which to return the pronunciation. Omit the parameter to - obtain the pronunciation in the default format. + The phoneme format in which to return the pronunciation. The Arabic, Chinese, + Dutch, Australian English, and Korean languages support only IPA. Omit the + parameter to obtain the pronunciation in the default format.
i_customization_id - The customization ID (GUID) of a custom voice model for which the pronunciation - is to be returned. The language of a specified custom model must match the - language of the specified voice. If the word is not defined in the specified - custom model, the service returns the default translation for the custom - model's language. You must make the request with credentials for the - instance of the service that owns the custom model. Omit the parameter to see - the translation for the specified voice with no customization. + The customization ID (GUID) of a custom model for which the pronunciation is to + be returned. The language of a specified custom model must match the language + of the specified voice. If the word is not defined in the specified custom + model, the service returns the default translation for the custom model's + language. You must make the request with credentials for the instance of the + service that owns the custom model. Omit the parameter to see the translation + for the specified voice with no customization.
e_response Service return value of type T_PRONUNCIATION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instanceget_request_prop redefinition public instanceget_sdk_version_date redefinition public instance
get_voice
importingi_voicetype STRING
i_customization_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VOICE
raisingzcx_ibmc_service_exception

Get a voice

Gets information about the specified voice. The information includes the name, language, gender, and other details about the voice. Specify a customization ID - to obtain information for a custom voice model that is defined for the language - of the specified voice. To list information about all available voices, use the + to obtain information for a custom model that is defined for the language of + the specified voice. To list information about all available voices, use the **List voices** method.

**See also:** [Listing a specific voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#li - stVoice). + stVoice).
+
+ ### Important voice updates
+
+ The service's voices underwent significant change on 2 December 2020.
+ * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now + neural instead of concatenative.
+ * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice + instead.
+ * The `ar-AR` language identifier cannot be used to create a custom model. Use + the `ar-MS` identifier instead.
+ * The standard concatenative voices for the following languages are now + deprecated: Brazilian Portuguese, United Kingdom and United States English, + French, German, Italian, Japanese, and Spanish (all dialects).
+ * The features expressive SSML, voice transformation SSML, and use of the + `volume` attribute of the `<prosody>` element are deprecated and are not + supported with any of the service's neural voices.
+ * All of the service's voices are now customizable and generally available + (GA) for production use.
+
+ The deprecated voices and features will continue to function for at least one + year but might be removed at a future date. You are encouraged to migrate to + the equivalent neural voices at your earliest convenience. For more information + about all voice updates, see the [2 December 2020 service + update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release- + notes#December2020) in the release notes.
Parameters
i_voice - The voice for which information is to be returned. + The voice for which information is to be returned. For more information about + specifying a voice, see **Important voice updates** in the method description.
i_customization_id - The customization ID (GUID) of a custom voice model for which information is to - be returned. You must make the request with credentials for the instance of the + The customization ID (GUID) of a custom model for which information is to be + returned. You must make the request with credentials for the instance of the service that owns the custom model. Omit the parameter to see information about the specified voice with no customization.
e_response Service return value of type T_VOICE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
get_voice_model
importingi_customization_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VOICE_MODEL
raisingzcx_ibmc_service_exception

Get a custom model

- Gets all information about a specified custom voice model. In addition to - metadata such as the name and description of the voice model, the output - includes the words and their translations as defined in the model. To see just - the metadata for a voice model, use the **List custom models** method.
-
- **Note:** This method is currently a beta release.
-
- **See also:** [Querying a custom - model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod - els#cuModelsQuery). - -
Parameters
i_customization_id - The customization ID (GUID) of the custom voice model. You must make the request - with credentials for the instance of the service that owns the custom model. -
e_response - Service return value of type T_VOICE_MODEL -
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_word
importingi_customization_idtype STRING
i_wordtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRANSLATION
raisingzcx_ibmc_service_exception

Get a custom word

Gets the translation for a single word from the specified custom model. The output shows the translation as it is defined in the model. You must use credentials for the instance of the service that owns a model to list its words.

- **Note:** This method is currently a beta release.
-
**See also:** [Querying a single word from a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor ds#cuWordQueryModel).
Parameters
i_customization_id - The customization ID (GUID) of the custom voice model. You must make the request - with credentials for the instance of the service that owns the custom model. + The customization ID (GUID) of the custom model. You must make the request with + credentials for the instance of the service that owns the custom model.
i_word - The word that is to be queried from the custom voice model. + The word that is to be queried from the custom model.
e_response Service return value of type T_TRANSLATION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_voices
importingi_accepttype STRING default 'application/json'
exportinge_responsetype T_VOICES
raisingzcx_ibmc_service_exception

List voices

- Lists all voices available for use with the service. The information includes - the name, language, gender, and other details about the voice. To see - information about a specific voice, use the **Get a voice** method.
-
- **See also:** [Listing all available - voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#l - istVoices). - -
Parameters
e_response - Service return value of type T_VOICES -
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_voice_models
importingi_languagetype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VOICE_MODELS
raisingzcx_ibmc_service_exception

List custom models

- Lists metadata such as the name and description for all custom voice models that - are owned by an instance of the service. Specify a language to list the voice +
public instance
list_custom_models
importingi_languagetype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_CUSTOM_MODELS
raisingzcx_ibmc_service_exception

List custom models

+ Lists metadata such as the name and description for all custom models that are + owned by an instance of the service. Specify a language to list the custom models for that language only. To see the words in addition to the metadata for - a specific voice model, use the **List a custom model** method. You must use + a specific custom model, use the **List a custom model** method. You must use credentials for the instance of the service that owns a model to list information about it.

- **Note:** This method is currently a beta release.
-
**See also:** [Querying all custom models](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMo dels#cuModelsQueryAll).
Parameters
i_language - The language for which custom voice models that are owned by the requesting - credentials are to be returned. Omit the parameter to see all custom voice - models that are owned by the requester. + The language for which custom models that are owned by the requesting + credentials are to be returned. Omit the parameter to see all custom models + that are owned by the requester.
e_response - Service return value of type T_VOICE_MODELS + Service return value of type T_CUSTOM_MODELS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
list_words
importingi_customization_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORDS
raisingzcx_ibmc_service_exception

List custom words

- Lists all of the words and their translations for the specified custom voice - model. The output shows the translations as they are defined in the model. You - must use credentials for the instance of the service that owns a model to list - its words.
+
public instance
list_voices
importingi_accepttype STRING default 'application/json'
exportinge_responsetype T_VOICES
raisingzcx_ibmc_service_exception

List voices

+ Lists all voices available for use with the service. The information includes + the name, language, gender, and other details about the voice. The ordering of + the list of voices can change from call to call; do not rely on an alphabetized + or static list of voices. To see information about a specific voice, use the + **Get a voice** method.

- **Note:** This method is currently a beta release.
+ **See also:** [Listing all available + voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#l + istVoices). + +
Parameters
e_response + Service return value of type T_VOICES +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
list_words
importingi_customization_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORDS
raisingzcx_ibmc_service_exception

List custom words

+ Lists all of the words and their translations for the specified custom model. + The output shows the translations as they are defined in the model. You must + use credentials for the instance of the service that owns a model to list its + words.

**See also:** [Querying all words from a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor ds#cuWordsQueryModel).
Parameters
i_customization_id - The customization ID (GUID) of the custom voice model. You must make the request - with credentials for the instance of the service that owns the custom model. + The customization ID (GUID) of the custom model. You must make the request with + credentials for the instance of the service that owns the custom model.
e_response Service return value of type T_WORDS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
synthesize
importingi_texttype T_TEXT
i_accepttype STRING default 'audio/ogg;codecs=opus'
i_voicetype STRING default 'en-US_MichaelVoice'
i_customization_idtype STRING optional
i_contenttypetype STRING default 'application/json'
exportinge_responsetype FILE
raisingzcx_ibmc_service_exception

Synthesize audio

+
public instance
synthesize
importingi_texttype T_TEXT
i_accepttype STRING default 'audio/ogg;codecs=opus'
i_voicetype STRING default 'en-US_MichaelV3Voice'
i_customization_idtype STRING optional
i_contenttypetype STRING default 'application/json'
exportinge_responsetype FILE
raisingzcx_ibmc_service_exception

Synthesize audio

Synthesizes text to audio that is spoken in the specified voice. The service bases its understanding of the language for the input text on the specified voice. Use a voice that matches the language of the input text.
@@ -399,6 +460,31 @@ formats](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-audioFo rmats#audioFormats).

+ ### Important voice updates
+
+ The service's voices underwent significant change on 2 December 2020.
+ * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now + neural instead of concatenative.
+ * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice + instead.
+ * The `ar-AR` language identifier cannot be used to create a custom model. Use + the `ar-MS` identifier instead.
+ * The standard concatenative voices for the following languages are now + deprecated: Brazilian Portuguese, United Kingdom and United States English, + French, German, Italian, Japanese, and Spanish (all dialects).
+ * The features expressive SSML, voice transformation SSML, and use of the + `volume` attribute of the `<prosody>` element are deprecated and are not + supported with any of the service's neural voices.
+ * All of the service's voices are now customizable and generally available + (GA) for production use.
+
+ The deprecated voices and features will continue to function for at least one + year but might be removed at a future date. You are encouraged to migrate to + the equivalent neural voices at your earliest convenience. For more information + about all voice updates, see the [2 December 2020 service + update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release- + notes#December2020) in the release notes.
+
### Warning messages

If a request includes invalid query parameters, the service returns a @@ -417,24 +503,24 @@ about specifying an audio format, see **Audio formats (accept types)** in the method description.
i_voice - The voice to use for synthesis. + The voice to use for synthesis. For more information about specifying a voice, + see **Important voice updates** in the method description. i_customization_id - The customization ID (GUID) of a custom voice model to use for the synthesis. If - a custom voice model is specified, it is guaranteed to work only if it matches - the language of the indicated voice. You must make the request with credentials - for the instance of the service that owns the custom model. Omit the parameter - to use the specified voice with no customization. + The customization ID (GUID) of a custom model to use for the synthesis. If a + custom model is specified, it works only if it matches the language of the + indicated voice. You must make the request with credentials for the instance of + the service that owns the custom model. Omit the parameter to use the specified + voice with no customization. e_response Service return value of type FILE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instance
update_voice_model
importingi_customization_idtype STRING
i_update_voice_modeltype T_UPDATE_VOICE_MODEL
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Update a custom model

- Updates information for the specified custom voice model. You can update - metadata such as the name and description of the voice model. You can also - update the words in the model and their translations. Adding a new translation - for a word that already exists in a custom model overwrites the word's - existing translation. A custom model can contain no more than 20,000 entries. - You must use credentials for the instance of the service that owns a model to - update it.
+
public instance
update_custom_model
importingi_customization_idtype STRING
i_update_voice_modeltype T_UPDATE_CUSTOM_MODEL
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception

Update a custom model

+ Updates information for the specified custom model. You can update metadata such + as the name and description of the model. You can also update the words in the + model and their translations. Adding a new translation for a word that already + exists in a custom model overwrites the word's existing translation. A + custom model can contain no more than 20,000 entries. You must use credentials + for the instance of the service that owns a model to update it.

You can define sounds-like or phonetic translations for words. A sounds-like translation consists of one or more words that, when combined, sound like the @@ -450,8 +536,6 @@ <code><phoneme alphabet="ibm" ph="1gAstroEntxrYFXs"></phoneme></code>

- **Note:** This method is currently a beta release.
-
**See also:**
* [Updating a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod @@ -464,10 +548,10 @@ ustomIntro#customIntro)
Parameters
i_customization_id - The customization ID (GUID) of the custom voice model. You must make the request - with credentials for the instance of the service that owns the custom model. + The customization ID (GUID) of the custom model. You must make the request with + credentials for the instance of the service that owns the custom model.
i_update_voice_model - An `UpdateVoiceModel` object that contains information that is to be updated for - the custom voice model. + An `UpdateCustomModel` object that contains information that is to be updated + for the custom model.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_tone_analyzer_v3.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_tone_analyzer_v3.html index 3084683..475c2b7 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_tone_analyzer_v3.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_tone_analyzer_v3.html @@ -119,4 +119,4 @@ e_response Service return value of type T_UTTERANCE_ANALYSES
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_util.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_util.html index 984577b..7724d27 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_util.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_util.html @@ -33,4 +33,4 @@
Parameters
i_timestamp Timestamp (UTC).
i_timezone Time zone
e_timestamp Timestamp in give time zone. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v3.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v3.html index 2842bd3..a1754f8 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v3.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v3.html @@ -1,8 +1,14 @@ Class ZCL_IBMC_VISUAL_RECOGNITION_V3

Class ZCL_IBMC_VISUAL_RECOGNITION_V3

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Visual Recognition

- The IBM Watson™ Visual Recognition service uses deep learning algorithms - to identify scenes and objects in images that you upload to the service. You - can create and train a custom classifier to identify subjects that suit your - needs.

Types

Visibility and LevelNameDocumentation
publict_class (structured type)

+ IBM Watson™ Visual Recognition is discontinued. Existing instances are + supported until 1 December 2021, but as of 7 January 2021, you can't + create instances. Any instance that is provisioned on 1 December 2021 will be + deleted.
+ {: deprecated}
+
+ The IBM Watson Visual Recognition service uses deep learning algorithms to + identify scenes and objects in images that you upload to the service. You can + create and train a custom classifier to identify subjects that suit your needs. +

Types

Visibility and LevelNameDocumentation
publict_class (structured type)

A category within a classifier.

publict_classified_image (structured type)

Results for one image.

publict_classified_images (structured type)

Results for all images.

publict_classifier (structured type)

@@ -215,4 +221,4 @@

e_response Service return value of type T_CLASSIFIER
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v4.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v4.html index b547fa9..d3c7a9f 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v4.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v4.html @@ -1,13 +1,20 @@ Class ZCL_IBMC_VISUAL_RECOGNITION_V4

Class ZCL_IBMC_VISUAL_RECOGNITION_V4

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Visual Recognition v4

- Provide images to the IBM Watson™ Visual Recognition service for analysis. - The service detects objects based on a set of images with training data.

Types

Visibility and LevelNameDocumentation
publict_analyze_response (structured type)

+ IBM Watson™ Visual Recognition is discontinued. Existing instances are + supported until 1 December 2021, but as of 7 January 2021, you can't + create instances. Any instance that is provisioned on 1 December 2021 will be + deleted.
+ {: deprecated}
+
+ Provide images to the IBM Watson Visual Recognition service for analysis. The + service detects objects based on a set of images with training data.

Types

Visibility and LevelNameDocumentation
publict_analyze_response (structured type)

Results for all images.

publict_base_collection (structured type)

Base details about a collection.

publict_base_object (structured type)

Details about an object and its location.

publict_base_training_data_objects (structured type)

Container for the training data.

publict_collection (structured type)

Details about a collection.

publict_collections_list (structured type)

A container for the list of collections.

publict_collection_objects (structured type)

- The objects in a collection that are detected in an image.

publict_detected_objects (structured type)

+ The objects in a collection that are detected in an image.

publict_collection_training_status (structured type)

+ Training status information for the collection.

publict_detected_objects (structured type)

Container for the list of collections that have objects

detected in an image.
publict_empty type JSONOBJECT

Empty response.

publict_error (structured type)

@@ -23,7 +30,8 @@ List of images.

publict_inline_object (structured type) No documentation available.
publict_inline_object1 (structured type) No documentation available.
publict_jpeg_image type FILE

A file returned in the response.

publict_location (structured type)

Defines the location of the bounding box around the object.

publict_object_detail (structured type)

- Details about an object in the collection.

publict_object_metadata (structured type)

+ Details about an object in the collection.

publict_object_detail_location (structured type)

+ Defines the location of the bounding box around the object.

publict_object_metadata (structured type)

Basic information about an object.

publict_object_metadata_list (structured type)

List of objects.

publict_object_training_status (structured type)

Training status for the objects in the collection.

publict_training_data_object (structured type)

@@ -205,6 +213,25 @@

e_response Service return value of type FILE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
get_model_file
importingi_collection_idtype STRING
i_featuretype STRING
i_model_formattype STRING
i_accepttype STRING default 'application/octet-stream'
exportinge_responsetype FILE
raisingzcx_ibmc_service_exception

Get a model

+ Download a model that you can deploy to detect objects in images. The collection + must include a generated model, which is indicated in the response for the + collection details as `"rscnn_ready": true`. If the value is `false`, + train or retrain the collection to generate the model.
+
+ Currently, the model format is specific to Android apps. For more information + about how to deploy the model to your app, see the [Watson Visual Recognition + on Android](https://github.com/matt-ny/rscnn) project in GitHub. + +
Parameters
i_collection_id + The identifier of the collection. +
i_feature + The feature for the model. +
i_model_format + The format of the returned model. +
e_response + Service return value of type FILE +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_object_metadata
importingi_collection_idtype STRING
i_objecttype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_OBJECT_METADATA
raisingzcx_ibmc_service_exception

Get object metadata

Get the number of bounding boxes for a single object in a collection. @@ -215,7 +242,7 @@
e_response Service return value of type T_OBJECT_METADATA
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
public instanceget_request_prop redefinition public instanceget_sdk_version_date redefinition public instance
get_training_usage
importingi_start_timetype STRING optional
i_end_timetype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRAINING_EVENTS
raisingzcx_ibmc_service_exception

Get training usage

+
public instanceget_request_prop redefinition public instanceget_sdk_version_date redefinition public instance
get_training_usage
importingi_start_timetype DATE optional
i_end_timetype DATE optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRAINING_EVENTS
raisingzcx_ibmc_service_exception

Get training usage

Information about the completed training events. You can use this information to determine how close you are to the training limits for the month. @@ -289,4 +316,4 @@
e_response Service return value of type T_UPDATE_OBJECT_METADATA
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcx_ibmc_service_exception.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcx_ibmc_service_exception.html index fa49b9c..14e8b20 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcx_ibmc_service_exception.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcx_ibmc_service_exception.html @@ -1 +1 @@ -Class ZCX_IBMC_SERVICE_EXCEPTION

Class ZCX_IBMC_SERVICE_EXCEPTION

public inheriting from CX_STATIC_CHECK final create public

Documentation

IBM Cloud Service Exception

Interfaces

if_t100_dyn_msg
if_t100_message

Attributes

Visibility and LevelNameDocumentation
public instancep_http_reason type STRING  
public instancep_http_status type STRING  
public instancep_msg_json type STRING  

Methods

Visibility and LevelNameDocumentation
public instance
constructor
importingtextidlike IF_T100_MESSAGE=>T100KEY optional
previouslike PREVIOUS optional
p_msg_jsontype STRING optional
p_http_statustype STRING optional
p_http_reasontype STRING optional
CONSTRUCTOR
public instanceif_message~get_longtext redefinition 
public instanceif_message~get_text redefinition 
\ No newline at end of file +Class ZCX_IBMC_SERVICE_EXCEPTION

Class ZCX_IBMC_SERVICE_EXCEPTION

public inheriting from CX_STATIC_CHECK final create public

Documentation

IBM Cloud Service Exception

Interfaces

if_t100_dyn_msg
if_t100_message

Attributes

Visibility and LevelNameDocumentation
public instancep_http_reason type STRING  
public instancep_http_status type STRING  
public instancep_msg_json type STRING  

Methods

Visibility and LevelNameDocumentation
public instance
constructor
importingtextidlike IF_T100_MESSAGE=>T100KEY optional
previouslike PREVIOUS optional
p_msg_jsontype STRING optional
p_http_statustype STRING optional
p_http_reasontype STRING optional
CONSTRUCTOR
public instanceif_message~get_longtext redefinition 
public instanceif_message~get_text redefinition 
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/interfaces/zif_ibmc_service_arch.html b/docs/ABAPDoc/abapdoc/zibmc/interfaces/zif_ibmc_service_arch.html index 73704a7..83e31af 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/interfaces/zif_ibmc_service_arch.html +++ b/docs/ABAPDoc/abapdoc/zibmc/interfaces/zif_ibmc_service_arch.html @@ -1 +1 @@ -Interface ZIF_IBMC_SERVICE_ARCH

Interface ZIF_IBMC_SERVICE_ARCH

public

Documentation

IBM Watson SDK Platform-specifics

Types

Visibility and LevelNameDocumentation
publicboolean (typing) 
publicchar (typing) 
publicts_access_token (structured type) 
publicts_form_part (structured type) 
publicts_header (structured type) 
publicts_http_status (structured type) 
publicts_request_prop (structured type) 
publicts_url (structured type) 
publictt_form_part TYPE standard table of TS_FORM_PART with non-unique default key 
publictt_header TYPE standard table of ts_header with non-unique default key 
publictt_string TYPE standard table of string with non-unique default key 
publicty_ssl_id (typing) 
publicty_timezone (typing) 

Constants

Visibility and LevelNameDocumentation
public staticc_datatype (structured type)  
public staticc_header_accept type STRING value 'Accept' 
public staticc_header_content_disposition type STRING value 'Content-Disposition' 
public staticc_header_content_type type STRING value 'Content-Type' 
public staticc_mediatype (structured type)  
public staticc_method_create type CHAR value 'c' 
public staticc_method_delete type CHAR value 'd' 
public staticc_method_get type CHAR value 'g' 
public staticc_method_post type CHAR value 'p' 
public staticc_method_put type CHAR value 'u' 
\ No newline at end of file +Interface ZIF_IBMC_SERVICE_ARCH

Interface ZIF_IBMC_SERVICE_ARCH

public

Documentation

IBM Watson SDK Platform-specifics

Types

Visibility and LevelNameDocumentation
publicboolean (typing) 
publicchar (typing) 
publicts_access_token (structured type) 
publicts_form_part (structured type) 
publicts_header (structured type) 
publicts_http_status (structured type) 
publicts_request_prop (structured type) 
publicts_url (structured type) 
publictt_form_part TYPE standard table of TS_FORM_PART with non-unique default key 
publictt_header TYPE standard table of ts_header with non-unique default key 
publictt_string TYPE standard table of string with non-unique default key 
publicty_ssl_id (typing) 
publicty_timezone (typing) 

Constants

Visibility and LevelNameDocumentation
public staticc_datatype (structured type)  
public staticc_header_accept type STRING value 'Accept' 
public staticc_header_content_disposition type STRING value 'Content-Disposition' 
public staticc_header_content_type type STRING value 'Content-Type' 
public staticc_mediatype (structured type)  
public staticc_method_create type CHAR value 'c' 
public staticc_method_delete type CHAR value 'd' 
public staticc_method_get type CHAR value 'g' 
public staticc_method_post type CHAR value 'p' 
public staticc_method_put type CHAR value 'u' 
\ No newline at end of file diff --git a/docs/ABAPDoc/htmldesign/stylesheet.css b/docs/ABAPDoc/htmldesign/stylesheet.css index 94a261c..30680b5 100644 --- a/docs/ABAPDoc/htmldesign/stylesheet.css +++ b/docs/ABAPDoc/htmldesign/stylesheet.css @@ -27,4 +27,4 @@ a { color: black; } .exceptions { border: 0px; width: auto; } .exceptions td { border: 0px; padding: 0px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; } .abapDocComment p { margin-top: 0px; } -.shorttext { margin-top: 0px; margin-bottom: 0px; } \ No newline at end of file +.shorttext { margin-top: 0px; } \ No newline at end of file diff --git a/src/zcl_ibmc_assistant_v1.clas.abap b/src/zcl_ibmc_assistant_v1.clas.abap index 3ca7e71..2c97de7 100644 --- a/src/zcl_ibmc_assistant_v1.clas.abap +++ b/src/zcl_ibmc_assistant_v1.clas.abap @@ -31,98 +31,6 @@ public section. "! Whether enhanced irrelevance detection is enabled for the workspace. ENABLED type BOOLEAN, end of T_WS_SYSTEM_SETTINGS_OFF_TOPIC. - types: - "! No documentation available. - begin of T_RT_ENTITY_INTERPRETATION, - "! The calendar used to represent a recognized date (for example, `Gregorian`). - CALENDAR_TYPE type STRING, - "! A unique identifier used to associate a recognized time and date. If the user - "! input contains a date and time that are mentioned together (for example, `Today - "! at 5`, the same **datetime_link** value is returned for both the - "! `@sys-date` and `@sys-time` entities). - DATETIME_LINK type STRING, - "! A locale-specific holiday name (such as `thanksgiving` or `christmas`). This - "! property is included when a `@sys-date` entity is recognized based on a - "! holiday name in the user input. - FESTIVAL type STRING, - "! The precision or duration of a time range specified by a recognized - "! `@sys-time` or `@sys-date` entity. - GRANULARITY type STRING, - "! A unique identifier used to associate multiple recognized `@sys-date`, - "! `@sys-time`, or `@sys-number` entities that are recognized as a range - "! of values in the user's input (for example, `from July 4 until July 14` or - "! `from 20 to 25`). - RANGE_LINK type STRING, - "! The word in the user input that indicates that a `sys-date` or `sys-time` entity - "! is part of an implied range where only one date or time is specified (for - "! example, `since` or `until`). - RANGE_MODIFIER type STRING, - "! A recognized mention of a relative day, represented numerically as an offset - "! from the current date (for example, `-1` for `yesterday` or `10` for `in ten - "! days`). - RELATIVE_DAY type NUMBER, - "! A recognized mention of a relative month, represented numerically as an offset - "! from the current month (for example, `1` for `next month` or `-3` for `three - "! months ago`). - RELATIVE_MONTH type NUMBER, - "! A recognized mention of a relative week, represented numerically as an offset - "! from the current week (for example, `2` for `in two weeks` or `-1` for `last - "! week). - RELATIVE_WEEK type NUMBER, - "! A recognized mention of a relative date range for a weekend, represented - "! numerically as an offset from the current weekend (for example, `0` for `this - "! weekend` or `-1` for `last weekend`). - RELATIVE_WEEKEND type NUMBER, - "! A recognized mention of a relative year, represented numerically as an offset - "! from the current year (for example, `1` for `next year` or `-5` for `five years - "! ago`). - RELATIVE_YEAR type NUMBER, - "! A recognized mention of a specific date, represented numerically as the date - "! within the month (for example, `30` for `June 30`.). - SPECIFIC_DAY type NUMBER, - "! A recognized mention of a specific day of the week as a lowercase string (for - "! example, `monday`). - SPECIFIC_DAY_OF_WEEK type STRING, - "! A recognized mention of a specific month, represented numerically (for example, - "! `7` for `July`). - SPECIFIC_MONTH type NUMBER, - "! A recognized mention of a specific quarter, represented numerically (for - "! example, `3` for `the third quarter`). - SPECIFIC_QUARTER type NUMBER, - "! A recognized mention of a specific year (for example, `2016`). - SPECIFIC_YEAR type NUMBER, - "! A recognized numeric value, represented as an integer or double. - NUMERIC_VALUE type NUMBER, - "! The type of numeric value recognized in the user input (`integer` or - "! `rational`). - SUBTYPE type STRING, - "! A recognized term for a time that was mentioned as a part of the day in the - "! user's input (for example, `morning` or `afternoon`). - PART_OF_DAY type STRING, - "! A recognized mention of a relative hour, represented numerically as an offset - "! from the current hour (for example, `3` for `in three hours` or `-1` for `an - "! hour ago`). - RELATIVE_HOUR type NUMBER, - "! A recognized mention of a relative time, represented numerically as an offset in - "! minutes from the current time (for example, `5` for `in five minutes` or `-15` - "! for `fifteen minutes ago`). - RELATIVE_MINUTE type NUMBER, - "! A recognized mention of a relative time, represented numerically as an offset in - "! seconds from the current time (for example, `10` for `in ten seconds` or `-30` - "! for `thirty seconds ago`). - RELATIVE_SECOND type NUMBER, - "! A recognized specific hour mentioned as part of a time value (for example, `10` - "! for `10:15 AM`.). - SPECIFIC_HOUR type NUMBER, - "! A recognized specific minute mentioned as part of a time value (for example, - "! `15` for `10:15 AM`.). - SPECIFIC_MINUTE type NUMBER, - "! A recognized specific second mentioned as part of a time value (for example, - "! `30` for `10:15:30 AM`.). - SPECIFIC_SECOND type NUMBER, - "! A recognized time zone mentioned as part of a time value (for example, `EST`). - TIMEZONE type STRING, - end of T_RT_ENTITY_INTERPRETATION. types: "!

"! A key/value pair defining an HTTP header and a value.

@@ -149,10 +57,7 @@ public section. end of T_DIALOG_NODE_ACTION. types: "!

- "! Workspace settings related to the disambiguation

- "! feature.
- "!
- "! **Note:** This feature is available only to Plus and Premium users. + "! Workspace settings related to the disambiguation feature.

begin of T_WS_SYSTM_STTNGS_DSMBGTN, "! The text of the introductory prompt that accompanies disambiguation options "! presented to the user. @@ -217,166 +122,9 @@ public section. "! Which part of the dialog node to process next. SELECTOR type STRING, end of T_DIALOG_NODE_NEXT_STEP. - types: - "!

- "! An input object that includes the input text.

- begin of T_MESSAGE_INPUT, - "! The text of the user input. This string cannot contain carriage return, newline, - "! or tab characters. - TEXT type STRING, - end of T_MESSAGE_INPUT. - types: - "!

- "! A recognized capture group for a pattern-based entity.

- begin of T_CAPTURE_GROUP, - "! A recognized capture group for the entity. - GROUP type STRING, - "! Zero-based character offsets that indicate where the entity value begins and - "! ends in the input text. - LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, - end of T_CAPTURE_GROUP. - types: - "!

- "! An object describing the role played by a system entity that

- "! is specifies the beginning or end of a range recognized in the user input. This - "! property is included only if the new system entities are enabled for the - "! workspace. - begin of T_RUNTIME_ENTITY_ROLE, - "! The relationship of the entity to the range. - TYPE type STRING, - end of T_RUNTIME_ENTITY_ROLE. - types: - "!

- "! A term from the request that was identified as an entity.

- begin of T_RUNTIME_ENTITY, - "! An entity detected in the input. - ENTITY type STRING, - "! An array of zero-based character offsets that indicate where the detected entity - "! values begin and end in the input text. - LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, - "! The entity value that was recognized in the user input. - VALUE type STRING, - "! A decimal percentage that represents Watson's confidence in the recognized - "! entity. - CONFIDENCE type NUMBER, - "! Any metadata for the entity. - METADATA type MAP, - "! The recognized capture groups for the entity, as defined by the entity pattern. - GROUPS type STANDARD TABLE OF T_CAPTURE_GROUP WITH NON-UNIQUE DEFAULT KEY, - "! An object containing detailed information about the entity recognized in the - "! user input. This property is included only if the new system entities are - "! enabled for the workspace.
- "!
- "! For more information about how the new system entities are interpreted, see the - "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-beta-syste - "! m-entities). - INTERPRETATION type T_RT_ENTITY_INTERPRETATION, - "! An object describing the role played by a system entity that is specifies the - "! beginning or end of a range recognized in the user input. This property is - "! included only if the new system entities are enabled for the workspace. - ROLE type T_RUNTIME_ENTITY_ROLE, - end of T_RUNTIME_ENTITY. - types: - "!

- "! An intent identified in the user input.

- begin of T_RUNTIME_INTENT, - "! The name of the recognized intent. - INTENT type STRING, - "! A decimal percentage that represents Watson's confidence in the intent. - CONFIDENCE type DOUBLE, - end of T_RUNTIME_INTENT. - types: - "!

- "! An object defining the message input to be sent to the

- "! Watson Assistant service if the user selects the corresponding option. - begin of T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, - "! An input object that includes the input text. - INPUT type T_MESSAGE_INPUT, - "! An array of intents to be used while processing the input.
- "!
- "! **Note:** This property is supported for backward compatibility with - "! applications that use the v1 **Get response to user input** method. - INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, - "! An array of entities to be used while processing the user input.
- "!
- "! **Note:** This property is supported for backward compatibility with - "! applications that use the v1 **Get response to user input** method. - ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, - end of T_DIA_ND_OUTPUT_OPT_ELEM_VALUE. - types: - "! No documentation available. - begin of T_DIA_NODE_OUTPUT_OPT_ELEMENT, - "! The user-facing label for the option. - LABEL type STRING, - "! An object defining the message input to be sent to the Watson Assistant service - "! if the user selects the corresponding option. - VALUE type T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, - end of T_DIA_NODE_OUTPUT_OPT_ELEMENT. - types: - "! No documentation available. - begin of T_DIA_ND_OTPT_TEXT_VALUES_ELEM, - "! The text of a response. This string can include newline characters (`\n`), - "! Markdown tagging, or other special characters, if supported by the channel. - TEXT type STRING, - end of T_DIA_ND_OTPT_TEXT_VALUES_ELEM. types: "! No documentation available. - begin of T_DIALOG_NODE_OUTPUT_GENERIC, - "! The type of response returned by the dialog node. The specified response type - "! must be supported by the client application or channel.
- "!
- "! **Note:** The **search_skill** response type is available only for Plus and - "! Premium users, and is used only by the v2 runtime API. - RESPONSE_TYPE type STRING, - "! A list of one or more objects defining text responses. Required when - "! **response_type**=`text`. - VALUES type STANDARD TABLE OF T_DIA_ND_OTPT_TEXT_VALUES_ELEM WITH NON-UNIQUE DEFAULT KEY, - "! How a response is selected from the list, if more than one response is - "! specified. Valid only when **response_type**=`text`. - SELECTION_POLICY type STRING, - "! The delimiter to use as a separator between responses when - "! `selection_policy`=`multiline`. - DELIMITER type STRING, - "! How long to pause, in milliseconds. The valid values are from 0 to 10000. Valid - "! only when **response_type**=`pause`. - TIME type INTEGER, - "! Whether to send a "user is typing" event during the pause. Ignored if - "! the channel does not support this event. Valid only when - "! **response_type**=`pause`. - TYPING type BOOLEAN, - "! The URL of the image. Required when **response_type**=`image`. - SOURCE type STRING, - "! An optional title to show before the response. Valid only when - "! **response_type**=`image` or `option`. - TITLE type STRING, - "! An optional description to show with the response. Valid only when - "! **response_type**=`image` or `option`. - DESCRIPTION type STRING, - "! The preferred type of control to display, if supported by the channel. Valid - "! only when **response_type**=`option`. - PREFERENCE type STRING, - "! An array of objects describing the options from which the user can choose. You - "! can include up to 20 options. Required when **response_type**=`option`. - OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, - "! An optional message to be sent to the human agent who will be taking over the - "! conversation. Valid only when **reponse_type**=`connect_to_agent`. - MESSAGE_TO_HUMAN_AGENT type STRING, - "! The text of the search query. This can be either a natural-language query or a - "! query that uses the Discovery query language syntax, depending on the value of - "! the **query_type** property. For more information, see the [Discovery service - "! documentation](https://cloud.ibm.com/docs/services/discovery/query-operators.ht - "! ml#query-operators). Required when **response_type**=`search_skill`. - QUERY type STRING, - "! The type of the search query. Required when **response_type**=`search_skill`. - QUERY_TYPE type STRING, - "! An optional filter that narrows the set of documents to be searched. For more - "! information, see the [Discovery service documentation]([Discovery service - "! documentation](https://cloud.ibm.com/docs/services/discovery/query-parameters.h - "! tml#filter). - FILTER type STRING, - "! The version of the Discovery service API to use for the query. - DISCOVERY_VERSION type STRING, - end of T_DIALOG_NODE_OUTPUT_GENERIC. + T_DIALOG_NODE_OUTPUT_GENERIC type JSONOBJECT. types: "!

"! The output of the dialog node. For more information about

@@ -386,9 +134,20 @@ public section. begin of T_DIALOG_NODE_OUTPUT, "! An array of objects describing the output defined for the dialog node. GENERIC type STANDARD TABLE OF T_DIALOG_NODE_OUTPUT_GENERIC WITH NON-UNIQUE DEFAULT KEY, + "! Output intended for specific integrations. For more information, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-res + "! ponses-json). + INTEGRATIONS type MAP, "! Options that modify how specified output is handled. MODIFIERS type T_DIALOG_NODE_OUTPUT_MODIFIERS, end of T_DIALOG_NODE_OUTPUT. + types: + "!

+ "! The context for the dialog node.

+ begin of T_DIALOG_NODE_CONTEXT, + "! Context data intended for specific integrations. + INTEGRATIONS type MAP, + end of T_DIALOG_NODE_CONTEXT. types: "! No documentation available. begin of T_DIALOG_NODE, @@ -414,7 +173,7 @@ public section. "! rview#dialog-overview-responses). OUTPUT type T_DIALOG_NODE_OUTPUT, "! The context for the dialog node. - CONTEXT type MAP, + CONTEXT type T_DIALOG_NODE_CONTEXT, "! The metadata for the dialog node. METADATA type MAP, "! The next step to execute following this dialog node. @@ -442,6 +201,7 @@ public section. "! users. USER_LABEL type STRING, "! Whether the dialog node should be excluded from disambiguation suggestions. + "! Valid only when **type**=`standard` or `frame`. DISAMBIGUATION_OPT_OUT type BOOLEAN, "! For internal use only. DISABLED type BOOLEAN, @@ -561,12 +321,19 @@ public section. begin of T_WORKSPACE_SYSTEM_SETTINGS, "! Workspace settings related to the Watson Assistant user interface. TOOLING type T_WS_SYSTEM_SETTINGS_TOOLING, - "! Workspace settings related to the disambiguation feature.
- "!
- "! **Note:** This feature is available only to Plus and Premium users. + "! Workspace settings related to the disambiguation feature. DISAMBIGUATION type T_WS_SYSTM_STTNGS_DSMBGTN, "! For internal use only. HUMAN_AGENT_ASSIST type MAP, + "! Whether spelling correction is enabled for the workspace. + SPELLING_SUGGESTIONS type BOOLEAN, + "! Whether autocorrection is enabled for the workspace. If spelling correction is + "! enabled and this property is `false`, any suggested corrections are returned in + "! the **suggested_text** property of the message response. If this property is + "! `true`, any corrections are automatically applied to the user input, and the + "! original text is returned in the **original_text** property of the message + "! response. + SPELLING_AUTO_CORRECT type BOOLEAN, "! Workspace settings related to the behavior of system entities. SYSTEM_ENTITIES type T_WS_SYSTM_STTNGS_SYSTM_ENTTS, "! Workspace settings related to detection of irrelevant input. @@ -621,6 +388,17 @@ public section. DESCRIPTION type STRING, "! The language of the workspace. LANGUAGE type STRING, + "! The workspace ID of the workspace. + WORKSPACE_ID type STRING, + "! An array of objects describing the dialog nodes in the workspace. + DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects defining input examples that have been marked as irrelevant + "! input. + COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, "! Any metadata related to the workspace. METADATA type MAP, "! Whether training data from the workspace (including artifacts such as intents @@ -629,24 +407,14 @@ public section. LEARNING_OPT_OUT type BOOLEAN, "! Global settings for the workspace. SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, - "! The workspace ID of the workspace. - WORKSPACE_ID type STRING, "! The current status of the workspace. STATUS type STRING, - "! The timestamp for creation of the object. - CREATED type DATETIME, - "! The timestamp for the most recent update to the object. - UPDATED type DATETIME, + "! No documentation available. + WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, "! An array of intents. INTENTS type STANDARD TABLE OF T_INTENT WITH NON-UNIQUE DEFAULT KEY, "! An array of objects describing the entities for the workspace. ENTITIES type STANDARD TABLE OF T_ENTITY WITH NON-UNIQUE DEFAULT KEY, - "! An array of objects describing the dialog nodes in the workspace. - DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, - "! An array of counterexamples. - COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, - "! No documentation available. - WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, end of T_WORKSPACE. types: "! No documentation available. @@ -669,7 +437,8 @@ public section. REFRESH_URL type STRING, "! The URL that will return the next page of results. NEXT_URL type STRING, - "! Reserved for future use. + "! The total number of objects that satisfy the request. This total includes all + "! results, not just those included in the current page. TOTAL type INTEGER, "! Reserved for future use. MATCHED type INTEGER, @@ -688,24 +457,262 @@ public section. end of T_SYNONYM_COLLECTION. types: "! No documentation available. - begin of T_RUNTIME_RESPONSE_TYPE_OPTION, - "! The title or introductory text to show before the response. - TITLE type STRING, - "! The description to show with the the response. - DESCRIPTION type STRING, - "! The preferred type of control to display. - PREFERENCE type STRING, + begin of T_RT_ENTITY_INTERPRETATION, + "! The calendar used to represent a recognized date (for example, `Gregorian`). + CALENDAR_TYPE type STRING, + "! A unique identifier used to associate a recognized time and date. If the user + "! input contains a date and time that are mentioned together (for example, `Today + "! at 5`, the same **datetime_link** value is returned for both the + "! `@sys-date` and `@sys-time` entities). + DATETIME_LINK type STRING, + "! A locale-specific holiday name (such as `thanksgiving` or `christmas`). This + "! property is included when a `@sys-date` entity is recognized based on a + "! holiday name in the user input. + FESTIVAL type STRING, + "! The precision or duration of a time range specified by a recognized + "! `@sys-time` or `@sys-date` entity. + GRANULARITY type STRING, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range + "! of values in the user's input (for example, `from July 4 until July 14` or + "! `from 20 to 25`). + RANGE_LINK type STRING, + "! The word in the user input that indicates that a `sys-date` or `sys-time` entity + "! is part of an implied range where only one date or time is specified (for + "! example, `since` or `until`). + RANGE_MODIFIER type STRING, + "! A recognized mention of a relative day, represented numerically as an offset + "! from the current date (for example, `-1` for `yesterday` or `10` for `in ten + "! days`). + RELATIVE_DAY type NUMBER, + "! A recognized mention of a relative month, represented numerically as an offset + "! from the current month (for example, `1` for `next month` or `-3` for `three + "! months ago`). + RELATIVE_MONTH type NUMBER, + "! A recognized mention of a relative week, represented numerically as an offset + "! from the current week (for example, `2` for `in two weeks` or `-1` for `last + "! week). + RELATIVE_WEEK type NUMBER, + "! A recognized mention of a relative date range for a weekend, represented + "! numerically as an offset from the current weekend (for example, `0` for `this + "! weekend` or `-1` for `last weekend`). + RELATIVE_WEEKEND type NUMBER, + "! A recognized mention of a relative year, represented numerically as an offset + "! from the current year (for example, `1` for `next year` or `-5` for `five years + "! ago`). + RELATIVE_YEAR type NUMBER, + "! A recognized mention of a specific date, represented numerically as the date + "! within the month (for example, `30` for `June 30`.). + SPECIFIC_DAY type NUMBER, + "! A recognized mention of a specific day of the week as a lowercase string (for + "! example, `monday`). + SPECIFIC_DAY_OF_WEEK type STRING, + "! A recognized mention of a specific month, represented numerically (for example, + "! `7` for `July`). + SPECIFIC_MONTH type NUMBER, + "! A recognized mention of a specific quarter, represented numerically (for + "! example, `3` for `the third quarter`). + SPECIFIC_QUARTER type NUMBER, + "! A recognized mention of a specific year (for example, `2016`). + SPECIFIC_YEAR type NUMBER, + "! A recognized numeric value, represented as an integer or double. + NUMERIC_VALUE type NUMBER, + "! The type of numeric value recognized in the user input (`integer` or + "! `rational`). + SUBTYPE type STRING, + "! A recognized term for a time that was mentioned as a part of the day in the + "! user's input (for example, `morning` or `afternoon`). + PART_OF_DAY type STRING, + "! A recognized mention of a relative hour, represented numerically as an offset + "! from the current hour (for example, `3` for `in three hours` or `-1` for `an + "! hour ago`). + RELATIVE_HOUR type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! minutes from the current time (for example, `5` for `in five minutes` or `-15` + "! for `fifteen minutes ago`). + RELATIVE_MINUTE type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! seconds from the current time (for example, `10` for `in ten seconds` or `-30` + "! for `thirty seconds ago`). + RELATIVE_SECOND type NUMBER, + "! A recognized specific hour mentioned as part of a time value (for example, `10` + "! for `10:15 AM`.). + SPECIFIC_HOUR type NUMBER, + "! A recognized specific minute mentioned as part of a time value (for example, + "! `15` for `10:15 AM`.). + SPECIFIC_MINUTE type NUMBER, + "! A recognized specific second mentioned as part of a time value (for example, + "! `30` for `10:15:30 AM`.). + SPECIFIC_SECOND type NUMBER, + "! A recognized time zone mentioned as part of a time value (for example, `EST`). + TIMEZONE type STRING, + end of T_RT_ENTITY_INTERPRETATION. + types: + "!

+ "! An input object that includes the input text.

+ begin of T_MESSAGE_INPUT, + "! The text of the user input. This string cannot contain carriage return, newline, + "! or tab characters. + TEXT type STRING, + "! Whether to use spelling correction when processing the input. This property + "! overrides the value of the **spelling_suggestions** property in the workspace + "! settings. + SPELLING_SUGGESTIONS type BOOLEAN, + "! Whether to use autocorrection when processing the input. If spelling correction + "! is used and this property is `false`, any suggested corrections are returned in + "! the **suggested_text** property of the message response. If this property is + "! `true`, any corrections are automatically applied to the user input, and the + "! original text is returned in the **original_text** property of the message + "! response. This property overrides the value of the **spelling_auto_correct** + "! property in the workspace settings. + SPELLING_AUTO_CORRECT type BOOLEAN, + "! Any suggested corrections of the input text. This property is returned only if + "! spelling correction is enabled and autocorrection is disabled. + SUGGESTED_TEXT type STRING, + "! The original user input text. This property is returned only if autocorrection + "! is enabled and the user input was corrected. + ORIGINAL_TEXT type STRING, + end of T_MESSAGE_INPUT. + types: + "!

+ "! A recognized capture group for a pattern-based entity.

+ begin of T_CAPTURE_GROUP, + "! A recognized capture group for the entity. + GROUP type STRING, + "! Zero-based character offsets that indicate where the entity value begins and + "! ends in the input text. + LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + end of T_CAPTURE_GROUP. + types: + "!

+ "! An alternative value for the recognized entity.

+ begin of T_RUNTIME_ENTITY_ALTERNATIVE, + "! The entity value that was recognized in the user input. + VALUE type STRING, + "! A decimal percentage that represents Watson's confidence in the recognized + "! entity. + CONFIDENCE type NUMBER, + end of T_RUNTIME_ENTITY_ALTERNATIVE. + types: + "!

+ "! An object describing the role played by a system entity that

+ "! is specifies the beginning or end of a range recognized in the user input. This + "! property is included only if the new system entities are enabled for the + "! workspace. + begin of T_RUNTIME_ENTITY_ROLE, + "! The relationship of the entity to the range. + TYPE type STRING, + end of T_RUNTIME_ENTITY_ROLE. + types: + "!

+ "! A term from the request that was identified as an entity.

+ begin of T_RUNTIME_ENTITY, + "! An entity detected in the input. + ENTITY type STRING, + "! An array of zero-based character offsets that indicate where the detected entity + "! values begin and end in the input text. + LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + "! The entity value that was recognized in the user input. + VALUE type STRING, + "! A decimal percentage that represents Watson's confidence in the recognized + "! entity. + CONFIDENCE type NUMBER, + "! Any metadata for the entity. + METADATA type MAP, + "! The recognized capture groups for the entity, as defined by the entity pattern. + GROUPS type STANDARD TABLE OF T_CAPTURE_GROUP WITH NON-UNIQUE DEFAULT KEY, + "! An object containing detailed information about the entity recognized in the + "! user input.
+ "!
+ "! For more information about how system entities are interpreted, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-system-ent + "! ities). + INTERPRETATION type T_RT_ENTITY_INTERPRETATION, + "! An array of possible alternative values that the user might have intended + "! instead of the value returned in the **value** property. This property is + "! returned only for `@sys-time` and `@sys-date` entities when the + "! user's input is ambiguous.
+ "!
+ "! This property is included only if the new system entities are enabled for the + "! workspace. + ALTERNATIVES type STANDARD TABLE OF T_RUNTIME_ENTITY_ALTERNATIVE WITH NON-UNIQUE DEFAULT KEY, + "! An object describing the role played by a system entity that is specifies the + "! beginning or end of a range recognized in the user input. This property is + "! included only if the new system entities are enabled for the workspace. + ROLE type T_RUNTIME_ENTITY_ROLE, + end of T_RUNTIME_ENTITY. + types: + "!

+ "! An intent identified in the user input.

+ begin of T_RUNTIME_INTENT, + "! The name of the recognized intent. + INTENT type STRING, + "! A decimal percentage that represents Watson's confidence in the intent. + CONFIDENCE type DOUBLE, + end of T_RUNTIME_INTENT. + types: + "!

+ "! An object defining the message input to be sent to the

+ "! Watson Assistant service if the user selects the corresponding option. + begin of T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, + "! An input object that includes the input text. + INPUT type T_MESSAGE_INPUT, + "! An array of intents to be used while processing the input.
+ "!
+ "! **Note:** This property is supported for backward compatibility with + "! applications that use the v1 **Get response to user input** method. + INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of entities to be used while processing the user input.
+ "!
+ "! **Note:** This property is supported for backward compatibility with + "! applications that use the v1 **Get response to user input** method. + ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + end of T_DIA_ND_OUTPUT_OPT_ELEM_VALUE. + types: + "! No documentation available. + begin of T_DIA_NODE_OUTPUT_OPT_ELEMENT, + "! The user-facing label for the option. + LABEL type STRING, + "! An object defining the message input to be sent to the Watson Assistant service + "! if the user selects the corresponding option. + VALUE type T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, + end of T_DIA_NODE_OUTPUT_OPT_ELEMENT. + types: + "!

+ "! An object that describes a response with response type

+ "! `option`. + begin of T_RUNTIME_RESPONSE_TYPE_OPTION, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! The description to show with the the response. + DESCRIPTION type STRING, + "! The preferred type of control to display. + PREFERENCE type STRING, "! An array of objects describing the options from which the user can choose. OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, end of T_RUNTIME_RESPONSE_TYPE_OPTION. types: "! No documentation available. + begin of T_DIA_ND_OTPT_TEXT_VALUES_ELEM, + "! The text of a response. This string can include newline characters (`\n`), + "! Markdown tagging, or other special characters, if supported by the channel. + TEXT type STRING, + end of T_DIA_ND_OTPT_TEXT_VALUES_ELEM. + types: + "!

+ "! An object that describes a response with response type

+ "! `text`. begin of T_DIA_ND_OUTPUT_RESP_TYPE_TEXT, - "! A list of one or more objects defining text responses. Required when - "! **response_type**=`text`. + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! A list of one or more objects defining text responses. VALUES type STANDARD TABLE OF T_DIA_ND_OTPT_TEXT_VALUES_ELEM WITH NON-UNIQUE DEFAULT KEY, "! How a response is selected from the list, if more than one response is - "! specified. Valid only when **response_type**=`text`. + "! specified. SELECTION_POLICY type STRING, "! The delimiter to use as a separator between responses when "! `selection_policy`=`multiline`. @@ -722,18 +729,13 @@ public section. DESCRIPTION type STRING, "! The language of the workspace. LANGUAGE type STRING, - "! Any metadata related to the workspace. - METADATA type MAP, - "! Whether training data from the workspace (including artifacts such as intents - "! and entities) can be used by IBM for general service improvements. `true` - "! indicates that workspace training data is not to be used. - LEARNING_OPT_OUT type BOOLEAN, - "! Global settings for the workspace. - SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, "! The workspace ID of the workspace. WORKSPACE_ID type STRING, - "! The current status of the workspace. - STATUS type STRING, + "! An array of objects describing the dialog nodes in the workspace. + DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects defining input examples that have been marked as irrelevant + "! input. + COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, "! The timestamp for creation of the object. CREATED type DATETIME, "! The timestamp for the most recent update to the object. @@ -761,8 +763,13 @@ public section. UPDATED type DATETIME, end of T_BASE_ENTITY. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `text`. begin of T_RUNTIME_RESPONSE_TYPE_TEXT, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! The text of the response. TEXT type STRING, end of T_RUNTIME_RESPONSE_TYPE_TEXT. @@ -837,20 +844,60 @@ public section. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, end of T_ENTITY_MENTION. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `image`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_IMG, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The URL of the image. + SOURCE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! The description to show with the the response. + DESCRIPTION type STRING, + end of T_RT_RESP_GNRC_RT_RESP_TYP_IMG. + types: + "!

+ "! An object that describes a response with response type

+ "! `text`. + begin of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP1, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! A list of one or more objects defining text responses. + VALUES type STANDARD TABLE OF T_DIA_ND_OTPT_TEXT_VALUES_ELEM WITH NON-UNIQUE DEFAULT KEY, + "! How a response is selected from the list, if more than one response is + "! specified. + SELECTION_POLICY type STRING, + "! The delimiter to use as a separator between responses when + "! `selection_policy`=`multiline`. + DELIMITER type STRING, + end of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP1. + types: + "!

+ "! An object that describes a response with response type

+ "! `search_skill`. begin of T_DIA_ND_OTPT_RESP_TYP_SRCH_S1, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel.
+ "!
+ "! **Note:** The **search_skill** response type is used only by the v2 runtime API. + "! + RESPONSE_TYPE type STRING, "! The text of the search query. This can be either a natural-language query or a "! query that uses the Discovery query language syntax, depending on the value of "! the **query_type** property. For more information, see the [Discovery service - "! documentation](https://cloud.ibm.com/docs/services/discovery/query-operators.ht - "! ml#query-operators). Required when **response_type**=`search_skill`. + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-opera + "! tors#query-operators). QUERY type STRING, - "! The type of the search query. Required when **response_type**=`search_skill`. + "! The type of the search query. QUERY_TYPE type STRING, "! An optional filter that narrows the set of documents to be searched. For more "! information, see the [Discovery service documentation]([Discovery service - "! documentation](https://cloud.ibm.com/docs/services/discovery/query-parameters.h - "! tml#filter). + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-param + "! eters#filter). FILTER type STRING, "! The version of the Discovery service API to use for the query. DISCOVERY_VERSION type STRING, @@ -876,18 +923,68 @@ public section. end of T_LOG_PAGINATION. types: "! No documentation available. + begin of T_AGENT_AVAILABILITY_MESSAGE, + "! The text of the message. + MESSAGE type STRING, + end of T_AGENT_AVAILABILITY_MESSAGE. + types: + "!

+ "! Routing or other contextual information to be used by target

+ "! service desk systems. + begin of T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1, + "! No documentation available. + TARGET type MAP, + end of T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1. + types: + "!

+ "! An object that describes a response with response type

+ "! `connect_to_agent`. begin of T_RT_RESP_TYP_CONNECT_TO_AGENT, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! A message to be sent to the human agent who will be taking over the "! conversation. MESSAGE_TO_HUMAN_AGENT type STRING, - "! A label identifying the topic of the conversation, derived from the - "! **user_label** property of the relevant node. + "! An optional message to be displayed to the user to indicate that the + "! conversation will be transferred to the next available agent. + AGENT_AVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! An optional message to be displayed to the user to indicate that no online agent + "! is available to take over the conversation. + AGENT_UNAVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! Routing or other contextual information to be used by target service desk + "! systems. + TRANSFER_INFO type T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1, + "! A label identifying the topic of the conversation, derived from the **title** + "! property of the relevant node or the **topic** property of the dialog node + "! response. TOPIC type STRING, "! The ID of the dialog node that the **topic** property is taken from. The "! **topic** property is populated using the value of the dialog node's - "! **user_label** property. + "! **title** property. DIALOG_NODE type STRING, end of T_RT_RESP_TYP_CONNECT_TO_AGENT. + types: + "!

+ "! An object that describes a response with response type

+ "! `connect_to_agent`. + begin of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP5, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! An optional message to be sent to the human agent who will be taking over the + "! conversation. + MESSAGE_TO_HUMAN_AGENT type STRING, + "! An optional message to be displayed to the user to indicate that the + "! conversation will be transferred to the next available agent. + AGENT_AVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! An optional message to be displayed to the user to indicate that no online agent + "! is available to take over the conversation. + AGENT_UNAVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! Routing or other contextual information to be used by target service desk + "! systems. + TRANSFER_INFO type T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1, + end of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP5. types: "! No documentation available. begin of T_CREATE_VALUE, @@ -917,54 +1014,6 @@ public section. "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_CREATE_VALUE. - types: - "! No documentation available. - begin of T_DIALOG_NODE_VISITED_DETAILS, - "! A dialog node that was triggered during processing of the input message. - DIALOG_NODE type STRING, - "! The title of the dialog node. - TITLE type STRING, - "! The conditions that trigger the dialog node. - CONDITIONS type STRING, - end of T_DIALOG_NODE_VISITED_DETAILS. - types: - "! No documentation available. - begin of T_DIA_SUGGESTION_RESP_GENERIC, - "! The type of response returned by the dialog node. The specified response type - "! must be supported by the client application or channel.
- "!
- "! **Note:** The **suggestion** response type is part of the disambiguation - "! feature, which is only available for Plus and Premium users. The - "! **search_skill** response type is available only for Plus and Premium users, - "! and is used only by the v2 runtime API. - RESPONSE_TYPE type STRING, - "! The text of the response. - TEXT type STRING, - "! How long to pause, in milliseconds. - TIME type INTEGER, - "! Whether to send a "user is typing" event during the pause. - TYPING type BOOLEAN, - "! The URL of the image. - SOURCE type STRING, - "! The title or introductory text to show before the response. - TITLE type STRING, - "! The description to show with the the response. - DESCRIPTION type STRING, - "! The preferred type of control to display. - PREFERENCE type STRING, - "! An array of objects describing the options from which the user can choose. - OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, - "! A message to be sent to the human agent who will be taking over the - "! conversation. - MESSAGE_TO_HUMAN_AGENT type STRING, - "! A label identifying the topic of the conversation, derived from the - "! **user_label** property of the relevant node. - TOPIC type STRING, - "! The ID of the dialog node that the **topic** property is taken from. The - "! **topic** property is populated using the value of the dialog node's - "! **user_label** property. - DIALOG_NODE type STRING, - end of T_DIA_SUGGESTION_RESP_GENERIC. types: "!

"! An object defining the message input, intents, and entities

@@ -978,25 +1027,6 @@ public section. "! An array of entities to be sent along with the user input. ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, end of T_DIALOG_SUGGESTION_VALUE. - types: - "!

- "! The dialog output that will be returned from the Watson

- "! Assistant service if the user selects the corresponding option. - begin of T_DIALOG_SUGGESTION_OUTPUT, - "! An array of the nodes that were triggered to create the response, in the order - "! in which they were visited. This information is useful for debugging and for - "! tracing the path taken through the node tree. - NODES_VISITED type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - "! An array of objects containing detailed diagnostic information about the nodes - "! that were triggered during processing of the input message. Included only if - "! **nodes_visited_details** is set to `true` in the message request. - NODES_VISITED_DETAILS type STANDARD TABLE OF T_DIALOG_NODE_VISITED_DETAILS WITH NON-UNIQUE DEFAULT KEY, - "! An array of responses to the user. - TEXT type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - "! Output intended for any channel. It is the responsibility of the client - "! application to implement the supported response types. - GENERIC type STANDARD TABLE OF T_DIA_SUGGESTION_RESP_GENERIC WITH NON-UNIQUE DEFAULT KEY, - end of T_DIALOG_SUGGESTION_OUTPUT. types: "! No documentation available. begin of T_DIALOG_SUGGESTION, @@ -1010,7 +1040,7 @@ public section. VALUE type T_DIALOG_SUGGESTION_VALUE, "! The dialog output that will be returned from the Watson Assistant service if the "! user selects the corresponding option. - OUTPUT type T_DIALOG_SUGGESTION_OUTPUT, + OUTPUT type MAP, "! The ID of the dialog node that the **label** property is taken from. The "! **label** property is populated using the value of the dialog node's "! **user_label** property. @@ -1050,14 +1080,28 @@ public section. end of T_UPDATE_VALUE. types: "!

- "! An alternative value for the recognized entity.

- begin of T_RUNTIME_ENTITY_ALTERNATIVE, - "! The entity value that was recognized in the user input. - VALUE type STRING, - "! A decimal percentage that represents Watson's confidence in the recognized - "! entity. - CONFIDENCE type NUMBER, - end of T_RUNTIME_ENTITY_ALTERNATIVE. + "! The user input utterance to classify.

+ begin of T_BULK_CLASSIFY_UTTERANCE, + "! The text of the input utterance. + TEXT type STRING, + end of T_BULK_CLASSIFY_UTTERANCE. + types: + "! No documentation available. + begin of T_BULK_CLASSIFY_OUTPUT, + "! The user input utterance to classify. + INPUT type T_BULK_CLASSIFY_UTTERANCE, + "! An array of entities identified in the utterance. + ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! An array of intents recognized in the utterance. + INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + end of T_BULK_CLASSIFY_OUTPUT. + types: + "! No documentation available. + begin of T_BULK_CLASSIFY_RESPONSE, + "! An array of objects that contain classification information for the submitted + "! input utterances. + OUTPUT type STANDARD TABLE OF T_BULK_CLASSIFY_OUTPUT WITH NON-UNIQUE DEFAULT KEY, + end of T_BULK_CLASSIFY_RESPONSE. types: "! No documentation available. begin of T_UPDATE_INTENT, @@ -1077,6 +1121,22 @@ public section. "! An array of user input examples for the intent. EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, end of T_UPDATE_INTENT. + types: + "! No documentation available. + begin of T_WORKSPACE_REFERENCE, + "! Any metadata related to the workspace. + METADATA type MAP, + "! Whether training data from the workspace (including artifacts such as intents + "! and entities) can be used by IBM for general service improvements. `true` + "! indicates that workspace training data is not to be used. + LEARNING_OPT_OUT type BOOLEAN, + "! Global settings for the workspace. + SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, + "! The current status of the workspace. + STATUS type STRING, + "! No documentation available. + WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, + end of T_WORKSPACE_REFERENCE. types: "! No documentation available. begin of T_VALUE_COLLECTION, @@ -1085,6 +1145,16 @@ public section. "! The pagination data for the returned objects. PAGINATION type T_PAGINATION, end of T_VALUE_COLLECTION. + types: + "! No documentation available. + begin of T_DIALOG_NODE_VISITED_DETAILS, + "! A dialog node that was triggered during processing of the input message. + DIALOG_NODE type STRING, + "! The title of the dialog node. + TITLE type STRING, + "! The conditions that trigger the dialog node. + CONDITIONS type STRING, + end of T_DIALOG_NODE_VISITED_DETAILS. types: "!

"! Log message details.

@@ -1095,47 +1165,8 @@ public section. MSG type STRING, end of T_LOG_MESSAGE. types: - "! No documentation available. - begin of T_RUNTIME_RESPONSE_GENERIC, - "! The type of response returned by the dialog node. The specified response type - "! must be supported by the client application or channel.
- "!
- "! **Note:** The **suggestion** response type is part of the disambiguation - "! feature, which is only available for Plus and Premium users. - RESPONSE_TYPE type STRING, - "! The text of the response. - TEXT type STRING, - "! How long to pause, in milliseconds. - TIME type INTEGER, - "! Whether to send a "user is typing" event during the pause. - TYPING type BOOLEAN, - "! The URL of the image. - SOURCE type STRING, - "! The title or introductory text to show before the response. - TITLE type STRING, - "! The description to show with the the response. - DESCRIPTION type STRING, - "! The preferred type of control to display. - PREFERENCE type STRING, - "! An array of objects describing the options from which the user can choose. - OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, - "! A message to be sent to the human agent who will be taking over the - "! conversation. - MESSAGE_TO_HUMAN_AGENT type STRING, - "! A label identifying the topic of the conversation, derived from the - "! **user_label** property of the relevant node. - TOPIC type STRING, - "! The ID of the dialog node that the **topic** property is taken from. The - "! **topic** property is populated using the value of the dialog node's - "! **user_label** property. - DIALOG_NODE type STRING, - "! An array of objects describing the possible matching dialog nodes from which the - "! user can choose.
- "!
- "! **Note:** The **suggestions** property is part of the disambiguation feature, - "! which is only available for Plus and Premium users. - SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, - end of T_RUNTIME_RESPONSE_GENERIC. + "! No documentation available. + T_RUNTIME_RESPONSE_GENERIC type JSONOBJECT. types: "!

"! An output object that includes the response to the user, the

@@ -1157,6 +1188,56 @@ public section. "! application to implement the supported response types. GENERIC type STANDARD TABLE OF T_RUNTIME_RESPONSE_GENERIC WITH NON-UNIQUE DEFAULT KEY, end of T_OUTPUT_DATA. + types: + "! No documentation available. + begin of T_BULK_CLASSIFY_INPUT, + "! An array of input utterances to classify. + INPUT type STANDARD TABLE OF T_BULK_CLASSIFY_UTTERANCE WITH NON-UNIQUE DEFAULT KEY, + end of T_BULK_CLASSIFY_INPUT. + types: + "!

+ "! An object that describes a response with response type

+ "! `image`. + begin of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP3, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The URL of the image. + SOURCE type STRING, + "! An optional title to show before the response. + TITLE type STRING, + "! An optional description to show with the response. + DESCRIPTION type STRING, + end of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP3. + types: + "!

+ "! An object that describes a response with response type

+ "! `connect_to_agent`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_CN1, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! A message to be sent to the human agent who will be taking over the + "! conversation. + MESSAGE_TO_HUMAN_AGENT type STRING, + "! An optional message to be displayed to the user to indicate that the + "! conversation will be transferred to the next available agent. + AGENT_AVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! An optional message to be displayed to the user to indicate that no online agent + "! is available to take over the conversation. + AGENT_UNAVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! Routing or other contextual information to be used by target service desk + "! systems. + TRANSFER_INFO type T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1, + "! A label identifying the topic of the conversation, derived from the **title** + "! property of the relevant node or the **topic** property of the dialog node + "! response. + TOPIC type STRING, + "! The ID of the dialog node that the **topic** property is taken from. The + "! **topic** property is populated using the value of the dialog node's + "! **title** property. + DIALOG_NODE type STRING, + end of T_RT_RESP_GNRC_RT_RESP_TYP_CN1. types: "!

"! An array of dialog nodes.

@@ -1166,10 +1247,6 @@ public section. "! The pagination data for the returned objects. PAGINATION type T_PAGINATION, end of T_DIALOG_NODE_COLLECTION. - types: - "!

- "! For internal use only.

- T_SYSTEM_RESPONSE type MAP. types: "!

"! Metadata related to the message.

@@ -1192,7 +1269,7 @@ public section. "! The unique identifier of the conversation. CONVERSATION_ID type STRING, "! For internal use only. - SYSTEM type T_SYSTEM_RESPONSE, + SYSTEM type MAP, "! Metadata related to the message. METADATA type T_MESSAGE_CONTEXT_METADATA, end of T_CONTEXT. @@ -1297,7 +1374,7 @@ public section. "! rview#dialog-overview-responses). OUTPUT type T_DIALOG_NODE_OUTPUT, "! The context for the dialog node. - CONTEXT type MAP, + CONTEXT type T_DIALOG_NODE_CONTEXT, "! The metadata for the dialog node. METADATA type MAP, "! The next step to execute following this dialog node. @@ -1325,6 +1402,7 @@ public section. "! users. USER_LABEL type STRING, "! Whether the dialog node should be excluded from disambiguation suggestions. + "! Valid only when **type**=`standard` or `frame`. DISAMBIGUATION_OPT_OUT type BOOLEAN, "! For internal use only. DISABLED type BOOLEAN, @@ -1334,20 +1412,52 @@ public section. UPDATED type DATETIME, end of T_UPDATE_DIALOG_NODE. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `pause`. begin of T_RUNTIME_RESPONSE_TYPE_PAUSE, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! How long to pause, in milliseconds. TIME type INTEGER, "! Whether to send a "user is typing" event during the pause. TYPING type BOOLEAN, end of T_RUNTIME_RESPONSE_TYPE_PAUSE. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `connect_to_agent`. begin of T_DIA_ND_OTPT_RESP_TYP_CNNCT_1, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! An optional message to be sent to the human agent who will be taking over the - "! conversation. Valid only when **reponse_type**=`connect_to_agent`. + "! conversation. MESSAGE_TO_HUMAN_AGENT type STRING, + "! An optional message to be displayed to the user to indicate that the + "! conversation will be transferred to the next available agent. + AGENT_AVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! An optional message to be displayed to the user to indicate that no online agent + "! is available to take over the conversation. + AGENT_UNAVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! Routing or other contextual information to be used by target service desk + "! systems. + TRANSFER_INFO type T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1, end of T_DIA_ND_OTPT_RESP_TYP_CNNCT_1. + types: + "!

+ "! An object that describes a response with response type

+ "! `pause`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_PS, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! How long to pause, in milliseconds. + TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. + TYPING type BOOLEAN, + end of T_RT_RESP_GNRC_RT_RESP_TYP_PS. types: "! No documentation available. begin of T_ERROR_DETAIL, @@ -1411,6 +1521,17 @@ public section. DESCRIPTION type STRING, "! The language of the workspace. LANGUAGE type STRING, + "! The workspace ID of the workspace. + WORKSPACE_ID type STRING, + "! An array of objects describing the dialog nodes in the workspace. + DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects defining input examples that have been marked as irrelevant + "! input. + COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, "! Any metadata related to the workspace. METADATA type MAP, "! Whether training data from the workspace (including artifacts such as intents @@ -1419,25 +1540,14 @@ public section. LEARNING_OPT_OUT type BOOLEAN, "! Global settings for the workspace. SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, - "! The workspace ID of the workspace. - WORKSPACE_ID type STRING, "! The current status of the workspace. STATUS type STRING, - "! The timestamp for creation of the object. - CREATED type DATETIME, - "! The timestamp for the most recent update to the object. - UPDATED type DATETIME, + "! No documentation available. + WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, "! An array of objects defining the intents for the workspace. INTENTS type STANDARD TABLE OF T_CREATE_INTENT WITH NON-UNIQUE DEFAULT KEY, "! An array of objects describing the entities for the workspace. ENTITIES type STANDARD TABLE OF T_CREATE_ENTITY WITH NON-UNIQUE DEFAULT KEY, - "! An array of objects describing the dialog nodes in the workspace. - DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, - "! An array of objects defining input examples that have been marked as irrelevant - "! input. - COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, - "! No documentation available. - WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, end of T_CREATE_WORKSPACE. types: "! No documentation available. @@ -1508,26 +1618,46 @@ public section. PAGINATION type T_PAGINATION, end of T_INTENT_COLLECTION. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `pause`. begin of T_DIA_ND_OTPT_RESP_TYPE_PAUSE, - "! How long to pause, in milliseconds. The valid values are from 0 to 10000. Valid - "! only when **response_type**=`pause`. + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! How long to pause, in milliseconds. The valid values are from 0 to 10000. TIME type INTEGER, "! Whether to send a "user is typing" event during the pause. Ignored if - "! the channel does not support this event. Valid only when - "! **response_type**=`pause`. + "! the channel does not support this event. TYPING type BOOLEAN, end of T_DIA_ND_OTPT_RESP_TYPE_PAUSE. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `suggestion`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_SG1, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! An array of objects describing the possible matching dialog nodes from which the + "! user can choose. + SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, + end of T_RT_RESP_GNRC_RT_RESP_TYP_SG1. + types: + "!

+ "! An object that describes a response with response type

+ "! `image`. begin of T_DIA_ND_OUTPUT_RESP_TYPE_IMG, - "! The URL of the image. Required when **response_type**=`image`. + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The URL of the image. SOURCE type STRING, - "! An optional title to show before the response. Valid only when - "! **response_type**=`image` or `option`. + "! An optional title to show before the response. TITLE type STRING, - "! An optional description to show with the response. Valid only when - "! **response_type**=`image` or `option`. + "! An optional description to show with the response. DESCRIPTION type STRING, end of T_DIA_ND_OUTPUT_RESP_TYPE_IMG. types: @@ -1540,6 +1670,24 @@ public section. "! HTTP status code for the error response. CODE type INTEGER, end of T_ERROR_RESPONSE. + types: + "!

+ "! An object that describes a response with response type

+ "! `option`. + begin of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP4, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! An optional title to show before the response. + TITLE type STRING, + "! An optional description to show with the response. + DESCRIPTION type STRING, + "! The preferred type of control to display, if supported by the channel. + PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. You + "! can include up to 20 options. + OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + end of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP4. types: "! No documentation available. begin of T_BASE_MESSAGE, @@ -1563,15 +1711,17 @@ public section. ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, end of T_BASE_MESSAGE. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `suggestion`. begin of T_RT_RESPONSE_TYPE_SUGGESTION, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! The title or introductory text to show before the response. TITLE type STRING, "! An array of objects describing the possible matching dialog nodes from which the - "! user can choose.
- "!
- "! **Note:** The **suggestions** property is part of the disambiguation feature, - "! which is only available for Plus and Premium users. + "! user can choose. SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, end of T_RT_RESPONSE_TYPE_SUGGESTION. types: @@ -1595,6 +1745,21 @@ public section. "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_UPDATE_SYNONYM. + types: + "!

+ "! An object that describes a response with response type

+ "! `text`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_TXT, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The text of the response. + TEXT type STRING, + end of T_RT_RESP_GNRC_RT_RESP_TYP_TXT. + types: + "!

+ "! For internal use only.

+ T_SYSTEM_RESPONSE type MAP. types: "! No documentation available. begin of T_BASE_INTENT, @@ -1612,6 +1777,20 @@ public section. "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_BASE_INTENT. + types: + "!

+ "! An object that describes a response with response type

+ "! `pause`. + begin of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP2, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! How long to pause, in milliseconds. The valid values are from 0 to 10000. + TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. Ignored if + "! the channel does not support this event. + TYPING type BOOLEAN, + end of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP2. types: "! No documentation available. begin of T_RT_ENTTY_INTRPRTTN_SYS_DATE, @@ -1674,19 +1853,48 @@ public section. SPECIFIC_YEAR type NUMBER, end of T_RT_ENTTY_INTRPRTTN_SYS_DATE. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `search_skill`. + begin of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP6, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel.
+ "!
+ "! **Note:** The **search_skill** response type is used only by the v2 runtime API. + "! + RESPONSE_TYPE type STRING, + "! The text of the search query. This can be either a natural-language query or a + "! query that uses the Discovery query language syntax, depending on the value of + "! the **query_type** property. For more information, see the [Discovery service + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-opera + "! tors#query-operators). + QUERY type STRING, + "! The type of the search query. + QUERY_TYPE type STRING, + "! An optional filter that narrows the set of documents to be searched. For more + "! information, see the [Discovery service documentation]([Discovery service + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-param + "! eters#filter). + FILTER type STRING, + "! The version of the Discovery service API to use for the query. + DISCOVERY_VERSION type STRING, + end of T_DIA_ND_OTPT_GNRC_DIA_ND_OTP6. + types: + "!

+ "! An object that describes a response with response type

+ "! `option`. begin of T_DIA_ND_OUTPUT_RESP_TYPE_OPT, - "! An optional title to show before the response. Valid only when - "! **response_type**=`image` or `option`. + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! An optional title to show before the response. TITLE type STRING, - "! An optional description to show with the response. Valid only when - "! **response_type**=`image` or `option`. + "! An optional description to show with the response. DESCRIPTION type STRING, - "! The preferred type of control to display, if supported by the channel. Valid - "! only when **response_type**=`option`. + "! The preferred type of control to display, if supported by the channel. PREFERENCE type STRING, "! An array of objects describing the options from which the user can choose. You - "! can include up to 20 options. Required when **response_type**=`option`. + "! can include up to 20 options. OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, end of T_DIA_ND_OUTPUT_RESP_TYPE_OPT. types: @@ -1703,8 +1911,13 @@ public section. UPDATED type DATETIME, end of T_BASE_COUNTEREXAMPLE. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `image`. begin of T_RUNTIME_RESPONSE_TYPE_IMAGE, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! The URL of the image. SOURCE type STRING, "! The title or introductory text to show before the response. @@ -1723,6 +1936,17 @@ public section. DESCRIPTION type STRING, "! The language of the workspace. LANGUAGE type STRING, + "! The workspace ID of the workspace. + WORKSPACE_ID type STRING, + "! An array of objects describing the dialog nodes in the workspace. + DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects defining input examples that have been marked as irrelevant + "! input. + COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, "! Any metadata related to the workspace. METADATA type MAP, "! Whether training data from the workspace (including artifacts such as intents @@ -1731,25 +1955,14 @@ public section. LEARNING_OPT_OUT type BOOLEAN, "! Global settings for the workspace. SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, - "! The workspace ID of the workspace. - WORKSPACE_ID type STRING, "! The current status of the workspace. STATUS type STRING, - "! The timestamp for creation of the object. - CREATED type DATETIME, - "! The timestamp for the most recent update to the object. - UPDATED type DATETIME, + "! No documentation available. + WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, "! An array of objects defining the intents for the workspace. INTENTS type STANDARD TABLE OF T_CREATE_INTENT WITH NON-UNIQUE DEFAULT KEY, "! An array of objects describing the entities for the workspace. ENTITIES type STANDARD TABLE OF T_CREATE_ENTITY WITH NON-UNIQUE DEFAULT KEY, - "! An array of objects describing the dialog nodes in the workspace. - DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, - "! An array of objects defining input examples that have been marked as irrelevant - "! input. - COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, - "! No documentation available. - WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, end of T_UPDATE_WORKSPACE. types: "! No documentation available. @@ -1776,7 +1989,7 @@ public section. "! rview#dialog-overview-responses). OUTPUT type T_DIALOG_NODE_OUTPUT, "! The context for the dialog node. - CONTEXT type MAP, + CONTEXT type T_DIALOG_NODE_CONTEXT, "! The metadata for the dialog node. METADATA type MAP, "! The next step to execute following this dialog node. @@ -1804,6 +2017,7 @@ public section. "! users. USER_LABEL type STRING, "! Whether the dialog node should be excluded from disambiguation suggestions. + "! Valid only when **type**=`standard` or `frame`. DISAMBIGUATION_OPT_OUT type BOOLEAN, "! For internal use only. DISABLED type BOOLEAN, @@ -1910,27 +2124,39 @@ public section. "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_BASE_SYNONYM. + types: + "!

+ "! An object that describes a response with response type

+ "! `option`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_OPT, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! The description to show with the the response. + DESCRIPTION type STRING, + "! The preferred type of control to display. + PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. + OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + end of T_RT_RESP_GNRC_RT_RESP_TYP_OPT. + types: + "!

+ "! For internal use only.

+ T_WS_SYSTM_SETTINGS_AUTO_LEARN type JSONOBJECT. constants: "!

List of required fields per type.

begin of C_REQUIRED_FIELDS, T_WS_SYSTEM_SETTINGS_OFF_TOPIC type string value '|', - T_RT_ENTITY_INTERPRETATION type string value '|', T_WEBHOOK_HEADER type string value '|NAME|VALUE|', T_DIALOG_NODE_ACTION type string value '|NAME|RESULT_VARIABLE|', T_WS_SYSTM_STTNGS_DSMBGTN type string value '|', T_DIALOG_NODE_OUTPUT_MODIFIERS type string value '|', T_DIALOG_NODE_NEXT_STEP type string value '|BEHAVIOR|', - T_MESSAGE_INPUT type string value '|', - T_CAPTURE_GROUP type string value '|GROUP|', - T_RUNTIME_ENTITY_ROLE type string value '|', - T_RUNTIME_ENTITY type string value '|ENTITY|LOCATION|VALUE|', - T_RUNTIME_INTENT type string value '|INTENT|CONFIDENCE|', - T_DIA_ND_OUTPUT_OPT_ELEM_VALUE type string value '|', - T_DIA_NODE_OUTPUT_OPT_ELEMENT type string value '|LABEL|VALUE|', - T_DIA_ND_OTPT_TEXT_VALUES_ELEM type string value '|', - T_DIALOG_NODE_OUTPUT_GENERIC type string value '|RESPONSE_TYPE|', T_DIALOG_NODE_OUTPUT type string value '|', + T_DIALOG_NODE_CONTEXT type string value '|', T_DIALOG_NODE type string value '|DIALOG_NODE|', T_VALUE type string value '|VALUE|TYPE|', T_WEBHOOK type string value '|URL|NAME|', @@ -1942,35 +2168,53 @@ constants: T_WORKSPACE_SYSTEM_SETTINGS type string value '|', T_COUNTEREXAMPLE type string value '|TEXT|', T_ENTITY type string value '|ENTITY|', - T_WORKSPACE type string value '|NAME|LANGUAGE|LEARNING_OPT_OUT|WORKSPACE_ID|', + T_WORKSPACE type string value '|NAME|LANGUAGE|WORKSPACE_ID|LEARNING_OPT_OUT|', T_SYNONYM type string value '|SYNONYM|', T_PAGINATION type string value '|REFRESH_URL|', T_SYNONYM_COLLECTION type string value '|SYNONYMS|PAGINATION|', - T_RUNTIME_RESPONSE_TYPE_OPTION type string value '|', - T_DIA_ND_OUTPUT_RESP_TYPE_TEXT type string value '|', + T_RT_ENTITY_INTERPRETATION type string value '|', + T_MESSAGE_INPUT type string value '|', + T_CAPTURE_GROUP type string value '|GROUP|', + T_RUNTIME_ENTITY_ALTERNATIVE type string value '|', + T_RUNTIME_ENTITY_ROLE type string value '|', + T_RUNTIME_ENTITY type string value '|ENTITY|LOCATION|VALUE|', + T_RUNTIME_INTENT type string value '|INTENT|CONFIDENCE|', + T_DIA_ND_OUTPUT_OPT_ELEM_VALUE type string value '|', + T_DIA_NODE_OUTPUT_OPT_ELEMENT type string value '|LABEL|VALUE|', + T_RUNTIME_RESPONSE_TYPE_OPTION type string value '|RESPONSE_TYPE|TITLE|OPTIONS|', + T_DIA_ND_OTPT_TEXT_VALUES_ELEM type string value '|', + T_DIA_ND_OUTPUT_RESP_TYPE_TEXT type string value '|RESPONSE_TYPE|VALUES|', T_BASE_WORKSPACE type string value '|', T_BASE_ENTITY type string value '|', - T_RUNTIME_RESPONSE_TYPE_TEXT type string value '|', + T_RUNTIME_RESPONSE_TYPE_TEXT type string value '|RESPONSE_TYPE|TEXT|', T_RT_ENTTY_INTRPRTTN_SYS_TIME type string value '|', T_UPDATE_EXAMPLE type string value '|', T_ENTITY_MENTION type string value '|TEXT|INTENT|LOCATION|', - T_DIA_ND_OTPT_RESP_TYP_SRCH_S1 type string value '|', + T_RT_RESP_GNRC_RT_RESP_TYP_IMG type string value '|RESPONSE_TYPE|SOURCE|', + T_DIA_ND_OTPT_GNRC_DIA_ND_OTP1 type string value '|RESPONSE_TYPE|VALUES|', + T_DIA_ND_OTPT_RESP_TYP_SRCH_S1 type string value '|RESPONSE_TYPE|QUERY|QUERY_TYPE|', T_EXAMPLE_COLLECTION type string value '|EXAMPLES|PAGINATION|', T_LOG_PAGINATION type string value '|', - T_RT_RESP_TYP_CONNECT_TO_AGENT type string value '|', + T_AGENT_AVAILABILITY_MESSAGE type string value '|', + T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1 type string value '|', + T_RT_RESP_TYP_CONNECT_TO_AGENT type string value '|RESPONSE_TYPE|', + T_DIA_ND_OTPT_GNRC_DIA_ND_OTP5 type string value '|RESPONSE_TYPE|', T_CREATE_VALUE type string value '|VALUE|', - T_DIALOG_NODE_VISITED_DETAILS type string value '|', - T_DIA_SUGGESTION_RESP_GENERIC type string value '|RESPONSE_TYPE|', T_DIALOG_SUGGESTION_VALUE type string value '|', - T_DIALOG_SUGGESTION_OUTPUT type string value '|TEXT|', T_DIALOG_SUGGESTION type string value '|LABEL|VALUE|', T_UPDATE_VALUE type string value '|', - T_RUNTIME_ENTITY_ALTERNATIVE type string value '|', + T_BULK_CLASSIFY_UTTERANCE type string value '|TEXT|', + T_BULK_CLASSIFY_OUTPUT type string value '|', + T_BULK_CLASSIFY_RESPONSE type string value '|', T_UPDATE_INTENT type string value '|', + T_WORKSPACE_REFERENCE type string value '|', T_VALUE_COLLECTION type string value '|VALUES|PAGINATION|', + T_DIALOG_NODE_VISITED_DETAILS type string value '|', T_LOG_MESSAGE type string value '|LEVEL|MSG|', - T_RUNTIME_RESPONSE_GENERIC type string value '|RESPONSE_TYPE|', T_OUTPUT_DATA type string value '|LOG_MESSAGES|TEXT|', + T_BULK_CLASSIFY_INPUT type string value '|INPUT|', + T_DIA_ND_OTPT_GNRC_DIA_ND_OTP3 type string value '|RESPONSE_TYPE|SOURCE|', + T_RT_RESP_GNRC_RT_RESP_TYP_CN1 type string value '|RESPONSE_TYPE|', T_DIALOG_NODE_COLLECTION type string value '|DIALOG_NODES|PAGINATION|', T_MESSAGE_CONTEXT_METADATA type string value '|', T_CONTEXT type string value '|', @@ -1978,8 +2222,9 @@ constants: T_BASE_VALUE type string value '|', T_UPDATE_ENTITY type string value '|', T_UPDATE_DIALOG_NODE type string value '|', - T_RUNTIME_RESPONSE_TYPE_PAUSE type string value '|', - T_DIA_ND_OTPT_RESP_TYP_CNNCT_1 type string value '|', + T_RUNTIME_RESPONSE_TYPE_PAUSE type string value '|RESPONSE_TYPE|TIME|', + T_DIA_ND_OTPT_RESP_TYP_CNNCT_1 type string value '|RESPONSE_TYPE|', + T_RT_RESP_GNRC_RT_RESP_TYP_PS type string value '|RESPONSE_TYPE|TIME|', T_ERROR_DETAIL type string value '|MESSAGE|', T_CREATE_INTENT type string value '|INTENT|', T_CREATE_ENTITY type string value '|ENTITY|', @@ -1990,18 +2235,23 @@ constants: T_UPDATE_COUNTEREXAMPLE type string value '|', T_ENTITY_COLLECTION type string value '|ENTITIES|PAGINATION|', T_INTENT_COLLECTION type string value '|INTENTS|PAGINATION|', - T_DIA_ND_OTPT_RESP_TYPE_PAUSE type string value '|', - T_DIA_ND_OUTPUT_RESP_TYPE_IMG type string value '|', + T_DIA_ND_OTPT_RESP_TYPE_PAUSE type string value '|RESPONSE_TYPE|TIME|', + T_RT_RESP_GNRC_RT_RESP_TYP_SG1 type string value '|RESPONSE_TYPE|TITLE|SUGGESTIONS|', + T_DIA_ND_OUTPUT_RESP_TYPE_IMG type string value '|RESPONSE_TYPE|SOURCE|', T_ERROR_RESPONSE type string value '|ERROR|CODE|', + T_DIA_ND_OTPT_GNRC_DIA_ND_OTP4 type string value '|RESPONSE_TYPE|TITLE|OPTIONS|', T_BASE_MESSAGE type string value '|', - T_RT_RESPONSE_TYPE_SUGGESTION type string value '|', + T_RT_RESPONSE_TYPE_SUGGESTION type string value '|RESPONSE_TYPE|TITLE|SUGGESTIONS|', T_ENTITY_MENTION_COLLECTION type string value '|EXAMPLES|PAGINATION|', T_UPDATE_SYNONYM type string value '|', + T_RT_RESP_GNRC_RT_RESP_TYP_TXT type string value '|RESPONSE_TYPE|TEXT|', T_BASE_INTENT type string value '|', + T_DIA_ND_OTPT_GNRC_DIA_ND_OTP2 type string value '|RESPONSE_TYPE|TIME|', T_RT_ENTTY_INTRPRTTN_SYS_DATE type string value '|', - T_DIA_ND_OUTPUT_RESP_TYPE_OPT type string value '|', + T_DIA_ND_OTPT_GNRC_DIA_ND_OTP6 type string value '|RESPONSE_TYPE|QUERY|QUERY_TYPE|', + T_DIA_ND_OUTPUT_RESP_TYPE_OPT type string value '|RESPONSE_TYPE|TITLE|OPTIONS|', T_BASE_COUNTEREXAMPLE type string value '|', - T_RUNTIME_RESPONSE_TYPE_IMAGE type string value '|', + T_RUNTIME_RESPONSE_TYPE_IMAGE type string value '|RESPONSE_TYPE|SOURCE|', T_UPDATE_WORKSPACE type string value '|', T_BASE_DIALOG_NODE type string value '|', T_MESSAGE_REQUEST type string value '|', @@ -2011,12 +2261,14 @@ constants: T_AUDIT_PROPERTIES type string value '|', T_WORKSPACE_COLLECTION type string value '|WORKSPACES|PAGINATION|', T_BASE_SYNONYM type string value '|', + T_RT_RESP_GNRC_RT_RESP_TYP_OPT type string value '|RESPONSE_TYPE|TITLE|OPTIONS|', __DUMMY type string value SPACE, end of C_REQUIRED_FIELDS . constants: "!

Map ABAP identifiers to service identifiers.

begin of C_ABAPNAME_DICTIONARY, + MESSAGE type string value 'message', CREATED type string value 'created', UPDATED type string value 'updated', TEXT type string value 'text', @@ -2027,8 +2279,8 @@ constants: PREVIOUS_SIBLING type string value 'previous_sibling', OUTPUT type string value 'output', CONTEXT type string value 'context', - INNER type string value 'inner', METADATA type string value 'metadata', + INNER type string value 'inner', NEXT_STEP type string value 'next_step', TITLE type string value 'title', TYPE type string value 'type', @@ -2050,9 +2302,7 @@ constants: ENTITIES type string value 'entities', ALTERNATE_INTENTS type string value 'alternate_intents', NODES_VISITED type string value 'nodes_visited', - NODESVISITED type string value 'nodesVisited', NODES_VISITED_DETAILS type string value 'nodes_visited_details', - NODESVISITEDDETAILS type string value 'nodesVisitedDetails', SYNONYM type string value 'synonym', VALUE type string value 'value', SYNONYMS type string value 'synonyms', @@ -2060,48 +2310,49 @@ constants: PATTERN type string value 'pattern', NAME type string value 'name', LANGUAGE type string value 'language', - LEARNING_OPT_OUT type string value 'learning_opt_out', - SYSTEM_SETTINGS type string value 'system_settings', WORKSPACE_ID type string value 'workspace_id', - STATUS type string value 'status', + DIALOG_NODES type string value 'dialog_nodes', + COUNTEREXAMPLES type string value 'counterexamples', + COUNTEREXAMPLE type string value 'counterexample', GROUP type string value 'group', LOCATION type string value 'location', CONVERSATION_ID type string value 'conversation_id', SYSTEM type string value 'system', - COUNTEREXAMPLES type string value 'counterexamples', PAGINATION type string value 'pagination', VALUES type string value 'values', EXAMPLES type string value 'examples', EXAMPLE type string value 'example', - DIALOG_NODES type string value 'dialog_nodes', - DIALOGNODE type string value 'dialogNode', - COUNTEREXAMPLE type string value 'counterexample', + LEARNING_OPT_OUT type string value 'learning_opt_out', + SYSTEM_SETTINGS type string value 'system_settings', + STATUS type string value 'status', WEBHOOKS type string value 'webhooks', PARAMETERS type string value 'parameters', RESULT_VARIABLE type string value 'result_variable', CREDENTIALS type string value 'credentials', - DIALOGNODES type string value 'dialogNodes', + INTEGRATIONS type string value 'integrations', BEHAVIOR type string value 'behavior', SELECTOR type string value 'selector', GENERIC type string value 'generic', MODIFIERS type string value 'modifiers', + OVERWRITE type string value 'overwrite', + LABEL type string value 'label', RESPONSE_TYPE type string value 'response_type', - SELECTION_POLICY type string value 'selection_policy', - DELIMITER type string value 'delimiter', - TIME type string value 'time', - TYPING type string value 'typing', + MESSAGE_TO_HUMAN_AGENT type string value 'message_to_human_agent', + AGENT_AVAILABLE type string value 'agent_available', + AGENT_UNAVAILABLE type string value 'agent_unavailable', + TRANSFER_INFO type string value 'transfer_info', + TARGET type string value 'target', SOURCE type string value 'source', PREFERENCE type string value 'preference', OPTIONS type string value 'options', - MESSAGE_TO_HUMAN_AGENT type string value 'message_to_human_agent', + TIME type string value 'time', + TYPING type string value 'typing', QUERY type string value 'query', QUERY_TYPE type string value 'query_type', FILTER type string value 'filter', DISCOVERY_VERSION type string value 'discovery_version', - OVERWRITE type string value 'overwrite', - LABEL type string value 'label', - TOPIC type string value 'topic', - MESSAGE type string value 'message', + SELECTION_POLICY type string value 'selection_policy', + DELIMITER type string value 'delimiter', PATH type string value 'path', ERROR type string value 'error', ERRORS type string value 'errors', @@ -2119,14 +2370,18 @@ constants: NEXT_CURSOR type string value 'next_cursor', DEPLOYMENT type string value 'deployment', USER_ID type string value 'user_id', + SPELLING_SUGGESTIONS type string value 'spelling_suggestions', + SPELLING_AUTO_CORRECT type string value 'spelling_auto_correct', + SUGGESTED_TEXT type string value 'suggested_text', + ORIGINAL_TEXT type string value 'original_text', LOG_MESSAGES type string value 'log_messages', - LOGMESSAGES type string value 'logMessages', REFRESH_URL type string value 'refresh_url', TOTAL type string value 'total', REFRESH_CURSOR type string value 'refresh_cursor', CONFIDENCE type string value 'confidence', GROUPS type string value 'groups', INTERPRETATION type string value 'interpretation', + ALTERNATIVES type string value 'alternatives', ROLE type string value 'role', CALENDAR_TYPE type string value 'calendar_type', DATETIME_LINK type string value 'datetime_link', @@ -2154,6 +2409,7 @@ constants: SPECIFIC_MINUTE type string value 'specific_minute', SPECIFIC_SECOND type string value 'specific_second', TIMEZONE type string value 'timezone', + TOPIC type string value 'topic', SUGGESTIONS type string value 'suggestions', URL type string value 'url', HEADERS type string value 'headers', @@ -2190,9 +2446,7 @@ constants: "! state management, versioning, and search capabilities. For more information, "! see the "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overvi - "! ew).
- "!
- "! There is no rate limit for this operation. + "! ew). "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2203,29 +2457,57 @@ constants: "! Whether to include additional diagnostic information about the dialog nodes that "! were visited during processing of the message. "! @parameter E_RESPONSE | - "! Service return value of type T_MESSAGE_RESPONSE + "! Service return value of type T_MESSAGE_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods MESSAGE + importing + !I_WORKSPACE_ID type STRING + !I_BODY type T_MESSAGE_REQUEST optional + !I_NODES_VISITED_DETAILS type BOOLEAN default c_boolean_false + !I_contenttype type string default 'application/json' + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_MESSAGE_RESPONSE + raising + ZCX_IBMC_SERVICE_EXCEPTION . + + "!

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 Premium plans. + "! + "! @parameter I_WORKSPACE_ID | + "! Unique identifier of the workspace. + "! @parameter I_REQUEST | + "! An input object that includes the text to classify. + "! @parameter E_RESPONSE | + "! Service return value of type T_BULK_CLASSIFY_RESPONSE "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! - methods MESSAGE + methods BULK_CLASSIFY importing !I_WORKSPACE_ID type STRING - !I_BODY type T_MESSAGE_REQUEST optional - !I_NODES_VISITED_DETAILS type BOOLEAN default c_boolean_false + !I_REQUEST type T_BULK_CLASSIFY_INPUT optional !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting - !E_RESPONSE type T_MESSAGE_RESPONSE + !E_RESPONSE type T_BULK_CLASSIFY_RESPONSE raising ZCX_IBMC_SERVICE_EXCEPTION . "!

List workspaces

- "! List the workspaces associated with a Watson Assistant service instance.
- "!
- "! This operation is limited to 500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! List the workspaces associated with a Watson Assistant service instance. "! "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. + "! @parameter I_INCLUDE_COUNT | + "! Whether to include information about the number of records that satisfy the + "! request, regardless of the page limit. If this parameter is `true`, the + "! `pagination` object in the response includes the `total` property. "! @parameter I_SORT | "! The attribute by which returned workspaces will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). @@ -2241,6 +2523,7 @@ constants: methods LIST_WORKSPACES importing !I_PAGE_LIMIT type INTEGER optional + !I_INCLUDE_COUNT type BOOLEAN default c_boolean_false !I_SORT type STRING optional !I_CURSOR type STRING optional !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false @@ -2251,17 +2534,10 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

Create workspace

"! Create a workspace based on component objects. You must provide workspace - "! components defining the content of the new workspace.
- "!
- "! This operation is limited to 30 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! components defining the content of the new workspace. "! "! @parameter I_BODY | - "! The content of the new workspace.
- "!
- "! The maximum size for this data is 50MB. If you need to import a larger - "! workspace, consider importing the workspace without intents and entities and - "! then adding them separately. + "! No documentation available. "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. @@ -2280,12 +2556,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Get information about a workspace

- "! Get information about a workspace, optionally including all workspace - "! content.
- "!
- "! With **export**=`false`, this operation is limited to 6000 requests per 5 - "! minutes. With **export**=`true`, the limit is 20 requests per 30 minutes. For - "! more information, see **Rate limiting**. + "! Get information about a workspace, optionally including all workspace content. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2318,10 +2589,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

Update workspace

"! Update an existing workspace with new or modified data. You must provide - "! component objects defining the content of the updated workspace.
- "!
- "! This operation is limited to 30 request per 30 minutes. For more information, - "! see **Rate limiting**. + "! component objects defining the content of the updated workspace. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2362,10 +2630,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete workspace

- "! Delete a workspace from the service instance.
- "!
- "! This operation is limited to 30 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! Delete a workspace from the service instance. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2379,11 +2644,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

List intents

- "! List the intents for a workspace.
- "!
- "! With **export**=`false`, this operation is limited to 2000 requests per 30 - "! minutes. With **export**=`true`, the limit is 400 requests per 30 minutes. For - "! more information, see **Rate limiting**. + "! List the intents for a workspace. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2394,6 +2655,10 @@ constants: "! included. "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. + "! @parameter I_INCLUDE_COUNT | + "! Whether to include information about the number of records that satisfy the + "! request, regardless of the page limit. If this parameter is `true`, the + "! `pagination` object in the response includes the `total` property. "! @parameter I_SORT | "! The attribute by which returned intents will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). @@ -2411,6 +2676,7 @@ constants: !I_WORKSPACE_ID type STRING !I_EXPORT type BOOLEAN default c_boolean_false !I_PAGE_LIMIT type INTEGER optional + !I_INCLUDE_COUNT type BOOLEAN default c_boolean_false !I_SORT type STRING optional !I_CURSOR type STRING optional !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false @@ -2423,10 +2689,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 2000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! the **[Update workspace](#update-workspace)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2451,11 +2714,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Get intent

- "! Get information about an intent, optionally including all intent content.
- "!
- "! With **export**=`false`, this operation is limited to 6000 requests per 5 - "! minutes. With **export**=`true`, the limit is 400 requests per 30 minutes. For - "! more information, see **Rate limiting**. + "! Get information about an intent, optionally including all intent content. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2489,10 +2748,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 2000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! the **[Update workspace](#update-workspace)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2539,10 +2795,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete intent

- "! Delete an intent from a workspace.
- "!
- "! This operation is limited to 2000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! Delete an intent from a workspace. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2560,10 +2813,7 @@ constants: "!

List user input examples

"! List the user input examples for an intent, optionally including contextual - "! entity mentions.
- "!
- "! This operation is limited to 2500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! entity mentions. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2571,6 +2821,10 @@ constants: "! The intent name. "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. + "! @parameter I_INCLUDE_COUNT | + "! Whether to include information about the number of records that satisfy the + "! request, regardless of the page limit. If this parameter is `true`, the + "! `pagination` object in the response includes the `total` property. "! @parameter I_SORT | "! The attribute by which returned examples will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). @@ -2588,6 +2842,7 @@ constants: !I_WORKSPACE_ID type STRING !I_INTENT type STRING !I_PAGE_LIMIT type INTEGER optional + !I_INCLUDE_COUNT type BOOLEAN default c_boolean_false !I_SORT type STRING optional !I_CURSOR type STRING optional !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false @@ -2599,11 +2854,8 @@ constants: "!

Create user input example

"! Add a new user input example to an intent.
"!
- "! If you want to add multiple exaples with a single API call, consider using the - "! **[Update intent](#update-intent)** method instead.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! If you want to add multiple examples with a single API call, consider using the + "! **[Update intent](#update-intent)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2631,10 +2883,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Get user input example

- "! Get information about a user input example.
- "!
- "! This operation is limited to 6000 requests per 5 minutes. For more information, - "! see **Rate limiting**. + "! Get information about a user input example. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2664,10 +2913,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! the **[Update intent](#update-intent)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2698,10 +2944,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete user input example

- "! Delete a user input example from an intent.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! Delete a user input example from an intent. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2722,15 +2965,16 @@ constants: "!

List counterexamples

"! List the counterexamples for a workspace. Counterexamples are examples that have - "! been marked as irrelevant input.
- "!
- "! This operation is limited to 2500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! been marked as irrelevant input. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. + "! @parameter I_INCLUDE_COUNT | + "! Whether to include information about the number of records that satisfy the + "! request, regardless of the page limit. If this parameter is `true`, the + "! `pagination` object in the response includes the `total` property. "! @parameter I_SORT | "! The attribute by which returned counterexamples will be sorted. To reverse the "! sort order, prefix the value with a minus sign (`-`). @@ -2747,6 +2991,7 @@ constants: importing !I_WORKSPACE_ID type STRING !I_PAGE_LIMIT type INTEGER optional + !I_INCLUDE_COUNT type BOOLEAN default c_boolean_false !I_SORT type STRING optional !I_CURSOR type STRING optional !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false @@ -2760,10 +3005,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! using the **[Update workspace](#update-workspace)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2789,10 +3031,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

Get counterexample

"! Get information about a counterexample. Counterexamples are examples that have - "! been marked as irrelevant input.
- "!
- "! This operation is limited to 6000 requests per 5 minutes. For more information, - "! see **Rate limiting**. + "! been marked as irrelevant input. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2817,13 +3056,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

Update counterexample

"! Update the text of a counterexample. Counterexamples are examples that have been - "! marked as irrelevant input.
- "!
- "! If you want to update multiple counterexamples with a single API call, consider - "! using the **[Update workspace](#update-workspace)** method instead.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! marked as irrelevant input. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2852,10 +3085,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete counterexample

"! Delete a counterexample from a workspace. Counterexamples are examples that have - "! been marked as irrelevant input.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! been marked as irrelevant input. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2872,11 +3102,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

List entities

- "! List the entities for a workspace.
- "!
- "! With **export**=`false`, this operation is limited to 1000 requests per 30 - "! minutes. With **export**=`true`, the limit is 200 requests per 30 minutes. For - "! more information, see **Rate limiting**. + "! List the entities for a workspace. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2887,6 +3113,10 @@ constants: "! included. "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. + "! @parameter I_INCLUDE_COUNT | + "! Whether to include information about the number of records that satisfy the + "! request, regardless of the page limit. If this parameter is `true`, the + "! `pagination` object in the response includes the `total` property. "! @parameter I_SORT | "! The attribute by which returned entities will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). @@ -2904,6 +3134,7 @@ constants: !I_WORKSPACE_ID type STRING !I_EXPORT type BOOLEAN default c_boolean_false !I_PAGE_LIMIT type INTEGER optional + !I_INCLUDE_COUNT type BOOLEAN default c_boolean_false !I_SORT type STRING optional !I_CURSOR type STRING optional !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false @@ -2916,10 +3147,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! the **[Update workspace](#update-workspace)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2944,11 +3172,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Get entity

- "! Get information about an entity, optionally including all entity content.
- "!
- "! With **export**=`false`, this operation is limited to 6000 requests per 5 - "! minutes. With **export**=`true`, the limit is 200 requests per 30 minutes. For - "! more information, see **Rate limiting**. + "! Get information about an entity, optionally including all entity content. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -2982,10 +3206,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! the **[Update workspace](#update-workspace)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3030,10 +3251,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete entity

- "! Delete an entity from a workspace, or disable a system entity.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! Delete an entity from a workspace, or disable a system entity. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3051,10 +3269,7 @@ constants: "!

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.
- "!
- "! This operation is limited to 200 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! contextual entity in the context of an intent user input example. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3085,10 +3300,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

List entity values

- "! List the values for an entity.
- "!
- "! This operation is limited to 2500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! List the values for an entity. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3101,6 +3313,10 @@ constants: "! included. "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. + "! @parameter I_INCLUDE_COUNT | + "! Whether to include information about the number of records that satisfy the + "! request, regardless of the page limit. If this parameter is `true`, the + "! `pagination` object in the response includes the `total` property. "! @parameter I_SORT | "! The attribute by which returned entity values will be sorted. To reverse the "! sort order, prefix the value with a minus sign (`-`). @@ -3119,6 +3335,7 @@ constants: !I_ENTITY type STRING !I_EXPORT type BOOLEAN default c_boolean_false !I_PAGE_LIMIT type INTEGER optional + !I_INCLUDE_COUNT type BOOLEAN default c_boolean_false !I_SORT type STRING optional !I_CURSOR type STRING optional !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false @@ -3131,10 +3348,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! using the **[Update entity](#update-entity)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3162,10 +3376,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Get entity value

- "! Get information about an entity value.
- "!
- "! This operation is limited to 6000 requests per 5 minutes. For more information, - "! see **Rate limiting**. + "! Get information about an entity value. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3202,10 +3413,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! using the **[Update entity](#update-entity)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3255,10 +3463,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete entity value

- "! Delete a value from an entity.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! Delete a value from an entity. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3278,10 +3483,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

List entity value synonyms

- "! List the synonyms for an entity value.
- "!
- "! This operation is limited to 2500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! List the synonyms for an entity value. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3291,6 +3493,10 @@ constants: "! The text of the entity value. "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. + "! @parameter I_INCLUDE_COUNT | + "! Whether to include information about the number of records that satisfy the + "! request, regardless of the page limit. If this parameter is `true`, the + "! `pagination` object in the response includes the `total` property. "! @parameter I_SORT | "! The attribute by which returned entity value synonyms will be sorted. To reverse "! the sort order, prefix the value with a minus sign (`-`). @@ -3309,6 +3515,7 @@ constants: !I_ENTITY type STRING !I_VALUE type STRING !I_PAGE_LIMIT type INTEGER optional + !I_INCLUDE_COUNT type BOOLEAN default c_boolean_false !I_SORT type STRING optional !I_CURSOR type STRING optional !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false @@ -3322,10 +3529,7 @@ constants: "!
"! 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.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! value](#update-entity-value)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3356,10 +3560,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Get entity value synonym

- "! Get information about a synonym of an entity value.
- "!
- "! This operation is limited to 6000 requests per 5 minutes. For more information, - "! see **Rate limiting**. + "! Get information about a synonym of an entity value. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3393,10 +3594,7 @@ constants: "!
"! 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.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! value](#update-entity-value)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3430,10 +3628,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete entity value synonym

- "! Delete a synonym from an entity value.
- "!
- "! This operation is limited to 1000 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! Delete a synonym from an entity value. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3456,15 +3651,16 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

List dialog nodes

- "! List the dialog nodes for a workspace.
- "!
- "! This operation is limited to 2500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! List the dialog nodes for a workspace. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. + "! @parameter I_INCLUDE_COUNT | + "! Whether to include information about the number of records that satisfy the + "! request, regardless of the page limit. If this parameter is `true`, the + "! `pagination` object in the response includes the `total` property. "! @parameter I_SORT | "! The attribute by which returned dialog nodes will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). @@ -3481,6 +3677,7 @@ constants: importing !I_WORKSPACE_ID type STRING !I_PAGE_LIMIT type INTEGER optional + !I_INCLUDE_COUNT type BOOLEAN default c_boolean_false !I_SORT type STRING optional !I_CURSOR type STRING optional !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false @@ -3493,10 +3690,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! using the **[Update workspace](#update-workspace)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3521,10 +3715,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Get dialog node

- "! Get information about a dialog node.
- "!
- "! This operation is limited to 6000 requests per 5 minutes. For more information, - "! see **Rate limiting**. + "! Get information about a dialog node. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3551,10 +3742,7 @@ constants: "! 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.
- "!
- "! This operation is limited to 500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! using the **[Update workspace](#update-workspace)** method instead. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3588,10 +3776,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete dialog node

- "! Delete a dialog node from a workspace.
- "!
- "! This operation is limited to 500 requests per 30 minutes. For more information, - "! see **Rate limiting**. + "! Delete a dialog node from a workspace. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3608,11 +3793,7 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

List log events in a workspace

- "! List the events from the log of a specific workspace.
- "!
- "! If **cursor** is not specified, this operation is limited to 40 requests per 30 - "! minutes. If **cursor** is specified, the limit is 120 requests per minute. For - "! more information, see **Rate limiting**. + "! List the events from the log of a specific workspace. "! "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. @@ -3645,11 +3826,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

List log events in all workspaces

- "! List the events from the logs of all workspaces in the service instance.
- "!
- "! If **cursor** is not specified, this operation is limited to 40 requests per 30 - "! minutes. If **cursor** is specified, the limit is 120 requests per minute. For - "! more information, see **Rate limiting**. + "! List the events from the logs of all workspaces in the service instance. "! "! @parameter I_FILTER | "! A cacheable parameter that limits the results to those matching the specified @@ -3689,10 +3866,7 @@ constants: "! 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-secu - "! rity#information-security).
- "!
- "! This operation is limited to 4 requests per minute. For more information, see - "! **Rate limiting**. + "! rity#information-security). "! "! @parameter I_CUSTOMER_ID | "! The customer ID for which all data is to be deleted. @@ -3710,10 +3884,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_ASSISTANT_V1 IMPLEMENTATION. @@ -3755,22 +3925,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'ICP4D'. - e_request_prop-auth_name = 'ICP4D'. - e_request_prop-auth_type = 'apiKey'. - e_request_prop-auth_headername = 'Authorization'. - e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/assistant/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.assistant.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -3782,7 +3944,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173420'. + e_sdk_version_date = '20210312144425'. endmethod. @@ -3864,15 +4026,104 @@ method MESSAGE. endif. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. + + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. + + + " execute HTTP POST request + lo_response = HTTP_POST( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. + + +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_ASSISTANT_V1->BULK_CLASSIFY +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_REQUEST TYPE T_BULK_CLASSIFY_INPUT(optional) +* | [--->] I_contenttype TYPE string (default ='application/json') +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_BULK_CLASSIFY_RESPONSE +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method BULK_CLASSIFY. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/bulk_classify'. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + + " standard headers + ls_request_prop-header_content_type = I_contenttype. + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + + + + + + " process body parameters + data: + lv_body type string, + lv_bodyparam type string, + lv_datatype type char. + field-symbols: + type any. + lv_separator = ''. + if not i_REQUEST is initial. + lv_datatype = get_datatype( i_REQUEST ). + + if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or + lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or + ls_request_prop-header_content_type cp '*json*'. + if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or + lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. + lv_bodyparam = abap_to_json( i_value = i_REQUEST i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + else. + lv_bodyparam = abap_to_json( i_name = 'request' i_value = i_REQUEST ). + endif. + lv_body = lv_body && lv_separator && lv_bodyparam. + else. + assign i_REQUEST to . + lv_bodyparam = . + concatenate lv_body lv_bodyparam into lv_body. + endif. + endif. + if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -3895,6 +4146,7 @@ endmethod. * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_WORKSPACES * +-------------------------------------------------------------------------------------------------+ * | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_INCLUDE_COUNT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_SORT TYPE STRING(optional) * | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) @@ -3933,6 +4185,17 @@ method LIST_WORKSPACES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_COUNT is supplied. + lv_queryparam = i_INCLUDE_COUNT. + add_query_parameter( + exporting + i_parameter = `include_count` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_SORT is supplied. lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -4058,15 +4321,15 @@ method CREATE_WORKSPACE. endif. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -4257,15 +4520,15 @@ method UPDATE_WORKSPACE. endif. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -4329,6 +4592,7 @@ endmethod. * | [--->] I_WORKSPACE_ID TYPE STRING * | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_INCLUDE_COUNT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_SORT TYPE STRING(optional) * | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) @@ -4379,6 +4643,17 @@ method LIST_INTENTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_COUNT is supplied. + lv_queryparam = i_INCLUDE_COUNT. + add_query_parameter( + exporting + i_parameter = `include_count` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_SORT is supplied. lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -4504,15 +4779,15 @@ method CREATE_INTENT. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -4694,15 +4969,15 @@ method UPDATE_INTENT. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -4768,6 +5043,7 @@ endmethod. * | [--->] I_WORKSPACE_ID TYPE STRING * | [--->] I_INTENT TYPE STRING * | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_INCLUDE_COUNT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_SORT TYPE STRING(optional) * | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) @@ -4808,6 +5084,17 @@ method LIST_EXAMPLES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_COUNT is supplied. + lv_queryparam = i_INCLUDE_COUNT. + add_query_parameter( + exporting + i_parameter = `include_count` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_SORT is supplied. lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -4935,15 +5222,15 @@ method CREATE_EXAMPLE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5105,15 +5392,15 @@ method UPDATE_EXAMPLE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5180,6 +5467,7 @@ endmethod. * +-------------------------------------------------------------------------------------------------+ * | [--->] I_WORKSPACE_ID TYPE STRING * | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_INCLUDE_COUNT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_SORT TYPE STRING(optional) * | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) @@ -5219,6 +5507,17 @@ method LIST_COUNTEREXAMPLES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_COUNT is supplied. + lv_queryparam = i_INCLUDE_COUNT. + add_query_parameter( + exporting + i_parameter = `include_count` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_SORT is supplied. lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -5344,15 +5643,15 @@ method CREATE_COUNTEREXAMPLE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5510,15 +5809,15 @@ method UPDATE_COUNTEREXAMPLE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5584,6 +5883,7 @@ endmethod. * | [--->] I_WORKSPACE_ID TYPE STRING * | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_INCLUDE_COUNT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_SORT TYPE STRING(optional) * | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) @@ -5634,6 +5934,17 @@ method LIST_ENTITIES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_COUNT is supplied. + lv_queryparam = i_INCLUDE_COUNT. + add_query_parameter( + exporting + i_parameter = `include_count` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_SORT is supplied. lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -5759,15 +6070,15 @@ method CREATE_ENTITY. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5949,15 +6260,15 @@ method UPDATE_ENTITY. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -6101,6 +6412,7 @@ endmethod. * | [--->] I_ENTITY TYPE STRING * | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_INCLUDE_COUNT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_SORT TYPE STRING(optional) * | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) @@ -6152,6 +6464,17 @@ method LIST_VALUES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_COUNT is supplied. + lv_queryparam = i_INCLUDE_COUNT. + add_query_parameter( + exporting + i_parameter = `include_count` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_SORT is supplied. lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -6279,15 +6602,15 @@ method CREATE_VALUE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -6473,15 +6796,15 @@ method UPDATE_VALUE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -6550,6 +6873,7 @@ endmethod. * | [--->] I_ENTITY TYPE STRING * | [--->] I_VALUE TYPE STRING * | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_INCLUDE_COUNT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_SORT TYPE STRING(optional) * | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) @@ -6591,6 +6915,17 @@ method LIST_SYNONYMS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_COUNT is supplied. + lv_queryparam = i_INCLUDE_COUNT. + add_query_parameter( + exporting + i_parameter = `include_count` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_SORT is supplied. lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -6720,15 +7055,15 @@ method CREATE_SYNONYM. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -6894,15 +7229,15 @@ method UPDATE_SYNONYM. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -6971,6 +7306,7 @@ endmethod. * +-------------------------------------------------------------------------------------------------+ * | [--->] I_WORKSPACE_ID TYPE STRING * | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_INCLUDE_COUNT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_SORT TYPE STRING(optional) * | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) @@ -7010,6 +7346,17 @@ method LIST_DIALOG_NODES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_COUNT is supplied. + lv_queryparam = i_INCLUDE_COUNT. + add_query_parameter( + exporting + i_parameter = `include_count` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_SORT is supplied. lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -7135,15 +7482,15 @@ method CREATE_DIALOG_NODE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -7301,15 +7648,15 @@ method UPDATE_DIALOG_NODE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -7603,22 +7950,4 @@ method DELETE_USER_DATA. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_ASSISTANT_V1->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_assistant_v1.clas.xml b/src/zcl_ibmc_assistant_v1.clas.xml index afd6515..9b799e7 100644 --- a/src/zcl_ibmc_assistant_v1.clas.xml +++ b/src/zcl_ibmc_assistant_v1.clas.xml @@ -12,6 +12,12 @@ X + + ZCL_IBMC_ASSISTANT_V1 + BULK_CLASSIFY + E + Identify intents and entities in multiple user utterances + ZCL_IBMC_ASSISTANT_V1 CREATE_COUNTEREXAMPLE diff --git a/src/zcl_ibmc_assistant_v2.clas.abap b/src/zcl_ibmc_assistant_v2.clas.abap index 8a7aad3..c13cbe4 100644 --- a/src/zcl_ibmc_assistant_v2.clas.abap +++ b/src/zcl_ibmc_assistant_v2.clas.abap @@ -61,15 +61,6 @@ public section. "! interrupted. BRANCH_EXITED_REASON type STRING, end of T_MESSAGE_OUTPUT_DEBUG. - types: - "! No documentation available. - T_EMPTY_RESPONSE type JSONOBJECT. - types: - "! No documentation available. - begin of T_SESSION_RESPONSE, - "! The session ID. - SESSION_ID type STRING, - end of T_SESSION_RESPONSE. types: "! No documentation available. begin of T_RT_ENTTY_INTRPRTTN_SYS_NUM, @@ -84,25 +75,6 @@ public section. "! `rational`). SUBTYPE type STRING, end of T_RT_ENTTY_INTRPRTTN_SYS_NUM. - types: - "!

- "! An alternative value for the recognized entity.

- begin of T_RUNTIME_ENTITY_ALTERNATIVE, - "! The entity value that was recognized in the user input. - VALUE type STRING, - "! A decimal percentage that represents Watson's confidence in the recognized - "! entity. - CONFIDENCE type NUMBER, - end of T_RUNTIME_ENTITY_ALTERNATIVE. - types: - "!

- "! An object describing the role played by a system entity that

- "! is specifies the beginning or end of a range recognized in the user input. This - "! property is included only if the new system entities are enabled for the skill. - begin of T_RUNTIME_ENTITY_ROLE, - "! The relationship of the entity to the range. - TYPE type STRING, - end of T_RUNTIME_ENTITY_ROLE. types: "! No documentation available. begin of T_RT_ENTITY_INTERPRETATION, @@ -197,31 +169,25 @@ public section. end of T_RT_ENTITY_INTERPRETATION. types: "!

- "! Optional properties that control how the assistant responds.

- begin of T_MESSAGE_INPUT_OPTIONS, - "! Whether to return additional diagnostic information. Set to `true` to return - "! additional information under the `output.debug` key. - DEBUG type BOOLEAN, - "! Whether to restart dialog processing at the root of the dialog, regardless of - "! any previously visited nodes. **Note:** This does not affect `turn_count` or - "! any other context variables. - RESTART type BOOLEAN, - "! Whether to return more than one intent. Set to `true` to return all matching - "! intents. - ALTERNATE_INTENTS type BOOLEAN, - "! Whether to return session context with the response. If you specify `true`, the - "! response will include the `context` property. - RETURN_CONTEXT type BOOLEAN, - end of T_MESSAGE_INPUT_OPTIONS. - types: - "!

- "! An intent identified in the user input.

- begin of T_RUNTIME_INTENT, - "! The name of the recognized intent. - INTENT type STRING, - "! A decimal percentage that represents Watson's confidence in the intent. - CONFIDENCE type DOUBLE, - end of T_RUNTIME_INTENT. + "! Spelling correction options for the message. Any options

+ "! specified on an individual message override the settings configured for the + "! skill. + begin of T_MESSAGE_INPUT_OPT_SPELLING, + "! Whether to use spelling correction when processing the input. If spelling + "! correction is used and **auto_correct** is `true`, any spelling corrections are + "! automatically applied to the user input. If **auto_correct** is `false`, any + "! suggested corrections are returned in the **output.spelling** property.
+ "!
+ "! This property overrides the value of the **spelling_suggestions** property in + "! the workspace settings for the skill. + SUGGESTIONS type BOOLEAN, + "! Whether to use autocorrection when processing the input. If this property is + "! `true`, any corrections are automatically applied to the user input, and the + "! original text is returned in the **output.spelling** property of the message + "! response. This property overrides the value of the **spelling_auto_correct** + "! property in the workspace settings for the skill. + AUTO_CORRECT type BOOLEAN, + end of T_MESSAGE_INPUT_OPT_SPELLING. types: "! No documentation available. begin of T_CAPTURE_GROUP, @@ -231,6 +197,25 @@ public section. "! ends in the input text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, end of T_CAPTURE_GROUP. + types: + "!

+ "! An alternative value for the recognized entity.

+ begin of T_RUNTIME_ENTITY_ALTERNATIVE, + "! The entity value that was recognized in the user input. + VALUE type STRING, + "! A decimal percentage that represents Watson's confidence in the recognized + "! entity. + CONFIDENCE type NUMBER, + end of T_RUNTIME_ENTITY_ALTERNATIVE. + types: + "!

+ "! An object describing the role played by a system entity that

+ "! is specifies the beginning or end of a range recognized in the user input. This + "! property is included only if the new system entities are enabled for the skill. + begin of T_RUNTIME_ENTITY_ROLE, + "! The relationship of the entity to the range. + TYPE type STRING, + end of T_RUNTIME_ENTITY_ROLE. types: "!

"! The entity value that was recognized in the user input.

@@ -270,6 +255,46 @@ public section. "! included only if the new system entities are enabled for the skill. ROLE type T_RUNTIME_ENTITY_ROLE, end of T_RUNTIME_ENTITY. + types: + "!

+ "! Optional properties that control how the assistant responds.

+ begin of T_MESSAGE_INPUT_OPTIONS, + "! Whether to restart dialog processing at the root of the dialog, regardless of + "! any previously visited nodes. **Note:** This does not affect `turn_count` or + "! any other context variables. + RESTART type BOOLEAN, + "! Whether to return more than one intent. Set to `true` to return all matching + "! intents. + ALTERNATE_INTENTS type BOOLEAN, + "! Spelling correction options for the message. Any options specified on an + "! individual message override the settings configured for the skill. + SPELLING type T_MESSAGE_INPUT_OPT_SPELLING, + "! Whether to return additional diagnostic information. Set to `true` to return + "! additional information in the `output.debug` property. If you also specify + "! **return_context**=`true`, the returned skill context includes the + "! `system.state` property. + DEBUG type BOOLEAN, + "! Whether to return session context with the response. If you specify `true`, the + "! response includes the `context` property. If you also specify **debug**=`true`, + "! the returned skill context includes the `system.state` property. + RETURN_CONTEXT type BOOLEAN, + "! Whether to return session context, including full conversation state. If you + "! specify `true`, the response includes the `context` property, and the skill + "! context includes the `system.state` property.
+ "!
+ "! **Note:** If **export**=`true`, the context is returned regardless of the value + "! of **return_context**. + EXPORT type BOOLEAN, + end of T_MESSAGE_INPUT_OPTIONS. + types: + "!

+ "! An intent identified in the user input.

+ begin of T_RUNTIME_INTENT, + "! The name of the recognized intent. + INTENT type STRING, + "! A decimal percentage that represents Watson's confidence in the intent. + CONFIDENCE type DOUBLE, + end of T_RUNTIME_INTENT. types: "!

"! An input object that includes the input text.

@@ -279,8 +304,6 @@ public section. "! The text of the user input. This string cannot contain carriage return, newline, "! or tab characters. TEXT type STRING, - "! Optional properties that control how the assistant responds. - OPTIONS type T_MESSAGE_INPUT_OPTIONS, "! Intents to use when evaluating the user input. Include intents from the previous "! response to continue using those intents rather than trying to recognize "! intents in the new input. @@ -291,6 +314,8 @@ public section. ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, "! For internal use only. SUGGESTION_ID type STRING, + "! Optional properties that control how the assistant responds. + OPTIONS type T_MESSAGE_INPUT_OPTIONS, end of T_MESSAGE_INPUT. types: "!

@@ -310,8 +335,13 @@ public section. VALUE type T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, end of T_DIA_NODE_OUTPUT_OPT_ELEMENT. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `option`. begin of T_RUNTIME_RESPONSE_TYPE_OPTION, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! The title or introductory text to show before the response. TITLE type STRING, "! The description to show with the the response. @@ -321,71 +351,65 @@ public section. "! An array of objects describing the options from which the user can choose. OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, end of T_RUNTIME_RESPONSE_TYPE_OPTION. + types: + "!

+ "! An object defining the message input to be sent to the

+ "! assistant if the user selects the corresponding disambiguation option. + begin of T_DIALOG_SUGGESTION_VALUE, + "! An input object that includes the input text. + INPUT type T_MESSAGE_INPUT, + end of T_DIALOG_SUGGESTION_VALUE. types: "! No documentation available. - begin of T_RT_ENTTY_INTRPRTTN_SYS_DATE, - "! The calendar used to represent a recognized date (for example, `Gregorian`). - CALENDAR_TYPE type STRING, - "! A unique identifier used to associate a time and date. If the user input - "! contains a date and time that are mentioned together (for example, `Today at - "! 5`, the same **datetime_link** value is returned for both the `@sys-date` - "! and `@sys-time` entities). - DATETIME_LINK type STRING, - "! A locale-specific holiday name (such as `thanksgiving` or `christmas`). This - "! property is included when a `@sys-date` entity is recognized based on a - "! holiday name in the user input. - FESTIVAL type STRING, - "! The precision or duration of a time range specified by a recognized - "! `@sys-time` or `@sys-date` entity. - GRANULARITY type STRING, - "! A unique identifier used to associate multiple recognized `@sys-date`, - "! `@sys-time`, or `@sys-number` entities that are recognized as a range - "! of values in the user's input (for example, `from July 4 until July 14` or - "! `from 20 to 25`). - RANGE_LINK type STRING, - "! The word in the user input that indicates that a `sys-date` or `sys-time` entity - "! is part of an implied range where only one date or time is specified (for - "! example, `since` or `until`). - RANGE_MODIFIER type STRING, - "! A recognized mention of a relative day, represented numerically as an offset - "! from the current date (for example, `-1` for `yesterday` or `10` for `in ten - "! days`). - RELATIVE_DAY type NUMBER, - "! A recognized mention of a relative month, represented numerically as an offset - "! from the current month (for example, `1` for `next month` or `-3` for `three - "! months ago`). - RELATIVE_MONTH type NUMBER, - "! A recognized mention of a relative week, represented numerically as an offset - "! from the current week (for example, `2` for `in two weeks` or `-1` for `last - "! week). - RELATIVE_WEEK type NUMBER, - "! A recognized mention of a relative date range for a weekend, represented - "! numerically as an offset from the current weekend (for example, `0` for `this - "! weekend` or `-1` for `last weekend`). - RELATIVE_WEEKEND type NUMBER, - "! A recognized mention of a relative year, represented numerically as an offset - "! from the current year (for example, `1` for `next year` or `-5` for `five years - "! ago`). - RELATIVE_YEAR type NUMBER, - "! A recognized mention of a specific date, represented numerically as the date - "! within the month (for example, `30` for `June 30`.). - SPECIFIC_DAY type NUMBER, - "! A recognized mention of a specific day of the week as a lowercase string (for - "! example, `monday`). - SPECIFIC_DAY_OF_WEEK type STRING, - "! A recognized mention of a specific month, represented numerically (for example, - "! `7` for `July`). - SPECIFIC_MONTH type NUMBER, - "! A recognized mention of a specific quarter, represented numerically (for - "! example, `3` for `the third quarter`). - SPECIFIC_QUARTER type NUMBER, - "! A recognized mention of a specific year (for example, `2016`). - SPECIFIC_YEAR type NUMBER, - end of T_RT_ENTTY_INTRPRTTN_SYS_DATE. + begin of T_DIALOG_SUGGESTION, + "! The user-facing label for the suggestion. This label is taken from the **title** + "! or **user_label** property of the corresponding dialog node, depending on the + "! disambiguation options. + LABEL type STRING, + "! An object defining the message input to be sent to the assistant if the user + "! selects the corresponding disambiguation option. + VALUE type T_DIALOG_SUGGESTION_VALUE, + "! The dialog output that will be returned from the Watson Assistant service if the + "! user selects the corresponding option. + OUTPUT type MAP, + end of T_DIALOG_SUGGESTION. + types: + "!

+ "! Detailed information about how an autolearned model affected

+ "! the response. + begin of T_MSSG_OTPT_DBG_AT_LEARN_MODEL, + "! Whether the model was consulted successfully. + OUTCOME type STRING, + "! How the model was applied. + MODEL_TYPE type STRING, + "! Unique identifier of the autolearned model. + MODEL_ID type STRING, + "! Possible responses the assistant would have returned with autolearning applied, + "! either as disambiguation suggestions or alternate responses. Included only if + "! the response was generated with autolearning in preview mode. (Preview mode + "! means that autolearning is enabled, but is not being applied.). + SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, + end of T_MSSG_OTPT_DBG_AT_LEARN_MODEL. + types: + "!

+ "! Detailed information about how autolearning (if enabled)

+ "! affected the response.
+ "!
+ "! **Note:** Autolearning is a beta feature. + begin of T_MSSG_OUTPUT_DEBUG_AUTO_LEARN, + "! Whether autolearning was in preview mode when the message was processed. Preview + "! mode means that autolearning is enabled, but the autolearned model is not being + "! applied. + PREVIEW type BOOLEAN, + "! Detailed information about how an autolearned model affected the response. + DISAMBIGUATION type T_MSSG_OTPT_DBG_AT_LEARN_MODEL, + "! Detailed information about how an autolearned model affected the response. + ALTERNATE_RESPONSES type T_MSSG_OTPT_DBG_AT_LEARN_MODEL, + end of T_MSSG_OUTPUT_DEBUG_AUTO_LEARN. types: "!

"! An object containing segments of text from search results

- "! with query-matching text highlighted using HTML <em> tags. + "! with query-matching text highlighted using HTML `<em>` tags. begin of T_SEARCH_RESULT_HIGHLIGHT, "! An array of strings containing segments taken from body text in the search "! results, with query-matching substrings highlighted. @@ -399,12 +423,36 @@ public section. end of T_SEARCH_RESULT_HIGHLIGHT. types: "!

- "! An object defining the message input to be sent to the

- "! assistant if the user selects the corresponding disambiguation option. - begin of T_DIALOG_SUGGESTION_VALUE, - "! An input object that includes the input text. - INPUT type T_MESSAGE_INPUT, - end of T_DIALOG_SUGGESTION_VALUE. + "! An object that describes a response with response type

+ "! `suggestion`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_SG1, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! An array of objects describing the possible matching dialog nodes from which the + "! user can choose. + SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, + end of T_RT_RESP_GNRC_RT_RESP_TYP_SG1. + types: + "! No documentation available. + begin of T_ERROR_DETAIL, + "! Description of a specific constraint violation. + MESSAGE type STRING, + "! The location of the constraint violation. + PATH type STRING, + end of T_ERROR_DETAIL. + types: + "! No documentation available. + begin of T_ERROR_RESPONSE, + "! General description of an error. + ERROR type STRING, + "! Collection of specific constraint violations associated with the error. + ERRORS type STANDARD TABLE OF T_ERROR_DETAIL WITH NON-UNIQUE DEFAULT KEY, + "! HTTP status code for the error response. + CODE type INTEGER, + end of T_ERROR_RESPONSE. types: "!

"! An object containing search result metadata from the

@@ -424,8 +472,8 @@ public section. begin of T_SEARCH_RESULT, "! The unique identifier of the document in the Discovery service collection.
"!
- "! This property is included in responses from search skills, which are a beta - "! feature available only to Plus or Premium plan users. + "! This property is included in responses from search skills, which are available + "! only to Plus or Premium plan users. ID type STRING, "! An object containing search result metadata from the Discovery service. RESULT_METADATA type T_SEARCH_RESULT_METADATA, @@ -439,94 +487,58 @@ public section. "! The URL of the original data object in its native data source. URL type STRING, "! An object containing segments of text from search results with query-matching - "! text highlighted using HTML <em> tags. + "! text highlighted using HTML `<em>` tags. HIGHLIGHT type T_SEARCH_RESULT_HIGHLIGHT, end of T_SEARCH_RESULT. types: - "! No documentation available. - begin of T_DIALOG_SUGGESTION, - "! The user-facing label for the disambiguation option. This label is taken from - "! the **title** or **user_label** property of the corresponding dialog node, - "! depending on the disambiguation options. - LABEL type STRING, - "! An object defining the message input to be sent to the assistant if the user - "! selects the corresponding disambiguation option. - VALUE type T_DIALOG_SUGGESTION_VALUE, - "! The dialog output that will be returned from the Watson Assistant service if the - "! user selects the corresponding option. - OUTPUT type MAP, - end of T_DIALOG_SUGGESTION. + "!

+ "! Optional properties that control how the assistant responds.

+ begin of T_MESSAGE_INPUT_OPT_STATELESS, + "! Whether to restart dialog processing at the root of the dialog, regardless of + "! any previously visited nodes. **Note:** This does not affect `turn_count` or + "! any other context variables. + RESTART type BOOLEAN, + "! Whether to return more than one intent. Set to `true` to return all matching + "! intents. + ALTERNATE_INTENTS type BOOLEAN, + "! Spelling correction options for the message. Any options specified on an + "! individual message override the settings configured for the skill. + SPELLING type T_MESSAGE_INPUT_OPT_SPELLING, + "! Whether to return additional diagnostic information. Set to `true` to return + "! additional information in the `output.debug` property. + DEBUG type BOOLEAN, + end of T_MESSAGE_INPUT_OPT_STATELESS. types: - "! No documentation available. - begin of T_RUNTIME_RESPONSE_GENERIC, - "! The type of response returned by the dialog node. The specified response type - "! must be supported by the client application or channel.
- "!
- "! **Note:** The **suggestion** response type is part of the disambiguation - "! feature, which is only available for Premium users. - RESPONSE_TYPE type STRING, - "! The text of the response. + "!

+ "! An input object that includes the input text.

+ begin of T_BASE_MESSAGE_INPUT, + "! The type of user input. Currently, only text input is supported. + MESSAGE_TYPE type STRING, + "! The text of the user input. This string cannot contain carriage return, newline, + "! or tab characters. TEXT type STRING, - "! How long to pause, in milliseconds. - TIME type INTEGER, - "! Whether to send a "user is typing" event during the pause. - TYPING type BOOLEAN, - "! The URL of the image. - SOURCE type STRING, - "! The title or introductory text to show before the response. - TITLE type STRING, - "! The description to show with the the response. - DESCRIPTION type STRING, - "! The preferred type of control to display. - PREFERENCE type STRING, - "! An array of objects describing the options from which the user can choose. - OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, - "! A message to be sent to the human agent who will be taking over the - "! conversation. - MESSAGE_TO_HUMAN_AGENT type STRING, - "! A label identifying the topic of the conversation, derived from the - "! **user_label** property of the relevant node. - TOPIC type STRING, - "! An array of objects describing the possible matching dialog nodes from which the - "! user can choose.
- "!
- "! **Note:** The **suggestions** property is part of the disambiguation feature, - "! which is only available for Premium users. - SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, - "! The title or introductory text to show before the response. This text is defined - "! in the search skill configuration. - HEADER type STRING, - "! An array of objects containing search results. - RESULTS type STANDARD TABLE OF T_SEARCH_RESULT WITH NON-UNIQUE DEFAULT KEY, - end of T_RUNTIME_RESPONSE_GENERIC. - types: - "! No documentation available. - begin of T_ERROR_DETAIL, - "! Description of a specific constraint violation. - MESSAGE type STRING, - "! The location of the constraint violation. - PATH type STRING, - end of T_ERROR_DETAIL. - types: - "! No documentation available. - begin of T_ERROR_RESPONSE, - "! General description of an error. - ERROR type STRING, - "! Collection of specific constraint violations associated with the error. - ERRORS type STANDARD TABLE OF T_ERROR_DETAIL WITH NON-UNIQUE DEFAULT KEY, - "! HTTP status code for the error response. - CODE type INTEGER, - end of T_ERROR_RESPONSE. + "! Intents to use when evaluating the user input. Include intents from the previous + "! response to continue using those intents rather than trying to recognize + "! intents in the new input. + INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! Entities to use when evaluating the message. Include entities from the previous + "! response to continue using those entities rather than detecting entities in the + "! new input. + ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! For internal use only. + SUGGESTION_ID type STRING, + end of T_BASE_MESSAGE_INPUT. types: - "! No documentation available. - begin of T_RUNTIME_RESPONSE_TYPE_IMAGE, - "! The URL of the image. - SOURCE type STRING, - "! The title to show before the response. - TITLE type STRING, - "! The description to show with the the response. - DESCRIPTION type STRING, - end of T_RUNTIME_RESPONSE_TYPE_IMAGE. + "!

+ "! An object that describes a response with response type

+ "! `text`. + begin of T_RUNTIME_RESPONSE_TYPE_TEXT, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The text of the response. + TEXT type STRING, + end of T_RUNTIME_RESPONSE_TYPE_TEXT. types: "! No documentation available. begin of T_DIALOG_NODE_ACTION, @@ -542,6 +554,49 @@ public section. "! credentials for the action. CREDENTIALS type STRING, end of T_DIALOG_NODE_ACTION. + types: + "! No documentation available. + begin of T_RT_ENTTY_INTRPRTTN_SYS_TIME, + "! A unique identifier used to associate a recognized time and date. If the user + "! input contains a date and time that are mentioned together (for example, `Today + "! at 5`, the same **datetime_link** value is returned for both the + "! `@sys-date` and `@sys-time` entities). + DATETIME_LINK type STRING, + "! The precision or duration of a time range specified by a recognized + "! `@sys-time` or `@sys-date` entity. + GRANULARITY type STRING, + "! A recognized term for a time that was mentioned as a part of the day in the + "! user's input (for example, `morning` or `afternoon`). + PART_OF_DAY type STRING, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range + "! of values in the user's input (for example, `from July 4 until July 14` or + "! `from 20 to 25`). + RANGE_LINK type STRING, + "! A recognized mention of a relative hour, represented numerically as an offset + "! from the current hour (for example, `3` for `in three hours` or `-1` for `an + "! hour ago`). + RELATIVE_HOUR type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! minutes from the current time (for example, `5` for `in five minutes` or `-15` + "! for `fifteen minutes ago`). + RELATIVE_MINUTE type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! seconds from the current time (for example, `10` for `in ten seconds` or `-30` + "! for `thirty seconds ago`). + RELATIVE_SECOND type NUMBER, + "! A recognized specific hour mentioned as part of a time value (for example, `10` + "! for `10:15 AM`.). + SPECIFIC_HOUR type NUMBER, + "! A recognized specific minute mentioned as part of a time value (for example, + "! `15` for `10:15 AM`.). + SPECIFIC_MINUTE type NUMBER, + "! A recognized specific second mentioned as part of a time value (for example, + "! `30` for `10:15:30 AM`.). + SPECIFIC_SECOND type NUMBER, + "! A recognized time zone mentioned as part of a time value (for example, `EST`). + TIMEZONE type STRING, + end of T_RT_ENTTY_INTRPRTTN_SYS_TIME. types: "!

"! Built-in system properties that apply to all skills used by

@@ -584,33 +639,227 @@ public section. end of T_MSSG_CONTEXT_GLOBAL_SYSTEM. types: "!

- "! Information that is shared by all skills used by the

- "! Assistant. + "! Session context data that is shared by all skills used by

+ "! the Assistant. begin of T_MESSAGE_CONTEXT_GLOBAL, "! Built-in system properties that apply to all skills used by the assistant. SYSTEM type T_MSSG_CONTEXT_GLOBAL_SYSTEM, + "! The session ID. + SESSION_ID type STRING, end of T_MESSAGE_CONTEXT_GLOBAL. types: "!

- "! Information specific to particular skills used by the

- "! Assistant.
+ "! Autolearning options for the message.


"!
- "! **Note:** Currently, only a single property named `main skill` is supported. - "! This object contains variables that apply to the dialog skill used by the - "! assistant. - T_MESSAGE_CONTEXT_SKILLS type MAP. + "! **Note:** Autolearning is a beta feature. + begin of T_MESSAGE_INPUT_OPT_AUTO_LEARN, + "! Whether the message should be used for autolearning. Specify `false` to exclude + "! a message from autolearning (for example, if you are running tests on a + "! production assistant). If autolearning is not enabled for the dialog skill, + "! this option is ignored. + LEARN type BOOLEAN, + "! Whether the autolearned model should be applied when responding to the message. + "! You can use this option to compare responses with and without autolearning. If + "! autolearning is not enabled for the dialog skill, this option is ignored. + APPLY type BOOLEAN, + end of T_MESSAGE_INPUT_OPT_AUTO_LEARN. types: "! No documentation available. begin of T_MESSAGE_CONTEXT, - "! Information that is shared by all skills used by the Assistant. + "! Session context data that is shared by all skills used by the Assistant. GLOBAL type T_MESSAGE_CONTEXT_GLOBAL, - "! Information specific to particular skills used by the Assistant.
+ "! Information specific to particular skills used by the assistant.
"!
- "! **Note:** Currently, only a single property named `main skill` is supported. - "! This object contains variables that apply to the dialog skill used by the - "! assistant. - SKILLS type T_MESSAGE_CONTEXT_SKILLS, + "! **Note:** Currently, only a single child property is supported, containing + "! variables that apply to the dialog skill used by the assistant. + SKILLS type MAP, end of T_MESSAGE_CONTEXT. + types: + "!

+ "! System context data used by the skill.

+ begin of T_MESSAGE_CONTEXT_SKILL_SYSTEM, + "! An encoded string that represents the current conversation state. By saving this + "! value and then sending it in the context of a subsequent message request, you + "! can return to an earlier point in the conversation. If you are using stateful + "! sessions, you can also use a stored state value to restore a paused + "! conversation whose session is expired. + STATE type STRING, + end of T_MESSAGE_CONTEXT_SKILL_SYSTEM. + types: + "!

+ "! Session context data that is shared by all skills used by

+ "! the Assistant. + begin of T_MSSG_CNTXT_GLOBAL_STATELESS, + "! Built-in system properties that apply to all skills used by the assistant. + SYSTEM type T_MSSG_CONTEXT_GLOBAL_SYSTEM, + "! The unique identifier of the session. + SESSION_ID type STRING, + end of T_MSSG_CNTXT_GLOBAL_STATELESS. + types: + "! No documentation available. + begin of T_MESSAGE_CONTEXT_STATELESS, + "! Session context data that is shared by all skills used by the Assistant. + GLOBAL type T_MSSG_CNTXT_GLOBAL_STATELESS, + "! Information specific to particular skills used by the assistant.
+ "!
+ "! **Note:** Currently, only a single child property is supported, containing + "! variables that apply to the dialog skill used by the assistant. + SKILLS type MAP, + end of T_MESSAGE_CONTEXT_STATELESS. + types: + "!

+ "! An input object that includes the input text.

+ begin of T_MESSAGE_INPUT_STATELESS, + "! The type of user input. Currently, only text input is supported. + MESSAGE_TYPE type STRING, + "! The text of the user input. This string cannot contain carriage return, newline, + "! or tab characters. + TEXT type STRING, + "! Intents to use when evaluating the user input. Include intents from the previous + "! response to continue using those intents rather than trying to recognize + "! intents in the new input. + INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! Entities to use when evaluating the message. Include entities from the previous + "! response to continue using those entities rather than detecting entities in the + "! new input. + ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! For internal use only. + SUGGESTION_ID type STRING, + "! Optional properties that control how the assistant responds. + OPTIONS type T_MESSAGE_INPUT_OPT_STATELESS, + end of T_MESSAGE_INPUT_STATELESS. + types: + "!

+ "! A stateless message request formatted for the Watson

+ "! Assistant service. + begin of T_MESSAGE_REQUEST_STATELESS, + "! An input object that includes the input text. + INPUT type T_MESSAGE_INPUT_STATELESS, + "! Context data for the conversation. You can use this property to set or modify + "! context variables, which can also be accessed by dialog nodes. The context is + "! not stored by the assistant. To maintain session state, include the context + "! from the previous response.
+ "!
+ "! **Note:** The total size of the context data for a stateless session cannot + "! exceed 250KB. + CONTEXT type T_MESSAGE_CONTEXT_STATELESS, + end of T_MESSAGE_REQUEST_STATELESS. + types: + "!

+ "! An object that describes a response with response type

+ "! `image`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_IMG, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The URL of the image. + SOURCE type STRING, + "! The title to show before the response. + TITLE type STRING, + "! The description to show with the the response. + DESCRIPTION type STRING, + end of T_RT_RESP_GNRC_RT_RESP_TYP_IMG. + types: + "!

+ "! An object that describes a response with response type

+ "! `suggestion`. + begin of T_RT_RESPONSE_TYPE_SUGGESTION, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! An array of objects describing the possible matching dialog nodes from which the + "! user can choose. + SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, + end of T_RT_RESPONSE_TYPE_SUGGESTION. + types: + "!

+ "! The user input utterance to classify.

+ begin of T_BULK_CLASSIFY_UTTERANCE, + "! The text of the input utterance. + TEXT type STRING, + end of T_BULK_CLASSIFY_UTTERANCE. + types: + "!

+ "! The pagination data for the returned objects.

+ begin of T_LOG_PAGINATION, + "! The URL that will return the next page of results, if any. + NEXT_URL type STRING, + "! Reserved for future use. + MATCHED type INTEGER, + "! A token identifying the next page of results. + NEXT_CURSOR type STRING, + end of T_LOG_PAGINATION. + types: + "!

+ "! An object that describes a response with response type

+ "! `text`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_TXT, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The text of the response. + TEXT type STRING, + end of T_RT_RESP_GNRC_RT_RESP_TYP_TXT. + types: + "! No documentation available. + begin of T_AGENT_AVAILABILITY_MESSAGE, + "! The text of the message. + MESSAGE type STRING, + end of T_AGENT_AVAILABILITY_MESSAGE. + types: + "!

+ "! Routing or other contextual information to be used by target

+ "! service desk systems. + begin of T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1, + "! No documentation available. + TARGET type MAP, + end of T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1. + types: + "!

+ "! An object that describes a response with response type

+ "! `connect_to_agent`. + begin of T_RT_RESP_TYP_CONNECT_TO_AGENT, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! A message to be sent to the human agent who will be taking over the + "! conversation. + MESSAGE_TO_HUMAN_AGENT type STRING, + "! An optional message to be displayed to the user to indicate that the + "! conversation will be transferred to the next available agent. + AGENT_AVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! An optional message to be displayed to the user to indicate that no online agent + "! is available to take over the conversation. + AGENT_UNAVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! Routing or other contextual information to be used by target service desk + "! systems. + TRANSFER_INFO type T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1, + "! A label identifying the topic of the conversation, derived from the **title** + "! property of the relevant node or the **topic** property of the dialog node + "! response. + TOPIC type STRING, + end of T_RT_RESP_TYP_CONNECT_TO_AGENT. + types: + "! No documentation available. + T_RUNTIME_RESPONSE_GENERIC type JSONOBJECT. + types: + "!

+ "! Properties describing any spelling corrections in the user

+ "! input that was received. + begin of T_MESSAGE_OUTPUT_SPELLING, + "! The user input text that was used to generate the response. If spelling + "! autocorrection is enabled, this text reflects any spelling corrections that + "! were applied. + TEXT type STRING, + "! The original user input text. This property is returned only if autocorrection + "! is enabled and the user input was corrected. + ORIGINAL_TEXT type STRING, + "! Any suggested corrections of the input text. This property is returned only if + "! spelling correction is enabled and autocorrection is disabled. + SUGGESTED_TEXT type STRING, + end of T_MESSAGE_OUTPUT_SPELLING. types: "!

"! Assistant output to be rendered or processed by the client.

@@ -632,73 +881,222 @@ public section. "! includes any arbitrary properties defined in the dialog JSON editor as part of "! the dialog node output. USER_DEFINED type MAP, + "! Properties describing any spelling corrections in the user input that was + "! received. + SPELLING type T_MESSAGE_OUTPUT_SPELLING, end of T_MESSAGE_OUTPUT. types: "!

- "! A response from the Watson Assistant service.

- begin of T_MESSAGE_RESPONSE, - "! Assistant output to be rendered or processed by the client. - OUTPUT type T_MESSAGE_OUTPUT, - "! State information for the conversation. The context is stored by the assistant - "! on a per-session basis. You can use this property to access context - "! variables.
- "!
- "! **Note:** The context is included in message responses only if - "! **return_context**=`true` in the message request. - CONTEXT type T_MESSAGE_CONTEXT, - end of T_MESSAGE_RESPONSE. + "! Optional properties that control how the assistant responds.

+ begin of T_BASE_MESSAGE_INPUT_OPTIONS, + "! Whether to restart dialog processing at the root of the dialog, regardless of + "! any previously visited nodes. **Note:** This does not affect `turn_count` or + "! any other context variables. + RESTART type BOOLEAN, + "! Whether to return more than one intent. Set to `true` to return all matching + "! intents. + ALTERNATE_INTENTS type BOOLEAN, + "! Spelling correction options for the message. Any options specified on an + "! individual message override the settings configured for the skill. + SPELLING type T_MESSAGE_INPUT_OPT_SPELLING, + end of T_BASE_MESSAGE_INPUT_OPTIONS. types: "! No documentation available. - begin of T_RUNTIME_RESPONSE_TYPE_TEXT, - "! The text of the response. - TEXT type STRING, - end of T_RUNTIME_RESPONSE_TYPE_TEXT. + T_EMPTY_RESPONSE type JSONOBJECT. types: "! No documentation available. - begin of T_RT_ENTTY_INTRPRTTN_SYS_TIME, - "! A unique identifier used to associate a recognized time and date. If the user - "! input contains a date and time that are mentioned together (for example, `Today - "! at 5`, the same **datetime_link** value is returned for both the - "! `@sys-date` and `@sys-time` entities). + begin of T_SESSION_RESPONSE, + "! The session ID. + SESSION_ID type STRING, + end of T_SESSION_RESPONSE. + types: + "! No documentation available. + begin of T_RT_ENTTY_INTRPRTTN_SYS_DATE, + "! The calendar used to represent a recognized date (for example, `Gregorian`). + CALENDAR_TYPE type STRING, + "! A unique identifier used to associate a time and date. If the user input + "! contains a date and time that are mentioned together (for example, `Today at + "! 5`, the same **datetime_link** value is returned for both the `@sys-date` + "! and `@sys-time` entities). DATETIME_LINK type STRING, + "! A locale-specific holiday name (such as `thanksgiving` or `christmas`). This + "! property is included when a `@sys-date` entity is recognized based on a + "! holiday name in the user input. + FESTIVAL type STRING, "! The precision or duration of a time range specified by a recognized "! `@sys-time` or `@sys-date` entity. GRANULARITY type STRING, - "! A recognized term for a time that was mentioned as a part of the day in the - "! user's input (for example, `morning` or `afternoon`). - PART_OF_DAY type STRING, "! A unique identifier used to associate multiple recognized `@sys-date`, "! `@sys-time`, or `@sys-number` entities that are recognized as a range "! of values in the user's input (for example, `from July 4 until July 14` or "! `from 20 to 25`). RANGE_LINK type STRING, - "! A recognized mention of a relative hour, represented numerically as an offset - "! from the current hour (for example, `3` for `in three hours` or `-1` for `an - "! hour ago`). - RELATIVE_HOUR type NUMBER, - "! A recognized mention of a relative time, represented numerically as an offset in - "! minutes from the current time (for example, `5` for `in five minutes` or `-15` - "! for `fifteen minutes ago`). - RELATIVE_MINUTE type NUMBER, - "! A recognized mention of a relative time, represented numerically as an offset in - "! seconds from the current time (for example, `10` for `in ten seconds` or `-30` - "! for `thirty seconds ago`). - RELATIVE_SECOND type NUMBER, - "! A recognized specific hour mentioned as part of a time value (for example, `10` - "! for `10:15 AM`.). - SPECIFIC_HOUR type NUMBER, - "! A recognized specific minute mentioned as part of a time value (for example, - "! `15` for `10:15 AM`.). - SPECIFIC_MINUTE type NUMBER, - "! A recognized specific second mentioned as part of a time value (for example, - "! `30` for `10:15:30 AM`.). - SPECIFIC_SECOND type NUMBER, - "! A recognized time zone mentioned as part of a time value (for example, `EST`). - TIMEZONE type STRING, - end of T_RT_ENTTY_INTRPRTTN_SYS_TIME. + "! The word in the user input that indicates that a `sys-date` or `sys-time` entity + "! is part of an implied range where only one date or time is specified (for + "! example, `since` or `until`). + RANGE_MODIFIER type STRING, + "! A recognized mention of a relative day, represented numerically as an offset + "! from the current date (for example, `-1` for `yesterday` or `10` for `in ten + "! days`). + RELATIVE_DAY type NUMBER, + "! A recognized mention of a relative month, represented numerically as an offset + "! from the current month (for example, `1` for `next month` or `-3` for `three + "! months ago`). + RELATIVE_MONTH type NUMBER, + "! A recognized mention of a relative week, represented numerically as an offset + "! from the current week (for example, `2` for `in two weeks` or `-1` for `last + "! week). + RELATIVE_WEEK type NUMBER, + "! A recognized mention of a relative date range for a weekend, represented + "! numerically as an offset from the current weekend (for example, `0` for `this + "! weekend` or `-1` for `last weekend`). + RELATIVE_WEEKEND type NUMBER, + "! A recognized mention of a relative year, represented numerically as an offset + "! from the current year (for example, `1` for `next year` or `-5` for `five years + "! ago`). + RELATIVE_YEAR type NUMBER, + "! A recognized mention of a specific date, represented numerically as the date + "! within the month (for example, `30` for `June 30`.). + SPECIFIC_DAY type NUMBER, + "! A recognized mention of a specific day of the week as a lowercase string (for + "! example, `monday`). + SPECIFIC_DAY_OF_WEEK type STRING, + "! A recognized mention of a specific month, represented numerically (for example, + "! `7` for `July`). + SPECIFIC_MONTH type NUMBER, + "! A recognized mention of a specific quarter, represented numerically (for + "! example, `3` for `the third quarter`). + SPECIFIC_QUARTER type NUMBER, + "! A recognized mention of a specific year (for example, `2016`). + SPECIFIC_YEAR type NUMBER, + end of T_RT_ENTTY_INTRPRTTN_SYS_DATE. + types: + "! No documentation available. + begin of T_BULK_CLASSIFY_OUTPUT, + "! The user input utterance to classify. + INPUT type T_BULK_CLASSIFY_UTTERANCE, + "! An array of entities identified in the utterance. + ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! An array of intents recognized in the utterance. + INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + end of T_BULK_CLASSIFY_OUTPUT. + types: + "! No documentation available. + begin of T_BULK_CLASSIFY_RESPONSE, + "! An array of objects that contain classification information for the submitted + "! input utterances. + OUTPUT type STANDARD TABLE OF T_BULK_CLASSIFY_OUTPUT WITH NON-UNIQUE DEFAULT KEY, + end of T_BULK_CLASSIFY_RESPONSE. + types: + "! No documentation available. + begin of T_BULK_CLASSIFY_INPUT, + "! An array of input utterances to classify. + INPUT type STANDARD TABLE OF T_BULK_CLASSIFY_UTTERANCE WITH NON-UNIQUE DEFAULT KEY, + end of T_BULK_CLASSIFY_INPUT. + types: + "!

+ "! An object that describes a response with response type

+ "! `image`. + begin of T_RUNTIME_RESPONSE_TYPE_IMAGE, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The URL of the image. + SOURCE type STRING, + "! The title to show before the response. + TITLE type STRING, + "! The description to show with the the response. + DESCRIPTION type STRING, + end of T_RUNTIME_RESPONSE_TYPE_IMAGE. + types: + "!

+ "! An object that describes a response with response type

+ "! `connect_to_agent`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_CN1, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! A message to be sent to the human agent who will be taking over the + "! conversation. + MESSAGE_TO_HUMAN_AGENT type STRING, + "! An optional message to be displayed to the user to indicate that the + "! conversation will be transferred to the next available agent. + AGENT_AVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! An optional message to be displayed to the user to indicate that no online agent + "! is available to take over the conversation. + AGENT_UNAVAILABLE type T_AGENT_AVAILABILITY_MESSAGE, + "! Routing or other contextual information to be used by target service desk + "! systems. + TRANSFER_INFO type T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1, + "! A label identifying the topic of the conversation, derived from the **title** + "! property of the relevant node or the **topic** property of the dialog node + "! response. + TOPIC type STRING, + end of T_RT_RESP_GNRC_RT_RESP_TYP_CN1. + types: + "!

+ "! A response from the Watson Assistant service.

+ begin of T_MESSAGE_RESPONSE, + "! Assistant output to be rendered or processed by the client. + OUTPUT type T_MESSAGE_OUTPUT, + "! Context data for the conversation. You can use this property to access context + "! variables. The context is stored by the assistant on a per-session basis.
+ "!
+ "! **Note:** The context is included in message responses only if + "! **return_context**=`true` in the message request. Full context is always + "! included in logs. + CONTEXT type T_MESSAGE_CONTEXT, + end of T_MESSAGE_RESPONSE. + types: + "!

+ "! A stateful message request formatted for the Watson

+ "! Assistant service. + begin of T_MESSAGE_REQUEST, + "! An input object that includes the input text. + INPUT type T_MESSAGE_INPUT, + "! Context data for the conversation. You can use this property to set or modify + "! context variables, which can also be accessed by dialog nodes. The context is + "! stored by the assistant on a per-session basis.
+ "!
+ "! **Note:** The total size of the context data stored for a stateful session + "! cannot exceed 100KB. + CONTEXT type T_MESSAGE_CONTEXT, + end of T_MESSAGE_REQUEST. + types: + "! No documentation available. + begin of T_LOG, + "! A unique identifier for the logged event. + LOG_ID type STRING, + "! A stateful message request formatted for the Watson Assistant service. + REQUEST type T_MESSAGE_REQUEST, + "! A response from the Watson Assistant service. + RESPONSE type T_MESSAGE_RESPONSE, + "! Unique identifier of the assistant. + ASSISTANT_ID type STRING, + "! The ID of the session the message was part of. + SESSION_ID type STRING, + "! The unique identifier of the skill that responded to the message. + SKILL_ID type STRING, + "! The name of the snapshot (dialog skill version) that responded to the message + "! (for example, `draft`). + SNAPSHOT type STRING, + "! The timestamp for receipt of the message. + REQUEST_TIMESTAMP type STRING, + "! The timestamp for the system response to the message. + RESPONSE_TIMESTAMP type STRING, + "! The language of the assistant to which the message request was made. + LANGUAGE type STRING, + "! The customer ID specified for the message, if any. + CUSTOMER_ID type STRING, + end of T_LOG. types: - "! No documentation available. + "!

+ "! An object that describes a response with response type

+ "! `pause`. begin of T_RUNTIME_RESPONSE_TYPE_PAUSE, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! How long to pause, in milliseconds. TIME type INTEGER, "! Whether to send a "user is typing" event during the pause. @@ -706,56 +1104,116 @@ public section. end of T_RUNTIME_RESPONSE_TYPE_PAUSE. types: "! No documentation available. + begin of T_LOG_COLLECTION, + "! An array of objects describing log events. + LOGS type STANDARD TABLE OF T_LOG WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. + PAGINATION type T_LOG_PAGINATION, + end of T_LOG_COLLECTION. + types: + "!

+ "! An object that describes a response with response type

+ "! `search`. begin of T_RUNTIME_RESPONSE_TYPE_SEARCH, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, "! The title or introductory text to show before the response. This text is defined "! in the search skill configuration. HEADER type STRING, - "! An array of objects containing search results. - RESULTS type STANDARD TABLE OF T_SEARCH_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects that contains the search results to be displayed in the + "! initial response to the user. + PRIMARY_RESULTS type STANDARD TABLE OF T_SEARCH_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects that contains additional search results that can be + "! displayed to the user upon request. + ADDITIONAL_RESULTS type STANDARD TABLE OF T_SEARCH_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_RUNTIME_RESPONSE_TYPE_SEARCH. types: - "! No documentation available. - begin of T_RT_RESPONSE_TYPE_SUGGESTION, - "! The title or introductory text to show before the response. - TITLE type STRING, - "! An array of objects describing the possible matching dialog nodes from which the - "! user can choose.
- "!
- "! **Note:** The **suggestions** property is part of the disambiguation feature, - "! which is only available for Premium users. - SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, - end of T_RT_RESPONSE_TYPE_SUGGESTION. + "!

+ "! Information specific to particular skills used by the

+ "! assistant.
+ "!
+ "! **Note:** Currently, only a single child property is supported, containing + "! variables that apply to the dialog skill used by the assistant. + T_MESSAGE_CONTEXT_SKILLS type MAP. types: "!

- "! Contains information specific to a particular skill used by

+ "! An object that describes a response with response type

+ "! `pause`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_PS, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! How long to pause, in milliseconds. + TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. + TYPING type BOOLEAN, + end of T_RT_RESP_GNRC_RT_RESP_TYP_PS. + types: + "!

+ "! A stateless response from the Watson Assistant service.

+ begin of T_MESSAGE_RESPONSE_STATELESS, + "! Assistant output to be rendered or processed by the client. + OUTPUT type T_MESSAGE_OUTPUT, + "! Context data for the conversation. You can use this property to access context + "! variables. The context is not stored by the assistant; to maintain session + "! state, include the context from the response in the next message. + CONTEXT type T_MESSAGE_CONTEXT_STATELESS, + end of T_MESSAGE_RESPONSE_STATELESS. + types: + "!

+ "! Session context data that is shared by all skills used by

"! the Assistant. + begin of T_BASE_MESSAGE_CONTEXT_GLOBAL, + "! Built-in system properties that apply to all skills used by the assistant. + SYSTEM type T_MSSG_CONTEXT_GLOBAL_SYSTEM, + end of T_BASE_MESSAGE_CONTEXT_GLOBAL. + types: + "!

+ "! Contains information specific to a particular skill used by

+ "! the Assistant. The property name must be the same as the name of the skill (for + "! example, `main skill`). begin of T_MESSAGE_CONTEXT_SKILL, "! Arbitrary variables that can be read and written by a particular skill. USER_DEFINED type MAP, - "! For internal use only. - SYSTEM type MAP, + "! System context data used by the skill. + SYSTEM type T_MESSAGE_CONTEXT_SKILL_SYSTEM, end of T_MESSAGE_CONTEXT_SKILL. types: - "! No documentation available. - begin of T_RT_RESP_TYP_CONNECT_TO_AGENT, - "! A message to be sent to the human agent who will be taking over the - "! conversation. - MESSAGE_TO_HUMAN_AGENT type STRING, - "! A label identifying the topic of the conversation, derived from the - "! **user_label** property of the relevant node. - TOPIC type STRING, - end of T_RT_RESP_TYP_CONNECT_TO_AGENT. + "!

+ "! An object that describes a response with response type

+ "! `search`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_SR1, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The title or introductory text to show before the response. This text is defined + "! in the search skill configuration. + HEADER type STRING, + "! An array of objects that contains the search results to be displayed in the + "! initial response to the user. + PRIMARY_RESULTS type STANDARD TABLE OF T_SEARCH_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects that contains additional search results that can be + "! displayed to the user upon request. + ADDITIONAL_RESULTS type STANDARD TABLE OF T_SEARCH_RESULT WITH NON-UNIQUE DEFAULT KEY, + end of T_RT_RESP_GNRC_RT_RESP_TYP_SR1. types: "!

- "! A request formatted for the Watson Assistant service.

- begin of T_MESSAGE_REQUEST, - "! An input object that includes the input text. - INPUT type T_MESSAGE_INPUT, - "! State information for the conversation. The context is stored by the assistant - "! on a per-session basis. You can use this property to set or modify context - "! variables, which can also be accessed by dialog nodes. - CONTEXT type T_MESSAGE_CONTEXT, - end of T_MESSAGE_REQUEST. + "! An object that describes a response with response type

+ "! `option`. + begin of T_RT_RESP_GNRC_RT_RESP_TYP_OPT, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel. + RESPONSE_TYPE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! The description to show with the the response. + DESCRIPTION type STRING, + "! The preferred type of control to display. + PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. + OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + end of T_RT_RESP_GNRC_RT_RESP_TYP_OPT. constants: "!

List of required fields per type.

@@ -763,60 +1221,158 @@ constants: T_DIALOG_LOG_MESSAGE type string value '|LEVEL|MESSAGE|', T_DIALOG_NODES_VISITED type string value '|', T_MESSAGE_OUTPUT_DEBUG type string value '|', - T_SESSION_RESPONSE type string value '|SESSION_ID|', T_RT_ENTTY_INTRPRTTN_SYS_NUM type string value '|', + T_RT_ENTITY_INTERPRETATION type string value '|', + T_MESSAGE_INPUT_OPT_SPELLING type string value '|', + T_CAPTURE_GROUP type string value '|GROUP|', T_RUNTIME_ENTITY_ALTERNATIVE type string value '|', T_RUNTIME_ENTITY_ROLE type string value '|', - T_RT_ENTITY_INTERPRETATION type string value '|', + T_RUNTIME_ENTITY type string value '|ENTITY|LOCATION|VALUE|', T_MESSAGE_INPUT_OPTIONS type string value '|', T_RUNTIME_INTENT type string value '|INTENT|CONFIDENCE|', - T_CAPTURE_GROUP type string value '|GROUP|', - T_RUNTIME_ENTITY type string value '|ENTITY|LOCATION|VALUE|', T_MESSAGE_INPUT type string value '|', T_DIA_ND_OUTPUT_OPT_ELEM_VALUE type string value '|', T_DIA_NODE_OUTPUT_OPT_ELEMENT type string value '|LABEL|VALUE|', - T_RUNTIME_RESPONSE_TYPE_OPTION type string value '|', - T_RT_ENTTY_INTRPRTTN_SYS_DATE type string value '|', - T_SEARCH_RESULT_HIGHLIGHT type string value '|', + T_RUNTIME_RESPONSE_TYPE_OPTION type string value '|RESPONSE_TYPE|TITLE|OPTIONS|', T_DIALOG_SUGGESTION_VALUE type string value '|', - T_SEARCH_RESULT_METADATA type string value '|', - T_SEARCH_RESULT type string value '|ID|RESULT_METADATA|', T_DIALOG_SUGGESTION type string value '|LABEL|VALUE|', - T_RUNTIME_RESPONSE_GENERIC type string value '|RESPONSE_TYPE|', + T_MSSG_OTPT_DBG_AT_LEARN_MODEL type string value '|', + T_MSSG_OUTPUT_DEBUG_AUTO_LEARN type string value '|', + T_SEARCH_RESULT_HIGHLIGHT type string value '|', + T_RT_RESP_GNRC_RT_RESP_TYP_SG1 type string value '|RESPONSE_TYPE|TITLE|SUGGESTIONS|', T_ERROR_DETAIL type string value '|MESSAGE|', T_ERROR_RESPONSE type string value '|ERROR|CODE|', - T_RUNTIME_RESPONSE_TYPE_IMAGE type string value '|', + T_SEARCH_RESULT_METADATA type string value '|', + T_SEARCH_RESULT type string value '|ID|RESULT_METADATA|', + T_MESSAGE_INPUT_OPT_STATELESS type string value '|', + T_BASE_MESSAGE_INPUT type string value '|', + T_RUNTIME_RESPONSE_TYPE_TEXT type string value '|RESPONSE_TYPE|TEXT|', T_DIALOG_NODE_ACTION type string value '|NAME|RESULT_VARIABLE|', + T_RT_ENTTY_INTRPRTTN_SYS_TIME type string value '|', T_MSSG_CONTEXT_GLOBAL_SYSTEM type string value '|', T_MESSAGE_CONTEXT_GLOBAL type string value '|', + T_MESSAGE_INPUT_OPT_AUTO_LEARN type string value '|', T_MESSAGE_CONTEXT type string value '|', + T_MESSAGE_CONTEXT_SKILL_SYSTEM type string value '|', + T_MSSG_CNTXT_GLOBAL_STATELESS type string value '|', + T_MESSAGE_CONTEXT_STATELESS type string value '|', + T_MESSAGE_INPUT_STATELESS type string value '|', + T_MESSAGE_REQUEST_STATELESS type string value '|', + T_RT_RESP_GNRC_RT_RESP_TYP_IMG type string value '|RESPONSE_TYPE|SOURCE|', + T_RT_RESPONSE_TYPE_SUGGESTION type string value '|RESPONSE_TYPE|TITLE|SUGGESTIONS|', + T_BULK_CLASSIFY_UTTERANCE type string value '|TEXT|', + T_LOG_PAGINATION type string value '|', + T_RT_RESP_GNRC_RT_RESP_TYP_TXT type string value '|RESPONSE_TYPE|TEXT|', + T_AGENT_AVAILABILITY_MESSAGE type string value '|', + T_DIA_ND_OTPT_CNNCT_T_AGNT_TR1 type string value '|', + T_RT_RESP_TYP_CONNECT_TO_AGENT type string value '|RESPONSE_TYPE|', + T_MESSAGE_OUTPUT_SPELLING type string value '|', T_MESSAGE_OUTPUT type string value '|', + T_BASE_MESSAGE_INPUT_OPTIONS type string value '|', + T_SESSION_RESPONSE type string value '|SESSION_ID|', + T_RT_ENTTY_INTRPRTTN_SYS_DATE type string value '|', + T_BULK_CLASSIFY_OUTPUT type string value '|', + T_BULK_CLASSIFY_RESPONSE type string value '|', + T_BULK_CLASSIFY_INPUT type string value '|INPUT|', + T_RUNTIME_RESPONSE_TYPE_IMAGE type string value '|RESPONSE_TYPE|SOURCE|', + T_RT_RESP_GNRC_RT_RESP_TYP_CN1 type string value '|RESPONSE_TYPE|', T_MESSAGE_RESPONSE type string value '|OUTPUT|', - T_RUNTIME_RESPONSE_TYPE_TEXT type string value '|', - T_RT_ENTTY_INTRPRTTN_SYS_TIME type string value '|', - T_RUNTIME_RESPONSE_TYPE_PAUSE type string value '|', - T_RUNTIME_RESPONSE_TYPE_SEARCH type string value '|', - T_RT_RESPONSE_TYPE_SUGGESTION type string value '|', - T_MESSAGE_CONTEXT_SKILL type string value '|', - T_RT_RESP_TYP_CONNECT_TO_AGENT type string value '|', T_MESSAGE_REQUEST type string value '|', + T_LOG type string value '|LOG_ID|REQUEST|RESPONSE|ASSISTANT_ID|SESSION_ID|SKILL_ID|SNAPSHOT|REQUEST_TIMESTAMP|RESPONSE_TIMESTAMP|LANGUAGE|', + T_RUNTIME_RESPONSE_TYPE_PAUSE type string value '|RESPONSE_TYPE|TIME|', + T_LOG_COLLECTION type string value '|LOGS|PAGINATION|', + T_RUNTIME_RESPONSE_TYPE_SEARCH type string value '|RESPONSE_TYPE|HEADER|PRIMARY_RESULTS|ADDITIONAL_RESULTS|', + T_RT_RESP_GNRC_RT_RESP_TYP_PS type string value '|RESPONSE_TYPE|TIME|', + T_MESSAGE_RESPONSE_STATELESS type string value '|OUTPUT|CONTEXT|', + T_BASE_MESSAGE_CONTEXT_GLOBAL type string value '|', + T_MESSAGE_CONTEXT_SKILL type string value '|', + T_RT_RESP_GNRC_RT_RESP_TYP_SR1 type string value '|RESPONSE_TYPE|HEADER|PRIMARY_RESULTS|ADDITIONAL_RESULTS|', + T_RT_RESP_GNRC_RT_RESP_TYP_OPT type string value '|RESPONSE_TYPE|TITLE|OPTIONS|', __DUMMY type string value SPACE, end of C_REQUIRED_FIELDS . constants: "!

Map ABAP identifiers to service identifiers.

begin of C_ABAPNAME_DICTIONARY, - DEBUG type string value 'debug', + MESSAGE type string value 'message', + SYSTEM type string value 'system', + MESSAGE_TYPE type string value 'message_type', + TEXT type string value 'text', + INTENTS type string value 'intents', + INTENT type string value 'intent', + ENTITIES type string value 'entities', + ENTITY type string value 'entity', + SUGGESTION_ID type string value 'suggestion_id', RESTART type string value 'restart', ALTERNATE_INTENTS type string value 'alternate_intents', + SPELLING type string value 'spelling', + INPUT type string value 'input', + OUTPUT type string value 'output', + LEVEL type string value 'level', + NAME type string value 'name', + TYPE type string value 'type', + PARAMETERS type string value 'parameters', + INNER type string value 'inner', + RESULT_VARIABLE type string value 'result_variable', + CREDENTIALS type string value 'credentials', + TARGET type string value 'target', + LABEL type string value 'label', + VALUE type string value 'value', + PATH type string value 'path', + ERROR type string value 'error', + ERRORS type string value 'errors', + CODE type string value 'code', + LOG_ID type string value 'log_id', + REQUEST type string value 'request', + RESPONSE type string value 'response', + ASSISTANT_ID type string value 'assistant_id', + SESSION_ID type string value 'session_id', + SKILL_ID type string value 'skill_id', + SNAPSHOT type string value 'snapshot', + REQUEST_TIMESTAMP type string value 'request_timestamp', + RESPONSE_TIMESTAMP type string value 'response_timestamp', + LANGUAGE type string value 'language', + CUSTOMER_ID type string value 'customer_id', + LOGS type string value 'logs', + PAGINATION type string value 'pagination', + NEXT_URL type string value 'next_url', + MATCHED type string value 'matched', + NEXT_CURSOR type string value 'next_cursor', + GLOBAL type string value 'global', + SKILLS type string value 'skills', + TIMEZONE type string value 'timezone', + USER_ID type string value 'user_id', + TURN_COUNT type string value 'turn_count', + LOCALE type string value 'locale', + REFERENCE_TIME type string value 'reference_time', + USER_DEFINED type string value 'user_defined', + STATE type string value 'state', + OPTIONS type string value 'options', + DEBUG type string value 'debug', RETURN_CONTEXT type string value 'return_context', - INTENT type string value 'intent', - CONFIDENCE type string value 'confidence', - ENTITY type string value 'entity', + EXPORT type string value 'export', + LEARN type string value 'learn', + APPLY type string value 'apply', + SUGGESTIONS type string value 'suggestions', + AUTO_CORRECT type string value 'auto_correct', + GENERIC type string value 'generic', + ACTIONS type string value 'actions', + NODES_VISITED type string value 'nodes_visited', + LOG_MESSAGES type string value 'log_messages', + BRANCH_EXITED type string value 'branch_exited', + BRANCH_EXITED_REASON type string value 'branch_exited_reason', + PREVIEW type string value 'preview', + DISAMBIGUATION type string value 'disambiguation', + ALTERNATE_RESPONSES type string value 'alternate_responses', + OUTCOME type string value 'outcome', + MODEL_TYPE type string value 'model_type', + MODEL_ID type string value 'model_id', + ORIGINAL_TEXT type string value 'original_text', + SUGGESTED_TEXT type string value 'suggested_text', + CONTEXT type string value 'context', LOCATION type string value 'location', - VALUE type string value 'value', + CONFIDENCE type string value 'confidence', METADATA type string value 'metadata', - INNER type string value 'inner', GROUPS type string value 'groups', INTERPRETATION type string value 'interpretation', ALTERNATIVES type string value 'alternatives', @@ -846,63 +1402,27 @@ constants: SPECIFIC_HOUR type string value 'specific_hour', SPECIFIC_MINUTE type string value 'specific_minute', SPECIFIC_SECOND type string value 'specific_second', - TIMEZONE type string value 'timezone', - TYPE type string value 'type', - MESSAGE_TYPE type string value 'message_type', - TEXT type string value 'text', - OPTIONS type string value 'options', - INTENTS type string value 'intents', - ENTITIES type string value 'entities', - SUGGESTION_ID type string value 'suggestion_id', - USER_ID type string value 'user_id', - TURN_COUNT type string value 'turn_count', - LOCALE type string value 'locale', - REFERENCE_TIME type string value 'reference_time', - SYSTEM type string value 'system', - USER_DEFINED type string value 'user_defined', - GLOBAL type string value 'global', - SKILLS type string value 'skills', - INPUT type string value 'input', - CONTEXT type string value 'context', - LEVEL type string value 'level', - MESSAGE type string value 'message', - TIME type string value 'time', - TYPING type string value 'typing', + RESPONSE_TYPE type string value 'response_type', + MESSAGE_TO_HUMAN_AGENT type string value 'message_to_human_agent', + AGENT_AVAILABLE type string value 'agent_available', + AGENT_UNAVAILABLE type string value 'agent_unavailable', + TRANSFER_INFO type string value 'transfer_info', + TOPIC type string value 'topic', SOURCE type string value 'source', TITLE type string value 'title', DESCRIPTION type string value 'description', - LABEL type string value 'label', PREFERENCE type string value 'preference', - MESSAGE_TO_HUMAN_AGENT type string value 'message_to_human_agent', - TOPIC type string value 'topic', - SUGGESTIONS type string value 'suggestions', - OUTPUT type string value 'output', - RESPONSE_TYPE type string value 'response_type', + TIME type string value 'time', + TYPING type string value 'typing', HEADER type string value 'header', - RESULTS type string value 'results', - NAME type string value 'name', - PARAMETERS type string value 'parameters', - RESULT_VARIABLE type string value 'result_variable', - CREDENTIALS type string value 'credentials', - NODES_VISITED type string value 'nodes_visited', - NODESVISITED type string value 'nodesVisited', - LOG_MESSAGES type string value 'log_messages', - LOGMESSAGES type string value 'logMessages', - BRANCH_EXITED type string value 'branch_exited', - BRANCH_EXITED_REASON type string value 'branch_exited_reason', - GENERIC type string value 'generic', - ACTIONS type string value 'actions', - PATH type string value 'path', - ERROR type string value 'error', - ERRORS type string value 'errors', - CODE type string value 'code', - BODY type string value 'body', - URL type string value 'url', - SCORE type string value 'score', + PRIMARY_RESULTS type string value 'primary_results', + ADDITIONAL_RESULTS type string value 'additional_results', ID type string value 'id', RESULT_METADATA type string value 'result_metadata', + BODY type string value 'body', + URL type string value 'url', HIGHLIGHT type string value 'highlight', - SESSION_ID type string value 'session_id', + SCORE type string value 'score', GROUP type string value 'group', DIALOG_NODE type string value 'dialog_node', CONDITIONS type string value 'conditions', @@ -971,10 +1491,10 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . - "!

Send user input to assistant

- "! Send user input to an assistant and receive a response.
- "!
- "! There is no rate limit for this operation. + "!

Send user input to assistant (stateful)

+ "! Send user input to an assistant and receive a response, with conversation state + "! (including context data) stored by Watson Assistant for the duration of the + "! session. "! "! @parameter I_ASSISTANT_ID | "! Unique identifier of the assistant. To find the assistant ID in the Watson @@ -1000,8 +1520,131 @@ constants: !I_REQUEST type T_MESSAGE_REQUEST optional !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' - exporting - !E_RESPONSE type T_MESSAGE_RESPONSE + exporting + !E_RESPONSE type T_MESSAGE_RESPONSE + raising + ZCX_IBMC_SERVICE_EXCEPTION . + "!

Send user input to assistant (stateless)

+ "! Send user input to an assistant and receive a response, with conversation state + "! (including context data) managed by your application. + "! + "! @parameter I_ASSISTANT_ID | + "! Unique identifier of the assistant. To find the assistant ID in the Watson + "! Assistant user interface, open the assistant settings and click **API + "! Details**. For information about creating assistants, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + "! add#assistant-add-task).
+ "!
+ "! **Note:** Currently, the v2 API does not support creating assistants. + "! @parameter I_REQUEST | + "! The message to be sent. This includes the user's input, context data, and + "! optional content such as intents and entities. + "! @parameter E_RESPONSE | + "! Service return value of type T_MESSAGE_RESPONSE_STATELESS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods MESSAGE_STATELESS + importing + !I_ASSISTANT_ID type STRING + !I_REQUEST type T_MESSAGE_REQUEST_STATELESS optional + !I_contenttype type string default 'application/json' + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_MESSAGE_RESPONSE_STATELESS + raising + ZCX_IBMC_SERVICE_EXCEPTION . + + "!

Identify intents and entities in multiple user utterances

+ "! Send multiple user inputs to a dialog skill 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 skills + "! or skill versions.
+ "!
+ "! This method is available only with Premium plans. + "! + "! @parameter I_SKILL_ID | + "! Unique identifier of the skill. To find the skill ID in the Watson Assistant + "! user interface, open the skill settings and click **API Details**. + "! @parameter I_REQUEST | + "! An input object that includes the text to classify. + "! @parameter E_RESPONSE | + "! Service return value of type T_BULK_CLASSIFY_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods BULK_CLASSIFY + importing + !I_SKILL_ID type STRING + !I_REQUEST type T_BULK_CLASSIFY_INPUT optional + !I_contenttype type string default 'application/json' + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_BULK_CLASSIFY_RESPONSE + raising + ZCX_IBMC_SERVICE_EXCEPTION . + + "!

List log events for an assistant

+ "! List the events from the log of an assistant.
+ "!
+ "! This method is available only with Premium plans. + "! + "! @parameter I_ASSISTANT_ID | + "! Unique identifier of the assistant. To find the assistant ID in the Watson + "! Assistant user interface, open the assistant settings and click **API + "! Details**. For information about creating assistants, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + "! add#assistant-add-task).
+ "!
+ "! **Note:** Currently, the v2 API does not support creating assistants. + "! @parameter I_SORT | + "! How to sort the returned log events. You can sort by **request_timestamp**. To + "! reverse the sort order, prefix the parameter value with a minus sign (`-`). + "! @parameter I_FILTER | + "! A cacheable parameter that limits the results to those matching the specified + "! filter. For more information, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-ref + "! erence#filter-reference). + "! @parameter I_PAGE_LIMIT | + "! The number of records to return in each page of results. + "! @parameter I_CURSOR | + "! A token identifying the page of results to retrieve. + "! @parameter E_RESPONSE | + "! Service return value of type T_LOG_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods LIST_LOGS + importing + !I_ASSISTANT_ID type STRING + !I_SORT type STRING optional + !I_FILTER type STRING optional + !I_PAGE_LIMIT type INTEGER optional + !I_CURSOR type STRING optional + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_LOG_COLLECTION + raising + ZCX_IBMC_SERVICE_EXCEPTION . + + "!

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-secu + "! rity#information-security).
+ "!
+ "! This operation is limited to 4 requests per minute. For more information, see + "! **Rate limiting**. + "! + "! @parameter I_CUSTOMER_ID | + "! The customer ID for which all data is to be deleted. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods DELETE_USER_DATA + importing + !I_CUSTOMER_ID type STRING + !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . @@ -1010,10 +1653,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_ASSISTANT_V2 IMPLEMENTATION. @@ -1055,22 +1694,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'ICP4D'. - e_request_prop-auth_name = 'ICP4D'. - e_request_prop-auth_type = 'apiKey'. - e_request_prop-auth_headername = 'Authorization'. - e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/assistant/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.assistant.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -1082,7 +1713,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173422'. + e_sdk_version_date = '20210312144427'. endmethod. @@ -1242,15 +1873,103 @@ method MESSAGE. endif. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. + + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. + + + " execute HTTP POST request + lo_response = HTTP_POST( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. + +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_ASSISTANT_V2->MESSAGE_STATELESS +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_ASSISTANT_ID TYPE STRING +* | [--->] I_REQUEST TYPE T_MESSAGE_REQUEST_STATELESS(optional) +* | [--->] I_contenttype TYPE string (default ='application/json') +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_MESSAGE_RESPONSE_STATELESS +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method MESSAGE_STATELESS. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v2/assistants/{assistant_id}/message'. + replace all occurrences of `{assistant_id}` in ls_request_prop-url-path with i_ASSISTANT_ID ignoring case. + + " standard headers + ls_request_prop-header_content_type = I_contenttype. + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + + + + + + " process body parameters + data: + lv_body type string, + lv_bodyparam type string, + lv_datatype type char. + field-symbols: + type any. + lv_separator = ''. + if not i_REQUEST is initial. + lv_datatype = get_datatype( i_REQUEST ). + + if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or + lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or + ls_request_prop-header_content_type cp '*json*'. + if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or + lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. + lv_bodyparam = abap_to_json( i_value = i_REQUEST i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + else. + lv_bodyparam = abap_to_json( i_name = 'request' i_value = i_REQUEST ). + endif. + lv_body = lv_body && lv_separator && lv_bodyparam. + else. + assign i_REQUEST to . + lv_bodyparam = . + concatenate lv_body lv_bodyparam into lv_body. + endif. + endif. + if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1269,22 +1988,237 @@ method MESSAGE. endmethod. +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_ASSISTANT_V2->BULK_CLASSIFY +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_SKILL_ID TYPE STRING +* | [--->] I_REQUEST TYPE T_BULK_CLASSIFY_INPUT(optional) +* | [--->] I_contenttype TYPE string (default ='application/json') +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_BULK_CLASSIFY_RESPONSE +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method BULK_CLASSIFY. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v2/skills/{skill_id}/workspace/bulk_classify'. + replace all occurrences of `{skill_id}` in ls_request_prop-url-path with i_SKILL_ID ignoring case. + + " standard headers + ls_request_prop-header_content_type = I_contenttype. + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + + + + + + " process body parameters + data: + lv_body type string, + lv_bodyparam type string, + lv_datatype type char. + field-symbols: + type any. + lv_separator = ''. + if not i_REQUEST is initial. + lv_datatype = get_datatype( i_REQUEST ). + + if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or + lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or + ls_request_prop-header_content_type cp '*json*'. + if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or + lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. + lv_bodyparam = abap_to_json( i_value = i_REQUEST i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + else. + lv_bodyparam = abap_to_json( i_name = 'request' i_value = i_REQUEST ). + endif. + lv_body = lv_body && lv_separator && lv_bodyparam. + else. + assign i_REQUEST to . + lv_bodyparam = . + concatenate lv_body lv_bodyparam into lv_body. + endif. + endif. + if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. + lv_body = `{` && lv_body && `}`. + endif. + + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. + + + " execute HTTP POST request + lo_response = HTTP_POST( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. * ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_ASSISTANT_V2->SET_DEFAULT_QUERY_PARAMETERS +* | Instance Public Method ZCL_IBMC_ASSISTANT_V2->LIST_LOGS * +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL +* | [--->] I_ASSISTANT_ID TYPE STRING +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_FILTER TYPE STRING(optional) +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_LOG_COLLECTION +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). +method LIST_LOGS. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v2/assistants/{assistant_id}/logs'. + replace all occurrences of `{assistant_id}` in ls_request_prop-url-path with i_ASSISTANT_ID ignoring case. + + " standard headers + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + " process query parameters + data: + lv_queryparam type string. + + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). + add_query_parameter( + exporting + i_parameter = `sort` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. endif. - endmethod. + + if i_FILTER is supplied. + lv_queryparam = escape( val = i_FILTER format = cl_abap_format=>e_uri_full ). + add_query_parameter( + exporting + i_parameter = `filter` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. + add_query_parameter( + exporting + i_parameter = `page_limit` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). + add_query_parameter( + exporting + i_parameter = `cursor` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + + + + + + " execute HTTP GET request + lo_response = HTTP_GET( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. + + +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_ASSISTANT_V2->DELETE_USER_DATA +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_CUSTOMER_ID TYPE STRING +* | [--->] I_accept TYPE string (default ='application/json') +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method DELETE_USER_DATA. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v2/user_data'. + + " standard headers + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + " process query parameters + data: + lv_queryparam type string. + + lv_queryparam = escape( val = i_CUSTOMER_ID format = cl_abap_format=>e_uri_full ). + add_query_parameter( + exporting + i_parameter = `customer_id` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + + + + + + + " execute HTTP DELETE request + lo_response = HTTP_DELETE( i_request_prop = ls_request_prop ). + + + +endmethod. + ENDCLASS. diff --git a/src/zcl_ibmc_assistant_v2.clas.xml b/src/zcl_ibmc_assistant_v2.clas.xml index 5a269c0..c994fb3 100644 --- a/src/zcl_ibmc_assistant_v2.clas.xml +++ b/src/zcl_ibmc_assistant_v2.clas.xml @@ -12,6 +12,12 @@ X + + ZCL_IBMC_ASSISTANT_V2 + BULK_CLASSIFY + E + Identify intents and entities in multiple user utterances + ZCL_IBMC_ASSISTANT_V2 CREATE_SESSION @@ -24,11 +30,29 @@ E Delete session + + ZCL_IBMC_ASSISTANT_V2 + DELETE_USER_DATA + E + Delete labeled data + + + ZCL_IBMC_ASSISTANT_V2 + LIST_LOGS + E + List log events for an assistant + ZCL_IBMC_ASSISTANT_V2 MESSAGE E - Send user input to assistant + Send user input to assistant (stateful) + + + ZCL_IBMC_ASSISTANT_V2 + MESSAGE_STATELESS + E + Send user input to assistant (stateless) diff --git a/src/zcl_ibmc_compare_comply_v1.clas.abap b/src/zcl_ibmc_compare_comply_v1.clas.abap index 8fe7109..00c81ce 100644 --- a/src/zcl_ibmc_compare_comply_v1.clas.abap +++ b/src/zcl_ibmc_compare_comply_v1.clas.abap @@ -81,6 +81,8 @@ public section. LABEL type T_LABEL, "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The type of modification of the feedback entry in the updated labels response. + MODIFICATION type STRING, end of T_TYPE_LABEL. types: "!

@@ -99,6 +101,8 @@ public section. LABEL type STRING, "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The type of modification of the feedback entry in the updated labels response. + MODIFICATION type STRING, end of T_CATEGORY. types: "!

@@ -110,10 +114,6 @@ public section. "! List of functional categories into which the element falls; in other words, the "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY WITH NON-UNIQUE DEFAULT KEY, - "! A string identifying the type of modification the feedback entry in the - "! `updated_labels` array. Possible values are `added`, `not_changed`, and - "! `removed`. - MODIFICATION type STRING, end of T_ORIGINAL_LABELS_OUT. types: "!

@@ -125,9 +125,6 @@ public section. "! List of functional categories into which the element falls; in other words, the "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY WITH NON-UNIQUE DEFAULT KEY, - "! The type of modification the feedback entry in the `updated_labels` array. - "! Possible values are `added`, `not_changed`, and `removed`. - MODIFICATION type STRING, end of T_UPDATED_LABELS_OUT. types: "!

@@ -1165,37 +1162,24 @@ constants: MODEL_VERSION type string value 'model_version', ELEMENTS type string value 'elements', EFFECTIVE_DATES type string value 'effective_dates', - EFFECTIVEDATES type string value 'effectiveDates', CONTRACT_AMOUNTS type string value 'contract_amounts', - CONTRACTAMOUNTS type string value 'contractAmounts', TERMINATION_DATES type string value 'termination_dates', - TERMINATIONDATES type string value 'terminationDates', CONTRACT_TYPES type string value 'contract_types', - CONTRACTTYPES type string value 'contractTypes', CONTRACT_TERMS type string value 'contract_terms', - CONTRACTTERMS type string value 'contractTerms', PAYMENT_TERMS type string value 'payment_terms', - PAYMENTTERMS type string value 'paymentTerms', CONTRACT_CURRENCIES type string value 'contract_currencies', - CONTRACTCURRENCIES type string value 'contractCurrencies', TABLES type string value 'tables', DOCUMENT_STRUCTURE type string value 'document_structure', PARTIES type string value 'parties', SECTION_TITLES type string value 'section_titles', - SECTIONTITLES type string value 'sectionTitles', LEADING_SENTENCES type string value 'leading_sentences', - LEADINGSENTENCES type string value 'leadingSentences', PARAGRAPHS type string value 'paragraphs', DOCUMENTS type string value 'documents', ALIGNED_ELEMENTS type string value 'aligned_elements', - ALIGNEDELEMENTS type string value 'alignedElements', UNALIGNED_ELEMENTS type string value 'unaligned_elements', - UNALIGNEDELEMENTS type string value 'unalignedElements', ELEMENT_PAIR type string value 'element_pair', - ELEMENTPAIR type string value 'elementPair', IDENTICAL_TEXT type string value 'identical_text', PROVENANCE_IDS type string value 'provenance_ids', - PROVENANCEIDS type string value 'provenanceIds', SIGNIFICANT_ELEMENTS type string value 'significant_elements', DOCUMENT_LABEL type string value 'document_label', LOCATION type string value 'location', @@ -1204,24 +1188,19 @@ constants: CATEGORIES type string value 'categories', ATTRIBUTES type string value 'attributes', LABEL type string value 'label', + MODIFICATION type string value 'modification', HASH type string value 'hash', CODE type string value 'code', ERROR type string value 'error', SECTION_TITLE type string value 'section_title', TABLE_HEADERS type string value 'table_headers', - TABLEHEADERS type string value 'tableHeaders', ROW_HEADERS type string value 'row_headers', - ROWHEADERS type string value 'rowHeaders', COLUMN_HEADERS type string value 'column_headers', - COLUMNHEADERS type string value 'columnHeaders', BODY_CELLS type string value 'body_cells', - BODYCELLS type string value 'bodyCells', CONTEXTS type string value 'contexts', KEY_VALUE_PAIRS type string value 'key_value_pairs', - KEYVALUEPAIRS type string value 'keyValuePairs', LEVEL type string value 'level', ELEMENT_LOCATIONS type string value 'element_locations', - ELEMENTLOCATIONS type string value 'elementLocations', BEGIN type string value 'begin', END type string value 'end', CELL_ID type string value 'cell_id', @@ -1233,17 +1212,11 @@ constants: KEY type string value 'key', VALUE type string value 'value', ROW_HEADER_IDS type string value 'row_header_ids', - ROWHEADERIDS type string value 'rowHeaderIds', ROW_HEADER_TEXTS type string value 'row_header_texts', - ROWHEADERTEXTS type string value 'rowHeaderTexts', ROW_HEADER_TEXTS_NORMALIZED type string value 'row_header_texts_normalized', - ROWHEADERTEXTSNORMALIZED type string value 'rowHeaderTextsNormalized', COLUMN_HEADER_IDS type string value 'column_header_ids', - COLUMNHEADERIDS type string value 'columnHeaderIds', COLUMN_HEADER_TEXTS type string value 'column_header_texts', - COLUMNHEADERTEXTS type string value 'columnHeaderTexts', COLUMN_HEADER_TEXTS_NORMALIZED type string value 'column_header_texts_normalized', - COLUMNHEADERTEXTSNORMALIZED type string value 'columnHeaderTextsNormalized', USER_ID type string value 'user_id', COMMENT type string value 'comment', FEEDBACK_DATA type string value 'feedback_data', @@ -1258,7 +1231,6 @@ constants: REFRESH_URL type string value 'refresh_url', NEXT_URL type string value 'next_url', TOTAL type string value 'total', - MODIFICATION type string value 'modification', FEEDBACK type string value 'feedback', STATUS type string value 'status', MESSAGE type string value 'message', @@ -1459,12 +1431,6 @@ constants: "! @parameter I_FEEDBACK_TYPE | "! An optional string that filters the output to include only feedback with the "! specified feedback type. The only permitted value is `element_classification`. - "! @parameter I_BEFORE | - "! An optional string in the format `YYYY-MM-DD` that filters the output to include - "! only feedback that was added before the specified date. - "! @parameter I_AFTER | - "! An optional string in the format `YYYY-MM-DD` that filters the output to include - "! only feedback that was added after the specified date. "! @parameter I_DOCUMENT_TITLE | "! An optional string that filters the output to include only feedback from the "! document with the specified `document_title`. @@ -1520,8 +1486,6 @@ constants: methods LIST_FEEDBACK importing !I_FEEDBACK_TYPE type STRING optional - !I_BEFORE type DATE optional - !I_AFTER type DATE optional !I_DOCUMENT_TITLE type STRING optional !I_MODEL_ID type STRING optional !I_MODEL_VERSION type STRING optional @@ -1594,11 +1558,11 @@ constants: "!
"! **Important:** Batch processing requires the use of the [IBM Cloud Object "! Storage - "! service](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=cloud-o - "! bject-storage-about#about-ibm-cloud-object-storage). The use of IBM Cloud Object - "! Storage with Compare and Comply is discussed at [Using batch - "! processing](https://cloud.ibm.com/docs/services/compare-comply?topic=compare-co - "! mply-batching#before-you-batch). + "! service](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-sto + "! rage-about#about-ibm-cloud-object-storage). The use of IBM Cloud Object Storage + "! with Compare and Comply is discussed at [Using batch + "! processing](https://cloud.ibm.com/docs/compare-comply?topic=compare-comply-batc + "! hing#before-you-batch). "! "! @parameter I_FUNCTION | "! The Compare and Comply method to run across the submitted input documents. @@ -1715,10 +1679,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_COMPARE_COMPLY_V1 IMPLEMENTATION. @@ -1760,22 +1720,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'ICP4D'. - e_request_prop-auth_name = 'ICP4D'. - e_request_prop-auth_type = 'apiKey'. - e_request_prop-auth_headername = 'Authorization'. - e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/compare-comply/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.compare-comply.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -1787,7 +1739,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173424'. + e_sdk_version_date = '20210312144429'. endmethod. @@ -2242,15 +2194,15 @@ method ADD_FEEDBACK. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -2272,8 +2224,6 @@ endmethod. * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->LIST_FEEDBACK * +-------------------------------------------------------------------------------------------------+ * | [--->] I_FEEDBACK_TYPE TYPE STRING(optional) -* | [--->] I_BEFORE TYPE DATE(optional) -* | [--->] I_AFTER TYPE DATE(optional) * | [--->] I_DOCUMENT_TITLE TYPE STRING(optional) * | [--->] I_MODEL_ID TYPE STRING(optional) * | [--->] I_MODEL_VERSION TYPE STRING(optional) @@ -2322,26 +2272,6 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_BEFORE is supplied. - lv_queryparam = i_BEFORE. - add_query_parameter( - exporting - i_parameter = `before` - i_value = lv_queryparam - changing - c_url = ls_request_prop-url ) ##NO_TEXT. - endif. - - if i_AFTER is supplied. - lv_queryparam = i_AFTER. - add_query_parameter( - exporting - i_parameter = `after` - i_value = lv_queryparam - changing - c_url = ls_request_prop-url ) ##NO_TEXT. - endif. - if i_DOCUMENT_TITLE is supplied. lv_queryparam = escape( val = i_DOCUMENT_TITLE format = cl_abap_format=>e_uri_full ). add_query_parameter( @@ -2690,8 +2620,8 @@ method CREATE_BATCH. if not i_INPUT_BUCKET_LOCATION is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="input_bucket_location"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_INPUT_BUCKET_LOCATION. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -2699,8 +2629,8 @@ method CREATE_BATCH. if not i_INPUT_BUCKET_NAME is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="input_bucket_name"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_INPUT_BUCKET_NAME. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -2708,8 +2638,8 @@ method CREATE_BATCH. if not i_OUTPUT_BUCKET_LOCATION is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="output_bucket_location"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_OUTPUT_BUCKET_LOCATION. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -2717,8 +2647,8 @@ method CREATE_BATCH. if not i_OUTPUT_BUCKET_NAME is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="output_bucket_name"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_OUTPUT_BUCKET_NAME. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -2931,22 +2861,4 @@ method UPDATE_BATCH. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_COMPARE_COMPLY_V1->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_discovery_v1.clas.abap b/src/zcl_ibmc_discovery_v1.clas.abap index dce6b17..37173d4 100644 --- a/src/zcl_ibmc_discovery_v1.clas.abap +++ b/src/zcl_ibmc_discovery_v1.clas.abap @@ -83,11 +83,6 @@ public section. "! The type for this wordlist. Can be `tokenization_dictionary` or `stopwords`. TYPE type STRING, end of T_TOKEN_DICT_STATUS_RESPONSE. - types: - "!

- "! An object that indicates the Categories enrichment will be

- "! applied to the specified field. - T_NLU_ENRICHMENT_CATEGORIES type MAP. types: "!

"! An object specifying the relations enrichment and related

@@ -200,7 +195,7 @@ public section. EMOTION type T_NLU_ENRICHMENT_EMOTION, "! An object that indicates the Categories enrichment will be applied to the "! specified field. - CATEGORIES type T_NLU_ENRICHMENT_CATEGORIES, + CATEGORIES type MAP, "! An object specifiying the semantic roles enrichment and related parameters. SEMANTIC_ROLES type T_NL_ENRICHMENT_SEMANTIC_ROLES, "! An object specifying the relations enrichment and related parameters. @@ -290,6 +285,11 @@ public section. "! also excludes `https://ibm.com/watson/discovery`. BLACKLIST type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_SOURCE_OPTIONS_WEB_CRAWL. + types: + "!

+ "! An object that indicates the Categories enrichment will be

+ "! applied to the specified field. + T_NLU_ENRICHMENT_CATEGORIES type MAP. types: "!

"! Object containing details of the stored credentials.


@@ -379,15 +379,15 @@ public section. "! required, with a **credential_type** of `aws4_hmac`. This value is never "! returned and is only used when creating or modifying **credentials**. For more "! infomation, see the [cloud object store - "! documentation](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=c - "! loud-object-storage-using-hmac-credentials#using-hmac-credentials). + "! documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-obje + "! ct-storage-using-hmac-credentials#using-hmac-credentials). ACCESS_KEY_ID type STRING, "! The secret access key associated with the cloud object store. Only valid, and "! required, with a **credential_type** of `aws4_hmac`. This value is never "! returned and is only used when creating or modifying **credentials**. For more "! infomation, see the [cloud object store - "! documentation](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=c - "! loud-object-storage-using-hmac-credentials#using-hmac-credentials). + "! documentation](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-obje + "! ct-storage-using-hmac-credentials#using-hmac-credentials). SECRET_ACCESS_KEY type STRING, end of T_CREDENTIAL_DETAILS. types: @@ -449,7 +449,7 @@ public section. "! environment. begin of T_ENVIRONMENT_DOCUMENTS, "! Number of documents indexed for the environment. - INDEXED type INTEGER, + AVAILABLE type INTEGER, "! Total number of documents allowed in the environment's capacity. MAXIMUM_ALLOWED type INTEGER, end of T_ENVIRONMENT_DOCUMENTS. @@ -846,8 +846,8 @@ public section. "! Classification options. Additionally, when using the `elements` enrichment the "! configuration specified and files ingested must meet all the criteria specified "! in [the - "! documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-el - "! ement-classification#element-classification). + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-element-cla + "! ssification#element-classification). ENRICHMENT type STRING, "! If true, then most errors generated during the enrichment process will be "! treated as warnings and will not cause the document to fail processing. @@ -2222,7 +2222,6 @@ constants: MAXIMUM_ALLOWED_BYTES type string value 'maximum_allowed_bytes', AVAILABLE type string value 'available', MAXIMUM_ALLOWED type string value 'maximum_allowed', - INDEXED type string value 'indexed', ENVIRONMENTS type string value 'environments', CONFIGURATION_ID type string value 'configuration_id', LANGUAGE type string value 'language', @@ -2248,26 +2247,20 @@ constants: IMAGE_TEXT_RECOGNITION type string value 'image_text_recognition', HEADING type string value 'heading', FONTS type string value 'fonts', - FONTSETTING type string value 'fontSetting', + FONT_SETTING type string value 'font_setting', STYLES type string value 'styles', - WORDSTYLE type string value 'wordStyle', + WORD_STYLE type string value 'word_style', LEVEL type string value 'level', NAMES type string value 'names', EXCLUDE_TAGS_COMPLETELY type string value 'exclude_tags_completely', - EXCLUDETAGSCOMPLETELY type string value 'excludeTagsCompletely', EXCLUDE_TAGS_KEEP_CONTENT type string value 'exclude_tags_keep_content', - EXCLUDETAGSKEEPCONTENT type string value 'excludeTagsKeepContent', KEEP_CONTENT type string value 'keep_content', EXCLUDE_CONTENT type string value 'exclude_content', KEEP_TAG_ATTRIBUTES type string value 'keep_tag_attributes', - KEEPTAGATTRIBUTES type string value 'keepTagAttributes', EXCLUDE_TAG_ATTRIBUTES type string value 'exclude_tag_attributes', - EXCLUDETAGATTRIBUTES type string value 'excludeTagAttributes', ENABLED type string value 'enabled', SELECTOR_TAGS type string value 'selector_tags', - SELECTORTAGS type string value 'selectorTags', ANNOTATED_FIELDS type string value 'annotated_fields', - ANNOTATEDFIELDS type string value 'annotatedFields', XPATHS type string value 'xpaths', MIN_SIZE type string value 'min_size', MAX_SIZE type string value 'max_size', @@ -2352,9 +2345,7 @@ constants: TARGET type string value 'target', EXPANSIONS type string value 'expansions', INPUT_TERMS type string value 'input_terms', - INPUTTERMS type string value 'inputTerms', EXPANDED_TERMS type string value 'expanded_terms', - EXPANDEDTERMS type string value 'expandedTerms', DATA type string value 'data', CLIENT_TIMESTAMP type string value 'client_timestamp', DISPLAY_RANK type string value 'display_rank', @@ -2397,7 +2388,6 @@ constants: FOLDERS type string value 'folders', OBJECTS type string value 'objects', SITE_COLLECTIONS type string value 'site_collections', - SITECOLLECTIONS type string value 'siteCollections', URLS type string value 'urls', BUCKETS type string value 'buckets', CRAWL_ALL_BUCKETS type string value 'crawl_all_buckets', @@ -2422,7 +2412,6 @@ constants: SIMILAR_FIELDS type string value 'similar.fields', BIAS type string value 'bias', TOKENIZATION_RULES type string value 'tokenization_rules', - TOKENIZATIONRULES type string value 'tokenizationRules', TEXT type string value 'text', TOKENS type string value 'tokens', READINGS type string value 'readings', @@ -2445,8 +2434,8 @@ constants: COMPLETIONS type string value 'completions', COLLECTION_IDS type string value 'collection_ids', SPELLING_SUGGESTIONS type string value 'spelling_suggestions', - SOURCE_CRAWL type string value 'source_crawl', DEFINED type string value 'defined', + SOURCE_CRAWL type string value 'source_crawl', STOPWORD_FILE type string value 'stopword_file', end of C_ABAPNAME_DICTIONARY . @@ -3217,8 +3206,8 @@ constants: "!

Query a collection

"! By using this method, you can construct long queries. For details, see the "! [Discovery - "! documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-qu - "! ery-concepts#query-concepts). + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-conce + "! pts#query-concepts). "! "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. @@ -3248,8 +3237,8 @@ constants: "! Queries for notices (errors or warnings) that might have been generated by the "! system. Notices are generated when ingesting documents and performing relevance "! training. See the [Discovery - "! documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-qu - "! ery-concepts#query-concepts) for more details on the query language. + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-conce + "! pts#query-concepts) for more details on the query language. "! "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. @@ -3350,8 +3339,8 @@ constants: "!

Query multiple collections

"! By using this method, you can construct long queries that search multiple "! collection. For details, see the [Discovery - "! documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-qu - "! ery-concepts#query-concepts). + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-conce + "! pts#query-concepts). "! "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. @@ -3378,8 +3367,8 @@ constants: "! Queries for notices (errors or warnings) that might have been generated by the "! system. Notices are generated when ingesting documents and performing relevance "! training. See the [Discovery - "! documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-qu - "! ery-concepts#query-concepts) for more details on the query language. + "! documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-conce + "! pts#query-concepts) for more details on the query language. "! "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. @@ -3737,8 +3726,8 @@ constants: "! 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/services/discovery?topic=discovery-informa - "! tion-security#information-security). + "! security](https://cloud.ibm.com/docs/discovery?topic=discovery-information-secu + "! rity#information-security). "! "! @parameter I_CUSTOMER_ID | "! The customer ID for which all data is to be deleted. @@ -4143,10 +4132,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_DISCOVERY_V1 IMPLEMENTATION. @@ -4188,22 +4173,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'ICP4D'. - e_request_prop-auth_name = 'ICP4D'. - e_request_prop-auth_type = 'apiKey'. - e_request_prop-auth_headername = 'Authorization'. - e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/discovery/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.discovery.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -4215,7 +4192,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173426'. + e_sdk_version_date = '20210312144431'. endmethod. @@ -4279,15 +4256,15 @@ method CREATE_ENVIRONMENT. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -4472,15 +4449,15 @@ method UPDATE_ENVIRONMENT. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP PUT request @@ -4673,15 +4650,15 @@ method CREATE_CONFIGURATION. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -4872,15 +4849,15 @@ method UPDATE_CONFIGURATION. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP PUT request @@ -5009,15 +4986,15 @@ method CREATE_COLLECTION. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5208,15 +5185,15 @@ method UPDATE_COLLECTION. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP PUT request @@ -5447,15 +5424,15 @@ method CREATE_EXPANSIONS. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5626,15 +5603,15 @@ method CREATE_TOKENIZATION_DICTIONARY. endif. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5917,8 +5894,8 @@ method ADD_DOCUMENT. if not i_METADATA is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="metadata"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_METADATA. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -6065,8 +6042,8 @@ method UPDATE_DOCUMENT. if not i_METADATA is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="metadata"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_METADATA. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -6239,15 +6216,15 @@ method QUERY. endif. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -6617,15 +6594,15 @@ method FEDERATED_QUERY. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -7078,15 +7055,15 @@ method ADD_TRAINING_DATA. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -7352,15 +7329,15 @@ method CREATE_TRAINING_EXAMPLE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -7487,15 +7464,15 @@ method UPDATE_TRAINING_EXAMPLE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP PUT request @@ -7673,15 +7650,15 @@ method CREATE_EVENT. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -8301,15 +8278,15 @@ method CREATE_CREDENTIALS. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -8439,15 +8416,15 @@ method UPDATE_CREDENTIALS. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP PUT request @@ -8626,15 +8603,15 @@ method CREATE_GATEWAY. endif. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -8753,22 +8730,4 @@ method DELETE_GATEWAY. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_DISCOVERY_V1->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_lang_translator_v3.clas.abap b/src/zcl_ibmc_lang_translator_v3.clas.abap index d7a4341..a9fdca6 100644 --- a/src/zcl_ibmc_lang_translator_v3.clas.abap +++ b/src/zcl_ibmc_lang_translator_v3.clas.abap @@ -13,7 +13,7 @@ * limitations under the License. "!

Language Translator

"! IBM Watson™ Language Translator translates text from one language to -"! another. The service offers multiple IBM provided translation models that you +"! another. The service offers multiple IBM-provided translation models that you "! can customize based on your unique terminology and language. Use Language "! Translator to take news from across the globe and present it in your language, "! communicate with your customers in their own language, and more.
@@ -55,6 +55,13 @@ public section. WORD_COUNT type INTEGER, "! Number of characters in the input text. CHARACTER_COUNT type INTEGER, + "! The language code of the source text if the source language was automatically + "! detected. + DETECTED_LANGUAGE type STRING, + "! A score between 0 and 1 indicating the confidence of source language detection. + "! A higher value indicates greater confidence. This is returned only when the + "! service automatically detects the source language. + DETECTED_LANGUAGE_CONFIDENCE type DOUBLE, "! List of translation output in UTF-8, corresponding to the input text entries. TRANSLATIONS type STANDARD TABLE OF T_TRANSLATION WITH NON-UNIQUE DEFAULT KEY, end of T_TRANSLATION_RESULT. @@ -72,6 +79,33 @@ public section. "! A ranking of identified languages with confidence scores. LANGUAGES type STANDARD TABLE OF T_IDENTIFIED_LANGUAGE WITH NON-UNIQUE DEFAULT KEY, end of T_IDENTIFIED_LANGUAGES. + types: + "!

+ "! Response payload for languages.

+ begin of T_LANGUAGE, + "! The language code for the language (for example, `af`). + LANGUAGE type STRING, + "! The name of the language in English (for example, `Afrikaans`). + LANGUAGE_NAME type STRING, + "! The native name of the language (for example, `Afrikaans`). + NATIVE_LANGUAGE_NAME type STRING, + "! The country code for the language (for example, `ZA` for South Africa). + COUNTRY_CODE type STRING, + "! Indicates whether words of the language are separated by whitespace: `true` if + "! the words are separated; `false` otherwise. + WORDS_SEPARATED type BOOLEAN, + "! Indicates the direction of the language: `right_to_left` or `left_to_right`. + DIRECTION type STRING, + "! Indicates whether the language can be used as the source for translation: `true` + "! if the language can be used as the source; `false` otherwise. + SUPPORTED_AS_SOURCE type BOOLEAN, + "! Indicates whether the language can be used as the target for translation: `true` + "! if the language can be used as the target; `false` otherwise. + SUPPORTED_AS_TARGET type BOOLEAN, + "! Indicates whether the language supports automatic detection: `true` if the + "! language can be detected automatically; `false` otherwise. + IDENTIFIABLE type BOOLEAN, + end of T_LANGUAGE. types: "!

"! Translation target language code.

@@ -101,6 +135,10 @@ public section. BASE_MODEL_ID type STRING, "! Translation source language code. SOURCE type STRING, + "! A score between 0 and 1 indicating the confidence of source language detection. + "! A higher value indicates greater confidence. This is returned only when the + "! service automatically detects the source language. + DETECTED_LANGUAGE_CONFIDENCE type DOUBLE, "! Translation target language code. TARGET type STRING, "! The time when the document was submitted. @@ -114,6 +152,9 @@ public section. "! status=available. CHARACTER_COUNT type INTEGER, end of T_DOCUMENT_STATUS. + types: + "! No documentation available. + T_GET_TRANSLATED_DOC_RESPONSE type FILE. types: "! No documentation available. begin of T_ERROR_RESPONSE, @@ -129,38 +170,54 @@ public section. types: "! No documentation available. begin of T_INLINE_OBJECT1, - "! The model to use for translation. `model_id` or both `source` and `target` are - "! required. + "! The model to use for translation. For example, `en-de` selects the IBM-provided + "! base model for English-to-German translation. A model ID overrides the `source` + "! and `target` parameters and is required if you use a custom model. If no model + "! ID is specified, you must specify at least a target language. MODEL_ID type STRING, - "! Language code that specifies the language of the source document. + "! Language code that specifies the language of the source document. If omitted, + "! the service derives the source language from the input text. The input must + "! contain sufficient text for the service to identify the language reliably. SOURCE type STRING, - "! Language code that specifies the target language for translation. + "! Language code that specifies the target language for translation. Required if + "! model ID is not specified. TARGET type STRING, "! To use a previously submitted document as the source for a new translation, "! enter the `document_id` of the document. DOCUMENT_ID type STRING, - "! The contents of the source file to translate.
- "!
- "! [Supported file - "! types](https://cloud.ibm.com/docs/services/language-translator?topic=language-t - "! ranslator-document-translator-tutorial#supported-file-formats)
- "!
- "! Maximum file size: **20 MB**. + "! The contents of the source file to translate. The maximum file size for document + "! translation is 20 MB for service instances on the Standard, Advanced, and + "! Premium plans, and 2 MB for service instances on the Lite plan. For more + "! information, see [Supported file formats + "! (Beta)](https://cloud.ibm.com/docs/language-translator?topic=language-translato + "! r-document-translator-tutorial#supported-file-formats). FILE type FILE, end of T_INLINE_OBJECT1. types: "! No documentation available. begin of T_INLINE_OBJECT, - "! A TMX file with your customizations. The customizations in the file completely - "! overwrite the domain translaton data, including high frequency or high - "! confidence phrase translations. You can upload only one glossary with a file - "! size less than 10 MB per call. A forced glossary should contain single words or - "! short phrases. + "! A file with forced glossary terms for the source and target languages. The + "! customizations in the file completely overwrite the domain translation data, + "! including high frequency or high confidence phrase translations.
+ "!
+ "! You can upload only one glossary file for a custom model, and the glossary can + "! have a maximum size of 10 MB. A forced glossary must contain single words or + "! short phrases. For more information, see **Supported file formats** in the + "! method description.
+ "!
+ "! *With `curl`, use `--form forced_glossary=@{filename}`.*. FORCED_GLOSSARY type FILE, - "! A TMX file with parallel sentences for source and target language. You can - "! upload multiple parallel_corpus files in one request. All uploaded - "! parallel_corpus files combined, your parallel corpus must contain at least - "! 5,000 parallel sentences to train successfully. + "! A file with parallel sentences for the source and target languages. You can + "! upload multiple parallel corpus files in one request by repeating the + "! parameter. All uploaded parallel corpus files combined must contain at least + "! 5000 parallel sentences to train successfully. You can provide a maximum of + "! 500,000 parallel sentences across all corpora.
+ "!
+ "! A single entry in a corpus file can contain a maximum of 80 words. All corpora + "! files for a custom model can have a cumulative maximum size of 250 MB. For more + "! information, see **Supported file formats** in the method description.
+ "!
+ "! *With `curl`, use `--form parallel_corpus=@{filename}`.*. PARALLEL_CORPUS type FILE, end of T_INLINE_OBJECT. types: @@ -207,6 +264,13 @@ public section. "! model. If the model is not a custom model, this will be absent or an empty "! string. T_BASE_MODEL_ID type String. + types: + "!

+ "! The response type for listing supported languages.

+ begin of T_LANGUAGES, + "! An array of supported languages with information about each language. + LANGUAGES type STANDARD TABLE OF T_LANGUAGE WITH NON-UNIQUE DEFAULT KEY, + end of T_LANGUAGES. types: "!

"! System generated ID identifying a document being translated

@@ -215,15 +279,21 @@ public section. types: "! No documentation available. begin of T_TRANSLATE_REQUEST, - "! Input text in UTF-8 encoding. Multiple entries will result in multiple - "! translations in the response. + "! Input text in UTF-8 encoding. Submit a maximum of 50 KB (51,200 bytes) of text + "! with a single request. Multiple elements result in multiple translations in the + "! response. TEXT type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - "! A globally unique string that identifies the underlying model that is used for - "! translation. + "! The model to use for translation. For example, `en-de` selects the IBM-provided + "! base model for English-to-German translation. A model ID overrides the `source` + "! and `target` parameters and is required if you use a custom model. If no model + "! ID is specified, you must specify at least a target language. MODEL_ID type STRING, - "! Translation source language code. + "! Language code that specifies the language of the input text. If omitted, the + "! service derives the source language from the input text. The input must contain + "! sufficient text for the service to identify the language reliably. SOURCE type STRING, - "! Translation target language code. + "! Language code that specifies the target language for translation. Required if + "! model ID is not specified. TARGET type STRING, end of T_TRANSLATE_REQUEST. types: @@ -248,12 +318,14 @@ constants: T_TRANSLATION_RESULT type string value '|WORD_COUNT|CHARACTER_COUNT|TRANSLATIONS|', T_IDENTIFIED_LANGUAGE type string value '|LANGUAGE|CONFIDENCE|', T_IDENTIFIED_LANGUAGES type string value '|LANGUAGES|', + T_LANGUAGE type string value '|', T_DOCUMENT_STATUS type string value '|DOCUMENT_ID|FILENAME|STATUS|MODEL_ID|SOURCE|TARGET|CREATED|', T_ERROR_RESPONSE type string value '|CODE|ERROR|', T_INLINE_OBJECT1 type string value '|FILE|', T_INLINE_OBJECT type string value '|', T_TRANSLATION_MODEL type string value '|MODEL_ID|', T_TRANSLATION_MODELS type string value '|MODELS|', + T_LANGUAGES type string value '|LANGUAGES|', T_TRANSLATE_REQUEST type string value '|TEXT|', T_DELETE_MODEL_RESULT type string value '|STATUS|', T_DOCUMENT_LIST type string value '|DOCUMENTS|', @@ -270,11 +342,22 @@ constants: MODEL_ID type string value 'model_id', BASE_MODEL_ID type string value 'base_model_id', SOURCE type string value 'source', + DETECTED_LANGUAGE_CONFIDENCE type string value 'detected_language_confidence', TARGET type string value 'target', CREATED type string value 'created', COMPLETED type string value 'completed', WORD_COUNT type string value 'word_count', CHARACTER_COUNT type string value 'character_count', + LANGUAGES type string value 'languages', + LANGUAGE type string value 'language', + LANGUAGE_NAME type string value 'language_name', + NATIVE_LANGUAGE_NAME type string value 'native_language_name', + COUNTRY_CODE type string value 'country_code', + WORDS_SEPARATED type string value 'words_separated', + DIRECTION type string value 'direction', + SUPPORTED_AS_SOURCE type string value 'supported_as_source', + SUPPORTED_AS_TARGET type string value 'supported_as_target', + IDENTIFIABLE type string value 'identifiable', MODELS type string value 'models', NAME type string value 'name', DOMAIN type string value 'domain', @@ -282,10 +365,9 @@ constants: DEFAULT_MODEL type string value 'default_model', OWNER type string value 'owner', TEXT type string value 'text', + DETECTED_LANGUAGE type string value 'detected_language', TRANSLATIONS type string value 'translations', TRANSLATION type string value 'translation', - LANGUAGES type string value 'languages', - LANGUAGE type string value 'language', CONFIDENCE type string value 'confidence', CODE type string value 'code', ERROR type string value 'error', @@ -303,8 +385,36 @@ constants: redefinition . + "!

List supported languages

+ "! Lists all supported languages for translation. The method returns an array of + "! supported languages with information about each language. Languages are listed + "! in alphabetical order by language code (for example, `af`, `ar`). In addition + "! to basic information about each language, the response indicates whether the + "! language is `supported_as_source` for translation and `supported_as_target` for + "! translation. It also lists whether the language is `identifiable`. + "! + "! @parameter E_RESPONSE | + "! Service return value of type T_LANGUAGES + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods LIST_LANGUAGES + importing + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_LANGUAGES + raising + ZCX_IBMC_SERVICE_EXCEPTION . + "!

Translate

"! Translates the input text from the source language to the target language. + "! Specify a model ID that indicates the source and target languages, or specify + "! the source and target languages individually. You can omit the source language + "! to have the service attempt to detect the language from the input text. If you + "! omit the source language, the request must contain sufficient input text for + "! the service to identify the source language.
+ "!
+ "! You can translate a maximum of 50 KB (51,200 bytes) of text with a single + "! request. All input text must be encoded in UTF-8 format. "! "! @parameter I_REQUEST | "! The translate request containing the text, and either a model ID or source and @@ -365,11 +475,11 @@ constants: "! @parameter I_TARGET | "! Specify a language code to filter results by target language. "! @parameter I_DEFAULT | - "! If the default parameter isn't specified, the service will return all - "! models (default and non-default) for each language pair. To return only default - "! models, set this to `true`. To return only non-default models, set this to - "! `false`. There is exactly one default model per language pair, the IBM provided - "! base model. + "! If the `default` parameter isn't specified, the service returns all models + "! (default and non-default) for each language pair. To return only default + "! models, set this parameter to `true`. To return only non-default models, set + "! this parameter to `false`. There is exactly one default model, the IBM-provided + "! base model, per language pair. "! @parameter E_RESPONSE | "! Service return value of type T_TRANSLATION_MODELS "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -385,45 +495,112 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Create model

- "! Uploads Translation Memory eXchange (TMX) files to customize a translation - "! model.
+ "! Uploads training files to customize a translation model. You can customize a + "! model with a forced glossary or with a parallel corpus:
+ "! * Use a *forced glossary* to force certain terms and phrases to be translated in + "! a specific way. You can upload only a single forced glossary file for a model. + "! The size of a forced glossary file for a custom model is limited to 10 MB.
+ "! * Use a *parallel corpus* when you want your custom model to learn from general + "! translation patterns in parallel sentences in your samples. What your model + "! learns from a parallel corpus can improve translation results for input text + "! that the model has not been trained on. You can upload multiple parallel + "! corpora files with a request. To successfully train with parallel corpora, the + "! corpora files must contain a cumulative total of at least 5000 parallel + "! sentences. The cumulative size of all uploaded corpus files for a custom model + "! is limited to 250 MB.
"!
- "! You can either customize a model with a forced glossary or with a corpus that - "! contains parallel sentences. To create a model that is customized with a - "! parallel corpus <b>and</b> a forced glossary, proceed in two steps: - "! customize with a parallel corpus first and then customize the resulting model - "! with a glossary. Depending on the type of customization and the size of the - "! uploaded corpora, training can range from minutes for a glossary to several - "! hours for a large parallel corpus. You can upload a single forced glossary file - "! and this file must be less than <b>10 MB</b>. You can upload - "! multiple parallel corpora tmx files. The cumulative file size of all uploaded - "! files is limited to <b>250 MB</b>. To successfully train with a - "! parallel corpus you must have at least <b>5,000 parallel - "! sentences</b> in your corpus.
+ "! Depending on the type of customization and the size of the uploaded files, + "! training time can range from minutes for a glossary to several hours for a + "! large parallel corpus. To create a model that is customized with a parallel + "! corpus and a forced glossary, customize the model with a parallel corpus first + "! and then customize the resulting model with a forced glossary.
"!
- "! You can have a <b>maximum of 10 custom models per language pair</b>. - "! + "! You can create a maximum of 10 custom models per language pair. For more + "! information about customizing a translation model, including the formatting and + "! character restrictions for data files, see [Customizing your + "! model](https://cloud.ibm.com/docs/language-translator?topic=language-translator + "! -customizing).
+ "!
+ "! #### Supported file formats
+ "!
+ "! You can provide your training data for customization in the following document + "! formats:
+ "! * **TMX** (`.tmx`) - Translation Memory eXchange (TMX) is an XML specification + "! for the exchange of translation memories.
+ "! * **XLIFF** (`.xliff`) - XML Localization Interchange File Format (XLIFF) is an + "! XML specification for the exchange of translation memories.
+ "! * **CSV** (`.csv`) - Comma-separated values (CSV) file with two columns for + "! aligned sentences and phrases. The first row must have two language codes. The + "! first column is for the source language code, and the second column is for the + "! target language code.
+ "! * **TSV** (`.tsv` or `.tab`) - Tab-separated values (TSV) file with two columns + "! for aligned sentences and phrases. The first row must have two language codes. + "! The first column is for the source language code, and the second column is for + "! the target language code.
+ "! * **JSON** (`.json`) - Custom JSON format for specifying aligned sentences and + "! phrases.
+ "! * **Microsoft Excel** (`.xls` or `.xlsx`) - Excel file with the first two + "! columns for aligned sentences and phrases. The first row contains the language + "! code.
+ "!
+ "! You must encode all text data in UTF-8 format. For more information, see + "! [Supported document formats for training + "! data](https://cloud.ibm.com/docs/language-translator?topic=language-translator- + "! customizing#supported-document-formats-for-training-data).
+ "!
+ "! #### Specifying file formats
+ "!
+ "! You can indicate the format of a file by including the file extension with the + "! file name. Use the file extensions shown in **Supported file formats**.
+ "!
+ "! Alternatively, you can omit the file extension and specify one of the following + "! `content-type` specifications for the file:
+ "! * **TMX** - `application/x-tmx+xml`
+ "! * **XLIFF** - `application/xliff+xml`
+ "! * **CSV** - `text/csv`
+ "! * **TSV** - `text/tab-separated-values`
+ "! * **JSON** - `application/json`
+ "! * **Microsoft Excel** - + "! `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
+ "!
+ "! For example, with `curl`, use the following `content-type` specification to + "! indicate the format of a CSV file named **glossary**:
+ "!
+ "! `--form "forced_glossary=@glossary;type=text/csv"` "! "! @parameter I_BASE_MODEL_ID | - "! The model ID of the model to use as the base for customization. To see available - "! models, use the `List models` method. Usually all IBM provided models are - "! customizable. In addition, all your models that have been created via parallel - "! corpus customization, can be further customized with a forced glossary. + "! The ID of the translation model to use as the base for customization. To see + "! available models and IDs, use the `List models` method. Most models that are + "! provided with the service are customizable. In addition, all models that you + "! create with parallel corpora customization can be further customized with a + "! forced glossary. "! @parameter I_FORCED_GLOSSARY | - "! A TMX file with your customizations. The customizations in the file completely - "! overwrite the domain translaton data, including high frequency or high - "! confidence phrase translations. You can upload only one glossary with a file - "! size less than 10 MB per call. A forced glossary should contain single words or - "! short phrases. + "! A file with forced glossary terms for the source and target languages. The + "! customizations in the file completely overwrite the domain translation data, + "! including high frequency or high confidence phrase translations.
+ "!
+ "! You can upload only one glossary file for a custom model, and the glossary can + "! have a maximum size of 10 MB. A forced glossary must contain single words or + "! short phrases. For more information, see **Supported file formats** in the + "! method description.
+ "!
+ "! *With `curl`, use `--form forced_glossary=@{filename}`.*. "! @parameter I_PARALLEL_CORPUS | - "! A TMX file with parallel sentences for source and target language. You can - "! upload multiple parallel_corpus files in one request. All uploaded - "! parallel_corpus files combined, your parallel corpus must contain at least - "! 5,000 parallel sentences to train successfully. + "! A file with parallel sentences for the source and target languages. You can + "! upload multiple parallel corpus files in one request by repeating the + "! parameter. All uploaded parallel corpus files combined must contain at least + "! 5000 parallel sentences to train successfully. You can provide a maximum of + "! 500,000 parallel sentences across all corpora.
+ "!
+ "! A single entry in a corpus file can contain a maximum of 80 words. All corpora + "! files for a custom model can have a cumulative maximum size of 250 MB. For more + "! information, see **Supported file formats** in the method description.
+ "!
+ "! *With `curl`, use `--form parallel_corpus=@{filename}`.*. "! @parameter I_NAME | "! An optional model name that you can use to identify the model. Valid characters - "! are letters, numbers, dashes, underscores, spaces and apostrophes. The maximum - "! length is 32 characters. + "! are letters, numbers, dashes, underscores, spaces, and apostrophes. The maximum + "! length of the name is 32 characters. "! @parameter E_RESPONSE | "! Service return value of type T_TRANSLATION_MODEL "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -462,7 +639,7 @@ constants: "!

Get model details

"! Gets information about a translation model, including training status for custom "! models. Use this API call to poll the status of your customization request. A - "! successfully completed training will have a status of `available`. + "! successfully completed training has a status of `available`. "! "! @parameter I_MODEL_ID | "! Model ID of the model to get. @@ -496,27 +673,33 @@ constants: "!

Translate document

"! Submit a document for translation. You can submit the document contents in the "! `file` parameter, or you can reference a previously submitted document by - "! document ID. + "! document ID. The maximum file size for document translation is
+ "! * 20 MB for service instances on the Standard, Advanced, and Premium plans
+ "! * 2 MB for service instances on the Lite plan "! "! @parameter I_FILE | - "! The contents of the source file to translate.
- "!
- "! [Supported file - "! types](https://cloud.ibm.com/docs/services/language-translator?topic=language-t - "! ranslator-document-translator-tutorial#supported-file-formats)
- "!
- "! Maximum file size: **20 MB**. + "! The contents of the source file to translate. The maximum file size for document + "! translation is 20 MB for service instances on the Standard, Advanced, and + "! Premium plans, and 2 MB for service instances on the Lite plan. For more + "! information, see [Supported file formats + "! (Beta)](https://cloud.ibm.com/docs/language-translator?topic=language-translato + "! r-document-translator-tutorial#supported-file-formats). "! @parameter I_FILENAME | "! The filename for file. "! @parameter I_FILE_CONTENT_TYPE | "! The content type of file. "! @parameter I_MODEL_ID | - "! The model to use for translation. `model_id` or both `source` and `target` are - "! required. + "! The model to use for translation. For example, `en-de` selects the IBM-provided + "! base model for English-to-German translation. A model ID overrides the `source` + "! and `target` parameters and is required if you use a custom model. If no model + "! ID is specified, you must specify at least a target language. "! @parameter I_SOURCE | - "! Language code that specifies the language of the source document. + "! Language code that specifies the language of the source document. If omitted, + "! the service derives the source language from the input text. The input must + "! contain sufficient text for the service to identify the language reliably. "! @parameter I_TARGET | - "! Language code that specifies the target language for translation. + "! Language code that specifies the target language for translation. Required if + "! model ID is not specified. "! @parameter I_DOCUMENT_ID | "! To use a previously submitted document as the source for a new translation, "! enter the `document_id` of the document. @@ -605,10 +788,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_LANG_TRANSLATOR_V3 IMPLEMENTATION. @@ -650,17 +829,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/language-translator/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.language-translator.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -672,12 +848,59 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173429'. + e_sdk_version_date = '20210312144434'. endmethod. +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->LIST_LANGUAGES +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_LANGUAGES +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method LIST_LANGUAGES. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v3/languages'. + + " standard headers + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + + + + + + + + " execute HTTP GET request + lo_response = HTTP_GET( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. + + * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->TRANSLATE * +-------------------------------------------------------------------------------------------------+ @@ -736,15 +959,15 @@ method TRANSLATE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -867,15 +1090,15 @@ method IDENTIFY. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1280,8 +1503,8 @@ method TRANSLATE_DOCUMENT. if not i_MODEL_ID is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="model_id"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_MODEL_ID. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -1289,8 +1512,8 @@ method TRANSLATE_DOCUMENT. if not i_SOURCE is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="source"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_SOURCE. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -1298,8 +1521,8 @@ method TRANSLATE_DOCUMENT. if not i_TARGET is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="target"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_TARGET. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -1307,8 +1530,8 @@ method TRANSLATE_DOCUMENT. if not i_DOCUMENT_ID is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="document_id"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_DOCUMENT_ID. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -1489,22 +1712,4 @@ method GET_TRANSLATED_DOCUMENT. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_LANG_TRANSLATOR_V3->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_lang_translator_v3.clas.xml b/src/zcl_ibmc_lang_translator_v3.clas.xml index a2c90ab..14fc87d 100644 --- a/src/zcl_ibmc_lang_translator_v3.clas.xml +++ b/src/zcl_ibmc_lang_translator_v3.clas.xml @@ -66,6 +66,12 @@ E List identifiable languages
+ + ZCL_IBMC_LANG_TRANSLATOR_V3 + LIST_LANGUAGES + E + List supported languages + ZCL_IBMC_LANG_TRANSLATOR_V3 LIST_MODELS diff --git a/src/zcl_ibmc_nat_lang_class_v1.clas.abap b/src/zcl_ibmc_nat_lang_class_v1.clas.abap index c82d25b..22f7150 100644 --- a/src/zcl_ibmc_nat_lang_class_v1.clas.abap +++ b/src/zcl_ibmc_nat_lang_class_v1.clas.abap @@ -190,7 +190,7 @@ constants: CLASSES type string value 'classes', CONFIDENCE type string value 'confidence', CLASS_NAME type string value 'class_name', - CLASSIFYINPUT type string value 'classifyInput', + CLASSIFY_INPUT type string value 'classify_input', TRAINING_METADATA type string value 'training_metadata', TRAINING_DATA type string value 'training_data', end of C_ABAPNAME_DICTIONARY . @@ -333,10 +333,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_NAT_LANG_CLASS_V1 IMPLEMENTATION. @@ -378,17 +374,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/natural-language-classifier/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.natural-language-classifier.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -400,7 +393,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173431'. + e_sdk_version_date = '20210312144435'. endmethod. @@ -466,15 +459,15 @@ method CLASSIFY. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -552,15 +545,15 @@ method CLASSIFY_COLLECTION. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -801,14 +794,4 @@ method DELETE_CLASSIFIER. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_NAT_LANG_CLASS_V1->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap b/src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap index b089a27..c72ca66 100644 --- a/src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap +++ b/src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap @@ -19,9 +19,9 @@ "! content.
"!
"! You can create [custom -"! models](https://cloud.ibm.com/docs/services/natural-language-understanding?topi -"! c=natural-language-understanding-customizing) with Watson Knowledge Studio to -"! detect custom entities and relations in Natural Language Understanding.
+"! models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural +"! -language-understanding-customizing) with Watson Knowledge Studio to detect +"! custom entities and relations in Natural Language Understanding.
class ZCL_IBMC_NAT_LANG_UNDRSTND_V1 DEFINITION public inheriting from ZCL_IBMC_SERVICE_EXT @@ -116,11 +116,13 @@ public section. NAME type STRING, "! An optional map of metadata key-value pairs to store with this model. USER_METADATA type MAP, - "! The language code of this model. + "! The 2-letter language code of this model. LANGUAGE type STRING, "! An optional description of the model. DESCRIPTION type STRING, "! An optional version string. + MODEL_VERSION type STRING, + "! Deprecated — use `model_version`. VERSION type STRING, "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural "! Language Understanding. @@ -168,7 +170,7 @@ public section. STATUS type STRING, "! Unique model ID. MODEL_ID type STRING, - "! ISO 639-1 code indicating the language of the model. + "! ISO 639-1 code that indicates the language of the model. LANGUAGE type STRING, "! Model description. DESCRIPTION type STRING, @@ -176,6 +178,8 @@ public section. "! Language Understanding. WORKSPACE_ID type STRING, "! The model version, if it was manually provided in Watson Knowledge Studio. + MODEL_VERSION type STRING, + "! Deprecated — use `model_version`. VERSION type STRING, "! The description of the version, if it was manually provided in Watson Knowledge "! Studio. @@ -360,8 +364,8 @@ public section. begin of T_TOKEN_RESULT, "! The token as it appears in the analyzed text. TEXT type STRING, - "! The part of speech of the token. For descriptions of the values, see [Universal - "! Dependencies POS tags](https://universaldependencies.org/u/pos/). + "! The part of speech of the token. For more information about the values, see + "! [Universal Dependencies POS tags](https://universaldependencies.org/u/pos/). PART_OF_SPEECH type STRING, "! Character offsets indicating the beginning and end of the token in the analyzed "! text. @@ -414,11 +418,10 @@ public section. "!

"! A categorization of the analyzed text.

begin of T_CATEGORIES_RESULT, - "! The path to the category through the 5-level taxonomy hierarchy. For the - "! complete list of categories, see the [Categories - "! hierarchy](https://cloud.ibm.com/docs/services/natural-language-understanding?t - "! opic=natural-language-understanding-categories#categories-hierarchy) - "! documentation. + "! The path to the category through the 5-level taxonomy hierarchy. For more + "! information about the categories, see [Categories + "! hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natu + "! ral-language-understanding-categories#categories-hierarchy). LABEL type STRING, "! Confidence score for the category classification. Higher values indicate greater "! confidence. @@ -547,6 +550,33 @@ public section. "! Set this to `true` to return the part of speech for each token. PART_OF_SPEECH type BOOLEAN, end of T_SYNTAX_OPTIONS_TOKENS. + types: + "!

+ "! Metadata associated with this custom model.

+ begin of T_FILE_AND_METADATA, + "! An optional name for the model. + NAME type STRING, + "! An optional map of metadata key-value pairs to store with this model. + USER_METADATA type MAP, + "! The 2-letter language code of this model. + LANGUAGE type STRING, + "! An optional description of the model. + DESCRIPTION type STRING, + "! An optional version string. + MODEL_VERSION type STRING, + "! Deprecated — use `model_version`. + VERSION type STRING, + "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural + "! Language Understanding. + WORKSPACE_ID type STRING, + "! The description of the version. + VERSION_DESCRIPTION type STRING, + "! Model file exported from the advanced rules editor in Watson Knowledge Studio. + "! For more information, see [Creating an advanced rules + "! model](https://cloud.ibm.com/docs/watson-knowledge-studio?topic=watson-knowledg + "! e-studio-create-advanced-rules-model#create-advanced-rules-model-procedure). + MODEL type FILE, + end of T_FILE_AND_METADATA. types: "!

"! Returns important keywords in the content.


@@ -565,25 +595,26 @@ public section. "!

"! Recognizes when two entities are related and identifies the

"! type of relation. For example, an `awardedTo` relation might connect the - "! entities "Nobel Prize" and "Albert Einstein". See [Relation - "! types](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - "! =natural-language-understanding-relations).
+ "! entities "Nobel Prize" and "Albert Einstein". For more + "! information, see [Relation + "! types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural- + "! language-understanding-relations).
"!
"! Supported languages: Arabic, English, German, Japanese, Korean, Spanish. "! Chinese, Dutch, French, Italian, and Portuguese custom models are also "! supported. begin of T_RELATIONS_OPTIONS, "! Enter a [custom - "! model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - "! =natural-language-understanding-customizing) ID to override the default model. + "! model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural- + "! language-understanding-customizing) ID to override the default model. MODEL type STRING, end of T_RELATIONS_OPTIONS. types: "!

"! Identifies people, cities, organizations, and other entities

- "! in the content. See [Entity types and - "! subtypes](https://cloud.ibm.com/docs/services/natural-language-understanding?to - "! pic=natural-language-understanding-entity-types).
+ "! in the content. For more information, see [Entity types and + "! subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natur + "! al-language-understanding-entity-types).
"!
"! Supported languages: English, French, German, Italian, Japanese, Korean, "! Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported @@ -594,9 +625,9 @@ public section. "! Set this to `true` to return locations of entity mentions. MENTIONS type BOOLEAN, "! Enter a [custom - "! model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - "! =natural-language-understanding-customizing) ID to override the standard entity - "! detection model. + "! model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural- + "! language-understanding-customizing) ID to override the standard entity detection + "! model. MODEL type STRING, "! Set this to `true` to return sentiment information for detected entities. SENTIMENT type BOOLEAN, @@ -615,12 +646,6 @@ public section. "! Maximum number of concepts to return. LIMIT type INTEGER, end of T_CONCEPTS_OPTIONS. - types: - "!

- "! Returns information from the document, including author

- "! name, title, RSS/ATOM feeds, prominent page image, and publication date. - "! Supports URL and HTML input types only. - T_METADATA_OPTIONS type JSONOBJECT. types: "!

"! Returns tokens and sentences from the input text.

@@ -644,9 +669,9 @@ public section. "! Maximum number of categories to return. LIMIT type INTEGER, "! Enter a [custom - "! model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - "! =natural-language-understanding-customizing) ID to override the standard - "! categories model.
+ "! model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural- + "! language-understanding-customizing) ID to override the standard categories + "! model.
"!
"! The custom categories experimental feature will be retired on 19 December 2019. "! On that date, deployed custom categories models will no longer be accessible in @@ -673,10 +698,10 @@ public section. "!
"! Supported languages: English. EMOTION type T_EMOTION_OPTIONS, - "! Identifies people, cities, organizations, and other entities in the content. See - "! [Entity types and - "! subtypes](https://cloud.ibm.com/docs/services/natural-language-understanding?to - "! pic=natural-language-understanding-entity-types).
+ "! Identifies people, cities, organizations, and other entities in the content. For + "! more information, see [Entity types and + "! subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natur + "! al-language-understanding-entity-types).
"!
"! Supported languages: English, French, German, Italian, Japanese, Korean, "! Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported @@ -690,12 +715,13 @@ public section. "! Returns information from the document, including author name, title, RSS/ATOM "! feeds, prominent page image, and publication date. Supports URL and HTML input "! types only. - METADATA type T_METADATA_OPTIONS, + METADATA type JSONOBJECT, "! Recognizes when two entities are related and identifies the type of relation. "! For example, an `awardedTo` relation might connect the entities "Nobel - "! Prize" and "Albert Einstein". See [Relation - "! types](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - "! =natural-language-understanding-relations).
+ "! Prize" and "Albert Einstein". For more information, see + "! [Relation + "! types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural- + "! language-understanding-relations).
"!
"! Supported languages: Arabic, English, German, Japanese, Korean, Spanish. "! Chinese, Dutch, French, Italian, and Portuguese custom models are also @@ -723,20 +749,38 @@ public section. end of T_FEATURES. types: "!

- "! Webpage metadata, such as the author and the title of the

- "! page. - begin of T_ANALYSIS_RESULTS_METADATA, - "! The authors of the document. - AUTHORS type STANDARD TABLE OF T_AUTHOR WITH NON-UNIQUE DEFAULT KEY, - "! The publication date in the format ISO 8601. - PUBLICATION_DATE type STRING, - "! The title of the document. - TITLE type STRING, - "! URL of a prominent image on the webpage. - IMAGE type STRING, - "! RSS/ATOM feeds found on the webpage. - FEEDS type STANDARD TABLE OF T_FEED WITH NON-UNIQUE DEFAULT KEY, - end of T_ANALYSIS_RESULTS_METADATA. + "! Advanced rules model.

+ begin of T_BASE_ADVANCED_RULES_MODEL, + "! An optional name for the model. + NAME type STRING, + "! An optional map of metadata key-value pairs to store with this model. + USER_METADATA type MAP, + "! The 2-letter language code of this model. + LANGUAGE type STRING, + "! An optional description of the model. + DESCRIPTION type STRING, + "! An optional version string. + MODEL_VERSION type STRING, + "! Deprecated — use `model_version`. + VERSION type STRING, + "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural + "! Language Understanding. + WORKSPACE_ID type STRING, + "! The description of the version. + VERSION_DESCRIPTION type STRING, + "! The service features that are supported by the custom model. + FEATURES type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! When the status is `available`, the model is ready to use. + STATUS type STRING, + "! Unique model ID. + MODEL_ID type STRING, + "! dateTime indicating when the model was created. + CREATED type DATETIME, + "! dateTime of last successful model training. + LAST_TRAINED type DATETIME, + "! dateTime of last successful model deployment. + LAST_DEPLOYED type DATETIME, + end of T_BASE_ADVANCED_RULES_MODEL. types: "!

"! API usage information for the request.

@@ -771,7 +815,7 @@ public section. "! The anger, disgust, fear, joy, or sadness conveyed by the content. EMOTION type T_EMOTION_RESULT, "! Webpage metadata, such as the author and the title of the page. - METADATA type T_ANALYSIS_RESULTS_METADATA, + METADATA type T_FEATURES_RESULTS_METADATA, "! The relationships between entities in the content. RELATIONS type STANDARD TABLE OF T_RELATIONS_RESULT WITH NON-UNIQUE DEFAULT KEY, "! Sentences parsed into `subject`, `action`, and `object` form. @@ -791,6 +835,63 @@ public section. "! An array of extracted keywords. KEYWORDS type STANDARD TABLE OF T_SEMANTIC_ROLES_KEYWORD WITH NON-UNIQUE DEFAULT KEY, end of T_SEMANTIC_ROLES_SUBJECT. + types: + "!

+ "! (Experimental) Returns a summary of content.


+ "!
+ "! Supported languages: English only. + begin of T_SUMMARIZATION_OPTIONS, + "! Maximum number of summary sentences to return. + LIMIT type INTEGER, + end of T_SUMMARIZATION_OPTIONS. + types: + "!

+ "! (Experimental) Summary of content.

+ begin of T_SUMMARIZATION_RESULT, + "! Summary sentences of input source. + TEXT type STRING, + end of T_SUMMARIZATION_RESULT. + types: + "!

+ "! Advanced rules model.

+ begin of T_ADVANCED_RULES_MODEL, + "! An optional name for the model. + NAME type STRING, + "! An optional map of metadata key-value pairs to store with this model. + USER_METADATA type MAP, + "! The 2-letter language code of this model. + LANGUAGE type STRING, + "! An optional description of the model. + DESCRIPTION type STRING, + "! An optional version string. + MODEL_VERSION type STRING, + "! Deprecated — use `model_version`. + VERSION type STRING, + "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural + "! Language Understanding. + WORKSPACE_ID type STRING, + "! The description of the version. + VERSION_DESCRIPTION type STRING, + "! The service features that are supported by the custom model. + FEATURES type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! When the status is `available`, the model is ready to use. + STATUS type STRING, + "! Unique model ID. + MODEL_ID type STRING, + "! dateTime indicating when the model was created. + CREATED type DATETIME, + "! dateTime of last successful model training. + LAST_TRAINED type DATETIME, + "! dateTime of last successful model deployment. + LAST_DEPLOYED type DATETIME, + end of T_ADVANCED_RULES_MODEL. + types: + "!

+ "! List of advanced rules models.

+ begin of T_ADVANCED_RULES_MODEL_LIST, + "! The advanced rules models. + MODELS type STANDARD TABLE OF T_ADVANCED_RULES_MODEL WITH NON-UNIQUE DEFAULT KEY, + end of T_ADVANCED_RULES_MODEL_LIST. types: "!

"! Custom models that are available for entities and relations.

@@ -806,6 +907,12 @@ public section. "! An array of extracted keywords. KEYWORDS type STANDARD TABLE OF T_SEMANTIC_ROLES_KEYWORD WITH NON-UNIQUE DEFAULT KEY, end of T_SEMANTIC_ROLES_OBJECT. + types: + "!

+ "! Returns information from the document, including author

+ "! name, title, RSS/ATOM feeds, prominent page image, and publication date. + "! Supports URL and HTML input types only. + T_METADATA_OPTIONS type JSONOBJECT. types: "!

"! An object containing request parameters.

@@ -821,17 +928,17 @@ public section. URL type STRING, "! Specific features to analyze the document for. FEATURES type T_FEATURES, - "! Set this to `false` to disable webpage cleaning. To learn more about webpage - "! cleaning, see the [Analyzing - "! webpages](https://cloud.ibm.com/docs/services/natural-language-understanding?to - "! pic=natural-language-understanding-analyzing-webpages) documentation. + "! Set this to `false` to disable webpage cleaning. For more information about + "! webpage cleaning, see [Analyzing + "! webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natur + "! al-language-understanding-analyzing-webpages). CLEAN type BOOLEAN, "! An [XPath - "! query](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - "! =natural-language-understanding-analyzing-webpages#xpath) to perform on `html` - "! or `url` input. Results of the query will be appended to the cleaned webpage - "! text before it is analyzed. To analyze only the results of the XPath query, set - "! the `clean` parameter to `false`. + "! query](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural- + "! language-understanding-analyzing-webpages#xpath) to perform on `html` or `url` + "! input. Results of the query will be appended to the cleaned webpage text before + "! it is analyzed. To analyze only the results of the XPath query, set the `clean` + "! parameter to `false`. XPATH type STRING, "! Whether to use raw HTML content if text cleaning fails. FALLBACK_TO_RAW type BOOLEAN, @@ -839,17 +946,77 @@ public section. RETURN_ANALYZED_TEXT type BOOLEAN, "! ISO 639-1 code that specifies the language of your text. This overrides "! automatic language detection. Language support differs depending on the - "! features you include in your analysis. See [Language - "! support](https://cloud.ibm.com/docs/services/natural-language-understanding?top - "! ic=natural-language-understanding-language-support) for more information. + "! features you include in your analysis. For more information, see [Language + "! support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natura + "! l-language-understanding-language-support). LANGUAGE type STRING, "! Sets the maximum number of characters that are processed by the service. LIMIT_TEXT_CHARACTERS type INTEGER, end of T_PARAMETERS. + types: + "! No documentation available. + begin of T_SENTIMENT_MODEL, + "! The service features that are supported by the custom model. + FEATURES type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! When the status is `available`, the model is ready to use. + STATUS type STRING, + "! Unique model ID. + MODEL_ID type STRING, + "! dateTime indicating when the model was created. + CREATED type DATETIME, + "! dateTime of last successful model training. + LAST_TRAINED type DATETIME, + "! dateTime of last successful model deployment. + LAST_DEPLOYED type DATETIME, + "! A name for the model. + NAME type STRING, + "! An optional map of metadata key-value pairs to store with this model. + USER_METADATA type MAP, + "! The 2-letter language code of this model. + LANGUAGE type STRING, + "! An optional description of the model. + DESCRIPTION type STRING, + "! An optional version string. + MODEL_VERSION type STRING, + "! Deprecated — use `model_version`. + VERSION type STRING, + "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural + "! Language Understanding. + WORKSPACE_ID type STRING, + "! The description of the version. + VERSION_DESCRIPTION type STRING, + end of T_SENTIMENT_MODEL. types: "!

"! Link to the corresponding DBpedia resource.

T_DBPEDIA_RESOURCE type String. + types: + "!

+ "! Metadata associated with this custom model.

+ begin of T_SNTMNT_MDL_FILE_AND_METADATA, + "! An optional name for the model. + NAME type STRING, + "! An optional map of metadata key-value pairs to store with this model. + USER_METADATA type MAP, + "! The 2-letter language code of this model. + LANGUAGE type STRING, + "! An optional description of the model. + DESCRIPTION type STRING, + "! An optional version string. + MODEL_VERSION type STRING, + "! Deprecated — use `model_version`. + VERSION type STRING, + "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural + "! Language Understanding. + WORKSPACE_ID type STRING, + "! The description of the version. + VERSION_DESCRIPTION type STRING, + "! Training data in CSV format. For more information, see [Sentiment training data + "! requirements](https://cloud.ibm.com/docs/natural-language-understanding?topic=n + "! atural-language-understanding-customizing#sentiment-training-data-requirements). + "! + TRAINING_DATA type FILE, + end of T_SNTMNT_MDL_FILE_AND_METADATA. types: "!

"! Metadata associated with this custom model.

@@ -858,11 +1025,13 @@ public section. NAME type STRING, "! An optional map of metadata key-value pairs to store with this model. USER_METADATA type MAP, - "! The language code of this model. + "! The 2-letter language code of this model. LANGUAGE type STRING, "! An optional description of the model. DESCRIPTION type STRING, "! An optional version string. + MODEL_VERSION type STRING, + "! Deprecated — use `model_version`. VERSION type STRING, "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural "! Language Understanding. @@ -872,6 +1041,9 @@ public section. "! No documentation available. FILE type FILE, end of T_MODEL_FILE_AND_METADATA. + types: + "! No documentation available. + T_ADVNCD_RLS_ANALYSIS_RESULTS type JSONOBJECT. types: "!

"! Delete model results.

@@ -926,6 +1098,7 @@ constants: T_SENTIMENT_OPTIONS type string value '|', T_SEMANTIC_ROLES_ACTION type string value '|', T_SYNTAX_OPTIONS_TOKENS type string value '|', + T_FILE_AND_METADATA type string value '|LANGUAGE|', T_KEYWORDS_OPTIONS type string value '|', T_RELATIONS_OPTIONS type string value '|', T_ENTITIES_OPTIONS type string value '|', @@ -933,13 +1106,19 @@ constants: T_SYNTAX_OPTIONS type string value '|', T_CATEGORIES_OPTIONS type string value '|', T_FEATURES type string value '|', - T_ANALYSIS_RESULTS_METADATA type string value '|', + T_BASE_ADVANCED_RULES_MODEL type string value '|LANGUAGE|', T_ANALYSIS_RESULTS_USAGE type string value '|', T_ANALYSIS_RESULTS type string value '|', T_SEMANTIC_ROLES_SUBJECT type string value '|', + T_SUMMARIZATION_OPTIONS type string value '|', + T_SUMMARIZATION_RESULT type string value '|', + T_ADVANCED_RULES_MODEL type string value '|LANGUAGE|STATUS|MODEL_ID|CREATED|', + T_ADVANCED_RULES_MODEL_LIST type string value '|', T_LIST_MODELS_RESULTS type string value '|', T_SEMANTIC_ROLES_OBJECT type string value '|', T_PARAMETERS type string value '|FEATURES|', + T_SENTIMENT_MODEL type string value '|', + T_SNTMNT_MDL_FILE_AND_METADATA type string value '|LANGUAGE|TRAINING_DATA|', T_MODEL_FILE_AND_METADATA type string value '|LANGUAGE|FILE|', T_DELETE_MODEL_RESULTS type string value '|', __DUMMY type string value SPACE, @@ -948,15 +1127,30 @@ constants: constants: "!

Map ABAP identifiers to service identifiers.

begin of C_ABAPNAME_DICTIONARY, + NAME type string value 'name', + USER_METADATA type string value 'user_metadata', + INNER type string value 'inner', + LANGUAGE type string value 'language', + DESCRIPTION type string value 'description', + MODEL_VERSION type string value 'model_version', + VERSION type string value 'version', + WORKSPACE_ID type string value 'workspace_id', + VERSION_DESCRIPTION type string value 'version_description', + FEATURES type string value 'features', + STATUS type string value 'status', + MODEL_ID type string value 'model_id', + CREATED type string value 'created', + LAST_TRAINED type string value 'last_trained', + LAST_DEPLOYED type string value 'last_deployed', + MODELS type string value 'models', + MODEL type string value 'model', TEXT type string value 'text', HTML type string value 'html', URL type string value 'url', - FEATURES type string value 'features', CLEAN type string value 'clean', XPATH type string value 'xpath', FALLBACK_TO_RAW type string value 'fallback_to_raw', RETURN_ANALYZED_TEXT type string value 'return_analyzed_text', - LANGUAGE type string value 'language', LIMIT_TEXT_CHARACTERS type string value 'limit_text_characters', CONCEPTS type string value 'concepts', EMOTION type string value 'emotion', @@ -968,23 +1162,12 @@ constants: SENTIMENT type string value 'sentiment', CATEGORIES type string value 'categories', SYNTAX type string value 'syntax', - MODELS type string value 'models', DELETED type string value 'deleted', - STATUS type string value 'status', - MODEL_ID type string value 'model_id', - DESCRIPTION type string value 'description', - WORKSPACE_ID type string value 'workspace_id', - VERSION type string value 'version', - VERSION_DESCRIPTION type string value 'version_description', - CREATED type string value 'created', - NAME type string value 'name', - USER_METADATA type string value 'user_metadata', - INNER type string value 'inner', + TRAINING_DATA type string value 'training_data', FILE type string value 'file', ANALYZED_TEXT type string value 'analyzed_text', RETRIEVED_URL type string value 'retrieved_url', USAGE type string value 'usage', - SEMANTICROLES type string value 'semanticRoles', TEXT_CHARACTERS type string value 'text_characters', TEXT_UNITS type string value 'text_units', RELEVANCE type string value 'relevance', @@ -1025,11 +1208,9 @@ constants: PART_OF_SPEECH type string value 'part_of_speech', LEMMA type string value 'lemma', LIMIT type string value 'limit', - MODEL type string value 'model', CODE type string value 'code', ERROR type string value 'error', RELEVANT_TEXT type string value 'relevant_text', - RELEVANTTEXT type string value 'relevantText', end of C_ABAPNAME_DICTIONARY . @@ -1052,12 +1233,13 @@ constants: "! - Relations
"! - Semantic roles
"! - Sentiment
- "! - Syntax (Experimental).
+ "! - Syntax
+ "! - Summarization (Experimental)
"!
"! If a language for the input text is not specified with the `language` parameter, "! the service [automatically detects the - "! language](https://cloud.ibm.com/docs/services/natural-language-understanding?to - "! pic=natural-language-understanding-detectable-languages). + "! language](https://cloud.ibm.com/docs/natural-language-understanding?topic=natur + "! al-language-understanding-detectable-languages). "! "! @parameter I_PARAMETERS | "! An object containing request parameters. The `features` object and one of the @@ -1078,9 +1260,9 @@ constants: "!

List models

"! Lists Watson Knowledge Studio [custom entities and relations - "! models](https://cloud.ibm.com/docs/services/natural-language-understanding?topi - "! c=natural-language-understanding-customizing) that are deployed to your Natural - "! Language Understanding service. + "! models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural + "! -language-understanding-customizing) that are deployed to your Natural Language + "! Understanding service. "! "! @parameter E_RESPONSE | "! Service return value of type T_LIST_MODELS_RESULTS @@ -1116,10 +1298,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_NAT_LANG_UNDRSTND_V1 IMPLEMENTATION. @@ -1161,22 +1339,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'ICP4D'. - e_request_prop-auth_name = 'ICP4D'. - e_request_prop-auth_type = 'apiKey'. - e_request_prop-auth_headername = 'Authorization'. - e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/natural-language-understanding/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.natural-language-understanding.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -1188,7 +1358,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173433'. + e_sdk_version_date = '20210312144437'. endmethod. @@ -1252,15 +1422,15 @@ method ANALYZE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1374,22 +1544,4 @@ method DELETE_MODEL. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_NAT_LANG_UNDRSTND_V1->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_personal_insights_v3.clas.abap b/src/zcl_ibmc_personal_insights_v3.clas.abap index afb3a45..5ec9825 100644 --- a/src/zcl_ibmc_personal_insights_v3.clas.abap +++ b/src/zcl_ibmc_personal_insights_v3.clas.abap @@ -12,12 +12,25 @@ * See the License for the specific language governing permissions and * limitations under the License. "!

Personality Insights

-"! The IBM Watson™ Personality Insights service enables applications to -"! derive insights from social media, enterprise data, or other digital -"! communications. The service uses linguistic analytics to infer -"! individuals' intrinsic personality characteristics, including Big Five, -"! Needs, and Values, from digital communications such as email, text messages, -"! tweets, and forum posts.
+"! IBM® will begin sunsetting IBM Watson™ Personality Insights on 1 +"! December 2020. For a period of one year from this date, you will still be able +"! to use Watson Personality Insights. However, as of 1 December 2021, the +"! offering will no longer be available.<br/><br/>As an alternative, +"! we encourage you to consider migrating to IBM Watson™ Natural Language +"! Understanding, a service on IBM Cloud® that uses deep learning to extract +"! data and insights from text such as keywords, categories, sentiment, emotion, +"! and syntax to provide insights for your business or industry. For more +"! information, see [About Natural Language +"! Understanding](https://cloud.ibm.com/docs/natural-language-understanding?topic= +"! natural-language-understanding-about).
+"! {: deprecated}
+"!
+"! The IBM Watson Personality Insights service enables applications to derive +"! insights from social media, enterprise data, or other digital communications. +"! The service uses linguistic analytics to infer individuals' intrinsic +"! personality characteristics, including Big Five, Needs, and Values, from +"! digital communications such as email, text messages, tweets, and forum +"! posts.
"!
"! The service can automatically infer, from potentially noisy social media, "! portraits of individuals that reflect their personality characteristics. The @@ -287,7 +300,6 @@ constants: VALUES type string value 'values', BEHAVIOR type string value 'behavior', CONSUMPTION_PREFERENCES type string value 'consumption_preferences', - CONSUMPTIONPREFERENCES type string value 'consumptionPreferences', WARNINGS type string value 'warnings', TRAIT_ID type string value 'trait_id', NAME type string value 'name', @@ -303,7 +315,7 @@ constants: WARNING_ID type string value 'warning_id', MESSAGE type string value 'message', CONTENTITEMS type string value 'contentItems', - CONTENTITEM type string value 'contentItem', + CONTENT_ITEM type string value 'content_item', CONTENT type string value 'content', ID type string value 'id', CREATED type string value 'created', @@ -542,10 +554,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_PERSONAL_INSIGHTS_V3 IMPLEMENTATION. @@ -587,17 +595,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/personality-insights/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.personality-insights.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -609,7 +614,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173434'. + e_sdk_version_date = '20210312144439'. endmethod. @@ -739,15 +744,15 @@ method PROFILE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -889,15 +894,15 @@ method PROFILE_AS_CSV. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -910,22 +915,4 @@ method PROFILE_AS_CSV. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_PERSONAL_INSIGHTS_V3->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_service.clas.abap b/src/zcl_ibmc_service.clas.abap index 3a869d6..c824515 100644 --- a/src/zcl_ibmc_service.clas.abap +++ b/src/zcl_ibmc_service.clas.abap @@ -411,6 +411,10 @@ protected section. changing !C_BASE type ANY . "!

Method for internal use.

+ methods SET_DEFAULT_QUERY_PARAMETERS + changing + !C_URL type TS_URL . + "!

Method for internal use.

methods SET_URI_AND_AUTHORIZATION importing !I_CLIENT type TS_CLIENT @@ -1180,6 +1184,7 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. lt_compname type tt_string, lv_compname type string, lv_index type i, + lv_rowno type i, begin of ls_stack, name type string, ref type ref to data, @@ -1187,11 +1192,16 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. type type char, end of ls_stack, ls_stack_new like ls_stack, - lt_stack like standard table of ls_stack. + lt_stack like standard table of ls_stack, + lr_ref type ref to data. field-symbols: type data, + type standard table, + type standard table, type any, type any, + type any, + type any, type ref to data, type any. @@ -1211,29 +1221,24 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. if lv_index <= 0. exit. endif. read table lt_stack into ls_stack index lv_index. - assign ls_stack-ref->* to . - assign ls_stack-struct->* to . - if ls_stack-name is initial. - assign e_abap to . - else. - assign component ls_stack-name of structure to . - endif. if ls_stack-type eq 'u' or ls_stack-type eq 'v'. " structure + assign ls_stack-struct->* to . + assign ls_stack-ref->* to . get_components( exporting - i_structure = + i_structure = importing e_components = lt_compname ). loop at lt_compname into lv_compname. + assign component lv_compname of structure to . ls_stack_new-name = lv_compname. ls_stack_new-struct = ref #( ). assign component lv_compname of structure to . if sy-subrc = 0. ls_stack_new-ref = . - assign component lv_compname of structure to . get_field_type( exporting - i_field = + i_field = importing e_technical_type = ls_stack_new-type ). append ls_stack_new to lt_stack. @@ -1241,14 +1246,38 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. endloop. else. - if not ls_stack-name is initial. - assign ls_stack-struct->* to . - assign component ls_stack-name of structure to . - endif. - if ls_stack-type eq 'l' or ls_stack-type eq 'r'. " reference - = ls_stack-ref. + + if ls_stack-type eq 'h'. " internal table + assign ls_stack-struct->* to . + assign ls_stack-ref->* to . + loop at assigning . + ls_stack_new-ref = . + create data ls_stack_new-struct like line of . + assign ls_stack_new-struct->* to . + + append to . " append copies data + lv_rowno = lines( ). + read table assigning index lv_rowno. " -> re-read row for reference + ls_stack_new-struct = ref #( ). + + get_field_type( + exporting + i_field = + importing + e_technical_type = ls_stack_new-type ). + clear ls_stack_new-name. + append ls_stack_new to lt_stack. + endloop. + else. - = . + assign ls_stack-struct->* to . + if ls_stack-type eq 'l' or ls_stack-type eq 'r'. " reference + = ls_stack-ref. + + else. " simple type + assign ls_stack-ref->* to . + = . + endif. endif. endif. @@ -1441,6 +1470,20 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. endmethod. + method set_default_query_parameters. + + if not p_version is initial. + add_query_parameter( + exporting + i_parameter = `version` + i_value = p_version + changing + c_url = c_url ). + endif. + + endmethod. + + method set_uri_and_authorization. data: @@ -1482,7 +1525,7 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. if i_request_prop-auth_apikey eq c_boolean_true. add_query_parameter( exporting - i_parameter = 'apikey' ##NO_TEXT + i_parameter = 'apiKey' ##NO_TEXT i_value = lv_password changing c_url = ls_url ). diff --git a/src/zcl_ibmc_service.clas.xml b/src/zcl_ibmc_service.clas.xml index a7409e5..a64be6e 100644 --- a/src/zcl_ibmc_service.clas.xml +++ b/src/zcl_ibmc_service.clas.xml @@ -174,6 +174,12 @@ E Sets an access token explicitly.
+ + ZCL_IBMC_SERVICE + SET_DEFAULT_QUERY_PARAMETERS + E + Method for internal use. + ZCL_IBMC_SERVICE SET_URI_AND_AUTHORIZATION diff --git a/src/zcl_ibmc_speech_to_text_v1.clas.abap b/src/zcl_ibmc_speech_to_text_v1.clas.abap index bfc0e9e..9c89eee 100644 --- a/src/zcl_ibmc_speech_to_text_v1.clas.abap +++ b/src/zcl_ibmc_speech_to_text_v1.clas.abap @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. "!

Speech to Text

-"! The IBM® Speech to Text service provides APIs that use IBM's +"! The IBM Watson™ Speech to Text service provides APIs that use IBM's "! speech-recognition capabilities to produce transcripts of spoken audio. The "! service can transcribe speech from various languages and audio formats. In "! addition to basic transcription, the service can produce detailed information @@ -33,9 +33,10 @@ "! service also supports grammars. A grammar is a formal language specification "! that lets you restrict the phrases that the service can recognize.
"!
-"! Language model customization is generally available for production use with most -"! supported languages. Acoustic model customization is beta functionality that is -"! available for all supported languages.
+"! Language model customization and acoustic model customization are generally +"! available for production use with all language models that are generally +"! available. Grammars are beta functionality for all language models that support +"! language model customization.
class ZCL_IBMC_SPEECH_TO_TEXT_V1 DEFINITION public inheriting from ZCL_IBMC_SERVICE_EXT @@ -853,7 +854,12 @@ public section. "! language model based on the language model. CUSTOM_LANGUAGE_MODEL type BOOLEAN, "! Indicates whether the `speaker_labels` parameter can be used with the language - "! model. + "! model.
+ "!
+ "! **Note:** The field returns `true` for all models. However, speaker labels are + "! supported only for US English, Australian English, German, Japanese, Korean, + "! and Spanish (both broadband and narrowband models) and UK English (narrowband + "! model only). Speaker labels are not supported for any other models. SPEAKER_LABELS type BOOLEAN, end of T_SUPPORTED_FEATURES. types: @@ -939,7 +945,8 @@ public section. NAME type STRING, "! The name of the base language model that is to be customized by the new custom "! acoustic model. The new custom model can be used only with the base model that - "! it customizes.
+ "! it customizes. (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use + "! `ar-MS_BroadbandModel` instead.)
"!
"! To determine whether a base model supports acoustic model customization, refer "! to [Language support for @@ -984,9 +991,9 @@ public section. "! asynchronous speech recognition. begin of T_REGISTER_STATUS, "! The current status of the job:
- "! * `created`: The service successfully white-listed the callback URL as a result + "! * `created`: The service successfully allowlisted the callback URL as a result "! of the call.
- "! * `already created`: The URL was already white-listed. + "! * `already created`: The URL was already allowlisted. STATUS type STRING, "! The callback URL that is successfully registered. URL type STRING, @@ -1053,7 +1060,6 @@ constants: WARNINGS type string value 'warnings', RESULT_INDEX type string value 'result_index', SPEAKER_LABELS type string value 'speaker_labels', - SPEAKERLABELS type string value 'speakerLabels', PROCESSING_METRICS type string value 'processing_metrics', AUDIO_METRICS type string value 'audio_metrics', FINAL type string value 'final', @@ -1061,7 +1067,6 @@ constants: KEYWORDS_RESULT type string value 'keywords_result', INNER type string value 'inner', WORD_ALTERNATIVES type string value 'word_alternatives', - WORDALTERNATIVES type string value 'wordAlternatives', END_OF_UTTERANCE type string value 'end_of_utterance', NORMALIZED_TEXT type string value 'normalized_text', START_TIME type string value 'start_time', @@ -1071,7 +1076,6 @@ constants: TRANSCRIPT type string value 'transcript', TIMESTAMPS type string value 'timestamps', WORD_CONFIDENCE type string value 'word_confidence', - WORDCONFIDENCE type string value 'wordConfidence', FROM type string value 'from', TO type string value 'to', SPEAKER type string value 'speaker', @@ -1087,13 +1091,9 @@ constants: SPEECH_RATIO type string value 'speech_ratio', HIGH_FREQUENCY_LOSS type string value 'high_frequency_loss', DIRECT_CURRENT_OFFSET type string value 'direct_current_offset', - DIRECTCURRENTOFFSET type string value 'directCurrentOffset', CLIPPING_RATE type string value 'clipping_rate', - CLIPPINGRATE type string value 'clippingRate', SPEECH_LEVEL type string value 'speech_level', - SPEECHLEVEL type string value 'speechLevel', NON_SPEECH_LEVEL type string value 'non_speech_level', - NONSPEECHLEVEL type string value 'nonSpeechLevel', BEGIN type string value 'begin', END type string value 'end', COUNT type string value 'count', @@ -1117,7 +1117,6 @@ constants: OUT_OF_VOCABULARY_WORDS type string value 'out_of_vocabulary_words', WORDS type string value 'words', SOUNDS_LIKE type string value 'sounds_like', - SOUNDSLIKE type string value 'soundsLike', DISPLAY_AS type string value 'display_as', SOURCE type string value 'source', ELEMENT type string value 'element', @@ -1149,7 +1148,8 @@ constants: "!

List models

"! Lists all language models that are available for use with the service. The "! information includes the name of the model and its minimum sampling rate in - "! Hertz, among other things.
+ "! Hertz, among other things. The ordering of the list of models can change from + "! call to call; do not rely on an alphabetized or static list of models.
"!
"! **See also:** [Languages and "! models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models#m @@ -1177,7 +1177,8 @@ constants: "! "! @parameter I_MODEL_ID | "! The identifier of the model in the form of its name from the output of the **Get - "! a model** method. + "! a model** method. (**Note:** The model `ar-AR_BroadbandModel` is deprecated; + "! use `ar-MS_BroadbandModel` instead.). "! @parameter E_RESPONSE | "! Service return value of type T_SPEECH_MODEL "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -1295,8 +1296,9 @@ constants: "! The format (MIME type) of the audio. For more information about specifying an "! audio format, see **Audio formats (content types)** in the method description. "! @parameter I_MODEL | - "! The identifier of the model that is to be used for the recognition request. See - "! [Languages and + "! The identifier of the model that is to be used for the recognition request. + "! (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use + "! `ar-MS_BroadbandModel` instead.) See [Languages and "! models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models#m "! odels). "! @parameter I_LANGUAGE_CUSTOMIZATION_ID | @@ -1358,9 +1360,15 @@ constants: "! An array of keyword strings to spot in the audio. Each keyword string can "! include one or more string tokens. Keywords are spotted only in the final "! results, not in interim hypotheses. If you specify any keywords, you must also - "! specify a keywords threshold. You can spot a maximum of 1000 keywords. Omit the - "! parameter or specify an empty array if you do not need to spot keywords. See - "! [Keyword + "! specify a keywords threshold. Omit the parameter or specify an empty array if + "! you do not need to spot keywords.
+ "!
+ "! You can spot a maximum of 1000 keywords with a single request. A single keyword + "! can have a maximum length of 1024 characters, though the maximum effective + "! length for double-byte languages might be shorter. Keywords are + "! case-insensitive.
+ "!
+ "! See [Keyword "! spotting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output "! #keyword_spotting). "! @parameter I_KEYWORDS_THRESHOLD | @@ -1423,11 +1431,9 @@ constants: "! parameter to be `true`, regardless of whether you specify `false` for the "! parameter.
"!
- "! **Note:** Applies to US English, Japanese, and Spanish (both broadband and - "! narrowband models) and UK English (narrowband model) transcription only. To - "! determine whether a language model supports speaker labels, you can also use - "! the **Get a model** method and check that the attribute `speaker_labels` is set - "! to `true`.
+ "! **Note:** Applies to US English, Australian English, German, Japanese, Korean, + "! and Spanish (both broadband and narrowband models) and UK English (narrowband + "! model) transcription only.
"!
"! See [Speaker "! labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#s @@ -1502,6 +1508,36 @@ constants: "! See [Split transcript at phrase "! end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#spli "! t_transcript). + "! @parameter I_SPEECH_DETECTOR_SENSITIVITY | + "! The sensitivity of speech activity detection that the service is to perform. Use + "! the parameter to suppress word insertions from music, coughing, and other + "! non-speech events. The service biases the audio it passes for speech + "! recognition by evaluating the input audio against prior models of speech and + "! non-speech activity.
+ "!
+ "! Specify a value between 0.0 and 1.0:
+ "! * 0.0 suppresses all audio (no speech is transcribed).
+ "! * 0.5 (the default) provides a reasonable compromise for the level of + "! sensitivity.
+ "! * 1.0 suppresses no audio (speech detection sensitivity is disabled).
+ "!
+ "! The values increase on a monotonic curve. See [Speech Activity + "! Detection](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-input + "! #detection). + "! @parameter I_BACKGROUND_AUDIO_SUPPRESSION | + "! The level to which the service is to suppress background audio based on its + "! volume to prevent it from being transcribed as speech. Use the parameter to + "! suppress side conversations or background noise.
+ "!
+ "! Specify a value in the range of 0.0 to 1.0:
+ "! * 0.0 (the default) provides no suppression (background audio suppression is + "! disabled).
+ "! * 0.5 provides a reasonable level of audio suppression for general usage.
+ "! * 1.0 suppresses all audio (no audio is transcribed).
+ "!
+ "! The values increase on a monotonic curve. See [Speech Activity + "! Detection](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-input + "! #detection). "! @parameter E_RESPONSE | "! Service return value of type T_SPEECH_RECOGNITION_RESULTS "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -1531,6 +1567,8 @@ constants: !I_AUDIO_METRICS type BOOLEAN default c_boolean_false !I_END_OF_PHRASE_SILENCE_TIME type DOUBLE optional !I_SPLT_TRNSCRPT_AT_PHRASE_END type BOOLEAN default c_boolean_false + !I_SPEECH_DETECTOR_SENSITIVITY type FLOAT optional + !I_BACKGROUND_AUDIO_SUPPRESSION type FLOAT optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_SPEECH_RECOGNITION_RESULTS @@ -1539,7 +1577,7 @@ constants: "!

Register a callback

"! Registers a callback URL with the service for use with subsequent asynchronous - "! recognition requests. The service attempts to register, or white-list, the + "! recognition requests. The service attempts to register, or allowlist, the "! callback URL if it is not already registered by sending a `GET` request to the "! callback URL. The service passes a random alphanumeric challenge string via the "! `challenge_string` parameter of the request. The request includes an `Accept` @@ -1554,9 +1592,9 @@ constants: "! The service sends only a single `GET` request to the callback URL. If the "! service does not receive a reply with a response code of 200 and a body that "! echoes the challenge string sent by the service within five seconds, it does - "! not white-list the URL; it instead sends status code 400 in response to the + "! not allowlist the URL; it instead sends status code 400 in response to the "! **Register a callback** request. If the requested callback URL is already - "! white-listed, the service responds to the initial registration request with + "! allowlisted, the service responds to the initial registration request with "! response code 200.
"!
"! If you specify a user secret with the request, the service uses it as a key to @@ -1577,7 +1615,7 @@ constants: "! "! @parameter I_CALLBACK_URL | "! An HTTP or HTTPS URL to which callback notifications are to be sent. To be - "! white-listed, the URL must successfully echo the challenge string during URL + "! allowlisted, the URL must successfully echo the challenge string during URL "! verification. During verification, the client can also check the signature that "! the service sends in the `X-Callback-Signature` header to verify the origin of "! the request. @@ -1601,7 +1639,7 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Unregister a callback

- "! Unregisters a callback URL that was previously white-listed with a **Register a + "! Unregisters a callback URL that was previously allowlisted with a **Register a "! callback** request for use with the asynchronous interface. Once unregistered, "! the URL can no longer be used with asynchronous recognition requests.
"!
@@ -1731,13 +1769,14 @@ constants: "! The format (MIME type) of the audio. For more information about specifying an "! audio format, see **Audio formats (content types)** in the method description. "! @parameter I_MODEL | - "! The identifier of the model that is to be used for the recognition request. See - "! [Languages and + "! The identifier of the model that is to be used for the recognition request. + "! (**Note:** The model `ar-AR_BroadbandModel` is deprecated; use + "! `ar-MS_BroadbandModel` instead.) See [Languages and "! models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models#m "! odels). "! @parameter I_CALLBACK_URL | "! A URL to which callback notifications are to be sent. The URL must already be - "! successfully white-listed by using the **Register a callback** method. You can + "! successfully allowlisted by using the **Register a callback** method. You can "! include the same callback URL with any number of job creation requests. Omit "! the parameter to poll the service for job completion and results.
"!
@@ -1832,9 +1871,15 @@ constants: "! An array of keyword strings to spot in the audio. Each keyword string can "! include one or more string tokens. Keywords are spotted only in the final "! results, not in interim hypotheses. If you specify any keywords, you must also - "! specify a keywords threshold. You can spot a maximum of 1000 keywords. Omit the - "! parameter or specify an empty array if you do not need to spot keywords. See - "! [Keyword + "! specify a keywords threshold. Omit the parameter or specify an empty array if + "! you do not need to spot keywords.
+ "!
+ "! You can spot a maximum of 1000 keywords with a single request. A single keyword + "! can have a maximum length of 1024 characters, though the maximum effective + "! length for double-byte languages might be shorter. Keywords are + "! case-insensitive.
+ "!
+ "! See [Keyword "! spotting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output "! #keyword_spotting). "! @parameter I_KEYWORDS_THRESHOLD | @@ -1897,11 +1942,9 @@ constants: "! parameter to be `true`, regardless of whether you specify `false` for the "! parameter.
"!
- "! **Note:** Applies to US English, Japanese, and Spanish (both broadband and - "! narrowband models) and UK English (narrowband model) transcription only. To - "! determine whether a language model supports speaker labels, you can also use - "! the **Get a model** method and check that the attribute `speaker_labels` is set - "! to `true`.
+ "! **Note:** Applies to US English, Australian English, German, Japanese, Korean, + "! and Spanish (both broadband and narrowband models) and UK English (narrowband + "! model) transcription only.
"!
"! See [Speaker "! labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#s @@ -2002,6 +2045,36 @@ constants: "! See [Split transcript at phrase "! end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-output#spli "! t_transcript). + "! @parameter I_SPEECH_DETECTOR_SENSITIVITY | + "! The sensitivity of speech activity detection that the service is to perform. Use + "! the parameter to suppress word insertions from music, coughing, and other + "! non-speech events. The service biases the audio it passes for speech + "! recognition by evaluating the input audio against prior models of speech and + "! non-speech activity.
+ "!
+ "! Specify a value between 0.0 and 1.0:
+ "! * 0.0 suppresses all audio (no speech is transcribed).
+ "! * 0.5 (the default) provides a reasonable compromise for the level of + "! sensitivity.
+ "! * 1.0 suppresses no audio (speech detection sensitivity is disabled).
+ "!
+ "! The values increase on a monotonic curve. See [Speech Activity + "! Detection](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-input + "! #detection). + "! @parameter I_BACKGROUND_AUDIO_SUPPRESSION | + "! The level to which the service is to suppress background audio based on its + "! volume to prevent it from being transcribed as speech. Use the parameter to + "! suppress side conversations or background noise.
+ "!
+ "! Specify a value in the range of 0.0 to 1.0:
+ "! * 0.0 (the default) provides no suppression (background audio suppression is + "! disabled).
+ "! * 0.5 provides a reasonable level of audio suppression for general usage.
+ "! * 1.0 suppresses all audio (no audio is transcribed).
+ "!
+ "! The values increase on a monotonic curve. See [Speech Activity + "! Detection](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-input + "! #detection). "! @parameter E_RESPONSE | "! Service return value of type T_RECOGNITION_JOB "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -2037,6 +2110,8 @@ constants: !I_AUDIO_METRICS type BOOLEAN default c_boolean_false !I_END_OF_PHRASE_SILENCE_TIME type DOUBLE optional !I_SPLT_TRNSCRPT_AT_PHRASE_END type BOOLEAN default c_boolean_false + !I_SPEECH_DETECTOR_SENSITIVITY type FLOAT optional + !I_BACKGROUND_AUDIO_SUPPRESSION type FLOAT optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_RECOGNITION_JOB @@ -2168,9 +2243,14 @@ constants: "! "! @parameter I_LANGUAGE | "! The identifier of the language for which custom language or custom acoustic - "! models are to be returned (for example, `en-US`). Omit the parameter to see all - "! custom language or custom acoustic models that are owned by the requesting - "! credentials. + "! models are to be returned. Omit the parameter to see all custom language or + "! custom acoustic models that are owned by the requesting credentials. (**Note:** + "! The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
+ "!
+ "! To determine the languages for which customization is available, see [Language + "! support for + "! customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-c + "! ustomization#languageSupport). "! @parameter E_RESPONSE | "! Service return value of type T_LANGUAGE_MODELS "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -2412,19 +2492,21 @@ constants: "!
"! The call returns an HTTP 201 response code if the corpus is valid. The service "! then asynchronously processes the contents of the corpus and automatically - "! extracts new words that it finds. This can take on the order of a minute or two - "! to complete depending on the total number of words and the number of new words - "! in the corpus, as well as the current load on the service. You cannot submit - "! requests to add additional resources to the custom model or to train the model - "! until the service's analysis of the corpus for the current request + "! extracts new words that it finds. This operation can take on the order of + "! minutes to complete depending on the total number of words and the number of + "! new words in the corpus, as well as the current load on the service. You cannot + "! submit requests to add additional resources to the custom model or to train the + "! model until the service's analysis of the corpus for the current request "! completes. Use the **List a corpus** method to check the status of the "! analysis.
"!
"! The service auto-populates the model's words resource with words from the - "! corpus that are not found in its base vocabulary. These are referred to as - "! out-of-vocabulary (OOV) words. You can use the **List custom words** method to - "! examine the words resource. You can use other words method to eliminate typos - "! and modify how words are pronounced as needed.
+ "! corpus that are not found in its base vocabulary. These words are referred to + "! as out-of-vocabulary (OOV) words. After adding a corpus, you must validate the + "! words resource to ensure that each OOV word's definition is complete and + "! valid. You can use the **List custom words** method to examine the words + "! resource. You can use other words method to eliminate typos and modify how + "! words are pronounced as needed.
"!
"! To add a corpus file that has the same name as an existing corpus, set the "! `allow_overwrite` parameter to `true`; otherwise, the request fails. @@ -2442,12 +2524,15 @@ constants: "! directly.
"!
"! **See also:**
+ "! * [Add a corpus to the custom language + "! model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC + "! reate#addCorpus)
"! * [Working with "! corpora](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corpora "! Words#workingCorpora)
- "! * [Add a corpus to the custom language - "! model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC - "! reate#addCorpus) + "! * [Validating a words + "! resource](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corpor + "! aWords#validateModel) "! "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for @@ -2631,7 +2716,10 @@ constants: "! Use the parameter for words that are difficult to pronounce, foreign words, "! acronyms, and so on. For example, you might specify that the word `IEEE` can "! sound like `i triple e`. You can specify a maximum of five sounds-like - "! pronunciations for a word.
+ "! pronunciations for a word. If you omit the `sounds_like` field, the service + "! attempts to set the field to its pronunciation of the word. It cannot generate + "! a pronunciation for all words, so you must review the word's definition to + "! ensure that it is complete and valid.
"! * The `display_as` field provides a different way of spelling the word in a "! transcript. Use the parameter when you want the word to appear different from "! its usual representation or from its spelling in training data. For example, @@ -2663,12 +2751,15 @@ constants: "! as needed.
"!
"! **See also:**
+ "! * [Add words to the custom language + "! model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC + "! reate#addWords)
"! * [Working with custom "! words](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWo "! rds#workingWords)
- "! * [Add words to the custom language - "! model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC - "! reate#addWords) + "! * [Validating a words + "! resource](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corpor + "! aWords#validateModel) "! "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for @@ -2709,7 +2800,10 @@ constants: "! Use the parameter for words that are difficult to pronounce, foreign words, "! acronyms, and so on. For example, you might specify that the word `IEEE` can "! sound like `i triple e`. You can specify a maximum of five sounds-like - "! pronunciations for a word.
+ "! pronunciations for a word. If you omit the `sounds_like` field, the service + "! attempts to set the field to its pronunciation of the word. It cannot generate + "! a pronunciation for all words, so you must review the word's definition to + "! ensure that it is complete and valid.
"! * The `display_as` field provides a different way of spelling the word in a "! transcript. Use the parameter when you want the word to appear different from "! its usual representation or from its spelling in training data. For example, @@ -2723,12 +2817,15 @@ constants: "! add.
"!
"! **See also:**
+ "! * [Add words to the custom language + "! model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC + "! reate#addWords)
"! * [Working with custom "! words](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWo "! rds#workingWords)
- "! * [Add words to the custom language - "! model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageC - "! reate#addWords) + "! * [Validating a words + "! resource](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corpor + "! aWords#validateModel) "! "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for @@ -2858,12 +2955,12 @@ constants: "!
"! The call returns an HTTP 201 response code if the grammar is valid. The service "! then asynchronously processes the contents of the grammar and automatically - "! extracts new words that it finds. This can take a few seconds to complete - "! depending on the size and complexity of the grammar, as well as the current - "! load on the service. You cannot submit requests to add additional resources to - "! the custom model or to train the model until the service's analysis of the - "! grammar for the current request completes. Use the **Get a grammar** method to - "! check the status of the analysis.
+ "! extracts new words that it finds. This operation can take a few seconds or + "! minutes to complete depending on the size and complexity of the grammar, as + "! well as the current load on the service. You cannot submit requests to add + "! additional resources to the custom model or to train the model until the + "! service's analysis of the grammar for the current request completes. Use + "! the **Get a grammar** method to check the status of the analysis.
"!
"! The service populates the model's words resource with any word that is "! recognized by the grammar that is not found in the model's base @@ -3049,9 +3146,14 @@ constants: "! "! @parameter I_LANGUAGE | "! The identifier of the language for which custom language or custom acoustic - "! models are to be returned (for example, `en-US`). Omit the parameter to see all - "! custom language or custom acoustic models that are owned by the requesting - "! credentials. + "! models are to be returned. Omit the parameter to see all custom language or + "! custom acoustic models that are owned by the requesting credentials. (**Note:** + "! The identifier `ar-AR` is deprecated; use `ar-MS` instead.)
+ "!
+ "! To determine the languages for which customization is available, see [Language + "! support for + "! customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-c + "! ustomization#languageSupport). "! @parameter E_RESPONSE | "! Service return value of type T_ACOUSTIC_MODELS "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -3119,14 +3221,14 @@ constants: "! you train it. You must use credentials for the instance of the service that "! owns a model to train it.
"!
- "! The training method is asynchronous. It can take on the order of minutes or - "! hours to complete depending on the total amount of audio data on which the - "! custom acoustic model is being trained and the current load on the service. - "! Typically, training a custom acoustic model takes approximately two to four - "! times the length of its audio data. The range of time depends on the model - "! being trained and the nature of the audio, such as whether the audio is clean - "! or noisy. The method returns an HTTP 200 response code to indicate that the - "! training process has begun.
+ "! The training method is asynchronous. Training time depends on the cumulative + "! amount of audio data that the custom acoustic model contains and the current + "! load on the service. When you train or retrain a model, the service uses all of + "! the model's audio data in the training. Training a custom acoustic model + "! takes approximately as long as the length of its cumulative audio data. For + "! example, it takes approximately 2 hours to train a model that contains a total + "! of 2 hours of audio. The method returns an HTTP 200 response code to indicate + "! that the training process has begun.
"!
"! You can monitor the status of the training by using the **Get a custom acoustic "! model** method to poll the model's status. Use a loop to check the status @@ -3142,8 +3244,9 @@ constants: "! training. Train with a custom language model if you have verbatim "! transcriptions of the audio files that you have added to the custom model or "! you have either corpora (text files) or a list of words that are relevant to - "! the contents of the audio files. Both of the custom models must be based on the - "! same version of the same base model for training to succeed.
+ "! the contents of the audio files. For training to succeed, both of the custom + "! models must be based on the same version of the same base model, and the custom + "! language model must be fully trained and available.
"!
"! **See also:**
"! * [Train the custom acoustic @@ -3161,6 +3264,9 @@ constants: "! model.
"! * The custom model contains less than 10 minutes or more than 200 hours of audio "! data.
+ "! * You passed a custom language model with the `custom_language_model_id` query + "! parameter that is not in the available state. A custom language model must be + "! fully trained and available to be used to train a custom acoustic model.
"! * You passed an incompatible custom language model with the "! `custom_language_model_id` query parameter. Both custom models must be based on "! the same version of the same base model.
@@ -3179,8 +3285,9 @@ constants: "! been trained with verbatim transcriptions of the audio resources or that "! contains words that are relevant to the contents of the audio resources. The "! custom language model must be based on the same version of the same base model - "! as the custom acoustic model. The credentials specified with the request must - "! own both custom models. + "! as the custom acoustic model, and the custom language model must be fully + "! trained and available. The credentials specified with the request must own both + "! custom models. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_RESPONSE "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -3260,7 +3367,8 @@ constants: "! If the custom acoustic model was trained with a custom language model, the "! customization ID (GUID) of that custom language model. The custom language "! model must be upgraded before the custom acoustic model can be upgraded. The - "! credentials specified with the request must own both custom models. + "! custom language model must be fully trained and available. The credentials + "! specified with the request must own both custom models. "! @parameter I_FORCE | "! If `true`, forces the upgrade of a custom acoustic model for which no input data "! has been modified since it was last trained. Use this parameter only to force @@ -3332,14 +3440,14 @@ constants: "! that has the same name as an existing audio resource, set the `allow_overwrite` "! parameter to `true`; otherwise, the request fails.
"!
- "! The method is asynchronous. It can take several seconds to complete depending on - "! the duration of the audio and, in the case of an archive file, the total number - "! of audio files being processed. The service returns a 201 response code if the - "! audio is valid. It then asynchronously analyzes the contents of the audio file - "! or files and automatically extracts information about the audio such as its - "! length, sampling rate, and encoding. You cannot submit requests to train or - "! upgrade the model until the service's analysis of all audio resources for - "! current requests completes.
+ "! The method is asynchronous. It can take several seconds or minutes to complete + "! depending on the duration of the audio and, in the case of an archive file, the + "! total number of audio files being processed. The service returns a 201 response + "! code if the audio is valid. It then asynchronously analyzes the contents of the + "! audio file or files and automatically extracts information about the audio such + "! as its length, sampling rate, and encoding. You cannot submit requests to train + "! or upgrade the model until the service's analysis of all audio resources + "! for current requests completes.
"!
"! To determine the status of the service's analysis of the audio, use the "! **Get an audio resource** method to poll the status of the audio. The method @@ -3565,10 +3673,15 @@ constants: "! information was added. The method has no effect if no data is associated with "! the customer ID. You must issue the request with credentials for the same "! instance of the service that was used to associate the customer ID with the - "! data.
+ "! data. You associate a customer ID with data by passing the `X-Watson-Metadata` + "! header with a request that passes the data.
"!
- "! You associate a customer ID with data by passing the `X-Watson-Metadata` header - "! with a request that passes the data.
+ "! **Note:** If you delete an instance of the service from the service console, all + "! data associated with that service instance is automatically deleted. This + "! includes all custom language models, corpora, grammars, and words; all custom + "! acoustic models and audio resources; all registered endpoints for the + "! asynchronous HTTP interface; and all data related to speech recognition + "! requests.
"!
"! **See also:** [Information "! security](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-inform @@ -3589,10 +3702,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_SPEECH_TO_TEXT_V1 IMPLEMENTATION. @@ -3634,22 +3743,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'ICP4D'. - e_request_prop-auth_name = 'ICP4D'. - e_request_prop-auth_type = 'apiKey'. - e_request_prop-auth_headername = 'Authorization'. - e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/speech-to-text/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.speech-to-text.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -3661,7 +3762,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173436'. + e_sdk_version_date = '20210312144441'. endmethod. @@ -3788,6 +3889,8 @@ endmethod. * | [--->] I_AUDIO_METRICS TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_END_OF_PHRASE_SILENCE_TIME TYPE DOUBLE(optional) * | [--->] I_SPLT_TRNSCRPT_AT_PHRASE_END TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_SPEECH_DETECTOR_SENSITIVITY TYPE FLOAT(optional) +* | [--->] I_BACKGROUND_AUDIO_SUPPRESSION TYPE FLOAT(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_SPEECH_RECOGNITION_RESULTS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4038,6 +4141,26 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_SPEECH_DETECTOR_SENSITIVITY is supplied. + lv_queryparam = i_SPEECH_DETECTOR_SENSITIVITY. + add_query_parameter( + exporting + i_parameter = `speech_detector_sensitivity` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + if i_BACKGROUND_AUDIO_SUPPRESSION is supplied. + lv_queryparam = i_BACKGROUND_AUDIO_SUPPRESSION. + add_query_parameter( + exporting + i_parameter = `background_audio_suppression` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + " process header parameters data: lv_headerparam type string ##NEEDED. @@ -4213,6 +4336,8 @@ endmethod. * | [--->] I_AUDIO_METRICS TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_END_OF_PHRASE_SILENCE_TIME TYPE DOUBLE(optional) * | [--->] I_SPLT_TRNSCRPT_AT_PHRASE_END TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_SPEECH_DETECTOR_SENSITIVITY TYPE FLOAT(optional) +* | [--->] I_BACKGROUND_AUDIO_SUPPRESSION TYPE FLOAT(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_RECOGNITION_JOB * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4524,6 +4649,26 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_SPEECH_DETECTOR_SENSITIVITY is supplied. + lv_queryparam = i_SPEECH_DETECTOR_SENSITIVITY. + add_query_parameter( + exporting + i_parameter = `speech_detector_sensitivity` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + if i_BACKGROUND_AUDIO_SUPPRESSION is supplied. + lv_queryparam = i_BACKGROUND_AUDIO_SUPPRESSION. + add_query_parameter( + exporting + i_parameter = `background_audio_suppression` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + " process header parameters data: lv_headerparam type string ##NEEDED. @@ -4742,15 +4887,15 @@ method CREATE_LANGUAGE_MODEL. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5420,15 +5565,15 @@ method ADD_WORDS. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5499,15 +5644,15 @@ method ADD_WORD. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP PUT request @@ -5736,15 +5881,15 @@ method ADD_GRAMMAR. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -5904,15 +6049,15 @@ method CREATE_ACOUSTIC_MODEL. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -6504,14 +6649,4 @@ method DELETE_USER_DATA. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_SPEECH_TO_TEXT_V1->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_text_to_speech_v1.clas.abap b/src/zcl_ibmc_text_to_speech_v1.clas.abap index 6787440..8a5e43d 100644 --- a/src/zcl_ibmc_text_to_speech_v1.clas.abap +++ b/src/zcl_ibmc_text_to_speech_v1.clas.abap @@ -12,25 +12,27 @@ * See the License for the specific language governing permissions and * limitations under the License. "!

Text to Speech

-"! The IBM® Text to Speech service provides APIs that use IBM's +"! The IBM Watson™ Text to Speech service provides APIs that use IBM's "! speech-synthesis capabilities to synthesize text into natural-sounding speech "! in a variety of languages, dialects, and voices. The service supports at least "! one male or female voice, sometimes both, for each language. The audio is "! streamed back to the client with minimal delay.
"!
"! For speech synthesis, the service supports a synchronous HTTP Representational -"! State Transfer (REST) interface. It also supports a WebSocket interface that -"! provides both plain text and SSML input, including the SSML <mark> -"! element and word timings. SSML is an XML-based markup language that provides -"! text annotation for speech-synthesis applications.
+"! State Transfer (REST) interface and a WebSocket interface. Both interfaces +"! support plain text and SSML input. SSML is an XML-based markup language that +"! provides text annotation for speech-synthesis applications. The WebSocket +"! interface also supports the SSML <code><mark></code> element +"! and word timings.
"!
-"! The service also offers a customization interface. You can use the interface to -"! define sounds-like or phonetic translations for words. A sounds-like -"! translation consists of one or more words that, when combined, sound like the -"! word. A phonetic translation is based on the SSML phoneme format for -"! representing a word. You can specify a phonetic translation in standard -"! International Phonetic Alphabet (IPA) representation or in the proprietary IBM -"! Symbolic Phonetic Representation (SPR).
+"! The service offers a customization interface that you can use to define +"! sounds-like or phonetic translations for words. A sounds-like translation +"! consists of one or more words that, when combined, sound like the word. A +"! phonetic translation is based on the SSML phoneme format for representing a +"! word. You can specify a phonetic translation in standard International Phonetic +"! Alphabet (IPA) representation or in the proprietary IBM Symbolic Phonetic +"! Representation (SPR). The Arabic, Chinese, Dutch, Australian English, and +"! Korean languages support only IPA.
class ZCL_IBMC_TEXT_TO_SPEECH_V1 DEFINITION public inheriting from ZCL_IBMC_SERVICE_EXT @@ -39,14 +41,16 @@ class ZCL_IBMC_TEXT_TO_SPEECH_V1 DEFINITION public section. types: "!

- "! Information about a word for the custom voice model.

+ "! Information about a word for the custom model.

begin of T_WORD, - "! The word for the custom voice model. + "! The word for the custom model. The maximum length of a word is 49 characters. WORD type STRING, "! The phonetic or sounds-like translation for the word. A phonetic translation is "! based on the SSML format for representing the phonetic string of a word either - "! as an IPA or IBM SPR translation. A sounds-like translation consists of one or - "! more words that, when combined, sound like the word. + "! as an IPA or IBM SPR translation. The Arabic, Chinese, Dutch, Australian + "! English, and Korean languages support only IPA. A sounds-like translation + "! consists of one or more words that, when combined, sound like the word. The + "! maximum length of a translation is 499 characters. TRANSLATION type STRING, "! **Japanese only.** The part of speech for the word. The service uses the value "! to produce the correct intonation for the word. You can create only a single @@ -59,37 +63,37 @@ public section. end of T_WORD. types: "!

- "! Information about an existing custom voice model.

- begin of T_VOICE_MODEL, - "! The customization ID (GUID) of the custom voice model. The **Create a custom - "! model** method returns only this field. It does not not return the other fields - "! of this object. + "! Information about an existing custom model.

+ begin of T_CUSTOM_MODEL, + "! The customization ID (GUID) of the custom model. The **Create a custom model** + "! method returns only this field. It does not not return the other fields of this + "! object. CUSTOMIZATION_ID type STRING, - "! The name of the custom voice model. + "! The name of the custom model. NAME type STRING, - "! The language identifier of the custom voice model (for example, `en-US`). + "! The language identifier of the custom model (for example, `en-US`). LANGUAGE type STRING, "! The GUID of the credentials for the instance of the service that owns the custom - "! voice model. + "! model. OWNER type STRING, - "! The date and time in Coordinated Universal Time (UTC) at which the custom voice - "! model was created. The value is provided in full ISO 8601 format + "! The date and time in Coordinated Universal Time (UTC) at which the custom model + "! was created. The value is provided in full ISO 8601 format "! (`YYYY-MM-DDThh:mm:ss.sTZD`). CREATED type STRING, - "! The date and time in Coordinated Universal Time (UTC) at which the custom voice - "! model was last modified. The `created` and `updated` fields are equal when a - "! voice model is first added but has yet to be updated. The value is provided in - "! full ISO 8601 format (`YYYY-MM-DDThh:mm:ss.sTZD`). + "! The date and time in Coordinated Universal Time (UTC) at which the custom model + "! was last modified. The `created` and `updated` fields are equal when a model is + "! first added but has yet to be updated. The value is provided in full ISO 8601 + "! format (`YYYY-MM-DDThh:mm:ss.sTZD`). LAST_MODIFIED type STRING, - "! The description of the custom voice model. + "! The description of the custom model. DESCRIPTION type STRING, "! An array of `Word` objects that lists the words and their translations from the - "! custom voice model. The words are listed in alphabetical order, with uppercase + "! custom model. The words are listed in alphabetical order, with uppercase "! letters listed before lowercase letters. The array is empty if the custom model "! contains no words. This field is returned only by the **Get a voice** method - "! and only when you specify the customization ID of a custom voice model. + "! and only when you specify the customization ID of a custom model. WORDS type STANDARD TABLE OF T_WORD WITH NON-UNIQUE DEFAULT KEY, - end of T_VOICE_MODEL. + end of T_CUSTOM_MODEL. types: "!

"! Additional service features that are supported with the

@@ -100,12 +104,13 @@ public section. CUSTOM_PRONUNCIATION type BOOLEAN, "! If `true`, the voice can be transformed by using the SSML "! <voice-transformation> element; if `false`, the voice cannot be - "! transformed. + "! transformed. The feature was available only for the now-deprecated standard + "! voices. You cannot use the feature with neural voices. VOICE_TRANSFORMATION type BOOLEAN, end of T_SUPPORTED_FEATURES. types: "!

- "! Information about an available voice model.

+ "! Information about an available voice.

begin of T_VOICE, "! The URI of the voice. URL type STRING, @@ -123,24 +128,11 @@ public section. CUSTOMIZABLE type BOOLEAN, "! Additional service features that are supported with the voice. SUPPORTED_FEATURES type T_SUPPORTED_FEATURES, - "! Returns information about a specified custom voice model. This field is returned - "! only by the **Get a voice** method and only when you specify the customization - "! ID of a custom voice model. - CUSTOMIZATION type T_VOICE_MODEL, + "! Returns information about a specified custom model. This field is returned only + "! by the **Get a voice** method and only when you specify the customization ID of + "! a custom model. + CUSTOMIZATION type T_CUSTOM_MODEL, end of T_VOICE. - types: - "!

- "! Information about the new custom voice model.

- begin of T_CREATE_VOICE_MODEL, - "! The name of the new custom voice model. - NAME type STRING, - "! The language of the new custom voice model. Omit the parameter to use the the - "! default language, `en-US`. - LANGUAGE type STRING, - "! A description of the new custom voice model. Specifying a description is - "! recommended. - DESCRIPTION type STRING, - end of T_CREATE_VOICE_MODEL. types: "!

"! The error response from a failed request.

@@ -155,56 +147,61 @@ public section. types: "!

"! For the **Add custom words** method, one or more words that

- "! are to be added or updated for the custom voice model and the translation for - "! each specified word.
+ "! are to be added or updated for the custom model and the translation for each + "! specified word.
"!
"! For the **List custom words** method, the words and their translations from the - "! custom voice model. + "! custom model. begin of T_WORDS, "! The **Add custom words** method accepts an array of `Word` objects. Each object - "! provides a word that is to be added or updated for the custom voice model and - "! the word's translation.
+ "! provides a word that is to be added or updated for the custom model and the + "! word's translation.
"!
"! The **List custom words** method returns an array of `Word` objects. Each object - "! shows a word and its translation from the custom voice model. The words are - "! listed in alphabetical order, with uppercase letters listed before lowercase - "! letters. The array is empty if the custom model contains no words. + "! shows a word and its translation from the custom model. The words are listed in + "! alphabetical order, with uppercase letters listed before lowercase letters. The + "! array is empty if the custom model contains no words. WORDS type STANDARD TABLE OF T_WORD WITH NON-UNIQUE DEFAULT KEY, end of T_WORDS. types: "!

- "! Information about the updated custom voice model.

- begin of T_UPDATE_VOICE_MODEL, - "! A new name for the custom voice model. - NAME type STRING, - "! A new description for the custom voice model. - DESCRIPTION type STRING, - "! An array of `Word` objects that provides the words and their translations that - "! are to be added or updated for the custom voice model. Pass an empty array to - "! make no additions or updates. - WORDS type STANDARD TABLE OF T_WORD WITH NON-UNIQUE DEFAULT KEY, - end of T_UPDATE_VOICE_MODEL. - types: - "!

- "! Information about all available voice models.

+ "! Information about all available voices.

begin of T_VOICES, "! A list of available voices. VOICES type STANDARD TABLE OF T_VOICE WITH NON-UNIQUE DEFAULT KEY, end of T_VOICES. + types: + "!

+ "! Information about the updated custom model.

+ begin of T_UPDATE_CUSTOM_MODEL, + "! A new name for the custom model. + NAME type STRING, + "! A new description for the custom model. + DESCRIPTION type STRING, + "! An array of `Word` objects that provides the words and their translations that + "! are to be added or updated for the custom model. Pass an empty array to make no + "! additions or updates. + WORDS type STANDARD TABLE OF T_WORD WITH NON-UNIQUE DEFAULT KEY, + end of T_UPDATE_CUSTOM_MODEL. types: "!

"! The empty response from a request.

T_EMPTY_RESPONSE_BODY type JSONOBJECT. types: "!

- "! Information about existing custom voice models.

- begin of T_VOICE_MODELS, - "! An array of `VoiceModel` objects that provides information about each available - "! custom voice model. The array is empty if the requesting credentials own no - "! custom voice models (if no language is specified) or own no custom voice models - "! for the specified language. - CUSTOMIZATIONS type STANDARD TABLE OF T_VOICE_MODEL WITH NON-UNIQUE DEFAULT KEY, - end of T_VOICE_MODELS. + "! Information about the new custom model.

+ begin of T_CREATE_CUSTOM_MODEL, + "! The name of the new custom model. + NAME type STRING, + "! The language of the new custom model. You create a custom model for a specific + "! language, not for a specific voice. A custom model can be used with any voice + "! for its specified language. Omit the parameter to use the the default language, + "! `en-US`. **Note:** The `ar-AR` language identifier cannot be used to create a + "! custom model. Use the `ar-MS` identifier instead. + LANGUAGE type STRING, + "! A description of the new custom model. Specifying a description is recommended. + DESCRIPTION type STRING, + end of T_CREATE_CUSTOM_MODEL. types: "!

"! The text to synthesize. Specify either plain text or a

@@ -220,18 +217,28 @@ public section. "! The pronunciation of the specified text.

begin of T_PRONUNCIATION, "! The pronunciation of the specified text in the requested voice and format. If a - "! custom voice model is specified, the pronunciation also reflects that custom - "! voice. + "! custom model is specified, the pronunciation also reflects that custom model. PRONUNCIATION type STRING, end of T_PRONUNCIATION. + types: + "!

+ "! Information about existing custom models.

+ begin of T_CUSTOM_MODELS, + "! An array of `CustomModel` objects that provides information about each available + "! custom model. The array is empty if the requesting credentials own no custom + "! models (if no language is specified) or own no custom models for the specified + "! language. + CUSTOMIZATIONS type STANDARD TABLE OF T_CUSTOM_MODEL WITH NON-UNIQUE DEFAULT KEY, + end of T_CUSTOM_MODELS. types: "!

"! Information about the translation for the specified text.

begin of T_TRANSLATION, "! The phonetic or sounds-like translation for the word. A phonetic translation is "! based on the SSML format for representing the phonetic string of a word either - "! as an IPA translation or as an IBM SPR translation. A sounds-like is one or - "! more words that, when combined, sound like the word. + "! as an IPA translation or as an IBM SPR translation. The Arabic, Chinese, Dutch, + "! Australian English, and Korean languages support only IPA. A sounds-like is one + "! or more words that, when combined, sound like the word. TRANSLATION type STRING, "! **Japanese only.** The part of speech for the word. The service uses the value "! to produce the correct intonation for the word. You can create only a single @@ -247,17 +254,17 @@ constants: "!

List of required fields per type.

begin of C_REQUIRED_FIELDS, T_WORD type string value '|WORD|TRANSLATION|', - T_VOICE_MODEL type string value '|CUSTOMIZATION_ID|', + T_CUSTOM_MODEL type string value '|CUSTOMIZATION_ID|', T_SUPPORTED_FEATURES type string value '|CUSTOM_PRONUNCIATION|VOICE_TRANSFORMATION|', T_VOICE type string value '|URL|GENDER|NAME|LANGUAGE|DESCRIPTION|CUSTOMIZABLE|SUPPORTED_FEATURES|', - T_CREATE_VOICE_MODEL type string value '|NAME|', T_ERROR_MODEL type string value '|ERROR|CODE|', T_WORDS type string value '|WORDS|', - T_UPDATE_VOICE_MODEL type string value '|', T_VOICES type string value '|VOICES|', - T_VOICE_MODELS type string value '|CUSTOMIZATIONS|', + T_UPDATE_CUSTOM_MODEL type string value '|', + T_CREATE_CUSTOM_MODEL type string value '|NAME|', T_TEXT type string value '|TEXT|', T_PRONUNCIATION type string value '|PRONUNCIATION|', + T_CUSTOM_MODELS type string value '|CUSTOMIZATIONS|', T_TRANSLATION type string value '|TRANSLATION|', __DUMMY type string value SPACE, end of C_REQUIRED_FIELDS . @@ -303,8 +310,10 @@ constants: "!

List voices

"! Lists all voices available for use with the service. The information includes - "! the name, language, gender, and other details about the voice. To see - "! information about a specific voice, use the **Get a voice** method.
+ "! the name, language, gender, and other details about the voice. The ordering of + "! the list of voices can change from call to call; do not rely on an alphabetized + "! or static list of voices. To see information about a specific voice, use the + "! **Get a voice** method.
"!
"! **See also:** [Listing all available "! voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#l @@ -324,19 +333,45 @@ constants: "!

Get a voice

"! Gets information about the specified voice. The information includes the name, "! language, gender, and other details about the voice. Specify a customization ID - "! to obtain information for a custom voice model that is defined for the language - "! of the specified voice. To list information about all available voices, use the + "! to obtain information for a custom model that is defined for the language of + "! the specified voice. To list information about all available voices, use the "! **List voices** method.
"!
"! **See also:** [Listing a specific "! voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#li - "! stVoice). + "! stVoice).
+ "!
+ "! ### Important voice updates
+ "!
+ "! The service's voices underwent significant change on 2 December 2020.
+ "! * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now + "! neural instead of concatenative.
+ "! * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice + "! instead.
+ "! * The `ar-AR` language identifier cannot be used to create a custom model. Use + "! the `ar-MS` identifier instead.
+ "! * The standard concatenative voices for the following languages are now + "! deprecated: Brazilian Portuguese, United Kingdom and United States English, + "! French, German, Italian, Japanese, and Spanish (all dialects).
+ "! * The features expressive SSML, voice transformation SSML, and use of the + "! `volume` attribute of the `<prosody>` element are deprecated and are not + "! supported with any of the service's neural voices.
+ "! * All of the service's voices are now customizable and generally available + "! (GA) for production use.
+ "!
+ "! The deprecated voices and features will continue to function for at least one + "! year but might be removed at a future date. You are encouraged to migrate to + "! the equivalent neural voices at your earliest convenience. For more information + "! about all voice updates, see the [2 December 2020 service + "! update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release- + "! notes#December2020) in the release notes. "! "! @parameter I_VOICE | - "! The voice for which information is to be returned. + "! The voice for which information is to be returned. For more information about + "! specifying a voice, see **Important voice updates** in the method description. "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of a custom voice model for which information is to - "! be returned. You must make the request with credentials for the instance of the + "! The customization ID (GUID) of a custom model for which information is to be + "! returned. You must make the request with credentials for the instance of the "! service that owns the custom model. Omit the parameter to see information about "! the specified voice with no customization. "! @parameter E_RESPONSE | @@ -418,6 +453,31 @@ constants: "! formats](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-audioFo "! rmats#audioFormats).
"!
+ "! ### Important voice updates
+ "!
+ "! The service's voices underwent significant change on 2 December 2020.
+ "! * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now + "! neural instead of concatenative.
+ "! * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice + "! instead.
+ "! * The `ar-AR` language identifier cannot be used to create a custom model. Use + "! the `ar-MS` identifier instead.
+ "! * The standard concatenative voices for the following languages are now + "! deprecated: Brazilian Portuguese, United Kingdom and United States English, + "! French, German, Italian, Japanese, and Spanish (all dialects).
+ "! * The features expressive SSML, voice transformation SSML, and use of the + "! `volume` attribute of the `<prosody>` element are deprecated and are not + "! supported with any of the service's neural voices.
+ "! * All of the service's voices are now customizable and generally available + "! (GA) for production use.
+ "!
+ "! The deprecated voices and features will continue to function for at least one + "! year but might be removed at a future date. You are encouraged to migrate to + "! the equivalent neural voices at your earliest convenience. For more information + "! about all voice updates, see the [2 December 2020 service + "! update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release- + "! notes#December2020) in the release notes.
+ "!
"! ### Warning messages
"!
"! If a request includes invalid query parameters, the service returns a @@ -436,13 +496,14 @@ constants: "! about specifying an audio format, see **Audio formats (accept types)** in the "! method description. "! @parameter I_VOICE | - "! The voice to use for synthesis. + "! The voice to use for synthesis. For more information about specifying a voice, + "! see **Important voice updates** in the method description. "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of a custom voice model to use for the synthesis. If - "! a custom voice model is specified, it is guaranteed to work only if it matches - "! the language of the indicated voice. You must make the request with credentials - "! for the instance of the service that owns the custom model. Omit the parameter - "! to use the specified voice with no customization. + "! The customization ID (GUID) of a custom model to use for the synthesis. If a + "! custom model is specified, it works only if it matches the language of the + "! indicated voice. You must make the request with credentials for the instance of + "! the service that owns the custom model. Omit the parameter to use the specified + "! voice with no customization. "! @parameter E_RESPONSE | "! Service return value of type FILE "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -451,7 +512,7 @@ constants: importing !I_TEXT type T_TEXT !I_ACCEPT type STRING default 'audio/ogg;codecs=opus' - !I_VOICE type STRING default 'en-US_MichaelVoice' + !I_VOICE type STRING default 'en-US_MichaelV3Voice' !I_CUSTOMIZATION_ID type STRING optional !I_contenttype type string default 'application/json' exporting @@ -463,33 +524,56 @@ constants: "! Gets the phonetic pronunciation for the specified word. You can request the "! pronunciation for a specific format. You can also request the pronunciation for "! a specific voice to see the default translation for the language of that voice - "! or for a specific custom voice model to see the translation for that voice - "! model.
- "!
- "! **Note:** This method is currently a beta release. The method does not support - "! the Arabic, Chinese, and Dutch languages.
+ "! or for a specific custom model to see the translation for that model.
"!
"! **See also:** [Querying a word from a "! language](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-custom - "! Words#cuWordsQueryLanguage). + "! Words#cuWordsQueryLanguage).
+ "!
+ "! ### Important voice updates
+ "!
+ "! The service's voices underwent significant change on 2 December 2020.
+ "! * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now + "! neural instead of concatenative.
+ "! * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice + "! instead.
+ "! * The `ar-AR` language identifier cannot be used to create a custom model. Use + "! the `ar-MS` identifier instead.
+ "! * The standard concatenative voices for the following languages are now + "! deprecated: Brazilian Portuguese, United Kingdom and United States English, + "! French, German, Italian, Japanese, and Spanish (all dialects).
+ "! * The features expressive SSML, voice transformation SSML, and use of the + "! `volume` attribute of the `<prosody>` element are deprecated and are not + "! supported with any of the service's neural voices.
+ "! * All of the service's voices are now customizable and generally available + "! (GA) for production use.
+ "!
+ "! The deprecated voices and features will continue to function for at least one + "! year but might be removed at a future date. You are encouraged to migrate to + "! the equivalent neural voices at your earliest convenience. For more information + "! about all voice updates, see the [2 December 2020 service + "! update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release- + "! notes#December2020) in the release notes. "! "! @parameter I_TEXT | "! The word for which the pronunciation is requested. "! @parameter I_VOICE | "! A voice that specifies the language in which the pronunciation is to be "! returned. All voices for the same language (for example, `en-US`) return the - "! same translation. + "! same translation. For more information about specifying a voice, see + "! **Important voice updates** in the method description. "! @parameter I_FORMAT | - "! The phoneme format in which to return the pronunciation. Omit the parameter to - "! obtain the pronunciation in the default format. + "! The phoneme format in which to return the pronunciation. The Arabic, Chinese, + "! Dutch, Australian English, and Korean languages support only IPA. Omit the + "! parameter to obtain the pronunciation in the default format. "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of a custom voice model for which the pronunciation - "! is to be returned. The language of a specified custom model must match the - "! language of the specified voice. If the word is not defined in the specified - "! custom model, the service returns the default translation for the custom - "! model's language. You must make the request with credentials for the - "! instance of the service that owns the custom model. Omit the parameter to see - "! the translation for the specified voice with no customization. + "! The customization ID (GUID) of a custom model for which the pronunciation is to + "! be returned. The language of a specified custom model must match the language + "! of the specified voice. If the word is not defined in the specified custom + "! model, the service returns the default translation for the custom model's + "! language. You must make the request with credentials for the instance of the + "! service that owns the custom model. Omit the parameter to see the translation + "! for the specified voice with no customization. "! @parameter E_RESPONSE | "! Service return value of type T_PRONUNCIATION "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -497,7 +581,7 @@ constants: methods GET_PRONUNCIATION importing !I_TEXT type STRING - !I_VOICE type STRING default 'en-US_MichaelVoice' + !I_VOICE type STRING default 'en-US_MichaelV3Voice' !I_FORMAT type STRING default 'ipa' !I_CUSTOMIZATION_ID type STRING optional !I_accept type string default 'application/json' @@ -507,72 +591,91 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "!

Create a custom model

- "! Creates a new empty custom voice model. You must specify a name for the new - "! custom model. You can optionally specify the language and a description for the - "! new model. The model is owned by the instance of the service whose credentials - "! are used to create it.
- "!
- "! **Note:** This method is currently a beta release. The service does not support - "! voice model customization for the Arabic, Chinese, and Dutch languages.
+ "! Creates a new empty custom model. You must specify a name for the new custom + "! model. You can optionally specify the language and a description for the new + "! model. The model is owned by the instance of the service whose credentials are + "! used to create it.
"!
"! **See also:** [Creating a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod - "! els#cuModelsCreate). + "! els#cuModelsCreate).
+ "!
+ "! ### Important voice updates
+ "!
+ "! The service's voices underwent significant change on 2 December 2020.
+ "! * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now + "! neural instead of concatenative.
+ "! * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice + "! instead.
+ "! * The `ar-AR` language identifier cannot be used to create a custom model. Use + "! the `ar-MS` identifier instead.
+ "! * The standard concatenative voices for the following languages are now + "! deprecated: Brazilian Portuguese, United Kingdom and United States English, + "! French, German, Italian, Japanese, and Spanish (all dialects).
+ "! * The features expressive SSML, voice transformation SSML, and use of the + "! `volume` attribute of the `<prosody>` element are deprecated and are not + "! supported with any of the service's neural voices.
+ "! * All of the service's voices are now customizable and generally available + "! (GA) for production use.
+ "!
+ "! The deprecated voices and features will continue to function for at least one + "! year but might be removed at a future date. You are encouraged to migrate to + "! the equivalent neural voices at your earliest convenience. For more information + "! about all voice updates, see the [2 December 2020 service + "! update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release- + "! notes#December2020) in the release notes. "! "! @parameter I_CREATE_VOICE_MODEL | - "! A `CreateVoiceModel` object that contains information about the new custom voice + "! A `CreateCustomModel` object that contains information about the new custom "! model. "! @parameter E_RESPONSE | - "! Service return value of type T_VOICE_MODEL + "! Service return value of type T_CUSTOM_MODEL "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! - methods CREATE_VOICE_MODEL + methods CREATE_CUSTOM_MODEL importing - !I_CREATE_VOICE_MODEL type T_CREATE_VOICE_MODEL + !I_CREATE_VOICE_MODEL type T_CREATE_CUSTOM_MODEL !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting - !E_RESPONSE type T_VOICE_MODEL + !E_RESPONSE type T_CUSTOM_MODEL raising ZCX_IBMC_SERVICE_EXCEPTION . "!

List custom models

- "! Lists metadata such as the name and description for all custom voice models that - "! are owned by an instance of the service. Specify a language to list the voice + "! Lists metadata such as the name and description for all custom models that are + "! owned by an instance of the service. Specify a language to list the custom "! models for that language only. To see the words in addition to the metadata for - "! a specific voice model, use the **List a custom model** method. You must use + "! a specific custom model, use the **List a custom model** method. You must use "! credentials for the instance of the service that owns a model to list "! information about it.
"!
- "! **Note:** This method is currently a beta release.
- "!
"! **See also:** [Querying all custom "! models](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMo "! dels#cuModelsQueryAll). "! "! @parameter I_LANGUAGE | - "! The language for which custom voice models that are owned by the requesting - "! credentials are to be returned. Omit the parameter to see all custom voice - "! models that are owned by the requester. + "! The language for which custom models that are owned by the requesting + "! credentials are to be returned. Omit the parameter to see all custom models + "! that are owned by the requester. "! @parameter E_RESPONSE | - "! Service return value of type T_VOICE_MODELS + "! Service return value of type T_CUSTOM_MODELS "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! - methods LIST_VOICE_MODELS + methods LIST_CUSTOM_MODELS importing !I_LANGUAGE type STRING optional !I_accept type string default 'application/json' exporting - !E_RESPONSE type T_VOICE_MODELS + !E_RESPONSE type T_CUSTOM_MODELS raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Update a custom model

- "! Updates information for the specified custom voice model. You can update - "! metadata such as the name and description of the voice model. You can also - "! update the words in the model and their translations. Adding a new translation - "! for a word that already exists in a custom model overwrites the word's - "! existing translation. A custom model can contain no more than 20,000 entries. - "! You must use credentials for the instance of the service that owns a model to - "! update it.
+ "! Updates information for the specified custom model. You can update metadata such + "! as the name and description of the model. You can also update the words in the + "! model and their translations. Adding a new translation for a word that already + "! exists in a custom model overwrites the word's existing translation. A + "! custom model can contain no more than 20,000 entries. You must use credentials + "! for the instance of the service that owns a model to update it.
"!
"! You can define sounds-like or phonetic translations for words. A sounds-like "! translation consists of one or more words that, when combined, sound like the @@ -588,8 +691,6 @@ constants: "! <code><phoneme alphabet="ibm" "! ph="1gAstroEntxrYFXs"></phoneme></code>
"!
- "! **Note:** This method is currently a beta release.
- "!
"! **See also:**
"! * [Updating a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod @@ -602,75 +703,71 @@ constants: "! ustomIntro#customIntro) "! "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of the custom voice model. You must make the request - "! with credentials for the instance of the service that owns the custom model. + "! The customization ID (GUID) of the custom model. You must make the request with + "! credentials for the instance of the service that owns the custom model. "! @parameter I_UPDATE_VOICE_MODEL | - "! An `UpdateVoiceModel` object that contains information that is to be updated for - "! the custom voice model. + "! An `UpdateCustomModel` object that contains information that is to be updated + "! for the custom model. "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! - methods UPDATE_VOICE_MODEL + methods UPDATE_CUSTOM_MODEL importing !I_CUSTOMIZATION_ID type STRING - !I_UPDATE_VOICE_MODEL type T_UPDATE_VOICE_MODEL + !I_UPDATE_VOICE_MODEL type T_UPDATE_CUSTOM_MODEL !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Get a custom model

- "! Gets all information about a specified custom voice model. In addition to - "! metadata such as the name and description of the voice model, the output - "! includes the words and their translations as defined in the model. To see just - "! the metadata for a voice model, use the **List custom models** method.
- "!
- "! **Note:** This method is currently a beta release.
+ "! Gets all information about a specified custom model. In addition to metadata + "! such as the name and description of the custom model, the output includes the + "! words and their translations as defined in the model. To see just the metadata + "! for a model, use the **List custom models** method.
"!
"! **See also:** [Querying a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod "! els#cuModelsQuery). "! "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of the custom voice model. You must make the request - "! with credentials for the instance of the service that owns the custom model. + "! The customization ID (GUID) of the custom model. You must make the request with + "! credentials for the instance of the service that owns the custom model. "! @parameter E_RESPONSE | - "! Service return value of type T_VOICE_MODEL + "! Service return value of type T_CUSTOM_MODEL "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! - methods GET_VOICE_MODEL + methods GET_CUSTOM_MODEL importing !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' exporting - !E_RESPONSE type T_VOICE_MODEL + !E_RESPONSE type T_CUSTOM_MODEL raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete a custom model

- "! Deletes the specified custom voice model. You must use credentials for the - "! instance of the service that owns a model to delete it.
- "!
- "! **Note:** This method is currently a beta release.
+ "! Deletes the specified custom model. You must use credentials for the instance of + "! the service that owns a model to delete it.
"!
"! **See also:** [Deleting a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customMod "! els#cuModelsDelete). "! "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of the custom voice model. You must make the request - "! with credentials for the instance of the service that owns the custom model. + "! The customization ID (GUID) of the custom model. You must make the request with + "! credentials for the instance of the service that owns the custom model. "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! - methods DELETE_VOICE_MODEL + methods DELETE_CUSTOM_MODEL importing !I_CUSTOMIZATION_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Add custom words

- "! Adds one or more words and their translations to the specified custom voice - "! model. Adding a new translation for a word that already exists in a custom - "! model overwrites the word's existing translation. A custom model can - "! contain no more than 20,000 entries. You must use credentials for the instance - "! of the service that owns a model to add words to it.
+ "! Adds one or more words and their translations to the specified custom model. + "! Adding a new translation for a word that already exists in a custom model + "! overwrites the word's existing translation. A custom model can contain no + "! more than 20,000 entries. You must use credentials for the instance of the + "! service that owns a model to add words to it.
"!
"! You can define sounds-like or phonetic translations for words. A sounds-like "! translation consists of one or more words that, when combined, sound like the @@ -686,8 +783,6 @@ constants: "! <code><phoneme alphabet="ibm" "! ph="1gAstroEntxrYFXs"></phoneme></code>
"!
- "! **Note:** This method is currently a beta release.
- "!
"! **See also:**
"! * [Adding multiple words to a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor @@ -700,8 +795,8 @@ constants: "! ustomIntro#customIntro) "! "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of the custom voice model. You must make the request - "! with credentials for the instance of the service that owns the custom model. + "! The customization ID (GUID) of the custom model. You must make the request with + "! credentials for the instance of the service that owns the custom model. "! @parameter I_CUSTOM_WORDS | "! No documentation available. "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -715,20 +810,18 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

List custom words

- "! Lists all of the words and their translations for the specified custom voice - "! model. The output shows the translations as they are defined in the model. You - "! must use credentials for the instance of the service that owns a model to list - "! its words.
- "!
- "! **Note:** This method is currently a beta release.
+ "! Lists all of the words and their translations for the specified custom model. + "! The output shows the translations as they are defined in the model. You must + "! use credentials for the instance of the service that owns a model to list its + "! words.
"!
"! **See also:** [Querying all words from a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor "! ds#cuWordsQueryModel). "! "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of the custom voice model. You must make the request - "! with credentials for the instance of the service that owns the custom model. + "! The customization ID (GUID) of the custom model. You must make the request with + "! credentials for the instance of the service that owns the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_WORDS "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -742,11 +835,11 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Add a custom word

- "! Adds a single word and its translation to the specified custom voice model. - "! Adding a new translation for a word that already exists in a custom model - "! overwrites the word's existing translation. A custom model can contain no - "! more than 20,000 entries. You must use credentials for the instance of the - "! service that owns a model to add a word to it.
+ "! Adds a single word and its translation to the specified custom model. Adding a + "! new translation for a word that already exists in a custom model overwrites the + "! word's existing translation. A custom model can contain no more than + "! 20,000 entries. You must use credentials for the instance of the service that + "! owns a model to add a word to it.
"!
"! You can define sounds-like or phonetic translations for words. A sounds-like "! translation consists of one or more words that, when combined, sound like the @@ -762,8 +855,6 @@ constants: "! <code><phoneme alphabet="ibm" "! ph="1gAstroEntxrYFXs"></phoneme></code>
"!
- "! **Note:** This method is currently a beta release.
- "!
"! **See also:**
"! * [Adding a single word to a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor @@ -776,10 +867,10 @@ constants: "! ustomIntro#customIntro) "! "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of the custom voice model. You must make the request - "! with credentials for the instance of the service that owns the custom model. + "! The customization ID (GUID) of the custom model. You must make the request with + "! credentials for the instance of the service that owns the custom model. "! @parameter I_WORD | - "! The word that is to be added or updated for the custom voice model. + "! The word that is to be added or updated for the custom model. "! @parameter I_TRANSLATION | "! The translation for the word that is to be added or updated. "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -798,17 +889,15 @@ constants: "! credentials for the instance of the service that owns a model to list its "! words.
"!
- "! **Note:** This method is currently a beta release.
- "!
"! **See also:** [Querying a single word from a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor "! ds#cuWordQueryModel). "! "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of the custom voice model. You must make the request - "! with credentials for the instance of the service that owns the custom model. + "! The customization ID (GUID) of the custom model. You must make the request with + "! credentials for the instance of the service that owns the custom model. "! @parameter I_WORD | - "! The word that is to be queried from the custom voice model. + "! The word that is to be queried from the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_TRANSLATION "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. @@ -823,21 +912,18 @@ constants: raising ZCX_IBMC_SERVICE_EXCEPTION . "!

Delete a custom word

- "! Deletes a single word from the specified custom voice model. You must use - "! credentials for the instance of the service that owns a model to delete its - "! words.
- "!
- "! **Note:** This method is currently a beta release.
+ "! Deletes a single word from the specified custom model. You must use credentials + "! for the instance of the service that owns a model to delete its words.
"!
"! **See also:** [Deleting a word from a custom "! model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWor "! ds#cuWordDelete). "! "! @parameter I_CUSTOMIZATION_ID | - "! The customization ID (GUID) of the custom voice model. You must make the request - "! with credentials for the instance of the service that owns the custom model. + "! The customization ID (GUID) of the custom model. You must make the request with + "! credentials for the instance of the service that owns the custom model. "! @parameter I_WORD | - "! The word that is to be deleted from the custom voice model. + "! The word that is to be deleted from the custom model. "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_WORD @@ -853,10 +939,13 @@ constants: "! information was added. The method has no effect if no data is associated with "! the customer ID. You must issue the request with credentials for the same "! instance of the service that was used to associate the customer ID with the - "! data.
+ "! data. You associate a customer ID with data by passing the `X-Watson-Metadata` + "! header with a request that passes the data.
"!
- "! You associate a customer ID with data by passing the `X-Watson-Metadata` header - "! with a request that passes the data.
+ "! **Note:** If you delete an instance of the service from the service console, all + "! data associated with that service instance is automatically deleted. This + "! includes all custom models and word/translation pairs, and all data related to + "! speech synthesis requests.
"!
"! **See also:** [Information "! security](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-inform @@ -877,10 +966,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_TEXT_TO_SPEECH_V1 IMPLEMENTATION. @@ -922,22 +1007,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'ICP4D'. - e_request_prop-auth_name = 'ICP4D'. - e_request_prop-auth_type = 'apiKey'. - e_request_prop-auth_headername = 'Authorization'. - e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/text-to-speech/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.text-to-speech.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -949,7 +1026,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173439'. + e_sdk_version_date = '20210312144443'. endmethod. @@ -1068,7 +1145,7 @@ endmethod. * +-------------------------------------------------------------------------------------------------+ * | [--->] I_TEXT TYPE T_TEXT * | [--->] I_ACCEPT TYPE STRING (default ='audio/ogg;codecs=opus') -* | [--->] I_VOICE TYPE STRING (default ='en-US_MichaelVoice') +* | [--->] I_VOICE TYPE STRING (default ='en-US_MichaelV3Voice') * | [--->] I_CUSTOMIZATION_ID TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE FILE @@ -1157,15 +1234,15 @@ method SYNTHESIZE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1182,7 +1259,7 @@ endmethod. * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->GET_PRONUNCIATION * +-------------------------------------------------------------------------------------------------+ * | [--->] I_TEXT TYPE STRING -* | [--->] I_VOICE TYPE STRING (default ='en-US_MichaelVoice') +* | [--->] I_VOICE TYPE STRING (default ='en-US_MichaelV3Voice') * | [--->] I_FORMAT TYPE STRING (default ='ipa') * | [--->] I_CUSTOMIZATION_ID TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') @@ -1270,15 +1347,15 @@ endmethod. * ---------------------------------------------------------------------------------------+ -* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->CREATE_VOICE_MODEL +* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->CREATE_CUSTOM_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_CREATE_VOICE_MODEL TYPE T_CREATE_VOICE_MODEL +* | [--->] I_CREATE_VOICE_MODEL TYPE T_CREATE_CUSTOM_MODEL * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') -* | [<---] E_RESPONSE TYPE T_VOICE_MODEL +* | [<---] E_RESPONSE TYPE T_CUSTOM_MODEL * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- -method CREATE_VOICE_MODEL. +method CREATE_CUSTOM_MODEL. data: ls_request_prop type ts_request_prop, @@ -1327,15 +1404,15 @@ method CREATE_VOICE_MODEL. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1354,14 +1431,14 @@ method CREATE_VOICE_MODEL. endmethod. * ---------------------------------------------------------------------------------------+ -* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->LIST_VOICE_MODELS +* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->LIST_CUSTOM_MODELS * +-------------------------------------------------------------------------------------------------+ * | [--->] I_LANGUAGE TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') -* | [<---] E_RESPONSE TYPE T_VOICE_MODELS +* | [<---] E_RESPONSE TYPE T_CUSTOM_MODELS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- -method LIST_VOICE_MODELS. +method LIST_CUSTOM_MODELS. data: ls_request_prop type ts_request_prop, @@ -1413,15 +1490,15 @@ method LIST_VOICE_MODELS. endmethod. * ---------------------------------------------------------------------------------------+ -* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->UPDATE_VOICE_MODEL +* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->UPDATE_CUSTOM_MODEL * +-------------------------------------------------------------------------------------------------+ * | [--->] I_CUSTOMIZATION_ID TYPE STRING -* | [--->] I_UPDATE_VOICE_MODEL TYPE T_UPDATE_VOICE_MODEL +* | [--->] I_UPDATE_VOICE_MODEL TYPE T_UPDATE_CUSTOM_MODEL * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- -method UPDATE_VOICE_MODEL. +method UPDATE_CUSTOM_MODEL. data: ls_request_prop type ts_request_prop, @@ -1471,15 +1548,15 @@ method UPDATE_VOICE_MODEL. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1490,14 +1567,14 @@ method UPDATE_VOICE_MODEL. endmethod. * ---------------------------------------------------------------------------------------+ -* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->GET_VOICE_MODEL +* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->GET_CUSTOM_MODEL * +-------------------------------------------------------------------------------------------------+ * | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') -* | [<---] E_RESPONSE TYPE T_VOICE_MODEL +* | [<---] E_RESPONSE TYPE T_CUSTOM_MODEL * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- -method GET_VOICE_MODEL. +method GET_CUSTOM_MODEL. data: ls_request_prop type ts_request_prop, @@ -1538,12 +1615,12 @@ method GET_VOICE_MODEL. endmethod. * ---------------------------------------------------------------------------------------+ -* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->DELETE_VOICE_MODEL +* | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->DELETE_CUSTOM_MODEL * +-------------------------------------------------------------------------------------------------+ * | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- -method DELETE_VOICE_MODEL. +method DELETE_CUSTOM_MODEL. data: ls_request_prop type ts_request_prop, @@ -1634,15 +1711,15 @@ method ADD_WORDS. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1759,15 +1836,15 @@ method ADD_WORD. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP PUT request @@ -1914,14 +1991,4 @@ method DELETE_USER_DATA. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_TEXT_TO_SPEECH_V1->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_text_to_speech_v1.clas.xml b/src/zcl_ibmc_text_to_speech_v1.clas.xml index c2a5247..f5187d8 100644 --- a/src/zcl_ibmc_text_to_speech_v1.clas.xml +++ b/src/zcl_ibmc_text_to_speech_v1.clas.xml @@ -26,21 +26,21 @@
ZCL_IBMC_TEXT_TO_SPEECH_V1 - CREATE_VOICE_MODEL + CREATE_CUSTOM_MODEL E Create a custom model ZCL_IBMC_TEXT_TO_SPEECH_V1 - DELETE_USER_DATA + DELETE_CUSTOM_MODEL E - Delete labeled data + Delete a custom model ZCL_IBMC_TEXT_TO_SPEECH_V1 - DELETE_VOICE_MODEL + DELETE_USER_DATA E - Delete a custom model + Delete labeled data ZCL_IBMC_TEXT_TO_SPEECH_V1 @@ -50,21 +50,21 @@ ZCL_IBMC_TEXT_TO_SPEECH_V1 - GET_PRONUNCIATION + GET_CUSTOM_MODEL E - Get pronunciation + Get a custom model ZCL_IBMC_TEXT_TO_SPEECH_V1 - GET_VOICE + GET_PRONUNCIATION E - Get a voice + Get pronunciation ZCL_IBMC_TEXT_TO_SPEECH_V1 - GET_VOICE_MODEL + GET_VOICE E - Get a custom model + Get a voice ZCL_IBMC_TEXT_TO_SPEECH_V1 @@ -74,15 +74,15 @@ ZCL_IBMC_TEXT_TO_SPEECH_V1 - LIST_VOICES + LIST_CUSTOM_MODELS E - List voices + List custom models ZCL_IBMC_TEXT_TO_SPEECH_V1 - LIST_VOICE_MODELS + LIST_VOICES E - List custom models + List voices ZCL_IBMC_TEXT_TO_SPEECH_V1 @@ -98,7 +98,7 @@ ZCL_IBMC_TEXT_TO_SPEECH_V1 - UPDATE_VOICE_MODEL + UPDATE_CUSTOM_MODEL E Update a custom model diff --git a/src/zcl_ibmc_tone_analyzer_v3.clas.abap b/src/zcl_ibmc_tone_analyzer_v3.clas.abap index 9c69d36..659b898 100644 --- a/src/zcl_ibmc_tone_analyzer_v3.clas.abap +++ b/src/zcl_ibmc_tone_analyzer_v3.clas.abap @@ -245,10 +245,8 @@ constants: USER type string value 'user', DOCUMENT_TONE type string value 'document_tone', SENTENCES_TONE type string value 'sentences_tone', - SENTENCESTONE type string value 'sentencesTone', TONES type string value 'tones', TONE_CATEGORIES type string value 'tone_categories', - TONECATEGORIES type string value 'toneCategories', WARNING type string value 'warning', SENTENCE_ID type string value 'sentence_id', INPUT_FROM type string value 'input_from', @@ -259,7 +257,6 @@ constants: CATEGORY_ID type string value 'category_id', CATEGORY_NAME type string value 'category_name', UTTERANCES_TONE type string value 'utterances_tone', - UTTERANCESTONE type string value 'utterancesTone', UTTERANCE_ID type string value 'utterance_id', UTTERANCE_TEXT type string value 'utterance_text', ERROR type string value 'error', @@ -403,10 +400,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_TONE_ANALYZER_V3 IMPLEMENTATION. @@ -448,17 +441,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. - elseif lv_auth_method eq 'basicAuth'. - e_request_prop-auth_name = 'basicAuth'. - e_request_prop-auth_type = 'http'. - e_request_prop-auth_basic = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/tone-analyzer/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.tone-analyzer.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -470,7 +460,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173440'. + e_sdk_version_date = '20210312144444'. endmethod. @@ -594,15 +584,15 @@ method TONE. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -703,15 +693,15 @@ method TONE_CHAT. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -730,22 +720,4 @@ method TONE_CHAT. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_TONE_ANALYZER_V3->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_visual_recognition_v3.clas.abap b/src/zcl_ibmc_visual_recognition_v3.clas.abap index 6f87ee6..92c148d 100644 --- a/src/zcl_ibmc_visual_recognition_v3.clas.abap +++ b/src/zcl_ibmc_visual_recognition_v3.clas.abap @@ -12,10 +12,16 @@ * See the License for the specific language governing permissions and * limitations under the License. "!

Visual Recognition

-"! The IBM Watson™ Visual Recognition service uses deep learning algorithms -"! to identify scenes and objects in images that you upload to the service. You -"! can create and train a custom classifier to identify subjects that suit your -"! needs.
+"! IBM Watson™ Visual Recognition is discontinued. Existing instances are +"! supported until 1 December 2021, but as of 7 January 2021, you can't +"! create instances. Any instance that is provisioned on 1 December 2021 will be +"! deleted.
+"! {: deprecated}
+"!
+"! The IBM Watson Visual Recognition service uses deep learning algorithms to +"! identify scenes and objects in images that you upload to the service. You can +"! create and train a custom classifier to identify subjects that suit your needs. +"!
class ZCL_IBMC_VISUAL_RECOGNITION_V3 DEFINITION public inheriting from ZCL_IBMC_SERVICE_EXT @@ -356,7 +362,6 @@ constants: THRESHOLD type string value 'threshold', OWNERS type string value 'owners', CLASSIFIER_IDS type string value 'classifier_ids', - CLASSIFIERID type string value 'classifierId', POSITIVE_EXAMPLES type string value 'positive_examples', NEGATIVE_EXAMPLES type string value 'negative_examples', end of C_ABAPNAME_DICTIONARY . @@ -654,10 +659,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_VISUAL_RECOGNITION_V3 IMPLEMENTATION. @@ -699,13 +700,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/visual-recognition/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.visual-recognition.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -717,7 +719,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173442'. + e_sdk_version_date = '20210312144446'. endmethod. @@ -788,8 +790,8 @@ method CLASSIFY. if not i_URL is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="url"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_URL. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -797,17 +799,17 @@ method CLASSIFY. if not i_THRESHOLD is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="threshold"' ##NO_TEXT. - lv_formdata = i_THRESHOLD. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-APPL_JSON. + lv_formdata = abap_to_json( i_value = i_THRESHOLD i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. if not i_OWNERS is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="owners"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. field-symbols: like line of i_OWNERS. loop at i_OWNERS assigning . @@ -824,8 +826,8 @@ method CLASSIFY. if not i_CLASSIFIER_IDS is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="classifier_ids"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. field-symbols: like line of i_CLASSIFIER_IDS. loop at i_CLASSIFIER_IDS assigning . @@ -928,8 +930,8 @@ method CREATE_CLASSIFIER. if not i_NAME is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="name"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_NAME. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -1330,22 +1332,4 @@ method DELETE_USER_DATA. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_VISUAL_RECOGNITION_V3->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_visual_recognition_v4.clas.abap b/src/zcl_ibmc_visual_recognition_v4.clas.abap index 6145972..742b0e5 100644 --- a/src/zcl_ibmc_visual_recognition_v4.clas.abap +++ b/src/zcl_ibmc_visual_recognition_v4.clas.abap @@ -12,8 +12,14 @@ * See the License for the specific language governing permissions and * limitations under the License. "!

Visual Recognition v4

-"! Provide images to the IBM Watson™ Visual Recognition service for analysis. -"! The service detects objects based on a set of images with training data.
+"! IBM Watson™ Visual Recognition is discontinued. Existing instances are +"! supported until 1 December 2021, but as of 7 January 2021, you can't +"! create instances. Any instance that is provisioned on 1 December 2021 will be +"! deleted.
+"! {: deprecated}
+"!
+"! Provide images to the IBM Watson Visual Recognition service for analysis. The +"! service detects objects based on a set of images with training data.
class ZCL_IBMC_VISUAL_RECOGNITION_V4 DEFINITION public inheriting from ZCL_IBMC_SERVICE_EXT @@ -45,6 +51,8 @@ public section. DATA_CHANGED type BOOLEAN, "! Whether the most recent training failed. LATEST_FAILED type BOOLEAN, + "! Whether the model can be downloaded after the training status is `ready`. + RSCNN_READY type BOOLEAN, "! Details about the training. If training is in progress, includes information "! about the status. If training is not in progress, includes a success message or "! information about why training failed. @@ -101,6 +109,13 @@ public section. "! Training data for specific objects. OBJECTS type STANDARD TABLE OF T_TRAINING_DATA_OBJECT WITH NON-UNIQUE DEFAULT KEY, end of T_TRAINING_DATA_OBJECTS. + types: + "!

+ "! Training status information for the collection.

+ begin of T_COLLECTION_TRAINING_STATUS, + "! Training status for the objects in the collection. + OBJECTS type T_OBJECT_TRAINING_STATUS, + end of T_COLLECTION_TRAINING_STATUS. types: "!

"! Details about a collection.

@@ -120,7 +135,7 @@ public section. "! Number of images in the collection. IMAGE_COUNT type INTEGER, "! Training status information for the collection. - TRAINING_STATUS type T_TRAINING_STATUS, + TRAINING_STATUS type T_COLLECTION_TRAINING_STATUS, end of T_COLLECTION. types: "!

@@ -131,6 +146,19 @@ public section. "! Width in pixels of the image. WIDTH type INTEGER, end of T_IMAGE_DIMENSIONS. + types: + "!

+ "! Defines the location of the bounding box around the object.

+ begin of T_OBJECT_DETAIL_LOCATION, + "! Y-position of top-left pixel of the bounding box. + TOP type INTEGER, + "! X-position of top-left pixel of the bounding box. + LEFT type INTEGER, + "! Width in pixels of of the bounding box. + WIDTH type INTEGER, + "! Height in pixels of the bounding box. + HEIGHT type INTEGER, + end of T_OBJECT_DETAIL_LOCATION. types: "!

"! Details about the specific area of the problem.

@@ -205,7 +233,7 @@ public section. "! The label for the object. OBJECT type STRING, "! Defines the location of the bounding box around the object. - LOCATION type T_LOCATION, + LOCATION type T_OBJECT_DETAIL_LOCATION, "! Confidence score for the object in the range of 0 to 1. A higher score indicates "! greater likelihood that the object is depicted at this location in the image. SCORE type FLOAT, @@ -289,7 +317,7 @@ public section. SOURCE type T_IMAGE_SOURCE, "! Height and width of an image. DIMENSIONS type T_IMAGE_DIMENSIONS, - "! No documentation available. + "! Details about the errors. ERRORS type STANDARD TABLE OF T_ERROR WITH NON-UNIQUE DEFAULT KEY, "! Training data for all objects. TRAINING_DATA type T_TRAINING_DATA_OBJECTS, @@ -444,14 +472,16 @@ constants: "!

List of required fields per type.

begin of C_REQUIRED_FIELDS, T_LOCATION type string value '|TOP|LEFT|WIDTH|HEIGHT|', - T_OBJECT_TRAINING_STATUS type string value '|READY|IN_PROGRESS|DATA_CHANGED|LATEST_FAILED|DESCRIPTION|', + T_OBJECT_TRAINING_STATUS type string value '|READY|IN_PROGRESS|DATA_CHANGED|LATEST_FAILED|RSCNN_READY|DESCRIPTION|', T_TRAINING_STATUS type string value '|OBJECTS|', T_OBJECT_METADATA type string value '|', T_IMAGE_SOURCE type string value '|TYPE|', T_TRAINING_DATA_OBJECT type string value '|', T_TRAINING_DATA_OBJECTS type string value '|', + T_COLLECTION_TRAINING_STATUS type string value '|OBJECTS|', T_COLLECTION type string value '|COLLECTION_ID|NAME|DESCRIPTION|CREATED|UPDATED|IMAGE_COUNT|TRAINING_STATUS|', T_IMAGE_DIMENSIONS type string value '|', + T_OBJECT_DETAIL_LOCATION type string value '|TOP|LEFT|WIDTH|HEIGHT|', T_ERROR_TARGET type string value '|TYPE|NAME|', T_ERROR type string value '|CODE|MESSAGE|', T_ERROR_RESPONSE type string value '|ERRORS|TRACE|', @@ -473,7 +503,7 @@ constants: T_IMAGE type string value '|SOURCE|DIMENSIONS|OBJECTS|', T_ANALYZE_RESPONSE type string value '|IMAGES|', T_BASE_COLLECTION type string value '|', - T_UPDATE_OBJECT_METADATA type string value '|OBJECT|COUNT|', + T_UPDATE_OBJECT_METADATA type string value '|OBJECT|', T_OBJECT_METADATA_LIST type string value '|OBJECT_COUNT|', __DUMMY type string value SPACE, end of C_REQUIRED_FIELDS . @@ -513,6 +543,7 @@ constants: IN_PROGRESS type string value 'in_progress', DATA_CHANGED type string value 'data_changed', LATEST_FAILED type string value 'latest_failed', + RSCNN_READY type string value 'rscnn_ready', IMAGE_ID type string value 'image_id', SOURCE type string value 'source', DIMENSIONS type string value 'dimensions', @@ -528,12 +559,9 @@ constants: TOP type string value 'top', LEFT type string value 'left', COLLECTION_IDS type string value 'collection_ids', - COLLECTIONIDS type string value 'collectionIds', FEATURES type string value 'features', IMAGES_FILE type string value 'images_file', - IMAGESFILE type string value 'imagesFile', IMAGE_URL type string value 'image_url', - IMAGEURL type string value 'imageUrl', THRESHOLD type string value 'threshold', end of C_ABAPNAME_DICTIONARY . @@ -687,6 +715,36 @@ constants: !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . + "!

Get a model

+ "! Download a model that you can deploy to detect objects in images. The collection + "! must include a generated model, which is indicated in the response for the + "! collection details as `"rscnn_ready": true`. If the value is `false`, + "! train or retrain the collection to generate the model.
+ "!
+ "! Currently, the model format is specific to Android apps. For more information + "! about how to deploy the model to your app, see the [Watson Visual Recognition + "! on Android](https://github.com/matt-ny/rscnn) project in GitHub. + "! + "! @parameter I_COLLECTION_ID | + "! The identifier of the collection. + "! @parameter I_FEATURE | + "! The feature for the model. + "! @parameter I_MODEL_FORMAT | + "! The format of the returned model. + "! @parameter E_RESPONSE | + "! Service return value of type FILE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods GET_MODEL_FILE + importing + !I_COLLECTION_ID type STRING + !I_FEATURE type STRING + !I_MODEL_FORMAT type STRING + !I_accept type string default 'application/octet-stream' + exporting + !E_RESPONSE type FILE + raising + ZCX_IBMC_SERVICE_EXCEPTION . "!

Add images

"! Add images to a collection by URL, by file, or both.
@@ -966,8 +1024,8 @@ constants: "! methods GET_TRAINING_USAGE importing - !I_START_TIME type STRING optional - !I_END_TIME type STRING optional + !I_START_TIME type DATE optional + !I_END_TIME type DATE optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRAINING_EVENTS @@ -1000,10 +1058,6 @@ protected section. private section. - methods SET_DEFAULT_QUERY_PARAMETERS - changing - !C_URL type TS_URL . - ENDCLASS. class ZCL_IBMC_VISUAL_RECOGNITION_V4 IMPLEMENTATION. @@ -1045,13 +1099,14 @@ method GET_REQUEST_PROP. e_request_prop-auth_name = 'IAM'. e_request_prop-auth_type = 'apiKey'. e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_query = c_boolean_false. e_request_prop-auth_header = c_boolean_true. else. endif. - e_request_prop-url-protocol = 'http'. - e_request_prop-url-host = 'localhost'. - e_request_prop-url-path_base = '/visual-recognition/api'. + e_request_prop-url-protocol = 'https'. + e_request_prop-url-host = 'api.us-south.visual-recognition.watson.cloud.ibm.com'. + e_request_prop-url-path_base = ''. endmethod. @@ -1063,7 +1118,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20200310173444'. + e_sdk_version_date = '20210312144448'. endmethod. @@ -1118,8 +1173,8 @@ method ANALYZE. if not i_COLLECTION_IDS is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="collection_ids"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. field-symbols: like line of i_COLLECTION_IDS. loop at i_COLLECTION_IDS assigning . @@ -1130,8 +1185,8 @@ method ANALYZE. if not i_FEATURES is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="features"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. field-symbols: like line of i_FEATURES. loop at i_FEATURES assigning . @@ -1142,8 +1197,8 @@ method ANALYZE. if not i_IMAGE_URL is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="image_url"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. field-symbols: like line of i_IMAGE_URL. loop at i_IMAGE_URL assigning . @@ -1154,9 +1209,9 @@ method ANALYZE. if not i_THRESHOLD is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="threshold"' ##NO_TEXT. - lv_formdata = i_THRESHOLD. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-APPL_JSON. + lv_formdata = abap_to_json( i_value = i_THRESHOLD i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. @@ -1267,15 +1322,15 @@ method CREATE_COLLECTION. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1449,15 +1504,15 @@ method UPDATE_COLLECTION. endif. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -1512,6 +1567,68 @@ method DELETE_COLLECTION. +endmethod. + +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->GET_MODEL_FILE +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_FEATURE TYPE STRING +* | [--->] I_MODEL_FORMAT TYPE STRING +* | [--->] I_accept TYPE string (default ='application/octet-stream') +* | [<---] E_RESPONSE TYPE FILE +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method GET_MODEL_FILE. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v4/collections/{collection_id}/model'. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + + " standard headers + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + " process query parameters + data: + lv_queryparam type string. + + lv_queryparam = escape( val = i_FEATURE format = cl_abap_format=>e_uri_full ). + add_query_parameter( + exporting + i_parameter = `feature` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + + lv_queryparam = escape( val = i_MODEL_FORMAT format = cl_abap_format=>e_uri_full ). + add_query_parameter( + exporting + i_parameter = `model_format` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + + + + + + + " execute HTTP GET request + lo_response = HTTP_GET( i_request_prop = ls_request_prop ). + + + " retrieve file data + e_response = get_response_binary( lo_response ). + endmethod. @@ -1564,8 +1681,8 @@ method ADD_IMAGES. if not i_IMAGE_URL is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="image_url"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. field-symbols: like line of i_IMAGE_URL. loop at i_IMAGE_URL assigning . @@ -1576,8 +1693,8 @@ method ADD_IMAGES. if not i_TRAINING_DATA is initial. clear ls_form_part. - ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="training_data"' ##NO_TEXT. + ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. lv_formdata = i_TRAINING_DATA. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. @@ -1937,15 +2054,15 @@ method UPDATE_OBJECT_METADATA. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -2165,15 +2282,15 @@ method ADD_IMAGE_TRAINING_DATA. concatenate lv_body lv_bodyparam into lv_body. endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. - lv_body = `{` && lv_body && `}`. - endif. + lv_body = `{` && lv_body && `}`. + endif. - if ls_request_prop-header_content_type cp '*charset=utf-8*'. - ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). - replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. - else. - ls_request_prop-body = lv_body. - endif. + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. " execute HTTP POST request @@ -2194,8 +2311,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->GET_TRAINING_USAGE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_START_TIME TYPE STRING(optional) -* | [--->] I_END_TIME TYPE STRING(optional) +* | [--->] I_START_TIME TYPE DATE(optional) +* | [--->] I_END_TIME TYPE DATE(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_EVENTS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2222,7 +2339,7 @@ method GET_TRAINING_USAGE. lv_queryparam type string. if i_START_TIME is supplied. - lv_queryparam = escape( val = i_START_TIME format = cl_abap_format=>e_uri_full ). + lv_queryparam = i_START_TIME. add_query_parameter( exporting i_parameter = `start_time` @@ -2232,7 +2349,7 @@ method GET_TRAINING_USAGE. endif. if i_END_TIME is supplied. - lv_queryparam = escape( val = i_END_TIME format = cl_abap_format=>e_uri_full ). + lv_queryparam = i_END_TIME. add_query_parameter( exporting i_parameter = `end_time` @@ -2311,22 +2428,4 @@ method DELETE_USER_DATA. endmethod. - - -* ---------------------------------------------------------------------------------------+ -* | Instance Private Method ZCL_IBMC_VISUAL_RECOGNITION_V4->SET_DEFAULT_QUERY_PARAMETERS -* +-------------------------------------------------------------------------------------------------+ -* | [<-->] C_URL TYPE TS_URL -* +-------------------------------------------------------------------------------------- - method set_default_query_parameters. - if not p_version is initial. - add_query_parameter( - exporting - i_parameter = `version` - i_value = p_version - changing - c_url = c_url ). - endif. - endmethod. - ENDCLASS. diff --git a/src/zcl_ibmc_visual_recognition_v4.clas.xml b/src/zcl_ibmc_visual_recognition_v4.clas.xml index 185d0a4..29cb66f 100644 --- a/src/zcl_ibmc_visual_recognition_v4.clas.xml +++ b/src/zcl_ibmc_visual_recognition_v4.clas.xml @@ -78,6 +78,12 @@ E Get a JPEG file of an image + + ZCL_IBMC_VISUAL_RECOGNITION_V4 + GET_MODEL_FILE + E + Get a model + ZCL_IBMC_VISUAL_RECOGNITION_V4 GET_OBJECT_METADATA