vania-janet/multiturn-rag-retrieval-data huggingface dataset:
"customization_id": "8391f918-3b76-e109-763c-b7732faa3312",
"created": "2017-12-01T18:51:37.291Z",
"updated": "2017-12-02T19:21:06.825Z",
"language": "en-US",
"versions":
"en-US_BroadbandModel.v2017-11-15"
],
"owner": "297cfd08-330a-22ba-93ce-1a73f454dd98",
"name": "Example model two",
"description": "Example custom acoustic model two",
"base_model_name": "en-US_BroadbandModel",
"status": "available",
"progress": 100
}
]
}
Show more





 List a specific custom acoustic model example 

The following example returns information about the custom model that has the specified customization ID:

IBM Cloud

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

IBM Cloud Pak for Data

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

The response duplicates the information from the previous example:

{
"customization_id": "74f4807e-b5ff-4866-824e-6bba1a84fa97",
"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"
* customization_id identifies the custom model's Globally Unique Identifier (GUID). The GUID is used to identify the model in methods of the interface.
* created is the date and time in Coordinated Universal Time (UTC) at which the custom model was created.
* updated is the date and time in Coordinated Universal Time (UTC) at which the custom model was last modified.
* language is the language of the custom model.
* owner identifies the credentials of the service instance that owns the custom model.
* name is the name of the custom model.
* description shows the description of the custom model, if one was provided at its creation.
* base_model_name indicates the name of the language model for which the custom model was created.
* versions provides a list of the available versions of the custom model. Each element of the array indicates a version of the base model with which the custom model can be used. Multiple versions exist only if the custom model is upgraded to a new version of its base model. Otherwise, only a single version is shown. For more information, see [Listing version information for a custom model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade-usecustom-upgrade-use-listing).



The methods also return a status field that indicates the state of the custom model:



* pending indicates that the model was created. It is waiting either for valid training data (audio resources) to be added or for the service to finish analyzing data that was added.
* ready indicates that the model contains valid audio data and is ready to be trained. If the model contains a mix of valid and invalid audio resources, training of the model fails unless you set the strict query parameter to false. For more information, see [Training failures](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acousticfailedTraining-acoustic).
* training indicates that the model is being trained on audio data.
* available indicates that the model is trained and ready to use with recognition requests.
* upgrading indicates that the model is being upgraded.
* customization_id identifies the custom model's Globally Unique Identifier (GUID). The GUID is used to identify the model in methods of the interface.
* created is the date and time in Coordinated Universal Time (UTC) at which the custom model was created.
* updated is the date and time in Coordinated Universal Time (UTC) at which the custom model was last modified.
* language is the language of the custom model. The value matches the language identifier from the name of the base model. For example, en-US for a US English language model.
* dialect is the dialect of the language for the custom model, which does not necessarily match the language of the custom model for previous-generation Spanish models. For more information, see the description of the dialect field in [Create a custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreatecreateModel-language).
* owner identifies the credentials of the service instance that owns the custom model.
* name is the name of the custom model.
* description shows the description of the custom model, if one was provided at its creation.
* base_model indicates the name of the language model for which the custom model was created.
* versions provides a list of the available versions of the custom model. Each element of the array indicates a version of the base model with which the custom model can be used. Multiple versions exist only if the custom model is upgraded to a new version of its base model. Otherwise, only a single version is shown. For more information, see [Listing version information for a custom model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade-usecustom-upgrade-use-listing).



The method also returns a status field that indicates the state of the custom model:



* pending indicates that the model was created. It is waiting either for valid training data (corpora, words, or grammars) to be added or for the service to finish analyzing data that was added.
* ready indicates that the model contains valid data and is ready to be trained.
"customization_id": "64f4807f-a5f1-5867-924f-7bba1a84fe97",
"owner": "297cfd08-330a-22ba-93ce-1a73f454dd98",
"created": "2017-09-16T17:12:31.743Z",
"name": "Customization test",
"language": "en-US",
"description": "Customization test",
"last_modified": "2017-09-16T17:12:31.743Z"
}
}
Show more

To see the custom words and prompts that the model includes, use the GET /v1/customizations/{customization_id} method. For more information, see [Querying a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModelscuModelsQuery).
Customizing tokens 

