vania-janet/multiturn-rag-retrieval-data huggingface dataset:
For information on using smart contracts with Fabric v2.x peers, check out [Deploying a smart contract using Fabric 2.x](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-smart-contracts-v2).

Attention! The IBM Blockchain Platform Extension for VS Code (VS Code extension) referenced throughout the documentation is an open-source project which is no longer active, and therefore not officially supported by IBM. Refer to the [alternatives to the VS Code extension](https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/3159).

You can use the [IBM Blockchain VS code extension](https://cloud.ibm.com/docs/blockchain?topic=blockchain-develop-vscode) to package the smart contract. After you install the extension, use Visual Studio Code to open the contracts folder in your workspace. Open the IBM Blockchain Platform tab. In the IBM Blockchain Platform pane, go to the smart contract packages section and click Package Open Project. The VS code extension uses the files in the contracts folder to create a new package named papernet-js@.0.0.1.cds. Right-click this package to export it to your local file system. You can then use your console to install your smart contract and either instantiate or propose it.





 Step three: Generate certificates for your wallet 

Applications need to sign the requests they send to Fabric components. If the components do not recognize the organizations submitting the transactions, the transactions are rejected and return with an error. The commercial paper sample creates a file system wallet that stores your certificates and signs your transactions. For more information about how applications use wallets, see the [wallet](https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/wallet.html) topic in the Fabric Documentation. The wallets that are used by the Fabric SDKs are different from the wallet in the IBM Blockchain Platform console. The identities that are stored in your console wallet cannot be directly used by the SDK.
: Value of the feature when it is enabled. Required field - input either as a flag or from file.

--disabled_value DISABLED_VALUE
: Value of the feature when it is disabled. Required field - input either as a flag or from file.

--tags TAGS
: Tags associated with the feature. Required field - input either as a flag or from file.

--segment_rules SEGMENT_RULES
: Specify the targeting rules that are used to set different values for different segments.

--enabled ENABLED
: The state of the feature flag.

--collections COLLECTIONS
: Collections array.

--file FILE
: Input through file. File format Supported - JSON





 Example 

To create a collection with name sample using flags ([click here](https://cloud.ibm.com/docs/cli?topic=cli-app-configuration-cliac-fileinput) for using commands with '--file' flag), run the following command:

ibmcloud ac feature create --environment_id "production" --name "IBMers" --feature_id "ibm-discount" --description "Discount given to IBM employees" --type "BOOLEAN" --enabled_value true --disabled_value false --segment_rules '[{"rules":{"segments":"ibm_employees"]}],"value": true,"order": 1}]' --collections '[{"collection_id":"corporatediscount","enabled": true}]' --tags "discount,sale" --enabled true



 Output 

The command returns the following output:

type BOOLEAN
enabled_value true
segment_rules <Array>
collections <Array>
name IBMers
feature_id ibm-discount
description Discount given to IBM employees
disabled_value false
enabled true
created_time 2021-02-02T17:52:46Z
updated_time 2021-02-02T17:52:46Z









 ibmcloud ac feature get 

You can get a feature, by using the command:
The following table describes feature support in both versions.



Feature support details
This table has row and column headers. The row headers identify features. The column headers identify the different versions of the product. To understand which features are supported by a product version, go to the row that describes the feature, and find the column for the product version that you are interested in.

 Feature Product redesign (v2) Earlier version (v1) 

 Use projects to organize your work ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/icons/checkmark-icon.svg) 
 Use the Smart Document Understanding (SDU) to annotate your documents ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/icons/checkmark-icon.svg) ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/icons/checkmark-icon.svg) 
 Leverage intuitive user interface tools to add domain-specific artifacts, such as dictionaries and custom machine learning models ![checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/icons/checkmark-icon.svg) 
 Create a content mining project type and then use the built-in Content Mining application to do in-depth data analysis (IBM Cloud Pak for Data, Enterprise, and Premium plans only) !
After you configure your App Configuration tool integration, you can use it to apply feature flags and properties to the toolchain environment and trigger properties.



1. Within the Pipeline environment properties tab or the Trigger properties tab, click Add to display the list of available property types.
2. Select AppConfig value and choose the feature flags or properties that you want to apply to the toolchain environment and trigger properties.
3. Specify the name for the new toolchain environment or trigger property.
4. Select the App Configuration tool integration and an Environment and Collection from within it.
5. Select Feature flag or Property and from the list within your App Configuration service instance, choose the target feature flag or property.
6. Click OK to apply an App Configuration reference to the field that is associated with it.







 Authorizing your toolchain to access feature flags and properties 

