vania-janet/multiturn-rag-retrieval-data huggingface dataset:
If the targeting is configured, then entity_attributes should be provided for the rule evaluation. An attribute is a parameter that is used to define a segment. The SDK uses the attribute values to determine whether the specified entity satisfies the targeting rules, and returns the appropriate property value.









 Fetching the appconfig_client across other modules 

When the SDK is initialized, the appconfig_client can be obtained across other modules as shown:

 other modules

from ibm_appconfiguration import AppConfiguration

appconfig_client = AppConfiguration.get_instance()
feature = appconfig_client.get_feature('online-check-in')
enabled = feature.is_enabled()
feature_value = feature.get_current_value(entity_id, entity_attributes)







 Supported data types 

You can configure feature flags and properties with App Configuration service, supporting the following data types: Boolean, Numeric, and String. The String data type can be of the format of a TEXT string, JSON, or YAML. The SDK processes each format as shown in the table.



Table 1. Example outputs

 Feature or Property value Data type Data format Type of data returned by GetCurrentValue() Example output 

 true BOOLEAN Not applicable bool true 
 25 NUMERIC Not applicable int 25 
 a string text STRING TEXT string a string text 
 {"firefox": { <br>"name": "Firefox", <br>"pref_url": "about:config" <br>}} STRING JSON Dictionary or List of Dictionary {'firefox': {'name': 'Firefox', 'pref_url': 'about:config'}} 
 men: <br>- John Smith <br>- Bill Jones <br>women: <br>- Mary Smith <br>- Susan Williams STRING YAML Dictionary {'men': ['John Smith', 'Bill Jones'], 'women': ['Mary Smith', 'Susan Williams']} 





 Feature flag
An alternative approach is to connect to a data source and crawl the source for information. When you crawl data sources, the data can stay where it is and you can set up a schedule by which to crawl the external source to find new and changed information. When you crawl the data, you know that the information in your collection is always up to date. For more information, see [Creating collections](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections).
* Must all my documents be English?

No. Discovery support multiple languages. For more information about language support per feature, see [Language support](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-language-support).
* What types of files can Discovery ingest?

Discovery can ingest most standard business file types, including PDF, Microsoft Word documents, spreadsheets, and presentations. For a complete list, see [Supported file types](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collectionssupportedfiletypes).
* How do I know whether I have Discovery v1 or v2?

If you're using Discovery on IBM Cloud Pak® for Data, then you're using Discovery v2.

If you have a service instance that is managed by IBM Cloud, then check what you see when you launch the product. When you open the product user interface in v2, the following page is displayed:

