vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* Can receive an optional sub path, so that the Function can implement different flavors, based on the specified path. The Function's main procedure receives the path as a __ce_path input parameter.
* Can receive optional query parameters, which can be used to configure the Function at runtime. The Function's main procedure receives the parameters as key-value pairs within the JSON formatted input data structure.
* Can receive request headers, so that client code can specify accepted encodings.
* Can receive an optional content-type request header.
* Can receive an optional request payload (body), which the Function processes at runtime. Depending on the selected request content-type, the data payload is passed to the Function's main entry point, either in base 64 encoded form or "unfolded" as part of the JSON input data structure. Special characters in keys values pairs of application/x-www-form-urlencoded input are percent-encoded values.
* Can define an arbitrary HTTP status code (optional) that is then returned to the invoking client.
* Can set arbitrary response headers, such as a redirect location, a response encoding, or cookie values.
* Can return an arbitrary response body with a selected binary or non-binary encoding; for example, application/octet-stream, application/json, text/, image/, or audio/. If no content-type response header is set, it defaults to text/plain.
* Supports the following request content-types: application/x-www-form-urlencoded (default), text/plain, application/json, application/octet-stream, image/, audio/
* Does not support the multipart/form-data request header.







 Options for creating Functions 

Learn about the options that you can specify when you create your Function. Note that options can vary between the console and the CLI.



 Memory and CPU 

When you deploy your Function, you can specify the amount of memory and CPU that your Function can consume. These amounts can vary, depending on if your app is compute-intensive, memory-intensive, or balanced.

By default, your Function is assigned 4 G of memory and .5 vCPU.
* The second parameter specifies the name of the table column that contains data of type StringArray that represents the values of the observations.



