vania-janet/multiturn-rag-retrieval-data huggingface dataset:
The service ID creates credentials for a specific IBM Cloud service instance. These service credentials are used by your bound Code Engine apps and jobs to interact with the service instances. The API key for the service ID is stored in the operator secret. The access policies are the permissions that are given to the service ID.

The operator secret or ibmcloud-operator-secret is a Code Engine generated and managed secret that includes the service ID and an autogenerated API key for it. This secret is used with service binding operations and does not act as the current user's account. If the operator secret doesn't exist, it is automatically created when any one of the following scenarios is true.



* When the next service binding is created for the project (from the console or CLI).
* When you configure service binding operations from the Integrations page.
* When you run the project update command.



When service binding operations are configured, the service ID and operator secret apply to your specific project.

You can configure service binding operations and let Code Engine [automatically generate the service ID](https://cloud.ibm.com/docs/codeengine?topic=codeengine-project-integrationsprojectintegration-sb-auto) or you can [configure service bindings with your own custom service ID](https://cloud.ibm.com/docs/codeengine?topic=codeengine-project-integrationsprojectintegration-sb-customserviceid).





 Configuring service bindings operations with a Code Engine autogenerated service ID 

You can configure service binding operations so that all users in the project can create and manage service bindings to IBM Cloud services in the selected resource group from the Code Engine console.



1. Go to the Integrations page.



1. Select your project from the [Projects page in the Code Engine console](https://cloud.ibm.com/codeengine/projects).
2. Click Project settings > Integrations.



2. Click Configure in the Service bindings tile to configure service binding operations for all users of this project.
3.
<br> <br>For more information, see [Retrieving an instance ID](https://cloud.ibm.com/docs/key-protect?topic=key-protect-retrieve-instance-ID). 
 key_ring_ID Optional. The unique identifier of the key ring that the key is a part of. If unspecified, Key Protect will search for the key in every key ring associated with the specified instance. It is recommended to specify the key ring ID for a more optimized request. <br> <br>Note: The key ring ID of keys that are created without an x-kms-key-ring header is: default. <br> <br>For more information, see [Grouping keys](https://cloud.ibm.com/docs/key-protect?topic=key-protect-grouping-keys). 



A successful enable request returns an HTTP 204 No Content response, which indicates that the root key was reinstated for encrypt and decrypt operations.





 Optional: Verify key enablement 

You can verify that a key has been enabled by issuing a get key metadata request:

$ curl -X GET "https://<region>.kms.cloud.ibm.com/api/v2/keys/<keyID_or_alias>/metadata" -H "accept: application/vnd.ibm.kms.key+json" -H "authorization: Bearer <IAM_token>" -H "bluemix-instance: <instance_ID>"

Where the <keyID_or_alias> is the ID or alias of the key, the <instance_ID> is the name of your instance, and your <IAM_token> is your IAM token.

Review the state field in the response body to verify that the root key transitioned to the Active key state. The following JSON output shows the metadata details for an active key.

The integer mapping for the Active key state is 1. Key States are based on NIST SP 800-57.

{
"metadata": {
"collectionType": "application/vnd.ibm.kms.key+json",
"collectionTotal": 1
"created": "2016-06-01T18:42:25.324Z",
"updated": "2020-01-19T11:12:02.296Z",
"language": "en-US",
"versions": [
"en-US_BroadbandModel.v2018-07-31",
"en-US_BroadbandModel.v2020-01-16"
],
"owner": "297cfd08-330a-22ba-93ce-1a73f454dd98",
"name": "Example model one",
"description": "Example custom acoustic model",
"base_model_name": "en-US_BroadbandModel",
"status": "pending",
"progress": 0
}
Show more







 Resetting a custom acoustic model 

Use the POST /v1/acoustic_customizations/{customization_id}/reset method to reset a custom acoustic model. Resetting a custom model removes all of the audio resources from the model, initializing the model to its state at creation. The method does not delete the model itself or metadata such as its name and language. However, when you reset a model, its audio resources are removed and must be re-created.



 Reset a custom acoustic model example 

The following example resets the custom acoustic model with the specified customization ID:

IBM Cloud

curl -X POST -u "apikey:{apikey}" "{url}/v1/acoustic_customizations/{customization_id}/reset"

IBM Cloud Pak for Data

curl -X POST --header "Authorization: Bearer {token}" "{url}/v1/acoustic_customizations/{customization_id}/reset"







 Deleting a custom acoustic model 

Use the DELETE /v1/acoustic_customizations/{customization_id} method to delete a custom acoustic model that you no longer need. The method deletes all audio that is associated with the custom model and the model itself.
"id": "264fadc3-7667-4b25-916e-5825fe70de0b",
"creationDate": "2022-06-09T21:21:55Z"
},
"aliases": [
"example-alias"
],
"keyRingID": "default",
"extractable": false,
"state": 1,
"crn": "crn:v1:bluemix:public:kms:us-south:a/ea998d3389c3473aa0987652b46fb146:390086ac-76fa-4094-8cf3-c0829bd69526:key:b3660416-4186-4587-b528-484886a4731b",
"deleted": false,
"dualAuthDelete": {
"enabled": false
}
}







 Required parameters 



* KEY_NAME

A unique, human-readable identifier to assign to your key.
* -i, --instance-ID

The IBM Cloud instance ID that identifies your Key Protect instance.

You can set an environment variable instead of specifying -i with the following command: $ export KP_INSTANCE_ID=<INSTANCE_ID>.







 Optional parameters 



* -k, --key-material

If you generated a key then this is the base64-encoded key material that you store and manage in the service.

Root keys must be 16, 24, or 32 bytes long; corresponding to 128, 192, or 256 bits. The key must be base64-encoded.

Standard keys can be up to 7,500 bytes in size. The key must be base64-encoded.

If you are creating a key using an import token then this is the encrypted key from the kp import-token key-encrypt process.

To generate a new key, omit the -k, --key-material parameter.
* -n, --encrypted-nonce
Add a word with the PUT method 

The PUT /v1/customizations/{customization_id}/words/{word_name} method adds individual words. You pass a JSON object that provides information about the word as the body of the request.

The following example adds the word NCAA to the model with the specified ID. The required Content-Type header again indicates that JSON data is being passed to the method.

IBM Cloud

curl -X PUT -u "apikey:{apikey}" --header "Content-Type: application/json" --data "{"sounds_like": ["N. C. A. A.", "N. C. double A."]}" "{url}/v1/customizations/{customization_id}/words/NCAA"

IBM Cloud Pak for Data

curl -X PUT --header "Authorization: Bearer {token}" --header "Content-Type: application/json" --data "{"sounds_like": ["N. C. A. A.", "N. C. double A."]}" "{url}/v1/customizations/{customization_id}/words/NCAA"

The PUT method is synchronous. The service returns a response code that reports the success or failure of the request immediately.





 Monitoring the add words request 

When you use the POST /v1/customizations/{customization_id}/words method, the service returns a 201 response code if the input data is valid. It then asynchronously processes the words to add them to the model. You cannot submit requests to add data to the custom model or to train the model until the service completes the request to add new words.

To determine the status of the request, use the GET /v1/customizations/{customization_id} method to poll the model's status. The method accepts the customization ID of the model, as in the following example:

IBM Cloud

curl -X GET -u "apikey:{apikey}" "{url}/v1/customizations/{customization_id}"

IBM Cloud Pak for Data
For more information, see [Retrieving an access token](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-retrieve-access-token). 
 key_ring_ID Optional. The unique identifier of the key ring that the key belongs to. If unspecified, Hyper Protect Crypto Services will search for the key in every key ring that is associated with the specified instance. Therefore, it is suggested to specify the key ring ID for a more optimized request.<br><br>Note: The key ring ID of keys that are created without an x-kms-key-ring header is: default. For more information, see [Managing key rings](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-managing-key-rings). 
 instance_ID Required. The unique identifier that is assigned to your Hyper Protect Crypto Services instance. For more information, see [Retrieving an instance ID](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-retrieve-instance-ID). 



A successful GET api/v2/keys/<key_ID>/versions response returns the list of versions that are associated with the root key. The following JSON object shows an example returned value.

{
"metadata": {
"collectionType": "application/vnd.ibm.kms.key.version+json",
"collectionTotal": 2
},
"resources": [
{
"id": "02fd6835-6001-4482-a892-13bd2085f75d",
"creationDate": "2020-03-05T16:39:25Z"
},
{
"id": "12e8c9c2-a162-472d-b7d6-8b9a86b815a6",
"creationDate": "2020-03-02T16:28:38Z"
}
]
}
The assistant ID can be found in Assistant settings.

In Assistant settings, the assistant ID is in the Assistant IDs and API details section.







 What do the draft and live tags mean? 

A Draft tag indicates that the information is linked to your draft environment, which means that you can preview these updates but they are not visible to your users. A Live tag indicates that the information is linked to your live environment, which means that the content is available to your users to interact with.

For more information, see [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish-overviewenvironments).





 Why can't I log in? 

If you are having trouble logging in to a service instance or see messages about tokens, such as unable to fetch access token or 400 bad request - header or cookie too large, it might mean that you need to clear your browser cache. Open a private browser window, and then try again.



* If accessing the page by using a private browsing window fixes the issue, then consider always using a private window or clear the cache of your browser. You can typically find an option for clearing the cache or deleting cookies in the browser's privacy and security settings.
* If accessing the page by using a private browsing window doesn't fix the issue, then try deleting the API key for the instance and creating a new one.







 Why am I being asked to log in repeatedly? 

If you keep getting messages, such as you are getting redirected to login, it might be due to one of the following things:



* The Lite plan that you were using expired. Lite plans expire if they are not used within a 30-day span. To begin again, log in to IBM Cloud and create a new service instance of Watson Assistant.
* An instance is locked when you exceed the plan limits for the month. To log in successfully, wait until the start of the next month when the plan limit totals are reset.







 Why don't I see the Analytics page? 

To view the Analytics page, you must have a service role of Manager and a platform role of at least Viewer.
ibmcloud analytics-engine-v3 instance home-set [--id ID] [--instance-home-id INSTANCE-HOME-ID] [--endpoint ENDPOINT] [--hmac-access-key HMAC-ACCESS-KEY] [--hmac-secret-key HMAC-SECRET-KEY]



 Command options 

-i, --id (string)
: The ID of the Analytics Engine instance for which 'instance home' is to be set. When specified, it overrides the target instance ID if it was set. Required, if the target instance was not set.

The value must match the regular expression /u0008[0-9a-f]{8}u0008-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-u0008[0-9a-f]{12}u0008/.

--instance-home-id (string)
: UUID of the instance home storage instance.

--endpoint (string)
: Endpoint to access the Cloud Object Storage instance.

The default value is s3.direct.us-south.cloud-object-storage.appdomain.cloud.

--hmac-access-key (string)
: Cloud Object Storage access key. Required.

--hmac-secret-key (string)
: Cloud Object Storage secret key. Required.





 Examples 

ibmcloud analytics-engine-v3 instance home-set --hmac-access-key=8210ae --hmac-secret-key=03e4fc3 --output json
You specify the relative weight for a custom language model as a double between 0.0 to 1.0:



* For custom models that are based on previous-generation models, the default customization weight is 0.3.
* For custom models that are based on most next-generation models, the default customization weight is 0.2.
* For custom models that are based on improved next-generation models, the default customization weight is 0.1.



To identify models that use improved language model customization, look for an (improved) date in the Language model customization column of table 2 in [Customization support for next-generation models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-supportcustom-language-support-ng). Make sure to check for a date for the version of the service that you use, IBM Cloud or IBM Cloud Pak for Data.

The default weight yields the best performance in the general case. It allows both words from the custom model and words from the base vocabulary to be recognized.

However, in cases where the audio to be transcribed makes frequent use of words from the custom model, increasing the customization weight can improve the accuracy of transcription results. Exercise caution when you set the customization weight. Although a higher weight can improve the accuracy of phrases from the domain of the custom model, it can also negatively impact performance on non-domain phrases. (Even if you set the weight to 0.0, a small probability exists that the transcription can include custom words due to the implementation of language model customization.)

You specify a customization weight by using the customization_weight parameter. You can specify the parameter when you train a custom language model or when you use it with a speech recognition request.



* For a training request, the following example specifies a customization weight of 0.5 with the POST /v1/customizations/{customization_id}/train method:

IBM Cloud

curl -X POST -u "apikey:{apikey}" "{url}/v1/customizations/{customization_id}/train?customization_weight=0.5"

IBM Cloud Pak for Data
The IBMid realm uses an IBMid Unique ID (IUI) to identify the user's identity in IBM Cloud. This IUI is an opaque string to the service provider.

Example:

X-Broker-API-Originating-Identity: ibmcloud eyJpYW1faWQiOiJJQk1pZC01MEdOUjcxN1lFIn0=
Decoded:
{"iam_id":"IBMid-50GNR717YE"}





 resource instance (PUT) body.context and resource instance (PATCH) body.context 

PUT /v2/service_instances/:resource_instance_id and PATCH /v2/service_instances/:resource_instance_id receive the following value within body.context: { "platform": "ibmcloud", "account_id": "tracys-account-id", "crn": "resource-instance-crn" }.







 Additional broker recommendations 



 Recommendations on using asynchronous instead of synchronous operations 

The OSB API supports both synchronous and asynchronous modes of operation. If your operations are going to take less than 10 seconds, you must use synchronous responses. Otherwise, you must use the asynchronous mode of operation. The asynchronous mode requires the last_operation endpoint. For more information, see [Get the status of a provision in-progress for a service instance](https://cloud.ibm.com/apidocs/resource-controller/ibm-cloud-osb-api).





 Recommendations for managing brokers across locations 

It's important for users to understand the location of their cloud services for latency, availability, and data residency.

When you're creating service instances on IBM Cloud, one of the required parameters your users provide is the location where they want that service instance to be created. Some services can support creation in multiple locations. For example, a database service can support creation in all IBM Cloud regions or it can support a subset.

If your third-party API-based service is implemented in another cloud and exposed into IBM Cloud, the location indicates the service's location in the other cloud.
Why do blueprint operations require a blueprint ID? 

In Schematics Blueprints, the displayed name is not a unique identifier. Only the blueprint ID that is generated at create time is unique. This unique blueprint ID is needed by the command line to identify the specific environment to be worked on. Blueprint IDs are unique globally and generated from the user supplied name at create time.





 What URL format is used for referencing blueprint templates and input files? 

In the Blueprints UI, the URL specification for the template and input files uses the Git object path syntax as used by the GitHub API and UI to access and retrieve files. This specifies both the repository URL and file name as a single string.

All information to reference the file in the Git repo, its branch and sub-folder must be specified as part of the URL string. This includes the template or input file name. For example, https://github.com/Cloud-Schematics/blueprint-basic-example/blob/main/basic-blueprint.yaml.

The link can point to the template file in the main branch, any other branch, or a subdirectory. The URL must include the template file name and must use the blob/branch/ pattern for the full path.



* Example for main blueprint.yaml - https://github.com/myorg/myrepo/blob/main/blueprint.yaml
* Example for blueprint.yaml in branches - https://github.com/myorg/myrepo/blob/mybranch/blueprint.yaml
* Example for blueprint.yaml in subdirectory - https://github.com/mnorg/myrepo/blob/mybranch/mysubdirectory/blueprint.yaml



The required URLs to the files can be copied directly from the Github or Gitlab UI. For example with Github, on the Code tab hover over the template or input file you require the URL for.
keyID The ID that identifies the root key that is associated with the cloud resource. 
 resourceCrn The Cloud Resource Name (CRN) that represents the cloud resource, such as a Cloud Object Storage bucket, that is associated with the key. 
 createdBy The unique identifier for the resource that created the registration. 
 creationDate The date the registration was created. 
 lastUpdated The date the registration was updated. 
 description A description for the registration. 
 preventKeyDeletion A boolean that determines whether Key Protect must prevent deletion of the root key. If true, the associated resource is non-erasable due to a retention policy, and the Key Protect key that is encrypting the resource cannot be deleted. 
 keyVersion The version of the root key that's protecting the cloud resource. 





 Listing registrations for a specific root key 

You can retrieve the registration details that are associated with a specific root key by making a GET call to the following endpoint.

https://<region>.kms.cloud.ibm.com/api/v2/keys/<keyID_or_alias>/registrations



1. [Retrieve your authentication credentials to work with the API](https://cloud.ibm.com/docs/key-protect?topic=key-protect-set-up-api).
2. View the registrations that are associated with a root key by running the following curl command.

$ curl -X GET "https://<region>.kms.cloud.ibm.com/api/v2/keys/<keyID_or_alias>/registrations" -H "authorization: Bearer <IAM_token>" -H "bluemix-instance: <instance_ID>"

Replace the variables in the example request according to the following table.





Table 3. Describes the variables that are needed to list all registrations that are associated with a root key.

 Variable Description 

 region Required. The region abbreviation, such as us-south or eu-gb, that represents the geographic area where your Key Protect instance resides.
curl -X POST --header "Authorization: Bearer {token}" "{url}/v1/acoustic_customizations/{customization_id}/reset"







 Deleting a custom acoustic model 

Use the DELETE /v1/acoustic_customizations/{customization_id} method to delete a custom acoustic model that you no longer need. The method deletes all audio that is associated with the custom model and the model itself. Use this method with caution: A custom model and its data cannot be reclaimed after you delete the model.



 Delete a custom acoustic model example 

The following example deletes the custom acoustic model with the specified customization ID:

IBM Cloud

curl -X DELETE -u "apikey:{apikey}" "{url}/v1/acoustic_customizations/{customization_id}"

IBM Cloud Pak for Data

curl -X DELETE --header "Authorization: Bearer {token}" "{url}/v1/acoustic_customizations/{customization_id}"
"data": {
"guid": "7304bc3c-7010-11ea-8840-48bf6bec2d78"
}
},
"app": {
"data": {
"guid": "e0e4417c-74ee-11ea-a604-48bf6bec2d78"
}
}
},
"parameters": {
"key1": "value1",
"key2": "value2"
},
"metadata": {
"labels": {
"foo": "bar"
},
"annotations": {
"baz": "qux"
}
}
}'





 Example request to create a key credential binding 

curl "https://api.example.org/v3/service_credential_bindings" -X POST -H "Authorization: bearer [token]" -H "Content-type: application/json" -d '{
"type": "key",
"name": "some-binding-name",
"relationships": {
"service_instance": {
"data": {
"guid": "7304bc3c-7010-11ea-8840-48bf6bec2d78"
}
}
},
"parameters": {
"key1": "value1",
"key2": "value2"
},
"metadata": {
"labels": {
"foo": "bar"
},
"annotations": {
"baz": "qux"
}
}
}'







 Viewing a credential 

After a credential is created for a service, it can be viewed at any time for users that need the API key value. However, all users must have the correct level of access to see the details of a credential that includes the API key value.
For more information, see [Retrieving an instance ID](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-retrieve-instance-ID). 
 key_ring_ID Optional. The unique identifier of the key ring that the key belongs to. If unspecified, Hyper Protect Crypto Services will search for the key in every key ring that is associated with the specified instance. Therefore, it is suggested to specify the key ring ID for a more optimized request.<br><br>Note: The key ring ID of keys that are created without an x-kms-key-ring header is: default. For more information, see [Managing key rings](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-managing-key-rings). 



A successful enable request returns an HTTP 204 No Content response, which indicates that the root key was reinstated for encrypt and decrypt operations.
5. Optional: Verify that the root key was enabled by retrieving details about the key.

curl -X GET 
https://api.<region>.hs-crypto.cloud.ibm.com:<port>/api/v2/keys/<key_id>/metadata 
-H 'authorization: Bearer <IAM_token>' 
-H 'bluemix-instance: <instance_ID>' 
-H 'accept: application/vnd.ibm.kms.key+json'

Review the state field in the response body to verify that the root key moved to the Active key state. The following JSON output shows the metadata details for an active key.

The integer mapping for the Active key state is 1. Key States are based on NIST SP 800-57.

{
"metadata": {
"collectionType": "application/vnd.ibm.kms.key+json",
"collectionTotal": 1
},
"resources": [
{
"type": "application/vnd.ibm.kms.key+json",