References to feature flags and properties that are stored in an App Configuration service instance are dynamically resolved when the toolchain runs. To access the required feature flags and properties, you must authorize your toolchain to access the App Configuration instance. If you create a toolchain that has a valid App Configuration tool integration, or add this tool integration to an existing toolchain, a request is automatically made to create the authorization.

To view your authorizations in IBM Cloud, complete the following steps:



1. From the IBM Cloud console, click Manage > Access (IAM).
2. Click Authorizations.



You can also access your authorizations on the [Manage authorizations](https://cloud.ibm.com/iam/authorizations) page.

You can also create the authorization manually, if required. To successfully resolve App Configuration references, your toolchain instance must have both Viewer and Reader access to the correct App Configuration service instance.





 Configuring App Configuration by using the API
2. Select Start creating.
3. Select a project from the list of available projects. You can also [create a new one](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-projectcreate-a-project). Note that you must have a selected project to deploy an app.
4. Select Application.
5. Enter a name for the application, for example, myapp. Use a name for your application that is unique within the project.
6. Select to run a Container image and specify icr.io/codeengine/helloworld for the image reference. For this example, you do not need to modify the default values. For more information about the code that is used for this example, see [helloworld](https://github.com/IBM/CodeEngine/tree/main/helloworld).
7. Click Create.
8. After the application status changes to Ready, you can test the application. Click Test application and then click Send request in the Test application pane. To open the application in a web page, click Application URL.



Example output

Hello World from:
. ___ __ ____ ____
./ __)/ ( ( __)
( (__( O )) D ( ) _)
.___)__/(____/(____)
.____ __ _ ___ __ __ _ ____
( __)( ( / __)( )( ( ( __)
.) _) / /( (_ )( / / ) _)
(____)_)__) ___/(__)_)__)(____)

