Class ZCL_IBMX_WATSONX_AI_ML_V1

public inheriting from ZCL_IBMX_SERVICE_EXT create public

Documentation

watsonx.ai

No documentation available.

Types

Visibility and LevelNameDocumentation
publictt_json_patch_operation TYPE STANDARD TABLE OF T_JSON_PATCH_OPERATION WITH NON-UNIQUE DEFAULT KEY

Array parameter type for method AI_SERVICES_UPDATE

publict_aiservice_content_metadata (structured type)

The metadata related to the attachment.

publict_aiservice_documentation (structured type)

The documentation of the AI service request body and

response body.
publict_aiservice_entity (structured type)

The details of the AI service to be created.

publict_aiservice_request (structured type)

The details of the AI service to be created.

publict_aiservice_resource (structured type)

The information for a flow.

publict_aiservice_resources (structured type)

A paginated list of AI services.

publict_aiservice_resource_entity (structured type)

The details of the AI service to be created.

publict_api_error (structured type)

An error message.

publict_api_error_response (structured type)

The data returned when an error is encountered.

publict_api_error_target (structured type)

The target of the error.

publict_asset_ref (structured type)

The field that identifies the asset.

publict_at_arggnrtn_mdl_at_argcstm_1 (structured type)

Properties describing the custom foundation model.

publict_at_arggnrtn_mdl_at_argmdl (structured type)

Properties describing the foundation model.

publict_auto_aidata_location (structured type)

A reference to data.

publict_auto_airagchunking (structured type)

The chunking details for an AutoAI RAG pattern,.

publict_auto_airagconstraints (structured type)

The constraint parameters for an AutoAI RAG run.

publict_auto_airagcontext (structured type) No documentation available.
publict_auto_airagcustom_model (structured type)

Properties describing the custom foundation model.

publict_auto_airagembeddings (structured type)

The embeddings properties for an AutoAI RAG pattern.

publict_auto_airagfoundation_models type STRING

The id of the foundation model. If not provided AutoAI

auto-selects 3 top rated models.
publict_auto_airaggeneration_model type JSONOBJECT No documentation available.
publict_auto_airagmetadata (structured type)

The request fields that are not part of the returned entity.

publict_auto_airagmetric (structured type)

The metric for a given property.

publict_auto_airagmetrics (structured type)

The AutoAI RAG metrics, this contains the list of calculated

metrics on test data (provided in the request) and (optionally) synthetic data autogenerated. Metric value is mean value calculated over all records in the dataset.
publict_auto_airagmodel (structured type)

Properties describing the foundation model.

publict_auto_airagmodel_params (structured type)

Properties that control the model and response.

publict_auto_airagoptimization_param (structured type)

The optimization parameters for an AutoAI RAG run.

publict_auto_airagparameters (structured type)

The parameters for an AutoAI RAG run.

publict_auto_airagpattern (structured type)

Describes the elements and settings found during the

optimization of the RAG pattern.
publict_auto_airagrequest (structured type)

The request entity for an AutoAI RAG run.

publict_auto_airagrequest_entity (structured type)

The request entity for an AutoAI RAG run.

publict_auto_airagresponse (structured type)

The response of an AutoAI RAG run.

publict_auto_airagresponse_entity (structured type)

The status of an AutoAI RAG run.

publict_auto_airagresponse_results (structured type)

The AutoAI RAG results.

publict_auto_airagresults (structured type)

The AutoAI RAG results.

publict_auto_airagresult_location (structured type)

The location of the different result files.

publict_auto_airagretrieval (structured type)

The retrieval details for an AutoAI RAG pattern,.

publict_auto_airagsettings (structured type)

The RAG pattern configuration settings that were found

during the optimization process.
publict_auto_airagstatus (structured type)

The status of an AutoAI RAG run.

publict_auto_airagstatus_object (structured type)

Status of the training job.

publict_auto_airagvector_store (structured type)

Properties that describe the AutoAI RAG vector store that

contains the results.
publict_auto_ragresult_resources (structured type)

A paginated list of training definitions.

publict_base_model (structured type)

The model id of the base model for this job.

publict_cai_kit_text_gen_properties (structured type)

Properties that control the model and response that are only

supported in caikit.
publict_chat_item (structured type) No documentation available.
publict_commit (structured type) No documentation available.
publict_common_patch_request_helper (structured type)

The common fields that can be patched. This is a helper for

`cpdctl`.
publict_connection_asset (structured type)

A reference to connection.

publict_consumptions_limit (structured type)

The limits that may be set per request.

publict_cos_data_connection (structured type)

Contains a set of location fields specific to each data

source.
publict_cos_data_location (structured type)

Contains a set of fields specific to each connection.

publict_created_at type DATETIME

The time when the response was created in ISO 8601 format.

publict_custom type JSONOBJECT

User defined properties specified as key-value pairs.

publict_data_connection type JSONOBJECT

Contains a set of fields specific to each connection. See