![Shows the main My Projects page with a single Sample Project tile.](https://cloud.ibm.com/docs/images/gs-home-page.png)

Figure 2. Discovery v2 home page
* Can I integrate Watson Discovery with Watson Assistant?

You can integrate Discovery and Watson Assistant to make information that is stored in external data sources available to a virtual assistant. Create a Conversational Search project in Discovery, and then add the data sources that you want to make available to it. Next, create a search integration in Watson Assistant, and connect it to your Discovery project and collection.
* Can I increase the collection limit for a project?
When you crawl data sources, the data can stay where it is and you can set up a schedule by which to crawl the external source to find new and changed information. When you crawl the data, you know that the information in your collection is always up to date. For more information, see [Creating collections](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections).
* Must all my documents be English?

No. Discovery support multiple languages. For more information about language support per feature, see [Language support](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-language-support).
* What types of files can Discovery ingest?

Discovery can ingest most standard business file types, including PDF, Microsoft Word documents, spreadsheets, and presentations. For a complete list, see [Supported file types](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collectionssupportedfiletypes).
* How do I know whether I have Discovery v1 or v2?

If you're using Discovery on IBM Cloud Pak® for Data, then you're using Discovery v2.

If you have a service instance that is managed by IBM Cloud, then check what you see when you launch the product. When you open the product user interface in v2, the following page is displayed:

![Shows the main My Projects page with a single Sample Project tile.](https://cloud.ibm.com/images/gs-home-page.png)

Figure 2. Discovery v2 home page
* Can I integrate Watson Discovery with Watson Assistant?

You can integrate Discovery and Watson Assistant to make information that is stored in external data sources available to a virtual assistant. Create a Conversational Search project in Discovery, and then add the data sources that you want to make available to it. Next, create a search integration in Watson Assistant, and connect it to your Discovery project and collection.
* Can I increase the collection limit for a project?
Options for pushing Liberty apps 

IBM® Cloud Foundry is deprecated and no longer supported as of 1 June 2023. For more information, see the [deprecation details](https://cloud.ibm.com/docs/cloud-foundry-public?topic=cloud-foundry-public-deprecationdep_details).

The behavior of the Liberty server in IBM Cloud® is controlled by the Liberty buildpack. Buildpacks can provide a complete runtime environment for a specific class of apps. They are key to providing portability across clouds and contributing to an open cloud architecture. The Liberty buildpack provides WebSphere Liberty container capable of running Jakarta EE, Eclipse MicroProfile, Java EE, and OSGi apps. It supports popular frameworks such as Spring and includes the IBM JRE. WebSphere Liberty enables rapid app development that is suited to the cloud. The Liberty buildpack supports multiple apps that are deployed into a single Liberty server. As part of the Liberty buildpack integration into IBM Cloud, the buildpack ensures that environment variables for binding services are shown as configuration variables in the Liberty server.

You can use the following methods to deploy your Liberty apps to IBM Cloud.



* Pushing a stand-alone app
* Pushing a server directory
* Pushing a packaged server



Important: When you deploy an app with the Liberty buildpack, specify a minimum of 512M as the memory limit for your apps. For more information, see [Memory limits and the Liberty buildpack](https://cloud.ibm.com/docs/cloud-foundry-public?topic=cloud-foundry-public-memory_limits).



 Stand-alone apps 

Stand-alone apps such as WAR or EAR files can be deployed to Liberty in IBM Cloud.

To deploy a stand-alone app, run the ibmcloud cf push command with the -p option that points to your WAR or EAR file. For example:

ibmcloud cf push <yourappname> -p myapp.war

When a stand-alone app is deployed, a default Liberty configuration is provided for the app. The default configuration enables the following Liberty features:



* beanValidation-1.1
4. Select the Service credentials tab > New credentials+ > Add in order to generate your service admin credentials.
5. Expand View credentials, which displays your service connectivity information including your admin credentials (username and password).
6. The admin credentials can be used to connect to both Db2 and the web console.







 Now that I've generated credentials, how do I access my Db2 on Cloud instance? 

You can access your Db2 on Cloud instance through several methods, including a dedicated web console and a REST API. For more information, see [Interfaces](https://cloud.ibm.com/docs/Db2onCloud?topic=Db2onCloud-interfaces).





 What's managed for me with Db2 on Cloud? 

IBM handles all of the software upgrades, operating system updates, and hardware maintenance for your Db2 on Cloud instance. IBM also preconfigures Db2 parameters for optimal performance across transactional workloads, and takes care of encryption and regular backups of your data.

The service includes 24x7 health monitoring of the database and infrastructure. In the event of a hardware or software failure, the service is automatically restarted. Because Db2 on Cloud is a fully-managed SaaS offering, you do not get SSH access or root access to the underlying server hardware, and cannot install additional software.





 Where can I find more information about Db2 on Cloud? 

In addition to the IBM Cloud documentation site, there is a wide range of information about the underlying Db2 engine functionality in the [Knowledge Center](https://www.ibm.com/support/knowledgecenter/SSFMBX/com.ibm.swg.im.dashdb.kc.doc/welcome.html). Updates to the service are posted on our [What's New](https://www.ibm.com/support/pages/whats-new-ibm-db2-cloud) page.

You can find pricing information and deploy a Db2 on Cloud instance through the IBM Cloud [catalog](https://cloud.ibm.com/catalog/services/db2) page for IBM Cloud.
The output of the segmentBy function, can be any type, including numeric, string, numeric array, and string array. For example: [(1,(1, 7.2), (3, 4.5)]), (5,(5, 4.5), (5, 4.6), (5, 7.1)]), (7,(7, 3.9), (9, 1.1)])] 
 dictionary Time series of dictionaries. A dictionary can have arbitrary types inside it 







 Time series functions 

You can use different functions in the provided time series packages to analyze time series data to extract meaningful information with which to create models that can be used to predict new values based on previously observed values. See [Time series functions](https://cloud.ibm.com/docs/AnalyticsEngine?topic=AnalyticsEngine-time-series-functions).





 Learn more 

To use the tspy Python SDK, see the [tspy Python SDK documentation](https://ibm-cloud.github.io/tspy-docs/).
5. Expand View credentials, which displays your service connectivity information including your admin credentials (username and password).
6. The admin credentials can be used to connect to both Db2 and the web console.







 Now that I've generated credentials, how do I access my Db2 Warehouse on Cloud instance? 

You can access your Db2 Warehouse on Cloud instance through several methods, including a dedicated web console and a REST API. For more information, see [Interfaces](https://cloud.ibm.com/docs/Db2whc?topic=Db2whc-interfaces).





 What's managed for me with Db2 Warehouse on Cloud? 

IBM handles all of the software upgrades, operating system updates, and hardware maintenance for your Db2 Warehouse on Cloud instance. IBM also preconfigures Db2 parameters for optimal performance across analytical workloads, and takes care of encryption and regular backups of your data.

The service includes 24x7 health monitoring of the database and infrastructure. In the event of a hardware or software failure, the service is automatically restarted. Because Db2 Warehouse on Cloud is a fully-managed SaaS offering, you do not get SSH access or root access to the underlying server hardware, and cannot install additional software.





 Where can I find more information about Db2 Warehouse on Cloud? 

In addition to the IBM Cloud documentation site, there is a wide range of information about the underlying Db2 engine functionality in the [Knowledge Center](https://www.ibm.com/support/knowledgecenter/SS6NHC/com.ibm.swg.im.dashdb.kc.doc/welcome.html). Updates to the service are posted on our [What's New](https://www.ibm.com/support/pages/whats-new-ibm-db2-warehouse-cloud) page.

You can find pricing information and deploy a Db2 Warehouse on Cloud instance through the IBM Cloud [catalog](https://cloud.ibm.com/catalog/services/db2-warehouse) page for IBM Cloud. To learn more, contact [IBM Sales](https://www.ibm.com/contact/us/en/).
No. But, you need to use SendGrid through IBM Cloud® to have your email service appear on the same IBM Cloud® invoice.

If you want to use a third-party email delivery product, you need to use a smart host that is outside of IBM Cloud®. A smart host relays SMTP traffic from an SMTP server, email client, or any other service or programming language that can handle SMTP.





 How do I use my own email server? 

Contact [support](https://cloud.ibm.com/docs/get-support?topic=get-support-using-avatargetting-support) to open port 25 so you can host your own email server.





 How do I get help from SendGrid? 

Log in to your [SendGrid account](https://support.sendgrid.com/hc/en-us) and submit a support request.





 Where can I find the Terms of Service for SendGrid and Twilio? 

For the Terms of Service for SendGrid and Twilio, see [Twilio Terms of Service](https://www.twilio.com/legal/tos).





 Where can I find more information about SendGrid? 

For more information about SendGrid, see the following links.



* [SendGrid documentation](https://sendgrid.com/docs/)
* [SendGrid Email API documentation](https://www.twilio.com/sendgrid/email-api)
* [SendGrid for developers](https://sendgrid.com/docs/for-developers/)
* [An IBM® Event Streams for IBM Cloud® topic](https://cloud.ibm.com/docs/atracker?topic=atracker-getting-started-target-event-streams)



* I cannot find auditing events in my account. Where can I find them?

In IBM Cloud, auditing events are generated automatically with the exception of some services that require additional configuration or a specific service plan. For more information about these services, see [Enabling Activity Tracker events](https://cloud.ibm.com/docs/atracker?topic=atracker-events-opt-in).

There are 2 ways by which you can access the auditing events in your account. For more information see [Collecting events.](https://cloud.ibm.com/docs/atracker?topic=atracker-events_collect)



Activity Tracker hosted event search



* What are the different ways to manage auditing events?

Activity Tracker offers 2 different ways to manage auditing events in an IBM Cloud account. You can use Activity Tracker hosted event search, an IAM enabled service, to manage auditing events through instances that you provision in each IBM Cloud region where you operate. Alternatively, you can use Activity Tracker Event Routing, a platform service, to manage auditing events at the account-level by configuring targets and routes that define where auditing data is routed.

Activity Tracker hosted event search routes location-based auditing events to an Activity Tracker instance in the region where they are generated and routes global auditing events to the Activity Tracker instance that is provisioned in Frankfurt.

Activity Tracker Event Routing routes events based on the location that is specified in the logSourceCRN field included in the event. You can define a target, the resource where events are routed to, in any Activity Tracker Event Routing supported region. However, the target resource can be located in any region where that type of target is supported, in the same account or in a different account. You can define rules to determine where auditing events are to be routed by configuring 1 or more routes in the account. You can define rules for managing global events and location-based events that are generated in regions where Activity Tracker Event Routing is supported.
print(f'Property Name : {0}'.format(property.get_property_name()))
print(f'Property Id : {0}'.format(property.get_property_id()))
print(f'Property Data Type : {0}'.format(property.get_property_data_type()))





 Get all Properties 

properties_dictionary = appconfig_client.get_properties()





 Property evaluation 

You can use the property.get_current_value(entity_id=entity_id, entity_attributes=entity_attributes) method to evaluate the value of the property. This method returns the default property value or its overridden value based on the evaluation. The data type of returned value matches that of property.

entity_id = "john_doe"
entity_attributes = {
'city': 'Bangalore',
'country': 'India'
}
property_value = property.get_current_value(entity_id=entity_id, entity_attributes=entity_attributes)



* entity_id: Id of the entity. This is a string identifier related to the entity against which the property is evaluated. For example, an entity might be an instance of an app that runs on a mobile device, a microservice that runs on the cloud, or a component of infrastructure that runs that microservice. For any entity to interact with App Configuration, it must provide a unique entity ID.
* entity_attributes: A JSON object consisting of the attribute name and their values that define the specified entity. This is an optional parameter if the property is not configured with any targeting definition. If the targeting is configured, then entity_attributes should be provided for the rule evaluation. An attribute is a parameter that is used to define a segment. The SDK uses the attribute values to determine whether the specified entity satisfies the targeting rules, and returns the appropriate property value.









 Fetching the appconfig_client across other modules 

When the SDK is initialized, the appconfig_client can be obtained across other modules as shown:

 other modules
The Akamai CNAME is generated automatically by Akamai and you do not have to define or edit it.
* When should I use the Akamai CNAME instead of IBM CNAME?

 When should I use the Akamai CNAME instead of IBM CNAME? 

Akamai CNAME provides a shorter DNS lookup time for your domain. The Akamai CNAME improves the performance of your website by shortening the DNS resolution time.

You can only point your domain to the Akamai CNAME when the CDN mapping status is in RUNNING state.
* What happens if a domain is still pointing to Akamai CNAME when the CDN is stopped?

 What happens if a domain is still pointing to Akamai CNAME when the CDN is stopped? 

When the CDN is stopped, a Deny_All rule is added for the domain on the Akamai side. Even if the domain can still be resolved to Akamai by pointing to Akamai CNAME, the traffic for the domain is denied, and the response is similar to the following:

HTTP/2 403
server: AkamaiGHost
mime-version: 1.0
content-type: text/html
content-length: 269
expires: Tue, 15 Sep 2020 07:54:31 GMT
date: Tue, 15 Sep 2020 07:54:31 GMT

<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>

You do not have permission to access "http://xxxx;" on this server.<P>
Reference 18.9df02817.1600156471.bf3f7f1
</BODY>
</HTML>
* Where I can find the Akamai CNAME?

 Where I can find the Akamai CNAME? 

You can find the Akamai CNAME in the following ways:



* From the console, you can click into the CDN domain, and view the Akamai CNAME in Overview > Details.
Then, you need to determine the location of the events based on scope.

For Activity Tracker hosted event search, global events are available through the Activity Tracker instance in Frankfurt. Therefore, to view global events, you must provision an instance of the IBM Cloud Activity Tracker service in Frankfurt.

For Activity Tracker Event Routing, global events are collected in the region that you configure. Therefore, to find those events, you must find the route that is configured in 1 region of your account to collect global events.

For location-based events, you need to check the following scenarios to determine the Activity Tracker Event Routing instance where the events are available for analysis:



* Scenario 1: The service is provisioned in a location where the Activity Tracker Event Routing service is available.



1. Identify the location where your Cloud service is provisioned.
2. Check whether the Activity Tracker Event Routing service is available in that region. See [Locations](https://cloud.ibm.com/docs/atracker?topic=atracker-regions).
3. For Activity Tracker hosted event search, check that you have an Activity Tracker Event Routing instance provisioned in the same location where your service is provisioned. For Activity Tracker Event Routing, check that you have a targets and routes defined correctly.



* Scenario 2: The Cloud service is provisioned in a location where the IBM Cloud Activity Tracker service is not available.



1. Identify the location where your Cloud service is provisioned.
2. Check the [Cloud services locations](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-regions) to identify the Activity Tracker instance where events are available.









 How do I access and query data that has been archived for long term storage in COS? 

To access data, you can download the archived file locally.

To query the data, you can also use a service like SQL Query to query your COS archives and get information based on queries that you define. [Learn more](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-sqlquery).





 How do I configure archiving for my instance?
const collectionId = '<collectionId>';
const environmentId = '<environmentId>';

const appConfigClient = AppConfiguration.getInstance();
appConfigClient.init(region, guid, apikey)
appConfigClient.setContext(collectionId, environmentId)

Where:



* region: Region name where the App Configuration service instance is created. Use AppConfiguration.REGION_US_SOUTH for Dallas, AppConfiguration.REGION_EU_GB for London, AppConfiguration.REGION_AU_SYD for Sydney, and AppConfiguration.REGION_US_EAST for Washington DC.
* guid: Instance ID of the App Configuration service. Get it from the service credentials section of the App Configuration dashboard.
* apikey: ApiKey of the App Configuration service. Get it from the service credentials section of the App Configuration dashboard.
* collectionId: ID of the collection created in App Configuration service instance under the Collections section.
* environmentId: ID of the environment created in App Configuration service instance under the Environments section.



The init() and setContext() are the initialization methods and need to be started only once by using appConfigClient. The appConfigClient, after initialized, can be obtained across modules by using AppConfiguration.getInstance().





 Using private endpoints 

Optionally, set the SDK to connect to App Configuration service by using a private endpoint that is accessible only through the IBM Cloud private network.

appConfigClient.usePrivateEndpoint(true);

This must be done before calling the init function on the SDK.





 Option to use a persistent cache for configuration 

In order for your application and SDK to continue its operations during the unlikely unavailability of the App Configuration service across your application restarts, you can configure the SDK to use a persistent cache. The SDK uses the persistent cache to store App Configuration data that is available across your application restarts.

// 1. default (without persistent cache)