Some Env Vars:
--------------
CE_APP=myapp
CE_DOMAIN=us-east.codeengine.appdomain.cloud
3. Select a project as the current context.
4. From the Overview page, select Jobs from the Summary section or select Jobs from the navigation menu.
5. Click the name of your job to open the configuration.
6. Click Submit job to open the Submit job dialog. Review and optionally change default configuration values such as instances, CPU, memory, number of job retries, and job timeout. For more information about these options, see [Options for creating and running a job](https://cloud.ibm.com/docs/codeengine?topic=codeengine-job-planjob-options).
7. Click Submit job to run your job. The system displays the status of the instances of your job on the job details page.
8. If any of the instances of your job failed to run, click Rerun failed indices to run the job again for indices that failed. From the Submit job pane, review and optionally change the configuration values. The Array indices field automatically lists the indices of the failed job run instances. After you review and optionally change configuration values, click Submit job to run your job.



You can view job logs after you add logging capabilities. For more information, see [viewing logs](https://cloud.ibm.com/docs/codeengine?topic=codeengine-view-logs).

The JOB_INDEX environment variable is automatically injected into each instance of your job whenever the job is run. For more information about environment variables that are set by Code Engine, see [I see configmaps that I didn't create. Can I delete them?](https://cloud.ibm.com/docs/codeengine?topic=codeengine-configmapinside-configmaps).





 Running a job with the CLI 

Before you begin



* Set up your [Code Engine](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli) environment.
Add the following features to the featureManager section. Some features might come built in with Liberty. If you receive an error when you run your server, you can install them by running .installUtility install {name_of_server} from the bin directory of your Liberty installation.

<featureManager>
<feature>appSecurity-2.0</feature>
<feature>openidConnectClient-1.0</feature>
<feature>ssl-1.0</feature>
<feature>servlet-3.1</feature>
</featureManager>
3. Configure SSL by adding the following to your server.xml file.

<keyStore id="defaultKeyStore" password="{password}"/>
<keyStore id="RootCA" password="{password}" location="${server.config.dir}/resources/security/{myTrustStore}"/>
<ssl id="{sslID}" keyStoreRef="defaultKeyStore" trustStoreRef="{truststore-ref}"/>
4. Create an Open ID Connect Client feature and define the following placeholders. With the credentials that you obtained, fill the placeholders.

<openidConnectClient
id="oidc-client-simple-liberty-backend-app"
inboundPropagation="required"
jwkEndpointUrl="<region>.appid.cloud.ibm.com/oauth/v4/<tenantID>/publickeys"
issuerIdentifier="<region>.appid.cloud.ibm.com/oauth/v4/<tenantID>"
signatureAlgorithm="RS256"
audiences="{client-id}"
sslRef="oidcClientSSL"
/>



Table 1. OIDC element variables for Liberty for Java apps

 Variable Description 

 id The name of your application.
Make sure that you have an editor of your choice to modify the deployable architecture, for example, Visual Studio Code. For more information, see [Visual Studio Code](https://code.visualstudio.com/).
3. Make sure that you have tools of your choice to test your deployable architecture and ensure that it works. For example, you can use Terraform runtime, which supplies the Terraform command line.







 Finding a customizable deployable architecture 

IBM Cloud provides multiple deployable architectures that you can use as-is or you can customize. To find an architecture, complete the following steps:



1. In the [IBM Cloud catalog](https://cloud.ibm.com/catalogreference_architecture), select a deployable architecture.
2. Download the customization bundle by selecting Review deployment options > Customize locally > Start customizing.







 Customizing the deployable architecture 

When you download the customization bundle, you receive a set of files that are designed to help you get started with customization.



 ibm_catalog.json 

The ibm_catalog.json file is a manifest JSON file that is used to automatically import version information into a private catalog. With a catalog manifest file, you can avoid manually entering version metadata through the console. To view how to set up an ibm_catalog.json file and the values that you can include, see [Specifying product metadata for onboarding a product to a private catalog](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-manifest).





 main.tf 

The main.tf file is where configuration information about each deployable architecture that you want to use is stored. Depending on the deployable architecture, you can use this file to specify specific regions, API keys, and source code locations. You can also use this file to add other modules and update the architecture's Terraform parameters.



 Example of main.tf with specifications 

The following example shows Secure infrastructure on VPC for regulated industries using a specific region, us-south:

module "landing-zone" {
Why can't I validate my configuration? 

You tried to validate changes to a configuration in a project, but an error prevented the validation from completing.

  What’s happening 

You tried to validate changes to a configuration in a project, but the following error displays:

> Unable to validate your configuration.

  Why it’s happening 

An availability issue occurred, which prevented validation.

  How to fix it 



*  A problem occurred with the project's authentication method. The API key that is used in a secret might have been deleted, or the trusted profile was not set up properly. For more information, go to [Defining an authentication menthod](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-best-practices-projects&interface=uibest-practice-auth).
*  If the error message provides information about a Schematics cart order failure with a status code 403, then access is not granted between the Projects service and other IBM Cloud services. For more information, go to [Granting access between the Projects service and other IBM Cloud services](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-access-project&interface=uiuser-create-role).
*  A service might have been down during the validation. Check the [Status page](https://cloud.ibm.com/status) for the service, and try to validate your configuration again when the service is back up.
*  A timeout might have occurred during the validation, which caused a failure. Try validating your configuration again.
*  If the error message provides information about a bad request or parameters, you might need to edit your input values, then validate your configuration again.
For the Server variables use your deployment region, slackbot-backend as appname, and the Code Engine projectid of your app. Thereafter, the generated URL should match that of your Code Engine app. When done, click Next to get to the review page, then Finish and Close to get back to the Integrations page.







 Step 4: Create the first action 

First, you are going to create an action to retrieve information about a single event identified by its name.



1. On the upper left, click on Actions and on the welcome page on Create action.
2. Click on the Start from scratch tile.
3. In the New action dialog, enter show me event details as example and click Save.
4. The next screen shows the step editor for the action with Step 1 open. In Assistant says type What is the event name?. Then, for Define customer response pick Free text as option. Leave And then as Continue to next step.
5. Click New step on the lower left to add Step 2. Leave the first parts (Assistant says, Define customer response) untouched, but under And then select Use an extension. In the dropdowns pick the events extension and its Event record by name operation. Thereafter, Parameters will show the possible inputs. By using the dropdown, assign for Set short_name the value 1. What is the event name?. It refers to the customer input from the previous step. Click on Apply to finish this step.
6. Add a New step. At the top change the selection so that Step 3 is taken with condition. Under Conditions and If select 2 Ran successfully. It refers to a result from using the extension in step 2.
7. Under Assistants says, you can compose the answer with the event details by referring to the output fields of the API call to the deployed app. Use I got these event details: followed by the Enter key to get to the next line. [The editor supports Markdown format](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-respondrespond-formatting).
A good practice is to include directories like node_modules also in a [.dockerignore file](https://docs.docker.com/engine/reference/builder/dockerignore-file) so that the Docker build that you run locally behaves the same as the Code Engine build.

Another reason for a project to be successfully built locally but to fail as Code Engine build are security limitations. As with applications and batch jobs, Code Engine does not allow arbitrary system operations within the Code Engine cluster. Most of those system operations are not relevant for Docker builds anyway. However, Code Engine does not allow opening server sockets for privileged ports. The range is 0 to 1023. For example, if you build a web application and your build includes a test step that brings up a web application server, then you must use ports with higher numbers for this server.
Failed to pull image "<image_name>": rpc error: code = Unknown desc = failed to pull and unpack image "<image_name:image_tag>": failed to resolve reference <image_name:image_tag>": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed.



4. View details of the submitted job run.



* From the console, view details of your submitted job run by clicking the name of your job run in the Job runs tab on your job page. From the submitted job run details page, you can review any environment variables that are set and check that the environment variables are correct.
* With the CLI, use the [ibmcloud ce jobrun get](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-jobrun-get) command and review the results for the following items:



* Check to see whether any environment variables that are set by using the --env KEY=VALUE, --env-from-secret SECRET_NAME, and --env-from-configmap CONFIGMAP_NAME options are correct in the job run details.
* Use the ibmcloud ce secret get --name SECRET_NAME and ibmcloud ce configmap get --name CONFIGMAP_NAME commands to check that any environment variable that is stored in the secret and configmap does exist.





5. Verify that the commands and arguments are valid for the job run.



* From the console, view details of the submitted job run in the console by clicking the name of your job run in the Job runs tab on your job page. The submitted job details page lists any commands or arguments that are defined for the submitted job run. The sequence in the commands and arguments is important.
* With the CLI, use the view details of the submitted job run by using the [ibmcloud ce jobrun get](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-jobrun-get) command. The sequence in the commands and arguments is important.
Why is my app create failing? 

 What’s happening 

You cannot create an app. When you run the ibmcloud ce app create command in the CLI or deploy an app in the console, the application create does not complete successfully and displays a failed or revision failed error message.

 Why it’s happening 

If you cannot create an app, determine whether one of the following cases is true.



1. The name of your app is not unique within the project. You receive an error message that contains Application 'myapp' already exists within project 'myproj', please select a unique name.
2. The name of your app is not valid. You receive an error message that contains An application name must consist of lowercase alphanumeric characters, '-' and must start with an alphabetic character and end with an alphanumeric character.
3. If the image that you referenced does not exist, the app create does not complete and an error occurs. You receive an error message that contains Unable to pull the image.
4. If you do not have the permissions to access the referenced image, the app create does not complete and an error occurs. You receive an error message that contains Unable to pull the image.
5. The memory or CPU setting is not valid. You receive an error message that contains memory parameter must be between .25 G and 32 G or cpu parameter must be between .0125 and 8.0.For more information about Code Engine limits for apps, see [Application limits and defaults for Code Engine](https://cloud.ibm.com/docs/codeengine?topic=codeengine-limitslimits_application).
6. The resource quota for apps or app revisions is reached and the app (or app revision) is not created. Code Engine has quotas for apps and revisions of the apps within a project. For more information about Code Engine limits, see [Project quotas](https://cloud.ibm.com/docs/codeengine?topic=codeengine-limitsproject_quotas).
7.
When a request is sent to this sample job, the job reads the TARGET environment variable, and the job prints Hello ${TARGET} from Code Engine and prints a listing of environment variables. If the TARGETenvironment variable is empty, Hello World from Code Engine is returned.

From the Jobs page,



1. Create a job; for example, myjob.
2. Specify icr.io/codeengine/codeengine as the image reference.
3. Click Create to create the job.



If your app or job that you want to use with the secret is already defined in Code Engine, go to the Applications or Jobs page and then click the name of your app or job to open the component.
2. When the job is created, from the Jobs page, click the name of your job to open it.
3. Update the job to add a secret as an environment variable. Click Environment variables to open the tab and click Add to add your environment variable.
4. From the Add environment variable page,



1. To use the previously defined secret, select Reference full secret.
2. From the menu, select the name of the secret that you want; for example, target-secret.
3. Click Add to add the environment variable.
4. Click Save to save the changes to your job.



5. To run the job with the environment variable that references a secret, click Submit job. For this example, the logs of the myjob job run display Hello Sunshine from Code Engine and the prints the environment variables, including any values of secrets that are referenced with environment variables.







 Referencing secrets with the CLI 

To use secrets with apps and jobs, you can set environment variables that fully reference a secret or reference individual keys in a secret with the CLI.



 Referencing existing secrets with the CLI 

The following examples reference a generic secret, which is the default secret when the --format option is not specified. Use the --format option to specify the category of secret, such as basic_auth, generic, ssh, tls, or registry.