here for [details about specifying connections](#datareferences).
publict_data_connection_reference (structured type)

A reference to data with an optional data schema. If

necessary, it is possible to provide a data connection that contains just the data schema.
publict_data_location type MAP

Contains a set of fields that describe the location of the

data with respect to the `connection`.
publict_data_schema (structured type)

The schema of the expected data, see


[datarecord-metadata-v2-schema](https://raw.githubusercontent.com/elyra-ai/pipel ine-schemas/master/common-pipeline/datarecord-metadata/datarecord-metadata-v2-sc hema.json) for the schema definition.
publict_deployment_entity (structured type)

The definition of the deployment.

publict_deployment_entity_common (structured type)

The common fields between a request and the response.

publict_deployment_resource (structured type)

A deployment resource.

publict_deployment_resource_entity (structured type)

The properties specific to `watsonx.ai` deployments.

publict_deployment_resource_patch (structured type)

The common fields that can be patched. This is a helper for

`cpdctl`.
publict_deployment_resrc_collection (structured type)

The deployment resources.

publict_deployment_resrc_prototype (structured type)

The deployment request entity (this description is not

used).
publict_deployment_status (structured type)

Specifies the current status, additional information about

the deployment and any failure messages in case of deployment failures.
publict_deployment_system (structured type)

System details including warnings.

publict_deployment_system_details (structured type)

Optional details provided by the service about statistics of

the number of deployments created. The deployments that are counted will depend on the request parameters.
publict_deployment_text_chat (structured type) No documentation available.
publict_deployment_text_chat_msg type JSONOBJECT No documentation available.
publict_deployment_text_gen (structured type) No documentation available.
publict_deployment_text_gen_prop (structured type)

The template properties if this request refers to a prompt

template.
publict_document_extraction_common (structured type)

The details needed to create document extraction job.

publict_document_extraction_request (structured type)

The properties that are part of a request that supports

spaces and projects. Either `space_id` or `project_id` has to be provided and is mandatory.
publict_document_extraction_resource (structured type)

The response from getting a specified document extraction

job.
publict_document_extraction_response (structured type)

The document extraction job properties.

publict_document_extraction_status (structured type)

Status of the document extraction job.

publict_doc_extraction_object_loc (structured type)

A reference to data.

publict_doc_extraction_resources (structured type)

The response of getting all document extraction jobs.

publict_dplymnt_txt_cht_msg_txt_cht1 (structured type)

The definition of an assistant message.

publict_dplymnt_txt_cht_msg_txt_cht2 (structured type)

The definition of a control message.

publict_dplymnt_txt_cht_msg_txt_cht3 (structured type)

The definition of a tool message.

publict_dplymnt_txt_cht_msg_txt_cht4 (structured type)

The definition of a user message.

publict_embedding (structured type)

The embedding values for a text string. The `input` field is

only set if the corresponding `return_option` is set.
publict_embeddings_request (structured type)

The text input for a given model to be used to generate the

embeddings.
publict_embeddings_response (structured type)

System details.

publict_embeddings_response_fields (structured type)

The embeddings per input.

publict_embedding_input_result (structured type)

The input text, this is only output if

`parameters.return_options.input_text` is set to `true` in the request.
publict_embedding_model_id type STRING

The `id` of the model to be used for this request. Please

refer to the [list of models](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-mod els-embed.html?context=wx&audience=wdp).
publict_embedding_parameters (structured type)

Parameters for text embedding requests.

publict_embedding_return_options (structured type)

The return options for text embeddings.

publict_entity_request_space_body (structured type)

The properties that are part of a request that supports

spaces.
publict_entity_req_spc_project_body (structured type)

The properties that are part of a request that supports

spaces and projects. Either `space_id` or `project_id` has to be provided and is mandatory.
publict_entity_req_spc_project_only (structured type)

The properties that are part of a request that supports

spaces and projects. Either `space_id` or `project_id` has to be provided and is mandatory.
publict_error (structured type)

An error object.

publict_error_response (structured type)

An error response.

publict_error_target (structured type)

The target of the error.

publict_external_information (structured type) No documentation available.
publict_external_store_settings (structured type) No documentation available.
publict_ext_info_external_model (structured type) No documentation available.
publict_ext_info_external_prompt (structured type) No documentation available.
publict_ext_prmpt_addtnl_info_item (structured type) No documentation available.
publict_ext_prompt_additional_info TYPE STANDARD TABLE OF T_EXT_PRMPT_ADDTNL_INFO_ITEM WITH NON-UNIQUE DEFAULT KEY No documentation available.
publict_ext_str_settings_schema_fld (structured type) No documentation available.
publict_file_paths (structured type) No documentation available.
publict_fine_tuning_entity (structured type)

Status of the training job.

publict_fine_tuning_parameters (structured type)

This field must not be set while creating a fine tuning job

with InstructLab.

The parameters for the job. Note that if `verbalizer` is provided then `response_template` must also be provided (and vice versa).
publict_fine_tuning_request (structured type)

The fine tuning resource.

publict_fine_tuning_resource (structured type)

The response of a fine tuning job.

publict_fine_tuning_resources (structured type)

System details.

publict_fine_tuning_resource_entity (structured type)

The fine tuning resource.

publict_fine_tuning_resource_list (structured type) No documentation available.
publict_fine_tuning_training_metrics type JSONOBJECT

The metrics that can be returned by a fine tuning job

created with InstructLab.
publict_foundation_model (structured type)

A supported foundation model.

publict_foundation_models (structured type)

System details.

publict_foundation_models_array TYPE STANDARD TABLE OF T_FOUNDATION_MODEL WITH NON-UNIQUE DEFAULT KEY

The supported foundation models.

publict_foundation_model_limits (structured type)

Limits per plan that may be set per request.

publict_foundation_model_task (structured type)

A task that is covered by some of the foundation models that

are supported in the service.
publict_foundation_model_tasks (structured type)

System details.

publict_foundation_model_tasks_array TYPE STANDARD TABLE OF T_FOUNDATION_MODEL_TASK WITH NON-UNIQUE DEFAULT KEY

The supported foundation model tasks.

publict_foundation_model_tier type STRING

The tier of the model, depending on the `tier` the billing

will be different, refer to the plan for the details. Note that input tokens and output tokens may be charged differently.
publict_foundation_model_version (structured type)

A minor or patch version for the model.

publict_geospatial_trans_data (structured type)

A data location of the input or output data.

publict_geospatial_trans_entity (structured type)

The inputs and outputs required to create a transformation

for the given model.
publict_geospatial_trans_metadata (structured type)

The specific fields for the geospatial transformation

metadata fields.
publict_geospatial_trans_model_id type STRING

The `id` of the model to be used for this request.

publict_geospatial_trans_request (structured type)

The inputs and outputs required to create a transformation

for the given model.
publict_geospatial_trans_req_fields (structured type) No documentation available.
publict_geospatial_trans_resource (structured type)

The geospatial transformation resource.

publict_geospatial_trans_resources (structured type)

A paginated list of resources.

publict_geospatial_trans_resp_entity (structured type)

The transformation results.

publict_geospatial_trans_resp_fields (structured type)

The transformation results.

publict_geospatial_trans_results (structured type)

The transformation results.

publict_get_prompt_input_response (structured type) No documentation available.
publict_gpu (structured type)

The name and number of GPUs used for the Fine Tuning job.

publict_granite_guardian_properties (structured type)

The properties specific to Granite Guardian. This detector

is in beta and may change.
publict_gsptl_trans_metadata_fld (structured type)

The specific fields for the geospatial transformation

metadata fields.
publict_gsptl_trans_resrc_entity (structured type)

The inputs and outputs required to create a transformation

for the given model.
publict_hap_properties (structured type)

The properties specific to HAP.

publict_hardware_request (structured type)

The requested hardware for deployment.

publict_hardware_spec (structured type)

A hardware specification.

publict_inference (structured type)

The details of an inference API.

publict_input_token_count type INTEGER

The number of input tokens that were consumed.

publict_in_memory_settings (structured type) No documentation available.
publict_jsoncontent_definition type MAP

The schema for a given content type. Each property defines

the content type and the sub-object is the JSON schema that describes the content.
publict_jsoncontent_schema type JSONOBJECT

A JSON schema, see the [JSON Schema

reference](https://json-schema.org/learn/getting-started-step-by-step) for documentation about the format.
publict_json_patch TYPE STANDARD TABLE OF T_JSON_PATCH_OPERATION WITH NON-UNIQUE DEFAULT KEY

Array of patch operations as defined in RFC 6902.

publict_json_patch_operation (structured type)

This model represents an individual patch operation to be

performed on a JSON document, as defined by RFC 6902.
publict_life_cycle_state (structured type)

The lifecycle details.

publict_mask_properties (structured type)

The properties specific to masking. If this object exists,

even if it is empty, then masking will be applied.
publict_mdrtn_granite_guardian_prop (structured type)

The properties specific to Granite Guardian. This detector

is in beta and may change.
publict_mdrtn_prop_without_threshold (structured type)

The properties for the moderation. Each type of moderation

may have additional properties that are specific to that moderation.
publict_message (structured type)

Optional messages related to the resource.

publict_metrics_context (structured type)

Provides extra information for this training stage in the

context of auto-ml.
publict_model_asset_ref (structured type)

The field that identifies the asset.

publict_model_limits (structured type)

The limits that are applied for the model, for all the

plans.
publict_model_rel (structured type)

A reference to a resource.

publict_model_version type STRING

The model version (using semantic versioning) if set.

publict_moderations (structured type)

Properties that control the moderations, for usages such as

`Hate and profanity` (HAP) and `Personal identifiable information` (PII) filtering. This list can be extended with new types of moderations.
publict_moderation_hap_input_prop (structured type)

The properties specific to HAP.

publict_moderation_hap_properties (structured type)

The properties specific to HAP.

publict_moderation_input_properties (structured type)

The properties for the moderation. Each type of moderation

may have additional properties that are specific to that moderation.
publict_moderation_pii_input_prop (structured type)

The properties specific to PII.

publict_moderation_pii_properties (structured type)

The properties specific to PII.

publict_moderation_properties (structured type)

The properties for the moderation. Each type of moderation

may have additional properties that are specific to that moderation.
publict_moderation_result (structured type)

A specific moderation result.

publict_moderation_results (structured type)

The result of any detected moderations.

publict_moderation_text_range (structured type)

A range of text.

publict_notebook (structured type)

Notebook information as returned by a GET request.

publict_notebooks_resource_list (structured type)

A list of notebook info as returned by a list query.

publict_notebook_copy_body (structured type)

Payload for copying a notebook.

publict_notebook_create_body_general (structured type)

Payload for creating a notebook.

publict_notebook_create_response type JSONOBJECT No documentation available.
publict_notebook_cre_body_in_project (structured type)

Payload for creating a notebook in a project.

publict_notebook_entity (structured type)

Entity of a notebook.

publict_notebook_entity_definition (structured type)

Definition part of a notebook entity.

publict_notebook_entity_def_for_copy (structured type)

Definition part of a notebook entity copied from a source.

publict_notebook_entity_for_copy (structured type)

Entity of a notebook copied from a source.

publict_notebook_for_copy (structured type)

Information of a copied notebook as returned by a GET

request.
publict_notebook_in_project (structured type)

Notebook information in a project as returned by a GET

request.
publict_notebook_kernel (structured type)

A notebook kernel.

publict_notebook_list_body (structured type)

Payload for a notebook list request.

publict_notebook_metadata (structured type)

Metadata of a notebook.

publict_notebook_metadata_in_project (structured type)

Metadata of a notebook in a project.

publict_notebook_origin (structured type)

The notebook origin.

publict_notebook_origin_from_source (structured type)

The origin of a notebook from a source.

publict_notebook_resource (structured type)

Notebook info returned in a listing.

publict_notebook_resource_entity (structured type)

Entity of notebook info returned in a listing.

publict_notebook_resource_metadata (structured type)

Metadata of notebook info returned in a listing.

publict_notebook_resrc_entity_asset (structured type)

Asset API asset description returned with a notebook

listing.
publict_notebook_resrc_entity_rt (structured type)

Runtime info returned with a notebook listing.

publict_notebook_revert_body (structured type)

Payload for a request to revert to a specific notebook

version.
publict_notebook_revert_response type JSONOBJECT No documentation available.
publict_notebook_runtime (structured type)

A notebook runtime.

publict_notebook_update_body (structured type)

Payload for a notebook update request.

publict_notebook_versions_lst_resp type JSONOBJECT No documentation available.
publict_notebook_version_entity (structured type)

A notebook version entity.

publict_notebook_version_in_project (structured type)

A notebook version in a project.

publict_notebook_version_metadata (structured type)

Notebook version metadata.

publict_notebook_ver_create_response type JSONOBJECT No documentation available.
publict_notebook_ver_retrieve_resp type JSONOBJECT No documentation available.
publict_ntbk_cre_resp_ntbk_for_copy (structured type)

Information of a copied notebook as returned by a GET

request.
publict_ntbk_cre_resp_ntbk_in_prjct (structured type)

Notebook information in a project as returned by a GET

request.
publict_ntbk_rvrt_resp_ntbk_in_prjct (structured type)

Notebook information in a project as returned by a GET

request.
publict_ntbk_versions_lst_in_project (structured type)

A list of notebook versions in a project.

publict_ntbk_ver_cre_resp_ntbk_ver_1 (structured type)

A notebook version in a project.

publict_ntbk_ver_entity_in_project (structured type)

A notebook version entity in a project.

publict_ntbk_ver_rtrv_resp_ntbk_ver1 (structured type)

A notebook version in a project.

publict_ntbk_vrsns_lst_resp_ntbk_vr1 (structured type)

A list of notebook versions in a project.

publict_object_location (structured type)

A reference to data.

publict_object_location_github (structured type)

A reference to data.

publict_object_loc_github_location (structured type)

Contains a set of fields that describe the location of the

data with respect to the `connection`.
publict_online_deployment (structured type)

Indicates that this is an online deployment. An object has

to be specified but can be empty. The `serving_name` can be provided in the `online.parameters`.
publict_online_deployment_parameters (structured type)

A set of key-value pairs that are used to configure the

deployment.
publict_pagination (structured type)

Information for paging when querying resources.

publict_pagination_base (structured type) No documentation available.
publict_pagination_first (structured type)

The reference to the first item in the current page.

publict_pagination_next (structured type)

A reference to the first item of the next page, if any.

publict_pagination_tc (structured type)

Information for paging when querying resources.

publict_pii_properties (structured type)

The properties specific to PII.

publict_prmpt_tuning_metrics_context (structured type)

This field will not returned by fine tuning jobs created

with InstructLab.

The context for prompt tuning metrics.
publict_prm_trnct_inpt_tkns_frm_strt type INTEGER

Represents the maximum number of input tokens accepted. This

can be used to avoid requests failing due to input being longer than configured limits. If the text is truncated, then it truncates the start of the input (on the left), so the end of the input will remain the same. If this value exceeds the `maximum sequence length` (refer to the documentation to find this value for the model) then the call will fail if the total number of tokens exceeds the `maximum sequence length`.
publict_prm_trnct_inpt_tkns_from_end type INTEGER

Represents the maximum number of tokens accepted per

input.

This can be used to avoid requests failing due to input being longer than configured limits. If the text is truncated, then it truncates the end of the input (on the right), so the start of the input will remain the same.

If this value exceeds the `maximum sequence length` (refer to the documentation to find this value for the model) then the call will fail if the total number of tokens exceeds the `maximum sequence length`.
publict_project_id type STRING

The project that contains the resource. Either `space_id` or

`project_id` has to be given.
publict_project_id_only type STRING

The project that contains the resource.

publict_prompt (structured type) No documentation available.
publict_prompt_data (structured type) No documentation available.
publict_prompt_lock (structured type) No documentation available.
publict_prompt_model_parameters (structured type) No documentation available.
publict_prompt_template_variables (structured type)

The template properties if this request refers to a prompt

template.
publict_prompt_tuning (structured type)

Properties to control the prompt tuning.

publict_prompt_variable type JSONOBJECT No documentation available.
publict_prompt_variables type MAP

The prompt variables.

publict_prompt_variable_string type STRING No documentation available.
publict_prompt_with_external (structured type) No documentation available.
publict_prompt_with_ext_model_param (structured type) No documentation available.
publict_rel (structured type)

A reference to a resource.

publict_reranked_results (structured type)

The ranking score for the input.

publict_rerank_input (structured type)

The input text.

publict_rerank_input_result (structured type)

The input text, this is only output if

`parameters.return_options.inputs` is set to `true` in the request.
publict_rerank_parameters (structured type)

The properties used for reranking.

publict_rerank_query type STRING

The rank query.

publict_rerank_request (structured type)

The request to rerank texts.

publict_rerank_response (structured type)

System details.

publict_rerank_response_fields (structured type)

The ranked results.

publict_rerank_return_options (structured type)

The return options for text reranking.

publict_resource_commit_info (structured type)

Information related to the revision.

publict_resource_description type STRING

The description of the job.

publict_resource_meta (structured type)

Common metadata for a resource where `project_id` or

`space_id` must be present.
publict_resource_meta_base (structured type)

Common metadata for a resource.

publict_resource_meta_simple (structured type)

Common metadata for a simple resource.

publict_resource_name type STRING

The name of the job.

publict_resource_request_fields (structured type)

The request fields that are not part of the returned entity.

publict_resrc_space_project_metadata (structured type)

Common metadata for a resource where `project_id` or

`space_id` must be present.
publict_results_location (structured type)

A reference to data.

publict_results_reference_input (structured type) No documentation available.
publict_results_reference_output (structured type) No documentation available.
publict_return_option_properties (structured type)

Properties that control what is returned.

publict_rev_entity_spc_project_req (structured type)

The details for the revision.

publict_sdgnstrctrd_gen_base_entity (structured type)

Common platform parameters for creating an unstructured

synthetic data generation job.
publict_sdgobject_location (structured type)

A reference to data.

publict_sdgobject_location_location (structured type)

The location of the data.

publict_sdgunstructured_gen_entity (structured type)

The details needed to create unstructured synthetic data

generation job.

The `seed_data_reference.type` must be `container` and the `results_reference.type` must also be `container`.
publict_sdgunstructured_gen_param (structured type)

The parameters to guide the generation.

publict_sdgunstructured_gen_request (structured type)

The details needed to create unstructured synthetic data

generation job.

The `seed_data_reference.type` must be `container` and the `results_reference.type` must also be `container`.
publict_sdgunstructured_gen_resource (structured type)

The response from getting a specified synthetic data

generation job.
publict_sdgunstructured_gen_response (structured type)

The synthetic data generation job properties.

publict_sdgunstructured_gen_resp_job (structured type) No documentation available.
publict_service_error (structured type)

A service error message.

publict_similarity_response (structured type)

System details.

publict_similarity_response_fields (structured type)

The similarity scores per source string.

publict_similarity_result (structured type)

The similarity results.

publict_simple_rel (structured type)

A reference to a resource.

publict_software_spec_rel (structured type)

A software specification.

publict_space_id type STRING

The space that contains the resource. Either `space_id` or

`project_id` has to be given.
publict_space_id_only type STRING

The space that contains the resource.

publict_stats (structured type)

The stats about deployments for a space.

publict_synthetic_data_gen_context (structured type)

The Synthetic Data Generation context.

publict_synthetic_data_gen_locations (structured type)

The Synthetic Data Generation location metrics.

publict_synthetic_data_gen_metric (structured type)

The Synthetic Data Generation metrics.

publict_synthetic_data_gen_metrics (structured type)

All the Synthetic Data Generation metrics.

publict_synthetic_data_gen_request (structured type)

The details needed to create synthetic data generation

job.

The `data_reference.type` must be `taxonomy_asset` and the `results_reference.type` will normally be something like `connection_asset` or `data_asset`.
publict_synthetic_data_gen_resource (structured type)

The response from getting a specified synthetic data

generation job.
publict_synthetic_data_gen_resources (structured type)

The response of getting all synthetic data generation jobs.

publict_synthetic_data_gen_response (structured type)

The synthetic data generation job properties.

publict_synthetic_data_gen_sample (structured type)

The Synthetic Data Generation sample metrics.

publict_synthetic_data_gen_status (structured type)

The status of a Synthetic Data Generation job.

publict_system (structured type)

System details.

publict_system_details (structured type)

Optional details coming from the service and related to the

API call or the associated resource.
publict_tags type TT_STRING

A list of tags for this resource.

publict_task_description (structured type)

The attributes of the task for this model.

publict_task_rating (structured type)

The ratings for this task for this model.

publict_taxonomy_request (structured type)

The request fields to create Taxonomy job.




The `data_reference.type` must be set to `github`.
publict_taxonomy_resource (structured type)

The response fields from a Taxonomy request.

publict_taxonomy_resources (structured type)

The list of Taxonomy jobs in specified project or space.

publict_taxonomy_response (structured type)

The Taxonomy entity.




The `data_reference.type` will be `github` and the `results_reference.type` will be set to `taxonomy_asset`.
publict_taxonomy_status (structured type)

The status of a Taxonomy job.

publict_text_chat_finish_reason type STRING

The reason why the call stopped, can be one of:


- `stop` - The model hit a natural stop point or a provided stop sequence.
- `length` - The maximum number of tokens specified in the request was reached.
- `tool_calls` - The model called a tool.
- `time_limit`` - Time limit reached.
- `cancelled`` - Request canceled by the client.
- `error`` - Error encountered.
- `null` - API response still in progress or incomplete.
publict_text_chat_function_call (structured type)

The function call.

publict_text_chat_message (structured type)

The base definition of a text chat message.

publict_text_chat_messages type JSONOBJECT No documentation available.
publict_text_chat_message_assistant (structured type)

The definition of an assistant message.

publict_text_chat_message_control (structured type)

The definition of a control message.

publict_text_chat_message_field_name type STRING

An optional name for the participant. Provides the model

information to differentiate between participants of the same role.
publict_text_chat_message_system (structured type)

The definition of a system message.

publict_text_chat_message_tool (structured type)

The definition of a tool message.

publict_text_chat_message_user (structured type)

The definition of a user message.

publict_text_chat_parameters (structured type)

The parameters specific to chat.

publict_text_chat_parameter_function (structured type)

The parameters specific to chat.

publict_text_chat_parameter_tools (structured type)

The chat tool parameters.

publict_text_chat_property_tool type STRING

The tool type.

publict_text_chat_request (structured type)

The parameters specific to chat.

publict_text_chat_response (structured type)

System details.

publict_text_chat_response_fields (structured type)

A chat completion choices.

publict_text_chat_response_format (structured type)

The chat response format parameters.

publict_text_chat_resp_fields_shared (structured type)

A chat completion.

publict_text_chat_resp_fields_stream (structured type)

A chat completion choices.

publict_text_chat_result_choice (structured type)

A tool related result.

publict_text_chat_result_delta (structured type)

A message result.

publict_text_chat_result_message (structured type)

A message result.

publict_text_chat_res_choice_stream (structured type)

A tool related result.

publict_text_chat_stream_item (structured type)

System details.

publict_text_chat_stream_response TYPE STANDARD TABLE OF T_TEXT_CHAT_STREAM_ITEM WITH NON-UNIQUE DEFAULT KEY

A set of server sent events, each event contains a response

for one or more tokens. The results will be an array of events of the form `data: {<json event>}` where the schema of the individual `json event` is described below.
publict_text_chat_tool_call (structured type)

The tool call.

publict_text_chat_tool_call_stream (structured type)

The tool call.

publict_text_chat_tool_choice_option type STRING

Using `auto` means the model can pick between generating a

message or calling one or more tools. Specify either `tool_choice_option` to allow the model to pick or `tool_choice` to force the model to call a tool.
publict_text_chat_tool_choice_tool (structured type)

Specifying a particular tool via `{"type":

"function", "function": {"name": "my_function"}}` forces the model to call that tool. Specify either `tool_choice_option` to allow the model to pick or `tool_choice` to force the model to call a tool.
publict_text_chat_tool_function (structured type)

The named function.

publict_text_chat_usage (structured type)

Usage statistics for the completion request.

publict_text_chat_user_content (structured type)

The base definition of a text chat user content.

publict_text_chat_user_contents type JSONOBJECT No documentation available.
publict_text_chat_user_image_url (structured type)

The definition of a user image content.

publict_text_chat_user_text_content (structured type)

The definition of a user text content.

publict_text_chat_user_video_url (structured type)

The definition of a user video content.

publict_text_chat_usr_img_urlcontent (structured type)

The definition of a user image content.

publict_text_detection_content_item (structured type)

The text that was detected.

publict_text_detection_context_item (structured type)

Detection evidence.

publict_text_detection_evidence_ref (structured type)

Detection evidence.

publict_text_detection_score type FLOAT

The threshold probability that this is a real match.

publict_text_extraction_data_ref (structured type)

A reference to data.

publict_text_extraction_entity (structured type)

The document details for the text extraction.

publict_text_extraction_metadata (structured type)

Common metadata for a resource where `project_id` or

`space_id` must be present.
publict_text_extraction_request (structured type)

The properties that are part of a request that supports

spaces and projects. Either `space_id` or `project_id` has to be provided and is mandatory.
publict_text_extraction_resource (structured type)

The text extraction resource.

publict_text_extraction_resources (structured type)

A paginated list of resources.

publict_text_extraction_response (structured type)

The text extraction response.

publict_text_extraction_resrc_entity (structured type)

The document details for the text extraction.

publict_text_extraction_results (structured type)

The current status of the text extraction.

publict_text_extraction_steps (structured type)

The steps for the text extraction pipeline.



Use `parameters` instead.
publict_text_extraction_step_ocr (structured type)

The OCR text extraction step.

publict_text_gen_common (structured type)

A prompt to be used to infer the next tokens. Each request

expects a `project_id` or a `space_id`, and the `project` or `space` must have an associated WML instance that will be used for limits and billing (if a paid plan).
publict_text_gen_length_penalty (structured type)

It can be used to exponentially increase the likelihood of

the text generation terminating once a specified number of tokens have been generated.
publict_text_gen_parameters (structured type)

Properties that control the model and response.

publict_text_gen_parameters2 (structured type)

Properties that control the model and response that are only

supported in caikit.
publict_text_gen_request (structured type)

A prompt to be used to infer the next tokens. Each request

expects a `project_id` or a `space_id`, and the `project` or `space` must have an associated WML instance that will be used for limits and billing (if a paid plan).
publict_text_gen_response (structured type)

System details.

publict_text_gen_response_fields (structured type)

The tokens that are inferred from the prompt.



Note that the events are different between a request with moderation and a request without moderations. A request with moderation will have events that are on a sentence level and a request without moderations will have events that are on a token level.
publict_text_gen_resp_fld_res_item (structured type) No documentation available.
publict_text_gen_result (structured type) No documentation available.
publict_text_gen_result_fields (structured type) No documentation available.
publict_text_gen_stop_reason type STRING

The reason why the call stopped, can be one of:


- not_finished - Possibly more tokens to be streamed.
- max_tokens - Maximum requested tokens reached.
- eos_token - End of sequence token encountered.
- cancelled - Request canceled by the client.
- time_limit - Time limit reached.
- stop_sequence - Stop sequence encountered.
- token_limit - Token limit reached.
- error - Error encountered.

Note that these values will be lower-cased so test for values case insensitive.
publict_text_gen_stream_response TYPE STANDARD TABLE OF T_TEXT_GEN_RESPONSE WITH NON-UNIQUE DEFAULT KEY

A set of server sent events, each event contains a response

for one or more tokens. The results will be an array of events of the form `data: {<json event>}` where the schema of the individual `json event` is described below.
publict_text_gen_token_info (structured type)

The generated token.

publict_text_gen_top_token_info (structured type)

The top tokens.

publict_text_input type STRING

The text input to the model.

publict_text_moderation (structured type)

Properties that control the moderation on the text.

publict_text_tokenize_parameters (structured type)

The parameters for text tokenization.

publict_text_tokenize_request (structured type)

The input string to tokenize along with the associated model

id and any parameters. One of `space_id` or `project_id` must be provided.
publict_text_tokenize_response (structured type)

The tokenization result.

publict_text_tokenize_result (structured type)

The result of tokenizing the input string.

publict_tooling type JSONOBJECT

User defined properties specified as key-value pairs, which

is propagated to the deployment.
publict_tool_config type JSONOBJECT

Optional configuration options that can be passed for some

tools. This must match the config schema for that tool.
publict_training_accumulated_steps (structured type)

Number of steps to be used for gradient accumulation.

Gradient accumulation refers to a method of collecting gradient for configured number of steps instead of updating the model variables at every step and then applying the update to model variables. This can be used as a tool to overcome smaller batch size limitation. Often also referred in conjunction with "effective batch size".
publict_training_batch_size (structured type)

The batch size is a number of samples processed before the

model is updated.
publict_training_init_method (structured type)

Initialization methods for a training.

publict_training_init_text (structured type)

Initialization text to be used if init_method is set to

`text`, otherwise this will be ignored.
publict_training_learning_rate (structured type)

Learning rate to be used for training.

publict_training_max_input_tokens (structured type)

Maximum length of input tokens being considered.

publict_training_max_output_tokens (structured type)

Maximum length of output tokens being predicted.

publict_training_metric (structured type)

A metric.

publict_training_metrics TYPE STANDARD TABLE OF T_TRAINING_METRIC WITH NON-UNIQUE DEFAULT KEY

Metrics that can be returned by an operation.

publict_training_mlmetrics type MAP

The metrics.

publict_training_num_epochs (structured type)

The number of epochs is the number of complete passes

through the training dataset. The quality depends on the number of epochs.
publict_training_num_virtual_tokens (structured type)

Number of virtual tokens to be used for training. In prompt

tuning we are essentially learning the embedded representations for soft prompts, which are known as virtual tokens, via back propagation for a specific task(s) while keeping the rest of the model fixed. `num_virtual_tokens` is the number of dimensions for these virtual tokens.
publict_training_parameters (structured type)

Training parameters for a given model.

publict_training_resource (structured type)

Training resource.

publict_training_resource_collection (structured type)

Information for paging when querying resources.

publict_training_resource_details (structured type)

The training details required when creating the job.

publict_training_resource_entity (structured type)

Status of the training job.

publict_training_resource_prototype (structured type)

The `training_data_references` contain the training datasets

and the
`results_reference` the connection where results will be stored.
publict_training_status (structured type)

Status of the training job.

publict_training_status_output (structured type)

Status of the training job.

publict_training_torch_dtype (structured type)

Datatype to use for training of the underlying text

generation model. If no value is provided, we pull from torch_dtype in config. If an in memory resource is provided which does not match the specified data type, the model underpinning the resource will be converted in place to the correct torch dtype.
publict_training_verbalizer (structured type)

Verbalizer template to be used for formatting data at train

and inference time. This template may use brackets to indicate where fields from the data model TrainGenerationRecord must be rendered.
publict_train_resource_entity_common (structured type) No documentation available.
publict_train_resrc_collection_sys (structured type)

Optional details coming from the service and related to the

API call or the associated resource.
publict_train_resrc_model_id_output (structured type) No documentation available.
publict_tsforecast_input_schema (structured type)

Contains metadata about your timeseries data input.

publict_tsforecast_parameters (structured type)

The parameters for the forecast request.

publict_tsforecast_request (structured type)

Input necessary for performing inference. These inputs

identify things like which model to use, the data payload you are passing to the model, and other parameters which affect the behavior of the inference operation.
publict_tsforecast_resource (structured type)

Input necessary for performing inference. These inputs

identify things like which model to use, the data payload you are passing to the model, and other parameters which affect the behavior of the inference operation.
publict_tsforecast_response (structured type)

The time series forecast response.

publict_tsforecast_results type JSONOBJECT

Prediction results.

publict_txt_cht_msg_txt_chat_msg_sys (structured type)

The definition of a system message.

publict_txt_cht_msg_txt_chat_msg_usr (structured type)

The definition of a user message.

publict_txt_cht_msg_txt_cht_msg_ass1 (structured type)

The definition of an assistant message.

publict_txt_cht_msg_txt_cht_msg_cnt1 (structured type)

The definition of a control message.

publict_txt_cht_msg_txt_cht_msg_tool (structured type)

The definition of a tool message.

publict_txt_cht_usr_cntnts_txt_cht_1 (structured type)

The definition of a user text content.

publict_txt_cht_usr_cntnts_txt_cht_2 (structured type)

The definition of a user image content.

publict_txt_cht_usr_cntnts_txt_cht_3 (structured type)

The definition of a user video content.

publict_txt_cht_usr_video_urlcontent (structured type)

The definition of a user video content.

publict_txt_detection_child_evidence (structured type)

Child evidence.

publict_txt_detection_detection_item (structured type)

Detection details.

publict_txt_dtctn_context_position (structured type)

The text that was detected.

publict_txt_dtctn_evidence_object (structured type)

The details for a given evidence.

publict_txt_extraction_languages_lst type TT_STRING

Set of languages to be expected in the document. The

language codes follow `ISO 639`. See the documentation for the currently supported languages.
publict_txt_extraction_step_tab_proc (structured type)

The tables processing text extraction step.

publict_txt_mdrtn_without_threshold (structured type)

Properties that control the moderation on the text.

publict_utility_agent_tool (structured type) No documentation available.
publict_util_agnt_tl_strctrd_input (structured type) No documentation available.
publict_util_agnt_tl_unstrctrd_input (structured type) No documentation available.
publict_warning (structured type)

A warning message.

publict_wx_prmpt_sssn_entry_lst_res1 (structured type) No documentation available.
publict_wx_prompt_input_request (structured type) No documentation available.
publict_wx_prompt_patch (structured type) No documentation available.
publict_wx_prompt_patch_model_ver (structured type) No documentation available.
publict_wx_prompt_post (structured type) No documentation available.
publict_wx_prompt_post_model_version (structured type) No documentation available.
publict_wx_prompt_response (structured type) No documentation available.
publict_wx_prompt_resp_model_version (structured type) No documentation available.
publict_wx_prompt_session (structured type) No documentation available.
publict_wx_prompt_session_entry (structured type) No documentation available.
publict_wx_prompt_session_entry_list (structured type) No documentation available.
publict_wx_util_agent_tools_response (structured type) No documentation available.
publict_wx_util_agent_tools_run_req type JSONOBJECT No documentation available.
publict_wx_util_agent_tools_run_resp (structured type) No documentation available.
publict_wx_util_agnt_tls_rn_req_uti1 (structured type) No documentation available.
publict_wx_util_agnt_tls_rn_req_uti2 (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
ai_services_create
importingi_aiservicerequesttype T_AISERVICE_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AISERVICE_RESOURCE
raisingzcx_ibmx_service_exception

Create a new AI service

Create a new AI service with the given payload. A AI service is some code that can be deployed as a deployment.
Parameters
i_aiservicerequest Payload for creating the AI service. Either `space_id` or `project_id` has to be provided and is mandatory.
e_response Service return value of type T_AISERVICE_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
ai_services_create_revision
importingi_idtype STRING
i_rvsnnttyspcprjctrqsttype T_REV_ENTITY_SPC_PROJECT_REQ
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AISERVICE_RESOURCE
raisingzcx_ibmx_service_exception

Create a new AI service revision

Create a new AI service revision.
The current metadata and content for
`id` will be taken and a new revision created.
Either `space_id` or `project_id` has to be provided and is mandatory.
Parameters
i_id AI service identifier.
i_rvsnnttyspcprjctrqst No documentation available.
e_response Service return value of type T_AISERVICE_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
ai_services_delete
importingi_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
raisingzcx_ibmx_service_exception

Delete the AI service

Delete the AI service with the specified identifier. This will delete all revisions of this flow as well. For each revision all attachments will also be deleted.
Parameters
i_id AI service identifier.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
ai_services_download_code
importingi_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_revtype STRING optional
i_accepttype STRING default 'application/zip'
exportinge_responsetype FILE
raisingzcx_ibmx_service_exception

Download the AI service code

Download the AI service code.
It is possible to download the `code` for a given revision of the `flow`.
AI services expect a zip file that contains the code files that make up the flow.
Parameters
i_id AI service identifier.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_rev The revision number of the resource.
e_response Service return value of type FILE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
ai_services_get
importingi_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_revtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AISERVICE_RESOURCE
raisingzcx_ibmx_service_exception

Retrieve the AI service

Retrieve the AI service with the specified identifier. If `rev` query parameter is provided,
`rev=latest` will fetch the latest revision. A call with `rev={revision_number}` will fetch the given revision_number record. Either `space_id` or `project_id` has to be provided and is mandatory.
Parameters
i_id AI service identifier.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_rev The revision number of the resource.
e_response Service return value of type T_AISERVICE_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
ai_services_list
importingi_space_idtype STRING optional
i_project_idtype STRING optional
i_starttype STRING optional
i_limittype INTEGER default 100
i_tag_valuetype STRING optional
i_searchtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AISERVICE_RESOURCES
raisingzcx_ibmx_service_exception

Retrieve the AI services

Retrieve the AI services for the specified space or project.
Parameters
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_start Token required for token-based pagination. This token cannot be determined by end user. It is generated by the service and it is set in the href available in the `next` field.
i_limit How many resources should be returned. By default limit is 100. Max limit allowed is 200.
i_tag_value Return only the resources with the given tag values, separated by `or` or `and` to support multiple tags.
i_search Returns only resources that match this search string. The path to the field must be the complete path to the field, and this field must be one of the indexed fields for this resource type. Note that the search string must be URL encoded.
e_response Service return value of type T_AISERVICE_RESOURCES
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
ai_services_list_revisions
importingi_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_starttype STRING optional
i_limittype INTEGER default 100
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AISERVICE_RESOURCES
raisingzcx_ibmx_service_exception

Retrieve the AI service revisions

Retrieve the AI service revisions.
Parameters
i_id AI service identifier.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_start Token required for token-based pagination. This token cannot be determined by end user. It is generated by the service and it is set in the href available in the `next` field.
i_limit How many resources should be returned. By default limit is 100. Max limit allowed is 200.
e_response Service return value of type T_AISERVICE_RESOURCES
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
ai_services_update
importingi_idtype STRING
i_json_patchtype TT_JSON_PATCH_OPERATION
i_space_idtype STRING optional
i_project_idtype STRING optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AISERVICE_RESOURCE
raisingzcx_ibmx_service_exception

Update the AI service

Update the AI service with the provided patch data.
The following fields can be patched:
- `/tags`
- `/name`
- `/description`
- `/custom`
Parameters
i_id AI service identifier.
i_json_patch Input For Patch. This is the patch body which corresponds to the JavaScript Object Notation (JSON) Patch standard (RFC 6902).
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
e_response Service return value of type T_AISERVICE_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
ai_services_upload_code
importingi_idtype STRING
i_upload_codetype FILE
i_space_idtype STRING optional
i_project_idtype STRING optional
i_contenttypetype STRING default 'application/gzip'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AISERVICE_CONTENT_METADATA
raisingzcx_ibmx_service_exception

Upload the AI service code

Upload the flow code. AI services expect a zip file that contains the code files that make up the flow.
Parameters
i_id AI service identifier.
i_upload_code A gzip file containing code files.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
e_response Service return value of type T_AISERVICE_CONTENT_METADATA
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
create_autoai_rags
importingi_autoairagrequesttype T_AUTO_AIRAGREQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AUTO_AIRAGRESPONSE
raisingzcx_ibmx_service_exception

Create a new AutoAI RAG run

Create a new AutoAI RAG that will find the best RAG pattern from the data that is provided in the request.
Parameters
i_autoairagrequest The details of the AutoAI RAG run with the data used to find the best RAG patterns.
e_response Service return value of type T_AUTO_AIRAGRESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
create_deployment
importingi_deploymentresourceprototypetype T_DEPLOYMENT_RESRC_PROTOTYPE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DEPLOYMENT_RESOURCE
raisingzcx_ibmx_service_exception

Create a new watsonx.ai deployment

Create a new deployment, currently the only supported type is `online`.

If this is a deployment for a prompt tune then the `asset` object must exist
and the `id` must be the `id` of the `model` that was created after the
prompt training.

If this is a deployment for a prompt template then the `prompt_template`
object should
exist and the `id` must be the `id` of the prompt template to be deployed.
Parameters
i_deploymentresourceprototype The deployment request entity.

The following important fields are described for each use case: 1. Prompt template:
- `base_model_id`: **required**
- `promt_template.id`: **required**
- `online`: **required**
- `hardware_spec`: **forbidden**
- `hardware_request`: **forbidden**
- response `deployed_asset_type`: `foundation_model` 1. Prompt tune:
- `asset.id`: **required**
- `online`: **required**
- `hardware_spec`: **forbidden**
- `hardware_request`: **forbidden**
- `base_model_id`: **forbidden**
- response `deployed_asset_type`: `prompt_tune` 1. Custom foundation model:
- `asset.id`: **required**
- `online`: **required**
- `online.parameters.foundation_model`: **optional**
- `hardware_spec`: **forbidden**
- `hardware_request`: **required**
- `base_model_id`: **forbidden**
- `base_deployment_id`: **forbidden**
- response `deployed_asset_type`: `custom_foundation_model` 1. Deploy on Demand model:
- `asset.id`: **required**
- `online`: **required**
- `online.parameters.foundation_model`: **forbidden**
- `hardware_spec`: **forbidden**
- `hardware_request`: **forbidden**
- `base_model_id`: **forbidden**
- `base_deployment_id`: **forbidden**
- `space_id`: **required**
- `project_id`: **forbidden**
- response `deployed_asset_type`: `curated_foundation_model`.
e_response Service return value of type T_DEPLOYMENT_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
delete_autoai_rags
importingi_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_hard_deletetype BOOLEAN optional
raisingzcx_ibmx_service_exception

Cancel or delete an AutoAI RAG run

Cancel or delete the specified AutoAI RAG run, once deleted all trace of the run job is gone.
Parameters
i_id The `id` is the identifier that was returned in the `metadata.id` field of the request.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_hard_delete Set to true in order to also delete the job or request metadata.
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
delete_prompt
importingi_project_idtype STRING
i_prompt_idtype STRING
i_space_idtype STRING optional
raisingzcx_ibmx_service_exception

Delete a prompt

This deletes a prompt / prompt template with the given id.
Parameters
i_project_id [REQUIRED] Specifies the project ID as the target. One target must be supplied per request.
i_prompt_id Prompt ID.
i_space_id [REQUIRED] Specifies the space ID as the target. One target must be supplied per request.
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
deployments_delete
importingi_deployment_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
raisingzcx_ibmx_service_exception

Delete the deployment

Delete the deployment with the specified identifier.
Parameters
i_deployment_id The deployment id.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
deployments_get
importingi_deployment_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DEPLOYMENT_RESOURCE
raisingzcx_ibmx_service_exception

Retrieve the deployment details

Retrieve the deployment details with the specified identifier.
Parameters
i_deployment_id The deployment id.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
e_response Service return value of type T_DEPLOYMENT_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
deployments_text_chat
importingi_id_or_nametype STRING
i_bodytype T_DEPLOYMENT_TEXT_CHAT
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TEXT_CHAT_RESPONSE
raisingzcx_ibmx_service_exception

Infer text chat

Infer the next chat message for a given deployment. The deployment must reference a prompt template which has `input_mode` set to `chat`. The model to the chat request will be from the deployment `base_model_id`. Parameters to the chat request will be from the prompt template `model_parameters`. Related guides: [Deployment](https://cloud.ibm.com/apidocs/watsonx-ai#create-deployment), [Prompt template](https://cloud.ibm.com/apidocs/watsonx-ai#post-prompt), [Text chat](https://cloud.ibm.com/apidocs/watsonx-ai#text-chat).

If a `serving_name` is used then it must match the `serving_name` that is returned in the `inference` section when the deployment was created.
Parameters
i_id_or_name The `id_or_name` can be either the `deployment_id` that identifies the deployment or a `serving_name` that allows a predefined URL to be used to post a prediction. The deployment must reference a prompt template with `input_mode` `chat`.

The WML instance that is associated with the deployment will be used for limits and billing (if a paid plan).
i_body From a given prompt, infer the next chat message.
e_response Service return value of type T_TEXT_CHAT_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
deployments_text_chat_stream
importingi_id_or_nametype STRING
i_bodytype T_DEPLOYMENT_TEXT_CHAT
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'text/event-stream'
exportinge_responsetype T_ARRAY
raisingzcx_ibmx_service_exception

Infer text chat event stream

Infer the next chat message for a given deployment. This operation will return the output tokens as a stream of events. The deployment must reference a prompt template which has `input_mode` set to `chat`. The model to the chat request will be from the deployment `base_model_id`. Parameters to the chat request will be from the prompt template `model_parameters`. Related guides: [Deployment](https://cloud.ibm.com/apidocs/watsonx-ai#create-deployment), [Prompt template](https://cloud.ibm.com/apidocs/watsonx-ai#post-prompt), [Text chat](https://cloud.ibm.com/apidocs/watsonx-ai#text-chat).

If a `serving_name` is used then it must match the `serving_name` that is returned in the `inference` section when the deployment was created.
Parameters
i_id_or_name The `id_or_name` can be either the `deployment_id` that identifies the deployment or a `serving_name` that allows a predefined URL to be used to post a prediction. The deployment must reference a prompt template with `input_mode` `chat`.

The WML instance that is associated with the deployment will be used for limits and billing (if a paid plan).
i_body From a given prompt, infer the next chat message in a server-sent events (SSE) stream.
e_response Service return value of type T_Array
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
deployments_text_generation
importingi_id_or_nametype STRING
i_bodytype T_DEPLOYMENT_TEXT_GEN
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TEXT_GEN_RESPONSE
raisingzcx_ibmx_service_exception

Infer text

Infer the next tokens for a given deployed model with a set of parameters.
If a `serving_name` is used then it must match the `serving_name` that is returned in the `inference` section when the deployment was created.

### Return options

Note that there is currently a limitation in this operation when using `return_options`,
for input only `input_text` will be returned if requested,
for output the `input_tokens` and `generated_tokens` will not be returned.
Parameters
i_id_or_name The `id_or_name` can be either the `deployment_id` that identifies the deployment or a `serving_name` that allows a predefined URL to be used to post a prediction.

The WML instance that is associated with the deployment will be used for limits and billing (if a paid plan).
i_body From a given prompt, infer the next tokens.
e_response Service return value of type T_TEXT_GEN_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
deployments_text_gen_stream
importingi_id_or_nametype STRING
i_bodytype T_DEPLOYMENT_TEXT_GEN
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'text/event-stream'
exportinge_responsetype T_ARRAY
raisingzcx_ibmx_service_exception

Infer text event stream

Infer the next tokens for a given deployed model with a set of parameters.
This operation will return the output tokens as a stream of events.
If a `serving_name` is used then it must match the `serving_name` that is returned in the `inference` section when the deployment was created.

### Return options

Note that there is currently a limitation in this operation when using `return_options`,
for input only `input_text` will be returned if requested,
for output the `input_tokens` and `generated_tokens` will not be returned, also the
`rank` and `top_tokens` will not be returned.
Parameters
i_id_or_name The `id_or_name` can be either the `deployment_id` that identifies the deployment or a `serving_name` that allows a predefined URL to be used to post a prediction.

The WML instance that is associated with the deployment will be used for limits and billing (if a paid plan).
i_body From a given prompt, infer the next tokens in a server-sent events (SSE) stream.
e_response Service return value of type T_Array
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
deployments_update
importingi_deployment_idtype STRING
i_json_patchtype TT_JSON_PATCH_OPERATION
i_space_idtype STRING optional
i_project_idtype STRING optional
i_contenttypetype STRING default 'application/json-patch+json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DEPLOYMENT_RESOURCE
raisingzcx_ibmx_service_exception

Update the deployment metadata

Update the deployment metadata.
The following parameters of deployment metadata are supported for the patch operation.

- `/name`
- `/description`
- `/tags`
- `/custom`
- `/online/parameters`
- `/asset` - `replace` only
- `/prompt_template` - `replace` only
- `/hardware_spec`
- `/hardware_request`
- `/base_model_id` - `replace` only (applicable only to prompt template deployments referring to IBM base foundation models)

The PATCH operation with path specified as `/online/parameters` can be used to update the `serving_name`.
Parameters
i_deployment_id The deployment id.
i_json_patch The json patch.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
e_response Service return value of type T_DEPLOYMENT_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instanceget_appname redefinition 
public instance
get_autoai_rags
importingi_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AUTO_AIRAGRESPONSE
raisingzcx_ibmx_service_exception

Get an AutoAI RAG run

Get the results of an AutoAI RAG run, or details if the job failed.
Parameters
i_id The `id` is the identifier that was returned in the `metadata.id` field of the request.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
e_response Service return value of type T_AUTO_AIRAGRESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
get_prompt
importingi_project_idtype STRING
i_prompt_idtype STRING
i_space_idtype STRING optional
i_restrict_model_parameterstype STRING default 'true'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WX_PROMPT_RESPONSE
raisingzcx_ibmx_service_exception

Get a prompt

This retrieves a prompt / prompt template with the given id.
Parameters
i_project_id [REQUIRED] Specifies the project ID as the target. One target must be supplied per request.
i_prompt_id Prompt ID.
i_space_id [REQUIRED] Specifies the space ID as the target. One target must be supplied per request.
i_restrict_model_parameters Only return a set of model parameters compatiable with inferencing.
e_response Service return value of type T_WX_PROMPT_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
get_prompt_input
importingi_prompt_idtype STRING
i_project_idtype STRING
i_wxpromptinputrequesttype T_WX_PROMPT_INPUT_REQUEST optional
i_space_idtype STRING optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_GET_PROMPT_INPUT_RESPONSE
raisingzcx_ibmx_service_exception

Get the inference input string for a given prompt

Computes the inference input string based on state of a prompt. Optionally replaces template params
Parameters
i_prompt_id Prompt ID.
i_project_id [REQUIRED] Specifies the project ID as the target. One target must be supplied per request.
i_wxpromptinputrequest No documentation available.
i_space_id [REQUIRED] Specifies the space ID as the target. One target must be supplied per request.
e_response Service return value of type T_GET_PROMPT_INPUT_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
get_prompt_lock
importingi_prompt_idtype STRING
i_project_idtype STRING
i_space_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_PROMPT_LOCK
raisingzcx_ibmx_service_exception

Get current prompt lock status

Retrieves the current locked state of a prompt.
Parameters
i_prompt_id Prompt ID.
i_project_id [REQUIRED] Specifies the project ID as the target. One target must be supplied per request.
i_space_id [REQUIRED] Specifies the space ID as the target. One target must be supplied per request.
e_response Service return value of type T_PROMPT_LOCK
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
list_autoai_rags
importingi_space_idtype STRING optional
i_project_idtype STRING optional
i_starttype STRING optional
i_limittype INTEGER default 100
i_accepttype STRING default 'application/json'
exportinge_responsetype T_AUTO_RAGRESULT_RESOURCES
raisingzcx_ibmx_service_exception

Retrieve the AutoAI RAG runs

Retrieve the list of AutoAI RAG requests for the specified space or project.

This operation does not save the history, any requests that were deleted or purged
will not appear in this list.
Parameters
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_start Token required for token-based pagination. This token cannot be determined by end user. It is generated by the service and it is set in the href available in the `next` field.
i_limit How many resources should be returned. By default limit is 100. Max limit allowed is 200.
e_response Service return value of type T_AUTO_RAGRESULT_RESOURCES
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
list_deployments
importingi_space_idtype STRING optional
i_project_idtype STRING optional
i_serving_nametype STRING optional
i_tag_valuetype STRING optional
i_asset_idtype STRING optional
i_prompt_template_idtype STRING optional
i_nametype STRING optional
i_typetype STRING optional
i_statetype STRING optional
i_conflicttype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DEPLOYMENT_RESRC_COLLECTION
raisingzcx_ibmx_service_exception

Retrieve the deployments

Retrieve the list of deployments for the specified space or project.
Parameters
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_serving_name Retrieves the deployment, if any, that contains this `serving_name`.
i_tag_value Retrieves only the resources with the given tag value.
i_asset_id Retrieves only the resources with the given asset_id, asset_id would be the model id.
i_prompt_template_id Retrieves only the resources with the given prompt_template_id.
i_name Retrieves only the resources with the given name.
i_type Retrieves the resources filtered with the given type. There are the deployment types as well as an additional
`prompt_template` if the deployment type includes a prompt template.

The supported deployment types are (see the description for `deployed_asset_type` in the deployment entity):

1. `prompt_tune` - when a prompt tuned model is deployed. 2. `foundation_model` - when a prompt template is used on a pre-deployed IBM provided model. 3. `custom_foundation_model` - when a custom foundation model is deployed.

These can be combined with the flag `prompt_template` like this:

1. `type=prompt_tune` - return all prompt tuned model deployments. 2. `type=prompt_tune and prompt_template` - return all prompt tuned model deployments with a prompt template. 3. `type=foundation_model` - return all prompt template deployments. 4. `type=foundation_model and prompt_template` - return all prompt template deployments - this is the same as the previous query because a `foundation_model` can only exist with a prompt template. 5. `type=prompt_template` - return all deployments with a prompt template.
i_state Retrieves the resources filtered by state. Allowed values are `initializing`, `updating`, `ready` and `failed`.
i_conflict Returns whether `serving_name` is available for use or not. This query parameter cannot be combined with any other parameter except for `serving_name`.
e_response Service return value of type T_DEPLOYMENT_RESRC_COLLECTION
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
list_foundation_model_specs
importingi_starttype STRING optional
i_limittype INTEGER default 100
i_filterstype STRING optional
i_tech_previewtype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_FOUNDATION_MODELS
raisingzcx_ibmx_service_exception

List the available foundation models

Retrieve the list of deployed foundation models.
Parameters
i_start Token required for token-based pagination. This token cannot be determined by end user. It is generated by the service and it is set in the href available in the `next` field.
i_limit How many resources should be returned. By default limit is 100. Max limit allowed is 200.
i_filters A set of filters to specify the list of models, filters are described as the `pattern` shown below.
```text
pattern: tfilter[,tfilter][:(or|and)]
tfilter: filter | !filter
filter: Requires existence of the filter.
!filter: Requires absence of the filter.
filter: one of
modelid_*: Filters by model id.
Namely, select a model with a specific model id.
provider_*: Filters by provider.
Namely, select all models with a specific provider.
source_*: Filters by source.
Namely, select all models with a specific source.
input_tier_*: Filters by input tier.
Namely, select all models with a specific input tier.
output_tier_*: Filters by output tier.
Namely, select all models with a specific output tier.
tier_*: Filters by tier.
Namely, select all models with a specific input or output tier.
task_*: Filters by task id.
Namely, select all models that support a specific task id.
lifecycle_*: Filters by lifecycle state.
Namely, select all models that are currently in the specified lifecycle state.
function_*: Filters by function.
Namely, select all models that support a specific function.
```.
i_tech_preview See all the `Tech Preview` models if entitled.
e_response Service return value of type T_FOUNDATION_MODELS
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
list_foundation_model_tasks
importingi_starttype STRING optional
i_limittype INTEGER default 100
i_accepttype STRING default 'application/json'
exportinge_responsetype T_FOUNDATION_MODEL_TASKS
raisingzcx_ibmx_service_exception

List the supported tasks

Retrieve the list of tasks that are supported by the foundation models.
Parameters
i_start Token required for token-based pagination. This token cannot be determined by end user. It is generated by the service and it is set in the href available in the `next` field.
i_limit How many resources should be returned. By default limit is 100. Max limit allowed is 200.
e_response Service return value of type T_FOUNDATION_MODEL_TASKS
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
list_text_extractions
importingi_space_idtype STRING optional
i_project_idtype STRING optional
i_starttype STRING optional
i_limittype INTEGER default 100
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TEXT_EXTRACTION_RESOURCES
raisingzcx_ibmx_service_exception

Retrieve the text extraction requests

Retrieve the list of text extraction requests for the specified space or project.

This operation does not save the history, any requests that were deleted or purged
will not appear in this list.
Parameters
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_start Token required for token-based pagination. This token cannot be determined by end user. It is generated by the service and it is set in the href available in the `next` field.
i_limit How many resources should be returned. By default limit is 100. Max limit allowed is 200.
e_response Service return value of type T_TEXT_EXTRACTION_RESOURCES
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
patch_prompt
importingi_project_idtype STRING
i_prompt_idtype STRING
i_wxpromptpatchtype T_WX_PROMPT_PATCH
i_space_idtype STRING optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WX_PROMPT_RESPONSE
raisingzcx_ibmx_service_exception

Update a prompt

This updates a prompt / prompt template with the given id.
Parameters
i_project_id [REQUIRED] Specifies the project ID as the target. One target must be supplied per request.
i_prompt_id Prompt ID.
i_wxpromptpatch No documentation available.
i_space_id [REQUIRED] Specifies the space ID as the target. One target must be supplied per request.
e_response Service return value of type T_WX_PROMPT_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
post_prompt
importingi_project_idtype STRING
i_wxpromptposttype T_WX_PROMPT_POST
i_space_idtype STRING optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WX_PROMPT_RESPONSE
raisingzcx_ibmx_service_exception

Create a new prompt / prompt template

This creates a new prompt with the provided parameters.
Parameters
i_project_id [REQUIRED] Specifies the project ID as the target. One target must be supplied per request.
i_wxpromptpost No documentation available.
i_space_id [REQUIRED] Specifies the space ID as the target. One target must be supplied per request.
e_response Service return value of type T_WX_PROMPT_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
put_prompt_lock
importingi_prompt_idtype STRING
i_project_idtype STRING
i_promptlocktype T_PROMPT_LOCK
i_space_idtype STRING optional
i_forcetype BOOLEAN optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_PROMPT_LOCK
raisingzcx_ibmx_service_exception

Prompt lock modifications

Modifies the current locked state of a prompt.
Parameters
i_prompt_id Prompt ID.
i_project_id [REQUIRED] Specifies the project ID as the target. One target must be supplied per request.
i_promptlock No documentation available.
i_space_id [REQUIRED] Specifies the space ID as the target. One target must be supplied per request.
i_force Override a lock if it is currently taken.
e_response Service return value of type T_PROMPT_LOCK
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_chat
importingi_textchatrequesttype T_TEXT_CHAT_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TEXT_CHAT_RESPONSE
raisingzcx_ibmx_service_exception

Infer text

Infer the next tokens for a given deployed model with a set of parameters.
Parameters
i_textchatrequest From a given prompt, infer the next tokens.
e_response Service return value of type T_TEXT_CHAT_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_chat_stream
importingi_textchatrequesttype T_TEXT_CHAT_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'text/event-stream'
exportinge_responsetype T_ARRAY
raisingzcx_ibmx_service_exception

Infer text event stream

Infer the next tokens for a given deployed model with a set of parameters.
This operation will return the output tokens as a stream of events.
Parameters
i_textchatrequest From a given prompt, infer the next tokens in a server-sent events (SSE) stream.
e_response Service return value of type T_Array
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_embeddings
importingi_embeddingsrequesttype T_EMBEDDINGS_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EMBEDDINGS_RESPONSE
raisingzcx_ibmx_service_exception

Generate embeddings

Generate embeddings from text input.

See the [documentation](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-dat a/fm-embed-overview.html?context=wx&audience=wdp)
for a description of text embeddings.
Parameters
i_embeddingsrequest The text input for a given model to be used to generate the embeddings.
e_response Service return value of type T_EMBEDDINGS_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_extraction
importingi_textextractionrequesttype T_TEXT_EXTRACTION_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TEXT_EXTRACTION_RESPONSE
raisingzcx_ibmx_service_exception

Start a text extraction request

Start a request to extract text and metadata from documents.

See the [documentation](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-dat a/fm-api-text-extraction.html?context=wx&audience=wdp) for a description of text extraction.
Parameters
i_textextractionrequest The input for the text extraction request.
e_response Service return value of type T_TEXT_EXTRACTION_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_extraction_delete
importingi_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_hard_deletetype BOOLEAN optional
raisingzcx_ibmx_service_exception

Delete the request

Cancel the specified text extraction request and delete any associated results.
Parameters
i_id The identifier of the extraction request.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_hard_delete Set to true in order to also delete the job or request metadata.
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_extraction_get
importingi_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TEXT_EXTRACTION_RESPONSE
raisingzcx_ibmx_service_exception

Get the results of the request

Retrieve the text extraction request with the specified identifier.

Note that there is a retention period of 2 days. If this retention
period is exceeded then the request will be deleted and the results
no longer available. In this case this operation will return `404`.
Parameters
i_id The identifier of the extraction request.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
e_response Service return value of type T_TEXT_EXTRACTION_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_generation
importingi_textgenrequesttype T_TEXT_GEN_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TEXT_GEN_RESPONSE
raisingzcx_ibmx_service_exception

Infer text

Infer the next tokens for a given deployed model with a set of parameters.
Parameters
i_textgenrequest From a given prompt, infer the next tokens.
e_response Service return value of type T_TEXT_GEN_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_generation_stream
importingi_textgenrequesttype T_TEXT_GEN_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'text/event-stream'
exportinge_responsetype T_ARRAY
raisingzcx_ibmx_service_exception

Infer text event stream

Infer the next tokens for a given deployed model with a set of parameters.
This operation will return the output tokens as a stream of events.
Parameters
i_textgenrequest From a given prompt, infer the next tokens in a server-sent events (SSE) stream.
e_response Service return value of type T_Array
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_rerank
importingi_rerankrequesttype T_RERANK_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_RERANK_RESPONSE
raisingzcx_ibmx_service_exception

Generate rerank

Rerank texts based on some queries.
Parameters
i_rerankrequest The input texts and the queries for reranking.
e_response Service return value of type T_RERANK_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
text_tokenization
importingi_texttokenizerequesttype T_TEXT_TOKENIZE_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TEXT_TOKENIZE_RESPONSE
raisingzcx_ibmx_service_exception

Text tokenization

The text tokenize operation allows you to check the conversion of provided input to tokens for a given model.
It splits text into words or sub-words, which then are converted to ids through a look-up table (vocabulary).
Tokenization allows the model to have a reasonable vocabulary size.
Parameters
i_texttokenizerequest The input string to tokenize.
e_response Service return value of type T_TEXT_TOKENIZE_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
time_series_forecast
importingi_tsforecastrequesttype T_TSFORECAST_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TSFORECAST_RESPONSE
raisingzcx_ibmx_service_exception

Time series forecast

Generate forecasts, or predictions for future time points, given historical time series data.
Parameters
i_tsforecastrequest The forecast request.
e_response Service return value of type T_TSFORECAST_RESPONSE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
trainings_create
importingi_trainingresourceprototypetype T_TRAINING_RESOURCE_PROTOTYPE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRAINING_RESOURCE
raisingzcx_ibmx_service_exception

Create a new watsonx.ai training

Create a new watsonx.ai training in a project or a space.

The details of the base model and parameters for the training
must be provided in the `prompt_tuning` object.


In order to deploy the tuned model you need to follow the following steps:

1. Create a WML model asset, in a space or a project,
by providing the `request.json` as shown below:
```
curl -X POST "https://{cpd_cluster}/ml/v4/models?version=2024-01-29" \
-H "Authorization: Bearer <replace with your token>" \
-H "content-type: application/json" \
--data '{
"name": "replace_with_a_meaningful_name",
"space_id": "replace_with_your_space_id",
"type": "prompt_tune_1.0",
"software_spec": {
"name": "watsonx-textgen-fm-1.0"
},
"metrics": [ from the training job ],
"training": {
"id": "05859469-b25b-420e-aefe-4a5cb6b595eb",
"base_model": {
"model_id": "google/flan-t5-xl"
},
"task_id": "generation",
"verbalizer": "Input: {{input}} Output:"
},
"training_data_references": [
{
"connection": {
"id": "20933468-7e8a-4706-bc90-f0a09332b263"
},
"id": "file_to_tune1.json",
"location": {
"bucket": "wxproject-donotdelete-pr-xeyivy0rx3vrbl",
"path": "file_to_tune1.json"
},
"type": "connection_asset"
}
]
}'
```


**Notes:**

1. If you used the training request field `auto_update_model: true`
then you can skip this step as the model will have been saved at
the end of the training job.
1. Rather than creating the payload for the model you can use the
generated `request.json` that was stored in the `results_reference`
field, look for the path in the field
`entity.results_reference.location.model_request_path`.
1. The model `type` must be `prompt_tune_1.0`.
1. The software spec name must be `watsonx-textgen-fm-1.0`.

1. Create a tuned model deployment as described in the
[create deployment documentation](#create-deployment).
Parameters
i_trainingresourceprototype No documentation available.
e_response Service return value of type T_TRAINING_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
trainings_delete
importingi_training_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_hard_deletetype BOOLEAN optional
raisingzcx_ibmx_service_exception

Cancel or delete the training

Cancel or delete the specified training, once deleted all trace of the job is gone.
Parameters
i_training_id The training identifier.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_hard_delete Set to true in order to also delete the job or request metadata.
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
trainings_get
importingi_training_idtype STRING
i_space_idtype STRING optional
i_project_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRAINING_RESOURCE
raisingzcx_ibmx_service_exception

Retrieve the training

Retrieve the training with the specified identifier.
Parameters
i_training_id The training identifier.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
e_response Service return value of type T_TRAINING_RESOURCE
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.
public instance
trainings_list
importingi_starttype STRING optional
i_limittype INTEGER default 100
i_total_counttype BOOLEAN optional
i_tag_valuetype STRING optional
i_statetype STRING optional
i_space_idtype STRING optional
i_project_idtype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRAINING_RESOURCE_COLLECTION
raisingzcx_ibmx_service_exception

Retrieve the list of trainings

Retrieve the list of trainings for the specified space or project.
Parameters
i_start Token required for token-based pagination. This token cannot be determined by end user. It is generated by the service and it is set in the href available in the `next` field.
i_limit How many resources should be returned. By default limit is 100. Max limit allowed is 200.
i_total_count Compute the total count. May have performance impact.
i_tag_value Return only the resources with the given tag value.
i_state Filter based on on the training job state.
i_space_id The space that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
i_project_id The project that contains the resource. Either `space_id` or `project_id` query parameter has to be given.
e_response Service return value of type T_TRAINING_RESOURCE_COLLECTION
Class-based Exceptions
zcx_ibmx_service_exception Exception being raised in case of an error.