With App ID, tokens are used to identify users and secure your resources. You can choose to customize the information that is injected in to the tokens by the service. By injecting the information into your tokens, it's available to your application at run time without you having to configure extra network calls. For more information about tokens and how they're used in App ID, see [Understanding tokens](https://cloud.ibm.com/docs/appid?topic=appid-tokens).

By customizing your token configuration, you can ensure that your security and user experience needs are met. However, should a token ever become compromised, a malicious user might have more information or time that can be used to affect your application. Be sure that you understand the security implications of the customizations that you want to make before you make them.



 Understanding custom claims mapping 

A claim is a statement that an entity makes about itself or on behalf of someone else. For example, if you signed into an application by using an identity provider, the provider would send the application a group of claims or statements about you to the app so that it can group with information that it already knows about you. This way, when you sign in, the app is set up with your information, in the way that you configured it.



 What types of claims can I define? 

The claims that are provided by App ID fall into several categories that are differentiated by their level of customization.

Normalized claims
: In each identity token, there is a set of claims that is recognized by App ID as normalized. When available, the claims are mapped directly from your identity provider to the token by default. The claims can't be explicitly omitted but they can be overwritten in your token by custom claims. The claims include name, email, picture, and locale.

Restricted claims
: Restricted claims are those that have limited customization possibilities and cannot be overwritten by custom mappings. For an access token, scope is the only restricted claim. Although it cannot be overwritten, it can be extended with your own scope.
The following example returns information about the custom model that has the specified customization ID:

IBM Cloud

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

IBM Cloud Pak for Data

curl -X GET --header "Authorization: Bearer {token}" "{url}/v1/customizations/{customization_id}"

The response duplicates the information from the previous example:

{
"customization_id": "74f4807e-b5ff-4866-824e-6bba1a84fe96",
"created": "2016-06-01T14:21:26.894Z",
"updated": "2020-01-18T18:42:25.324Z",
"language": "en-US",
"dialect": "en-US",
"versions": [
"en-US_BroadbandModel.v2018-07-31",
"en-US_BroadbandModel.v2020-01-16"
],
"owner": "297cfd08-330a-22ba-93ce-1a73f454dd98",
"name": "Example model",
"description": "Example custom language model",
"base_model_name": "en-US_BroadbandModel",
"status": "pending",
"progress": 0
}
Show more







 Resetting a custom language model 

Use the POST /v1/customizations/{customization_id}/reset method to reset a custom model. Resetting a model removes all of the corpora and words 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 words resource is empty and must be re-created by adding corpora and words.



 Reset a custom language model example
--id (string): The unique config ID. Required.
The maximum length is 128 characters. The value must match regular expression /^\.\-0-9a-zA-Z] ! ! ! ! ! ! ! +$/.
--draft-only (bool): The flag to determine if only the draft version should be deleted.
The default value is false.
<-- </section "id="section-project-config-delete-cli-options" "> --><-- <section "id="section-project-config-delete-examples" "> --> Example ibmcloud project config-delete --project-id=exampleString --id=exampleString --draft-only=false
<-- </section "id="section-project-config-delete-examples" "> --><-- <section "id="section-project-config-delete-cli-output" "> --> Example output An example of the delete configuration response. {
"id" : "293c3c36-a094-4115-a12b-de0a9ca39be5"
}
<-- </section "id="section-project-config-delete-cli-output" "> --><-- </section "id="section-project-cli-config-delete-command" "> --><-- <section "id="section-project-cli-config-approve-command" "> --> ibmcloud project config-approve Approve and merge configuration edits to the main configuration. ibmcloud project config-approve --project-id PROJECT-ID --id ID --comment COMMENT] !
<-- <section "id="section-project-config-approve-cli-options" "> --> Command options --project-id (string): The unique project ID. Required.
The POST /v1/customizations/{customization_id}/words method adds one or more words at one time. You pass the words to be added as JSON data via the body of the request or from a file. In either case, the required Content-Type header specifies that JSON data is being passed to the method.

The following examples add two custom words, HHonors and IEEE, to the custom model with the specified ID:



* The first example passes the information about each word via the body of the request:

IBM Cloud

curl -X POST -u "apikey:{apikey}" --header "Content-Type: application/json" --data "{"words": [ {"word": "HHonors", "sounds_like": "hilton honors", "H. honors"], "display_as": "HHonors"}, {"word": "IEEE", "sounds_like": "I. triple E."]}]}" "{url}/v1/customizations/{customization_id}/words"