TIME_SERIES_SA_WITH_TRS(String, String, TRS) Output: StringArrayTimeSeries
Creates a StringArrayTimeSeries that uses a custom [TRS](https://cloud.ibm.com/docs/services/sql-query?topic=sql-query-TRS).



* The first parameter specifies the name of a table column that contains numeric data that represents the timeticks of the observations.
* The second parameter specifies the name of the table column that contains data of type StringArray that represents the values of the observations.
* The third parameter specifies the name of the TRS that is to be associated with the time series. This TRS determines the granularity and start time of the time series timeticks.







 TRS creation functions 

These functions create or reassign a [time reference system (TRS)](https://cloud.ibm.com/docs/services/sql-query?topic=sql-query-TRS).

TS_TRS(String, TimestampType) or TS_TRS(String, String) Output: TRS
Creates a TRS that determines the granularity and start time of a time series.



* The first parameter specifies the granularity of the TRS. It can be specified by using any of the formats that are accepted by the Java [parse function of the Duration class](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.htmlparse-java.lang.CharSequence-).
* The second parameter specifies the start time of the TRS. It can be specified either as a TimestampType or as a string that uses any of the formats that are accepted by the Java [DateTimeFormatter class](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html).



TS_TRS_DEFAULT() Output: TRS
Description Binds to EP11 m_EncryptUpdate, which is an implementation of PKCS #11 C_EncryptUpdate. 
 Parameters message EncryptUpdateRequest { bytes State = 1; bytes Plain = 2; } message EncryptUpdateResponse { bytes State = 1; bytes Ciphered = 3; } 
 Return values Wraps EP11 error into message Grep11Error. 



Code snippets



* Golang code snippet

plainText := 
This is a very long message that needs to be encrypted by performing
multiple EncrypytUpdate functions

// Use EncryptUpdate if you would like to breakup
// the encrypt operation into multiple suboperations
EncryptUpdateRequest1 := &pb.EncryptUpdateRequest {
State: EncryptInitResponse.State,
Plain: plainText[:20],
}

EncryptUpdateResponse, err := cryptoClient.EncryptUpdate(context.Background(), EncryptUpdateRequest1)

ciphertext := EncryptUpdateResponse.Ciphered[:]

EncryptUpdateRequest2 := &pb.EncryptUpdateRequest {
State: EncryptUpdateResponse.State,
Plain: plainText[20:],
}

EncryptUpdateResponse, err := cryptoClient.EncryptUpdate(context.Background(), EncryptUpdateRequest2)

ciphertext = append(ciphertext, EncryptUpdateResponse.Ciphered...)
Show more
* JavaScript code snippet

client.EncryptUpdate({
State: state,
Plain: Buffer.from(message.substr(20))
}, (err, data={}) => {
You can also specify the endpoint at the command-level by using the --service-url INSTANCE flag. For example, ibmcloud secrets-manager secrets --service-url https://{instance_ID}.{region}.secrets-manager.appdomain.cloud.







 Globals 



 Options 

--instance-id (string)
: The Secrets Manager Instance ID assigned by the service provider.

--region (string)
: The region where you provisioned your Secrets Manager Instance. Available values: us-south, us-east, au-syd, jp-osa, jp-tok, eu-de, eu-gb, ca-tor, br-sao.

--output (string)
: Choose an output format - can be 'json', 'yaml', or 'table'. Defaults to 'table'.

-j, --jmes-query (string)
: Provide a JMESPath query to customize output.

--service-url (string)
: Provide the base endpoint URL for the API.

-q, --quiet
: Suppresses verbose messages.



 Example 

ibmcloud secrets-manager
--instance-id=provide-here-your-smgr-instanceuuid --region=us-south --output=json --jmes-query="[:10]" --service-url="https://myservice.test.cloud.ibm.com"
--quiet

Note: This example only demonstrates the global options available to all sub-commands and is not a valid command itself.







 ibmcloud secrets-manager config 

Global parameters can also be stored in persistent configuration so that they do not need to be manually specified each time the plugin is invoked. Each parameter can be configured with the config command and its subcommands.

ibmcloud secrets-manager config





 ibmcloud secrets-manager config set 

Set a new config value for a specific option. Each subcommand of the set command maps to a global option.
Using the sort parameter in the query string [sorts the list of keys](https://cloud.ibm.com/apidocs/key-protectkp-get-key-sort-api) returned based on one or more key properties. To sort on a property in descending order, prefix the term with "-". To sort on multiple key properties, use a comma to separate each properties. The first property in the comma-separated list will be evaluated before the next.

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



Table 7. Usage notes for the sort query parameter.

 Variable Description 

 sort-value The list of properties for sorting. The key properties that can be sorted at this time are:<br><br><br><br> * id<br> * state<br> * extractable<br> * imported<br> * creationDate<br> * lastUpdateDate<br> * lastRotateDate<br> * deletionDate<br> * expirationDate<br><br><br>
Description Binds to EP11 m_DigestInit, which is an implementation of PKCS #11 C_DigestInit. 
 Parameters message DigestInitRequest { Mechanism Mech = 2; } message DigestInitResponse { bytes State = 1; } 
 Return values Wraps EP11 error into message Grep11Error. 



Code snippets



* Golang code snippet

DigestInitRequest := &pb.DigestInitRequest {
Mech: &pb.Mechanism{Mechanism: ep11.CKM_SHA256},
}

DigestInitResponse, err := cryptoClient.DigestInit(context.Background(), DigestInitRequest)
* JavaScript code snippet

client.DigestInit({
Mech: {
Mechanism: ep11.CKM_SHA256
}
}, (err, response) => {
callback(err, response);
});







 Digest 

The Digest function digests single-part data. You don't need to call the DigestUpdate and DigestFinal functions for digesting single-part data. Before you call this function, make sure to run DigestInit first. When you set parameters, note not to specify the length of the input data to be zero and the pointer that points to the input data location to be NULL.

Enterprise PKCS #11 over gRPC

Enterprise PKCS #11

PKCS #11





 Description Binds to EP11 m_Digest, which is an implementation of PKCS #11 C_Digest. 
 Parameters message DigestRequest { bytes State = 1; bytes Data = 2; } message DigestResponse { bytes Digest = 3; } 
 Return values Wraps EP11 error into message Grep11Error. 



Code snippets



* Golang code snippet

digestData := []byte("Create a digest for this string")
DigestRequest := &pb.DigestRequest {
State: DigestInitResponse.State,
Data: digestData,
}
Optional parameters 



* -c, --crn-query

Specify the crn query whose registrations need to be listed
* -k, --key-id

Specify the key id whose registrations need to be listed.
* -o, --output

Set the CLI output format. By default, all commands print in table format. To change the output format to JSON, use --output json.

Setting the output to JSON (--output json) includes the cloud resource name (CRN) in the output.
* -r, --key-ring

A unique, human readable name for the key-ring. Required to show registrations on the given key ring.









 Next Steps 

Look for related operations in the [API documentation](https://cloud.ibm.com/apidocs/key-protect).
* Returns - An object of type SoftLayer_Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth.



See this example to [create a token auth](https://cloud.ibm.com/docs/CDN?topic=CDN-code-examples-using-the-cdn-apicreate-token-auth-example).

--------------------





 updateTokenAuth 

Updates an existing Token Authentication path for an existing domain mapping and returns the updated behavior.



* Parameters: A collection of type SoftLayer_Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth. You can view all of the attributes in the Input container here:

[Token authentication input container](https://cloud.ibm.com/docs/CDN?topic=CDN-token-auth-container)

The following attributes are part of the Token Authentication container input, which can be provided when updating a Token Authentication. Attributes are optional unless otherwise noted.



* uniqueId - (Required) The unique ID of the mapping to which the existing behavior belongs.
* path - (Required) The path, relative to the domain that is accessed via token authentication.
* name - The token name.
* tokenKey - The token key, which specifies an even number of hex digits for the token key. An entry can be up to 64 characters in length.
* escapeTokenInputs - Possible values 0 and 1. If set to 1, input values are escaped before adding them to the token. Default value is 1.
* ignoreQueryString - Possible values 0 and 1. If set to 1, query strings are removed from a URL when computing the token’s HMAC algorithm. Default value is 0.
* tokenDelimiter - Specifies a single character to separate the individual token fields.
* aclDelimiter - Specifies a single character to separate access control list (ACL) fields.
* hmacAlgorithm - Specifies the algorithm to use for the token’s hash-based message authentication code (HMAC) field.
Credentials 'Service credentials-1' from 'messagehub' service instance 'EventStreams-0s' bound to 'MyEventStreamBind'.
6. Verify that the credentials are successfully bound.

ibmcloud fn package get MyEventStreamBind parameters

Example output

ok: got package MyEventStreamBind
...
"parameters": [
{
"key": "bluemixServiceName",
"value": "messagehub"
},
{
"key": "endpoint",
"value": "openwhisk.ng.bluemix.net"
},
{
"key": "__bx_creds",
"value": {
"messagehub": {
"api_key": "2RxXWBVUdR5-8GDXrYhpm7zMCB5dNtJ1vB3YfaI3o7",
"apikey": "2RxXWBVUdR5-8GDXrYhpm7zMCB5dNtJ1vB3YfaI3o7",
"credentials": "Service credentials-1",
"iam_apikey_description": "Auto generated apikey during resource-key operation for Instance - crn:v1:bluemix:public:messagehub:us-south:a/6ef045fb2b43266cfe8e6745dd2ec098:1244a768-a7e5-3c48-a6d2-1ab7c8b63d57::",
"iam_apikey_name": "auto-generated-apikey-dc334c91-3503-480f-a812-49bff8bedc60",
"iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Manager",
The speaking rate is the speed at which the service speaks the text that it synthesizes into speech. A higher rate causes the text to be spoken more quickly; a lower rate causes the text to be spoken more slowly. The parameter changes the per-voice default rate for an entire request. For more information, see [Modifying the speaking rate](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-paramsparams-rate-percentage).

The rate_percentage parameter is beta functionality.





 Modifying the speaking pitch 

To modify the global pitch of speech synthesis for a request, you can use the rate_pitch query parameter. The speaking pitch represents the tone of the speech that the service synthesizes. It represents how high or low the tone of the voice is perceived by the listener. A higher pitch results in speech that is spoken at a higher tone and is perceived as a higher voice; a lower pitch results in speech that is spoken in a lower tone and is perceived as a lower voice. The parameter changes the per-voice default pitch for an entire request. For more information, see [Modifying the speaking pitch](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-paramsparams-pitch-percentage).

The pitch_percentage parameter is beta functionality.





 Spelling out strings 

To indicate how individual characters of a string (alphabetic, numeric, or alphanumeric) are to be spelled out, you can include the spell_out_mode query parameter with a request. By default, the service spells out individual characters at the same rate at which it synthesizes text for a language. You can use the parameter to direct the service to spell out individual characters more slowly, in groups of one, two, or three characters. Use the parameter with the SSML <say-as> element to control how the characters of a string are synthesized. For more information, see [Specifying how strings are spelled out](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-paramsparams-spell-out-mode).
The value must match regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2}/.

--deactivation-date-max (string)
: Optional. Return only managed keys whose deactivation date is at or before the parameter value. This query parameter cannot be used in conjunction with the deactivation_date, expiration_date, expiration_date_min, and expiration_date_max query parameters. The value must match regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2}/.

--expiration-date (string)
: Optional. Return only managed keys whose deactivation date matches the parameter. The value must match regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2}/.

--expiration-date-min (string)
: Optional. Return only managed keys whose deactivation date is at or after the parameter value. This query parameter cannot be used in conjunction with the deactivation_date, expiration_date, deactivation_date_min, and deactivation_date_max query parameters. The value must match regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2}/.

--expiration-date-max (string)
: Optional. Return only managed keys whose deactivation date is at or before the parameter value. This query parameter cannot be used in conjunction with the deactivation_date, expiration_date, deactivation_date_min, and deactivation_date_max query parameters. The value must match regular expression /[0-9]{4}-[0-9]{2}-[0-9]{2}/.

--created-at (string)
: Optional. Return only managed keys whose creation time matches the parameter.
For more information, see [Understanding customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro).

rate_percentage (query parameter, optional integer)
: Specifies the global speaking rate for the entire synthesis request. The speaking rate is the speed at which the service speaks the text that it synthesizes into speech. A higher rate causes the text to be spoken more quickly; a lower rate causes the text to be spoken more slowly. The parameter changes the per-voice default rate for an entire request. For more information, see [Modifying the speaking rate](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-paramsparams-rate-percentage).

pitch_percentage (query parameter, optional integer)
: Specifies the global speaking pitch for the entire synthesis request. The speaking pitch represents the tone of the speech that the service synthesizes. It represents how high or low the tone of the voice is perceived by the listener. A higher pitch results in speech that is spoken at a higher tone; a lower pitch results in speech that is spoken in a lower tone. The parameter changes the per-voice default pitch for an entire request. For more information, see [Modifying the speaking pitch](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-paramsparams-pitch-percentage).

spell_out_mode (query parameter, optional string)
: For German voices, specifies how individual characters of a string are to be spelled out. By default, the service spells out individual characters at the same rate at which it synthesizes text for a language. You can use the parameter to direct the service to spell out individual characters more slowly, in groups of one (singles), two (pairs), or three (triples). For more information, see [Specifying how strings are spelled out](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-synthesis-paramsparams-spell-out-mode).
Token authentication container 

The SoftLayer_Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth collection contains the attributes that are used by our Token Authentication APIs. Each of the token authentication APIs returns a collection of this type.

classSoftLayer_Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth



* uniqueId - The unique ID of the mapping to which this token authentication belongs.
* path - The path, relative to the domain that should be accessed using token authentication.
* tokenKey - The key/shared secret used to validate the tokens. This setting must match the key that is used in the token generation code. This specifies an even number of hex digits for the token key. An entry can be up to 64 characters in length.
* name - Specify the name of token on the incoming client HTTP request: cookie name, query string parameter name, or HTTP header name. The default value is __token__.
* tokenDelimiter - Specifies a single character to separate the individual token fields. The default value is .
* aclDelimiter - Specifies a single character to separate access control list (ACL) fields. The default value is !.
* hmacAlgorithm - The algorithm used for the HMAC (Hashed Message Authentication Code) to generate the token. This setting must match the method that is chosen in the token generation code. Caution! The algorithms from most to least secure are SHA256, SHA1, and MD5. You should not change the default of SHA256 unless you have a specific reason to do so (for example, if you have speed requirements or computational limitations on generating tokens at the origin).
* escapeTokenInputs - Specify whether the token inputs are URL escaped before generating the token. By default, inputs are URL escaped. This setting must match the setting that is used in the token generation code. Possible values 0 and 1. If set to 1, input values are escaped before adding them to the token. Default value is 1.
* ignoreQueryString - Specify whether the query string is included in the URL input into the token.
You pass all audio via the body of the request and specify the parameters as request headers and query parameters.

The method returns results only after it processes all of the audio for a request. The method is appropriate for batch processing but not for live speech recognition. Use the WebSocket interface to transcribe live audio.

If your data consists of multiple audio files, the recommended means of submitting the audio is by sending multiple requests, one for each audio file. You can submit the requests in a loop, optionally with parallelism to improve performance. You can also use multipart speech recognition to pass multiple audio files with a single request.



 Basic request example 

The following example sends a recognition request for a single FLAC file named audio-file.flac. The request omits the model query parameter to use the default language model, en-US_BroadbandModel. For more information, see [Using the default model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-usemodels-use-default).

IBM Cloud

curl -X POST -u "apikey:{apikey}" --header "Content-Type: audio/flac" --data-binary @{path}audio-file.flac "{url}/v1/recognize"

IBM Cloud Pak for Data

curl -X POST --header "Authorization: Bearer {token}" --header "Content-Type: audio/flac" --data-binary @{path}audio-file.flac "{url}/v1/recognize"

The example returns the following transcript for the audio:

{
"result_index": 0,
"results": [
{
"alternatives":
{
"confidence": 0.96,
"transcript": "several tornadoes touch down as a line of severe thunderstorms swept through Colorado on Sunday "
}
],
"final": true
}
]
}







 Making a multipart HTTP speech recognition request
For more information, see [WAV](https://wikipedia.org/wiki/WAV).





 audio/webm format 

Web Media (WebM) (.webm) is an open media-file format. You can specify the codecs parameter with the format to request an audio stream that is compressed with one of the following codecs:



* The Opus codec by specifying audio/webm;codecs=opus or simply audio/webm. Audio in this format always has a sampling rate of 48 kHz.
* The Vorbis codec by specifying audio/webm;codecs=vorbis. You can optionally specify a sampling rate other than the default 22,050 Hz.



Both codecs are free, open, lossy audio-compression formats. Opus is the preferred codec.

For more information, see



* [webmproject.org](https://www.webmproject.org/)
* [opus-codec.org](https://www.opus-codec.org/)
* [Opus (audio format)](https://wikipedia.org/wiki/Opus_%28audio_format%29) (look especially at the Containers section)
* [Vorbis](https://wikipedia.org/wiki/Vorbis)









 Specifying an audio format 

By default, the service returns audio in the format audio/ogg;codecs=opus. You can specify a different audio format with either the HTTP or the WebSocket interface.



* With the HTTP GET and POST /v1/synthesize methods, you can specify a format by using the Accept request header or the accept query parameter.



* If you use the Accept request header, you specify the format and any additional parameters as shown in the following example. The example specifies the audio/l16 format and a sampling rate of 16,000 Hz.

audio/l16;rate=16000
* If you use the accept query parameter, you must URL-encode the format and any additional parameters as shown in the following example. The example specifies the same format and sampling rate as the previous example.
* webProfile-6.0
* webProfile-7.0
* webProfile-8.0
* websocket-1.0
* websocket-1.1
* wmqJmsClient-1.1
* wmqJmsClient-2.0
* wsAtomicTransaction-1.2
* wsSecurity-1.1
* wsSecuritySaml-1.1