vania-janet/multiturn-rag-retrieval-data huggingface dataset:
To avoid accidentally exposing your credentials when you push an application to GitHub or IBM Cloud, make sure that the file that contains your credentials is listed in the relevant ignore file. If you open .cfignore and .gitignore in your application directory, you can see that vcap-local.json is listed in both. It is not included in the files that are uploaded when you push the app to either GitHub or IBM Cloud.

Now start the local server.

npm start

The app is now running at http://localhost:8080. You can add words and definitions to your Messages for RabbitMQ database. When you stop and restart the app, any words you added are displayed when you refresh the page.





 Next steps 

Check out [Best Practices for RabbitMQ on the IBM Cloud](https://www.ibm.com/cloud/blog/best-practices-for-rabbitmq-on-the-ibm-cloud).

To understand more about how the [sample app](https://github.com/IBM-Cloud/clouddatabases-helloworld-cloudfoundry-examples/tree/node/rabbitmq) works, you can read the application's readme file, or the code comments in server.js, which give some information about the app's functions.

To start exploring your Messages for RabbitMQ service, see the following topics about the service dashboard:



* [Dashboard Overview](https://cloud.ibm.com/docs/messages-for-rabbitmq/dashboard-overview.html)
* [Backups](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=cloud-databases-dashboard-backups)
* [Creating Users and Getting Connection Strings](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-connection-strings)
Getting started with Db2 on Cloud 

IBM® Db2® on Cloud is an SQL database that is provisioned for you in the cloud. You can use Db2 on Cloud just as you would use any database software, but without the time and expense of hardware setup or software installation and maintenance.

Create credentials. After creating the Db2 on Cloud service on IBM Cloud®, you must create a user name and password by clicking the Service credentials tab on your service page and selecting New credential. Technically, you can log in to the web console without credentials, but you will need the user name and password to use many of the Db2 tools. To retrieve your service credentials, select the Service credentials tab from your service page and expand the credentials that you want to view.

You can also install a local Db2 database by using the [free Db2 Developer Edition download](https://www.ibm.com/us-en/marketplace/ibm-db2-direct-and-developer-editions). It rapidly installs a ready-to-go developer edition of Db2 with tools inside a Docker container (Docker not required; it automatically installs any necessary components).
"apikey": api_key
},
headers={
"Accept": "application/json"
}
)
if token_response.status_code == 200:
print "Got access token from IAM"
return token_response.json()['access_token']
else:
print token_response.status_code, token_response.json()
return None

def main(api_key, account):
access_token = None
while True:
if not access_token:
access_token = get_access_token(api_key)

if access_token:
response = requests.get(
"https://{0}.cloudant.com/_all_dbs".format(account),
headers={
"Accept": "application/json",
"Authorization": "Bearer {0}".format(access_token)
}
)
print "Got Cloudant response, status code", response.status_code
if response.status_code == 401:
print "Token has expired."
access_token = None

time.sleep(1)

if __name__ == "__main__":
main(API_KEY, ACCOUNT)
Show more







 Roles and actions 

The following tables include a complete list of IBM Cloudant's IAM roles and actions, and a mapping of what actions are allowed for each IAM system role.



 IBM Cloudant roles 

The following table lists the available IAM service roles for IBM Cloudant and a brief description of each.



Table 1. IAM service roles for IBM Cloudant

 Role Description 

 Manager Includes the ability to access all endpoints and perform all administrative functions on an instance, such as creating databases, changing capacity, reading and writing data and indexes, and accessing the Dashboard. 
 Writer Includes the ability to read and write to all databases and documents, but not able to create indexes. 
 Reader Includes the ability to read all databases and documents, but not able to write new documents or create indexes.
Retrieve your credentials cs20170517a (where the name for the credentials is creds_for_cs20170517a) by using a command similar to the following example.

ibmcloud resource service-key creds_for_cs20170517b
2. Review the IBM Cloud response that includes your credentials and a message similar to the following (abbreviated) example.

Retrieving service key in resource group default of account John Does's Account as john.doe@email.com...
OK
Service key crn:v1:bluemix:public:cloudantnosqldb:us-south:a/b42223455bb7e2abb0841ca25d28ee4c:ee78351d-82bf-4e80-bc22-825c937fafa3:resource-key:621ffde2-ea10-4318-b297-d6d849cec48a was created.

Name: creds_for_cs20170517a
ID: crn:v1:bluemix:public:cloudantnosqldb:us-south:a/b42223455bb7e2abb0841ca25d28ee4c:ee78351d-82bf-4e80-bc22-825c937fafa3:resource-key:621ffde2-ea10-4318-b297-d6d849cec48a
Created At: Tue Sep 18 19:58:38 UTC 2018
State: active
Credentials:
iam_apikey_name: auto-generated-apikey-621ffde2-ea10-4318-b297-d6d849cec48a
iam_role_crn: crn:v1:bluemix:public:iam::::serviceRole:Manager
Alternatively, you can use the command-line user interface CLPPlus to define, edit, and run statements, scripts, and commands.







 Plans and configurations 

Db2 on Cloud offers two elastic configurations to meet your workload requirements. Each plan can be deployed with or without high availability. When high availability is chosen, three nodes are provisioned in multiple availability zones, where available.



 Standard Plan 



* Base instances start at 8 GB RAM x 20 GB storage on shared compute slices
* 100 GB of free backup storage for up to 14 days of backups







 Enterprise Plan 



* Base instances start at 4 vCPU x 16 GB RAM x 20 GB storage on dedicated compute slices
* 1 TB of free backup storage for up to 14 days of backups









 Supported data centers 

The Standard and Enterprise plans are supported in the following data center geographies:



 Multi-zone region (MZR) 



* Dallas - (Dal10, Dal12, Dal13)
* Frankfurt - (Fra02, Fra04, Fra05)
* London - (Lon04, Lon05, Lon06)
* Sydney - (Syd01, Syd04, Syd05)
* Tokyo - (Tok02, Tok04, Tok05)
* Washington, DC - (Wdc04, Wdc06, Wdc07)
* Sao Paulo - (Sao01, Sao04, Sao05)
* Toronto - (Tor01, Tor04, Tor05)



MZRs support 3 node HA in 3 different data centers in that region





 Single-zone region (SZR) 



* Amsterdam - (Ams03)
* Milan - (Mil01)
* Montréal - (Mon01)



SZRs support 3 node HA in a single data center in that region
For example, if you provision a deployment with three dedicated cores per member on the Standard plan, that is a total of 9 cores, and billed at $405 per month.

The default Shared CPU setting provisions for your Databases for MongoDB Standard Edition deployment hosts with shared compute resources and incurs no additional charge.

Dedicated cores are an optional feature for Databases for MongoDB Standard Edition and required for Databases for MongoDB Enterprise Edition deployments.





 Scaling per Member 

Databases for MongoDB deployments have minimum and maximum allocation for disk and RAM as shown. Scaling deployments through the API/CLI provides more granularity and also allows a user to scale a database instance up to 4 TB of disk per member.



 Databases for MongoDB Two-member Standard Plan: 



Table 1. Per Member Standard Scaling Limits

 Resource Minimum Maximum Scaling Granularity (API/CLI) 

 Disk 5 GB per member 4 TB per member 1024 MB per member 
 RAM 1 GB per member 112 GB per member 128 MB per member 
 CPU (if enabled) 3 CPUs per member 28 CPUs per member 1 CPU per member 







 Databases for MongoDB Three-member Enterprise Plan: 



Table 2. Per Member Enterprise Scaling Limits

 Resource Minimum Maximum Scaling Granularity (API/CLI) 

 Disk 20 GB per member 4 TB per member 1024 MB per member 
 RAM 14 GB per member 112 GB per member 128 MB per member 
 CPU 6 CPUs per member 28 CPUs per member 1 CPU per member
[Feature available](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/icon_enabled.svg) ![Feature available](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/icon_enabled.svg) ![Feature available](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/icon_enabled.svg) 
 Access to all Free plans ![Feature available](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/icon_enabled.svg) ![Feature available](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/icon_enabled.svg) ![Feature available](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/icon_enabled.svg) 
 Access to the full IBM Cloud catalog ![Feature available](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/icon_enabled.svg) !
Contacting Watson IoT Platform support 

IBM Watson® IoT Platform is deprecated. As of 30 April 2023, only subscribers on paid plans will be able to deploy new instances. The service will be fully withdrawn on 1 December 2023. Any instances that still exist on 1 December 2023 will be deleted. For more information, see [the deprecation details](https://cloud.ibm.com/docs/IoT?topic=IoT-deprecation).

This IBM Cloud® documentation collection pertains to the IBM Watson® IoT Platform Lite pricing plan and includes basic getting started information, API references, and general troubleshooting information. For the full Watson IoT Platform feature documentation, see the [Watson IoT Platform product documentation ![External link icon](https://cloud.ibm.com/docs-content/v1/content/icons/launch-glyph.svg)](https://www.ibm.com/support/knowledgecenter/SSQP8H/iot/overview/overview.html) on IBM Knowledge Center. More information about the various plans can be found in [Watson IoT Platform service plans](https://cloud.ibm.com/docs/services/IoT?topic=IoT-plans_overviewplans_overview).

You have several options for getting support when using IBM Watson® IoT Platform, such as getting help through a forum, or through Slack, or by opening a support ticket. You can even submit your own ideas for enhancements to Watson IoT Platform by using the ideas portal.



 Forums 



* [Stack Overflow ![External link icon](https://cloud.ibm.com/docs-content/v1/content/icons/launch-glyph.svg)](http://stackoverflow.com/search?q=watson-iot+ibm-bluemix) - tag your posts with "ibm-cloud" and "watson-iot".





* [IBM developerWorks dW Answers !
The following image displays watsonx.dataIBM Cloud® catalog page.

Zoom

![Catalogpage](https://cloud.ibm.com/docs-content/v1/content/4c3c4670556d1cad9f530a5c8a9edd2e63919b83/watsonxdata/images/happy_path_screen.svg)

Figure 2. Price estimator

The following are some of the scenarios to illustrate consumption of promotion credits, an example case of $1,500.



* If you leave the query engine in the running state, with a head node and a worker node for the entire day, then the cost estimate is 8.6 RU/Hrs * 24 Hrs = 206.4 RU/Day. At this rate there would be seven days until the promo code is consumed and billing begins automatically.
* If you leave the engine paused without resuming, the support services still continue to have 3 RU/Hr in cost per hour to maintain your support services. This consumes the promo credit within 20 days even though the engine was paused.



Best practice:



* For the trial, pause the engine whenever you are not using it for queries.
* For the trial, it is recommend to go with a single Presto engine (memory or storage optimized) that has one head node and one worker node.
* If you choose not to continue, buy and build on with your watsonx.data you must manually delete your instance from the resource list before the promo credits are consumed. For more information about how to delete an instance, see [Viewing Usage](https://cloud.ibm.com/docs/watsonxdata?topic=watsonxdata-tutorial_hp_introhp_monitor_usg)









 Step 2: Applying the promotion code 

In this section of the tutorial, you are going to learn how to apply the promotion code.



1. Go to the watsonx.dataIBM Cloud® catalog page.
2. Select the Create tab.
3. Select IBM Cloud® as the cloud platform to deploy watsonx.data.
4.
[External link icon](https://cloud.ibm.com/docs-content/v1/content/icons/launch-glyph.svg)](https://www.ibm.com/support/knowledgecenter/SSQP8H/iot/overview/overview.html), you can purchase one of the Connection and Analytics Service plans and then migrate your existing environment.



To migrate plans, contact your IBM® representative or raise a support ticket.

A more detailed set of getting started guides and sample applications that step through the basics of developing a ready-for-production, end-to-end IoT prototype system with Watson IoT Platform are also available in the Watson IoT Platform product documentation on IBM Knowledge Center. If you are a developer who is new to working with Watson IoT Platform, use the step-by-step processes in the [Getting started guides ![External link icon](https://cloud.ibm.com/docs-content/v1/content/icons/launch-glyph.svg)](https://www.ibm.com/support/knowledgecenter/SSQP8H/iot/platform/getting_started/getting-started-iot-overview.htmlgetting-started) section.
[Create Firefox destination](https://cloud.ibm.com/docs-content/v1/content/4c9a07fe500838e5e55e71e73131ef20b44a6c66/event-notifications/images/en-migration-firefox.png)

Figure 9. Create Firefox destination





 Safari Destination 

Create a destination of type Safari Push Notification for the Web app. Provide the Website name, Website push ID, Website URL, URL format string, p12 file, Password and icons.

Zoom

![Create Safari destination](https://cloud.ibm.com/docs-content/v1/content/4c9a07fe500838e5e55e71e73131ef20b44a6c66/event-notifications/images/en-migration-safari.png)

Figure 10. Create Safari destination







 Edit the Web application 

The web application needs to be updated with the latest SDK. Follow the below steps,



1. Change the import statement

// Replace this
<script src="BMSPushSDK.js" async></script>

// with this
<script src="ENPushSDK.js" async></script>
2. Replace SDK Initialization code

// Replace this

var bmsPush = new BMSPush()
function callback(response) {
alert(response.response)
}
var initParams = {
"appGUID":"push app GUID",
"appRegion":"Region where service hosted",
"clientSecret":"push app client secret",
"websitePushIDSafari": "website Push ID for safari",
"deviceId":"Optional deviceId for device registration",
"applicationServerKey":"VAPID key",
}
bmsPush.initialize(params, callback)

// with this
Sending logs by using Python 

You can send logs to an IBM Log Analysis instance by using Python.

Complete the following steps to send logs:



 Prereqs 

Run the following command to install the handler:

python3 -m pip install logdna





 Step 1. Get the ingestion API key 

Note: You must have manager role for the IBM Log Analysis instance or service to complete this step. For more information, see [Granting permissions to manage logs and configure alerts](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-work_iamadmin_user_logdna).

Complete the following steps to get the ingestion key:



1. [Launch the IBM Log Analysis web UI](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-view_logsview_logs_step2).
2. Click the Settings icon ![Settings icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/admin.png) > Organization.
3. Select API keys.

You can see the ingestion keys that have been created.
4. Copy a key. You can use an existing ingestion key or click Generate Ingestion Key to create a new one. When you generate a key, the key is added to the list.







 Step 2. Send logs 

To send logs, creaate a file with the following content:

!/usr/bin/env python3
import os
import logging

from logdna import LogDNAHandler

apiKey = '<INGESTION-KEY>'

log = logging.getLogger('logdna')
log.setLevel(logging.INFO)

options = {
'hostname': '<HOSTNAME>',
50%:5.5
75%:6.25
Show more





 Learn more 



* [Time series key functionality](https://cloud.ibm.com/docs/AnalyticsEngine?topic=AnalyticsEngine-time-series-key-functionality)
* [Time series functions](https://cloud.ibm.com/docs/AnalyticsEngine?topic=AnalyticsEngine-time-series-functions)
* [Time series lazy evaluation](https://cloud.ibm.com/docs/AnalyticsEngine?topic=AnalyticsEngine-lazy-evaluation)
* [Using time reference system](https://cloud.ibm.com/docs/AnalyticsEngine?topic=AnalyticsEngine-time-reference-system)
* [tspy Python SDK documentation](https://ibm-cloud.github.io/tspy-docs/)
Push notifications 



 Resources Data sources 

 <br><br> * [ibm_pn_application_chrome](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/pn_application_chrome)<br><br><br> <br><br> * [ibm_pn_application_chrome](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/pn_application_chrome)<br><br><br> 







 Resource management 



 Resources Data sources 

 <br><br> * [ibm_resource_group](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_group)<br> * [ibm_resource_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_instance)<br> * [ibm_resource_key](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_key)<br><br><br> <br><br> * [ibm_resource_group](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/resource_group)<br> * [ibm_resource_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/resource_instance)<br> * [ibm_resource_key](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/resource_key)<br> * [ibm_resource_quota](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/resource_quota)<br><br><br> 







 Satellite 



 Resources Data sources
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) 
 SDK support ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/icons/checkmark-icon.svg) !
In Add web redirect URLs enter the url of your application + /redirect_uri, for example https://ghstats-app.56ab78cd90ef.us-south.codeengine.appdomain.cloud/redirect_uri.

For testing the app locally, the redirect URL is http://127.0.0.1:5000/redirect_uri. You can configure multiple redirect URLs. In order to test the app locally, copy .env.local.template to .env, adapt it and start the app using python3 ghstats.py.
4. In the menu on the left, expand Cloud Directory and click on Users. It opens the list of users in the Cloud Directory. Click on the Create User button to add yourself as the first user. You are now done configuring the App ID service.
5. In the browser, visit [Github.com](https://github.com/settings/tokens) and go to Settings -> Developer settings -> Personal access tokens. Click on the button Generate new token (classic). Enter GHStats Tutorial for the Note. Thereafter, enable public_repo under the repo category and read:org under admin:org. Now, at the bottom of that page, click on Generate token. The new access token is displayed on the next page. You need it during the following application setup.

Zoom

![GitHub Access Token](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution24-github-traffic-analytics/GithubAccessToken.png)

GitHub Access Token







 Step 5: Configure and test Python app 

After the preparation, you configure and test the app.
(https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/en_destination_slack)<br> * [ibm_en_destination_webhook](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/en_destination_webhook)<br> * [ibm_en_source](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/en_source)<br> * [ibm_en_subscription](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/en_subscription)<br> * [ibm_en_subscription_android"](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/en_subscription_android)<br> * [ibm_en_subscription_chrome](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/en_subscription_chrome)<br> * [ibm
"ibmenpushto": "{"safari_devices": ["1175972a-37d0-3898-905d-3b5ee0d7c1D2","Q9CACDF5-1EBF-49E1-AD60-E25BA23E994N"]}"

Multiple destinations can be targeted by using following methods

"ibmenpushto": "{"fcm_devices": ["9c75975a-37d0-3898-905d-3b5ee0d7c172","C9CACDF5-6EBF-49E1-AD60-E25BA23E954C"],"apns_devices": ["1c75972a-37d0-3898-905d-3b5ee0d7c172","M9CACDF5-1EBF-49E1-AD60-E25BA23E954C"],"chrome_devices": ["2c75972a-37d0-3898-905d-3b5ee0d7c182","N9CACDF5-1EBF-49E1-AD60-E25BA23E994D"],"firefox_devices": ["3c75972a-37d0-3898-905d-3b5ee0d7c182","L9CACDF5-1EBF-49E1-AD60-E25BA23E994E"],"safari_devices": ["1175972a-37d0-3898-905d-3b5ee0d7c1D2","Q9CACDF5-1EBF-49E1-AD60-E25BA23E994N"]}"

Targeting notifications to push user_ids.
"region": "<region>",
"deviceId": "<YOUR_DEVICE_ID>",
"firefoxDestinationId": "<firefox_destination_id>",
"firefoxApplicationServerKey": "<Firefox_VapId_public_key>"
}

enPush.initialize(initParams, callback)
Show more



* region: Region of the Event Notifications instance. eg; us-south,eu-gb, au-syd, and eu-de.
* deviceId: Optional deviceId for device registration.



* To register for notifications, se the register() or registerWithUserId() API to register the device with IBM Cloud Event Notifications service. Choose either of the following options:



* Register without UserId:

enPush.register(function(response) {
alert(response.response)
})
* Register with UserId. For userId based notification, the register method will accept one more parameter - userId.

bmsPush.registerWithUserId("UserId",function(response) {
alert(response.response)
})

UserId is the user identifier value with which you want to register devices in the push service instance.



* The subscribe API subscribes the device for a tag. After the device is subscribed to a particular tag, the device can receive notifications that are sent for that tag. Add the following code snippet to your web application to subscribe to a list of tags.

enPush.subscribe(tagName, function(response) {
alert(response.response)
})
* When the setup is complete, run your application and register for push notifications.







 Step 7: Send notifications to the Firefox device 

Use the [Send Notification API](https://cloud.ibm.com/apidocs/event-notifications/event-notificationssend-notifications) to send the push notification for the Firefox device.