IBM Cloud Pak for Data

curl -X POST --header "Authorization: Bearer {token}" --header "Content-Type: application/json" --data "{"words": [ {"word": "HHonors", "sounds_like": "hilton honors", "H. honors"], "display_as": "HHonors"}, {"word": "IEEE", "sounds_like": "I. triple E."]}]}" "{url}/v1/customizations/{customization_id}/words"
* The second example adds the same words from a file named words.json:

{
"words": [
{"word": "HHonors", "sounds_like": "hilton honors", "H. honors"], "display_as": "HHonors"},
{"word": "IEEE", "sounds_like": "I. triple E."]}
]
}

The following request adds the words from the file:
You pass the method the customization ID of the model that you want to train, as in the following example:

IBM Cloud

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

IBM Cloud Pak for Data

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

The method is asynchronous. Training can take on the order of minutes to complete depending on the number of new words on which the model is being trained and the current load on the service. For more information about checking the status of a training operation, see [Monitoring the train model request](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreatemonitorTraining-language).

The method includes the following optional query parameters:



* The word_type_to_add parameter specifies the words on which the custom model is to be trained:



* Specify all or omit the parameter to train the model on all of its words, regardless of their origin.
* Specify user to train the model only on words that were added or modified by the user, ignoring words that were extracted only from corpora or grammars.



For custom models that are based on previous-generation models, this option is useful if you add corpora with noisy data, such as words that contain typographical errors. Before training the model on such data, you can use the word_type query parameter of the GET /v1/customizations/{customization_id}/words method to review words that are extracted from corpora and grammars. For more information, see [Listing custom words from a custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageWordslistWords).

For custom models that are based on next-generation models, the service ignores the word_type_to_add parameter. The words resource contains only custom words that the user adds or modifies directly, so the parameter is unnecessary.
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

curl -X GET --header "Authorization: Bearer {token}" "{url}/v1/customizations/{customization_id}"

The request includes information about the status of the model:

{
"customization_id": "74f4807e-b5ff-4866-824e-6bba1a84fe96",
"created": "2016-06-01T18:42:25.324Z",
"updated": "2016-06-01T18:45:11.737Z",
"language": "en-US",
"dialect": "en-US",
"owner": "297cfd08-330a-22ba-93ce-1a73f454dd98",
"name": "Example model",
"description": "Example custom language model",
"base_model_name": "en-US_BroadbandModel",
"status": "pending",
"progress": 0
}

The status field reports the current state of the model. While the service is processing new words, the status remains pending. Use a loop to check the status every 10 seconds until it becomes ready to indicate that the operation is complete. For more information about possible status values, see [Monitoring the train model request](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreatemonitorTraining-language).





 Modifying words in a custom model
You specify a custom model's GUID with the customization_id parameter of calls that are associated with the model.

{
"customization_id": "74f4807e-b5ff-4866-824e-6bba1a84fe96"
}





 Add audio to the custom acoustic model 

Once you create your custom acoustic model, the next step is to add audio resources to it. You use the POST /v1/acoustic_customizations/{customization_id}/audio/{audio_name} method to add an audio resource to a custom model. You can add



* An individual audio file in any format that is supported for speech recognition. For more information, see [Supported audio formats](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-audio-formats).
* An archive file (a .zip or .tar.gz file) that includes multiple audio files. Gathering multiple audio files into a single archive file and loading that single file is significantly more efficient than adding audio files individually.



You pass the audio resource as the body of the request and assign the resource an audio_name. For more information, see [Working with audio resources](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-audioResources).

The following examples show the addition of both audio- and archive-type resources:



* This example adds an audio-type resource to the custom acoustic model with the specified customization_id. The Content-Type header identifies the type of the audio as audio/wav. The audio file, audio1.wav, is passed as the body of the request, and the resource is given the name audio1.

IBM Cloud

curl -X POST -u "apikey:{apikey}" --header "Content-Type: audio/wav" --data-binary @audio1.wav "{url}/v1/acoustic_customizations/{customization_id}/audio/audio1"

IBM Cloud Pak for Data
* The POST /v1/customizations/{customization_id}/words method adds an error field to the word in the model's words resource.
* The PUT /v1/customizations/{customization_id}/words/{word_name} method fails with a 400 response code and an error message. The service does not add the word to the words resource.





