vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* [SDK for Node.js](https://cloud.ibm.com/docs/cloud-foundry-public?topic=cloud-foundry-public-getting-started-node)





 Context 

Port secures exchange of port data and shipping manifests that connects public and private organizations.



* Disparate groups of Developers from the government and shipping company don’t have a unified platform where they can collaborate, which slows down deployments of updates and features.
* Developers are spread across the globe and across organizational boundaries, which means open-source and PaaS the best option.
* Security is a primary concern, and this concern increases the collaboration burden that impacts features and updates to the software, especially after the apps are in production.
* Just-in-time data meant that the worldwide systems must be highly available to reduce lags in transit operations. Time tables for shipping terminals are highly controlled and sometimes inflexible. Web usage is growing, so instability might cause poor user experience.







 Solution 

The port and the shipping company co-develop a unified trading system to electronically submit compliance-related information for the clearance of goods and ships once, rather than to multiple agencies. Manifest and customs apps can quickly share contents of a particular shipment and ensure that all paperwork is electronically transferred and processed by agencies for the port.

So they create a partnership that is dedicated to solutions for the trade system.



* DECLARATIONS - App to take in shipping manifests and digitally process typical customs paperwork and to option out-of-policy items for investigation and enforcement
* TARIFFS – App to calculate tariffs, submit charges electronically to shipper, and receive digital payments
* REGULATIONS – Flexible and configurable app that feeds previous two apps with ever-changing policies and regulations that affect imports, exports, and tariff processing



Developers started by deploying their apps in containers with Red Hat OpenShift on IBM Cloud. They created clusters for a shared Dev environment that allow worldwide Developers to collaboratively deploy app improvements quickly. Containers allow each development team to use the language of their choice.

Security first: The IT Execs chose bare metal clusters. With bare metal for Red Hat OpenShift on IBM Cloud, the sensitive customs workloads now have familiar isolation but within the flexibility of public cloud.
Software-defined storage (SDS) flavors have additional raw disks for physical local storage. Unlike the primary and auxiliary local disk, these raw disks are not wiped during a worker node update or reload. Because data is co-located with the compute node, SDS machines are suited for high-performance workloads.

Software-defined storage flavor are available for classic clusters only and are not supported in VPC clusters.



 Planning considerations for SDS 

Because you have full control over the isolation and resource consumption for your workloads, you can use SDS machines to achieve HIPAA and PCI compliance for your environment.

You typically use SDS machines in the following cases:



* If you use an SDS add-on such as [Portworx](https://cloud.ibm.com/docs/openshift?topic=openshift-storage_portworx_about), use an SDS machine.
* If your app is a [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) that requires local storage, you can use SDS machines and provision [Kubernetes local persistent volumes](https://kubernetes.io/docs/concepts/storage/volumes/local).
* If you have custom apps that require additional raw local storage.



For more storage solutions, see [Planning highly available persistent storage](https://cloud.ibm.com/docs/openshift?topic=openshift-storage-plan).





 Available flavors for SDS 

Worker node flavors vary by cluster type, the zone where you want to create the cluster, the container platform, and the infrastructure provider that you want to use. To see the flavors available in your zone, run ibmcloud oc flavors --zone <zone>. You can also review available [bare metal](https://cloud.ibm.com/docs/openshift?topic=openshift-planning_worker_nodesbm) or [VM](https://cloud.ibm.com/docs/openshift?topic=openshift-planning_worker_nodesvm) flavors.
Authorization 

This section covers authorization, or access control, best practices for IBM Cloud APIs. Other areas of interest include [authentication](https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-authentication) and managing authorization using IBM Cloud [Identity and Access Management (IAM)](https://cloud.ibm.com/iam/overview).

Authorization MUST be determined using platform-standard IAM tokens. Permission to perform a specific action on a specific resource MUST be computed with official IAM libraries. Outside of official IAM libraries, services SHOULD NOT compute permissions.

APIs should not allow anonymous access with the limited exception for publicly available resources like documentation or samples. All other requests must require platform-standard IAM interaction.

APIs MUST document the access requirements for operations and keep this information up to date. This documentation must include the IAM permissions needed for a request, as well as specific conditions that require additional scoped permissions.

For example:

> POST /volumes requires is.snapshot.snapshot.operate IAM action if a source_snapshot is specified in the request body.

Per the [resource-oriented design](https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-resources) best practices, API authors should consider implicit actions on non-primary resources that may be caused by the relationships between resources. APIs should also communicate this via unambiguous [status codes](https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-status-codes)

Users can [manage their permissions](https://cloud.ibm.com/docs/account?topic=account-access-getstarted) using IAM, which regulates the scope and access allocated to each API key.



  Additional resources 



*  [Authorization paradigms](https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-authorization)
*  [IBM Cloud Identity and Accesss Management](https://cloud.ibm.com/docs/account?topic=account-iamoverview)
*  [SDK Authentication Guidelines](https://github.com/IBM/ibm-cloud-sdk-commonauthentication)
30 October 2018 

New support for token-based IBM Cloud IAM
: The Text to Speech service has migrated to token-based Identity and Access Management (IAM) authentication for all locations. All IBM Cloud services now use IAM authentication. The Text to Speech service migrated in each location on the following dates:



* Dallas (us-south): October 30, 2018
* Frankfurt (eu-de): October 30, 2018
* Washington, DC (us-east): June 12, 2018
* Sydney (au-syd): May 15, 2018



The migration to IAM authentication affects new and existing service instances differently:



* All new service instances that you create in any location now use IAM authentication to access the service. You can pass either a bearer token or an API key: Tokens support authenticated requests without embedding service credentials in every call; API keys use HTTP basic authentication. When you use any of the Watson SDKs, you can pass the API key and let the SDK manage the lifecycle of the tokens.
* Existing service instances that you created in a location before the indicated migration date continue to use the {username} and {password} from their previous Cloud Foundry service credentials for authentication until you migrate them to use IAM authentication.



For more information, see the following documentation:



* To learn which authentication mechanism your service instance uses, view your service credentials by clicking the instance on the [IBM Cloud dashboard](https://cloud.ibm.com/dashboard/apps).
* For more information about using IAM tokens with Watson services, see [Authenticating to Watson services](https://cloud.ibm.com/docs/watson?topic=watson-iam).
* For examples that use IAM authentication, see the [API & SDK reference](https://cloud.ibm.com/apidocs/text-to-speech).







 12 June 2018 

New features for applications hosted in Washington, DC, location
: The following features are enabled for applications that are hosted in Washington, DC (us-east):



* The service now supports a new API authentication process.
Service[Log Analysis](https://cloud.ibm.com/apidocs/log-analysis)Log Analysis Service[Metrics Routing](https://cloud.ibm.com/apidocs/metrics-router/metrics-router-v3)Metrics Routing Service SDK[Monitoring](https://cloud.ibm.com/apidocs/monitor)Monitoring ServiceMobile[Administration API](https://cloud.ibm.com/apidocs/mobile-foundation/mobile-foundation-administration)Administration APINetworking[Cloud Internet Services](https://cloud.ibm.com/apidocs/cis)Cloud Internet Services Service SDK[DNS Services API](https://cloud.ibm.com/apidocs/dns-svcs)DNS Services API Service SDK[Direct Link 2.0](https://cloud.ibm.com/apidocs/direct_link)Direct Link 2.0 Service SDK[Direct Link 2.0 Provider](https://cloud.ibm.com/apidocs/direct_link_provider_api)Direct Link 2.0 Provider Service SDK[Transit Gateway](https://cloud.ibm.com/apidocs/transit-gateway)Transit Gateway Service SDK[Virtual Private Cloud
WithCredentials(ibmiam.NewStaticCredentials(aws.NewConfig(), authEndpoint, apiKey, serviceInstanceID)).
WithS3ForcePathStyle(true)

func main() {

// Create client
sess := session.Must(session.NewSession())
client := s3.New(sess, conf)

// Bucket Names
Bucket := "<BUCKET_NAME>"
Input := &s3.ListObjectsV2Input{
Bucket: aws.String(Bucket),
}

res, _ := client.ListObjectsV2(Input)

for _, item := range res.Contents {
input := &s3.DeleteObjectInput{
Bucket: aws.String(Bucket),
Key: aws.String(item.Key),
}
d, _ := client.DeleteObject(input)
fmt.Println(d)
}
}

const myCOS = require('ibm-cos-sdk');

var config = {
endpoint: 's3.us-geo.cloud-object-storage.appdomain.cloud',
apiKeyId: 'd-2-DO-NOT-USEevplExampleo_t3ZTCJO',
ibmAuthEndpoint: 'https://iam.cloud.ibm.com/identity/token',
serviceInstanceId: 'crn:v1:bluemix:public:cloud-object-storage:global:a/SAMPLE253abf6e65dca920c9d58126b:3f656f43-5c2a-941e-b128-DO-NOT-USE::',
};

var cosClient = new myCOS.S3(config);

function logDone() {
console.log('COMPLETE!n');
}

function logError(e) {
Text to Speech 

The installable IBM Watson® Text to Speech Service provides an API with IBM's speech-synthesis capabilities to synthesize text into natural-sounding speech in a various languages, dialects, and voices.

The Watson packages are deprecated. Please use the [Watson SDKs](https://cloud.ibm.com/docs/watson?topic=watson-using-sdks) to perform Watson related functionality. For more information about which Watson SDK is included in the available runtimes, see the [Functions runtime](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-runtimes) documentation.

This service supports at least one male or female voice, sometimes both, for each language. The audio is streamed back to the client with minimal delay. For more information about the service, see [Text to Speech](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-about).

The Text to Speech package contains the following entities. You can find more information in the Text to Speech API reference by clicking the entity name.



Table 1. Text to speech package entities

 Entity Type Parameters Description 

 [text-to-speech-v1](https://cloud.ibm.com/apidocs/text-to-speech) Package username, password, iam_access_token, iam_apikey, iam_url, headers, headers[X-Watson-Learning-Opt-Out], url Work with the Text to Speech Service. 
 [get-voice](https://cloud.ibm.com/apidocs/text-to-speechget-a-voice) Action username, password, iam_access_token, iam_apikey, iam_url, headers, headers[X-Watson-Learning-Opt-Out], url, voice, customization_id Get a voice.
: You can now use Hyper Protect Crypto Services with Unified Key Orchestrator to create and manage Google Cloud KMS keys. For more information, see [Connecting to external keystores](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-connect-external-keystores) and [Creating managed keys](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-create-managed-keys).





 20 Octorber 2022 

Added: EP11 activity tracker events
: Both Hyper Protect Crypto Services Standard Plan and Hyper Protect Crypto Services with Unified Key Orchestrator now support Enterprise PKCS #11 (EP11) events tracking. You can use IBM Cloud Activity Tracker to monitor EP11 activities and analyze successful events. For more information, see [Auditing events for Hyper Protect Crypto Services - Standard Plan](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-at-events) and [Auditing events for Hyper Protect Crypto Services with Unified Key Orchestrator](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-uko-at-events).





 15 July 2022 

Added: Viewing associated resources with managed keys
: You can now view other IBM Cloud resources that are protected by managed keys in your Hyper Protect Crypto Services with Unified Key Orchestrator instance. For more information, see [Viewing resources associated with managed keys](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-uko-view-associated-resource).





 24 June 2022 

Added: Go SDK and Terraform support for Unified Key Orchestrator
: You can now manage your keys by using the Unified Key Orchestrator API with the Go software development kit (SDK) enabled. For more code examples in Go, see [Unified Key Orchestrator API reference](https://cloud.ibm.com/apidocs/uko?code=go).
(https://cloud.ibm.com/docs-content/v1/content/27ecaa7a29890634603881a8e64789974a29916b/appid/images/cf-alias-screenshot.svg)

Figure 1. Identifying instances with aliases.

If your instance is not an alias and you want to keep it, please contact [IBM Cloud support](https://cloud.ibm.com/unifiedsupport/supportcenter) to discuss next steps.





 Next steps 

Ready to jump in and get started with your own apps? Start by [adding the service to your app](https://cloud.ibm.com/docs/appid?topic=appid-web-appsweb-apps). The service provides SDKs for the most used languages, but if you don't see an SDK for the language that your app is written in, you can still take advantage of App ID by using the APIs.
Contributing 

The IBM Cloud SDK Handbook is open source and corrections and contributions can be made by clicking the Open Issue or Edit Topic links on each page.
const property = useProperty('json-property');
property.getPropertyDataType(); // STRING
property.getPropertyDataFormat(); // JSON

// Example (traversing the returned JSON)
let result = property.getCurrentValue(entityId, entityAttributes);
console.log(result.key) // prints the value of the key

const property = useProperty('yaml-property');
property.getPropertyDataType(); // STRING
property.getPropertyDataFormat(); // YAML
property.getCurrentValue(entityId, entityAttributes); // returns the stringified yaml (check above table)





 Listen to the feature or property changes 

The SDK automatically subscribes to event-based mechanism and re-renders the enclosed components when feature flag's or property's configuration changes.
The new SDK is available from the [swift-sdk repository](https://github.com/watson-developer-cloud/swift-sdk) in the watson-developer-cloud namespace on GitHub.





 22 February 2016 

New expressive SSML feature
: The service was updated with a new expressive SSML feature. The service extends SSML with an <express-as> element that you can use to indicate expressiveness in one of three speaking styles: GoodNews, Apology, or Uncertainty. You can apply the element to the entire body of the text, a sentence, a phrase, or a word. The service currently supports expressiveness only for the US English Allison voice (en-US_AllisonVoice).





 17 December 2015 

New beta customization interface
: The service offers a new customization interface that you can use to specify how it pronounces unusual words that occur in your input. The interface includes a number of new methods that you can use to create and manage custom models and the word/translation pairs that they contain. You can then use your custom models when synthesizing text to audio.

The service supports sounds-like translations and phonetic translations. Phonetic translations can use either the standard International Phonetic Alphabet (IPA) representation or the proprietary IBM Symbolic Phonetic Representation (SPR). You use SSML to specify phonetic translations.

The customization interface includes a collection of new HTTP methods that have the names POST /v1/customizations, POST /v1/customizations/{customization_id}, POST /v1/customizations/{customization_id}/words, and PUT /v1/customizations/{customization_id}/words/{word}. The service also provides a new GET /v1/pronunciation method that returns the pronunciation for any word and a new GET /v1/voices/{voice} method that returns detailed information about a specific voice. In addition, existing methods of the service's interface now accept custom model parameters as needed.
workspace_response = schematic_obj.schematics_service.get_workspace(w_id="<workspace id>").get_result()
    schematic_obj.update_variables(w_id="<workspace id>", 
        t_id=workspace_response["template_data"]["id"], 
        variablestore=config_data["template_data"]["variablestore"]
    )

logging.info("Schematic Variable Update Completed")
Show more





 Example Python request for schematics_env_class.py file 

import json
import logging

from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from ibm_schematics import SchematicsV1

class HPCCEnvironmentValues:

    def __init__(self, api_key):
        """
        create schematic services
        """
        self.authenticator = IAMAuthenticator(api_key)
        self.schematics_service = SchematicsV1(authenticator=self.authenticator)

        self.schematics_service.set_service_url('https://us.schematics.cloud.ibm.com')
        logging.info("Schematic Services created")

    def update_variables(self, w_id, t_id, variablestore):

        print("Function Schematic Update Variables Started")
        variables_update_result = self.schematics_service.replace_workspace_inputs(w_id=w_id, t_id=t_id, variablestore=variablestore
    ).get_result()

        return variables_update_result   
Show more





 config.json template file
Yes Boolean False Yes 
 descending Return the documents in descending by key order. Yes Boolean False Yes 
 end_key Stop returning records when the specified key is reached. Yes String or JSON array Yes 
 end_key_docid Stop returning records when the specified document ID is reached. Yes String Yes 
 group Specify whether to group reduced results by key. Valid only if a reduce function is defined in the view. If the view emits keys in JSON array format, then it is possible to reduce groups further based on the number of array elements with the group_level parameter. Yes Boolean False Yes 
 group_level Specify a group level to be used. Only applicable if the view uses keys that are JSON arrays. Implies group is true. Group level groups the reduced results by the specified number of array elements. If unset, results are grouped by the entire array key, returning a reduced value for each complete key. Yes Numeric Yes 
 include_docs Include the full content of the documents in the response. Yes Boolean False Yes 
 inclusive_end Include rows with the specified end_key. Yes Boolean True Yes 
 key Return only documents that match the specified key. Keys are JSON values, and must be URL encoded. Yes JSON array Yes 
 keys Specify to return only documents that match any of the specified keys. String representation of a JSON array of keys that match the key type that is emitted by the view function. Yes String or JSON array Yes 
 limit Limit the number of returned documents to the specified count. Yes Numeric Yes 
 reduce Use the reduce function. Yes Boolean True Yes 
 skip Skip this number of rows from the start. Yes Numeric 0 Yes 
 stable Specify whether to use the same replica of the index on each request. The default value false contacts all replicas and returns the result from the first, fastest responder.
"2020-04-17T04:31:20.965176Z stdout: Building custom sequence, using openwhisk node-js SDK...",
"2020-04-17T04:31:31.670466Z stdout: Result from cos-access {"cos_message":"SUCCESS"}",
"2020-04-17T04:31:31.670501Z stdout: Now invoking db-access...",
"2020-04-17T04:31:36.847844Z stdout: Result from db-access {"cloudant_result":"SUCCESS"}",
"2020-04-17T04:31:36.847883Z stdout: Now invoking cos-access...",
"2020-04-17T04:31:47.230424Z stdout: Result from cos-access {"cos_message":"SUCCESS"}",
"2020-04-17T04:31:47.230466Z stdout: Custom SEQUENCE with openwhisk-node-js-sdk completed."
]





Great work! You created an action that calls two other actions. From these actions, you can now develop the code to call IBM Cloud Object Storage, access your IBM Cloudant database, and then put the results back into IBM Cloud Object Storage. You even have the basic building blocks for error handling.
LifecycleConfiguration: config
}).promise()
.then(() => {
console.log(Created bucket lifecycle config for: ${bucketName});
})
.catch((e) => {
console.log(ERROR: ${e.code} - ${e.message}n);
});
}
Show more

Key Values



* <policy-id> - Name of the lifecycle policy (must be unqiue)
* <number-of-days> - Number of days to keep the restored file



SDK References



* [putBucketLifecycleConfiguration](https://ibm.github.io/ibm-cos-sdk-js/AWS/S3.html)







 Delete a bucket's lifecycle configuration 

function deleteLifecycleConfiguration(bucketName) {
return cos.deleteBucketLifecycle({
Bucket: bucketName
}).promise()
.then(() => {
console.log(Deleted bucket lifecycle config from: ${bucketName});
})
.catch((e) => {
console.log(ERROR: ${e.code} - ${e.message}n);
});
}

SDK References



* [deleteBucketLifecycle](https://ibm.github.io/ibm-cos-sdk-js/AWS/S3.html)







 Temporarily restore an object 

Detailed information about the restore request parameters are available in the [API Reference](https://cloud.ibm.com/docs/services/cloud-object-storage/api-reference?topic=cloud-object-storage-object-operationsobject-operations-archive-restore)

function restoreItem(bucketName, itemName) {
var params = {
Bucket: bucketName,
Key: itemName,
RestoreRequest: {
Days: <number-of-days>,
"type" : "sample2",
...
"model_name" : "Dictionary:.sample1.sample2"}
...

And this after:

{
"result" : {
"enriched_text" :
{
"entities" :
{
"text" : "capital",
"type" : "sample1.sample2",
...
"model_name" : "Dictionary:.sample1.sample2"}
...
* When a CSV file is uploaded with the converter settings set to auto_detection=true, the CSV settings tab in the tooling will display the incorrect settings. If you update the settings on the CSV settings tab, auto_detection will no longer be set to true. * In Office documents ('.doc', '.docx', '.odf', '.xls', '.xlsx', '.ods', '.ppt', '.pptx', '.odp') converted using a Smart Document Understanding (SDU) custom model, the publicationdate may not display in extracted_metadata field in the JSON response. It will instead appear in the html field of the JSON response. The publicationdate in the html field will be the date the document was ingested and not the document's original publication date. * The Analyze API uses an in-memory cache to hold the enrichment models associated with the collection used to run the documents. If the collection contains many large enrichments or multiple of these collections are used at the same time, the cache may run out of memory. When this happens, the Analyze API returns null results (see example) and the stateless api rest proxy will display this message in its log: RESOURCE_EXHAUSTED: stateless.Analysis/analyze: RESOURCE_EXHAUSTED.
{
"result": null,
"notices": null
}

To work around this issue:

<-- <ol> -->

1. Review the enrichments used in the collection and remove those that are not necessary for your application. In particular, remove the Part of Speech enrichment.
2.