* Specify only the display_as field:



* If the word does not exist in the service's base vocabulary, the service attempts to set the sounds_like field to its pronunciation of the word. It cannot generate a pronunciation for all words, so you must review the word's definition to ensure that it is complete and valid. The service leaves the display_as field as specified.
* If the word exists in the service's base vocabulary, the service leaves the sounds_like empty and leaves the display_as field as specified.



* Specify both the sounds_like and display_as fields:



* If the sounds_like field is valid, the service sets the sounds_like and display_as fields to the specified values.
* If the sounds_like field is invalid, the service responds as it does in the case where the sounds_like field is specified but the display_as field is not.











 Validating a words resource for previous-generation models 

Especially when you add a corpus to a custom language model or add multiple custom words at one time, examine the OOV words in the model's words resource.



* Look for typographical and other errors. Especially when you add corpora, which can be large, mistakes are easily made. Typographical errors in a corpus fole (or in custom words or a grammar file) have the unintended consequence of adding new words to a model's words resource, as do ill-formed HTML tags that are left in a corpus file.
* Verify the sounds-like pronunciations. The service tries to generate sounds-like pronunciations for OOV words automatically. In most cases, these pronunciations are sufficient. But the service cannot generate a pronunciation for all words, so you must review the word's definition to ensure that it is complete and valid.
Customizing emails 

When a user interacts with your application, you might want to send a reply or ask for verification. App ID provides default templates that you can use for the interactions. You can also use the templates as a guide and customize your messaging to fit your brand.

App ID uses [SendGrid](https://sendgrid.com/) as a mail delivery service. All emails are sent with a single SendGrid account.



 Configuring email settings 

With App ID, you can choose to use App ID default [SendGrid](https://sendgrid.com/) credentials, add your own SendGrid account, or configure your own custom webhook to send email messages in Cloud Directory.



 Using the IBM default email provider 

By default, App ID uses [SendGrid](https://sendgrid.com/) as an email delivery service for Cloud Directory.



1. Go to the Cloud Directory > Email templates > Email settings page of the service dashboard.
2. Select Default. The information that you need to input appears.
3. Configure your Sender details.



1. In From, enter the email address that you want users to receive your emails from.
2. In Sender name, enter the name that you want associated with the "From" email.
3. In Reply-to, enter the email address where you want to receive any replies that someone might have to the email.



4. Click Test to try your configuration with a test email.
5. Click Save to enable your configuration.







 Adding your own SendGrid account 

By using your own SendGrid account to send your Cloud Directory emails, you have full control. You can decide how the emails are sent, use your own domain name, and define your sender details. With custom email settings, you can reduce the chances of an email getting filtered as spam while also furthering brand recognition for your application.

A direct connection to your email provider can help you to get information about individual messages such as the number of people that open the emails and which messages were not delivered.
ｚ UTF-8 hexadecimal 0xEF 0xBD 0x9A (efbd9a) 







 Listing custom words from a custom language model 

The customization interface offers two methods for listing words from a custom language model:



* The GET /v1/customizations/{customization_id}/words method lists information about the words from the custom model's words resource. The method includes two optional query parameters:



* The word_type parameter specifies which words are to be listed:



* all (the default) shows all words.
* user shows only custom words that were added or modified by the user.
* corpora shows only OOV words that were extracted from corpora.
* grammars shows only OOV words that were extracted from grammars.



For custom models that are based on next-generation models, only all and user apply. Both options return the same results. Words from corpora and grammars are not added to the words resource for custom models that are based on next-generation models.
* The sort parameter indicates how the words are to be ordered. The parameter accepts two arguments to indicate how the words are to be sorted: alphabetical and count. You can add an optional + or - to the front of an argument to indicate whether the results are to be sorted in ascending or descending order. By default, the method displays the words in ascending alphabetical order.



* The GET /v1/customizations/{customization_id}/words/{word_name} method lists information about a single specified word from the model's words resource.



In addition to a word field that identifies the word, both methods return the following information about each word:



* A sounds_like field that presents an array of as many as five pronunciations for the word. The array of sounds-like pronunciations can include a sounds-like value that is automatically generated by the service if no sounds-like value is provided when the word is added to the custom model. For more information, see