vania-janet/multiturn-rag-retrieval-data huggingface dataset:
kcat -F kcat.config -P -t webserver

If you use Docker, run:

docker run -v ${PWD}:/bdla -w /bdla -it --network=host edenhill/kcat:1.7.0 -F kcat.config -P -t webserver

The command will connect as event producer to the topic webserver. Remember the command for later.
4. The kcat tool is awaiting input. Copy and paste the log message from below into the terminal. Hit enter then CTRL-d to send the log message to Event Streams.

{ "host": "199.72.81.55", "time_stamp": "01/Jul/1995:00:00:01 -0400", "request": "GET /history/apollo/ HTTP/1.0", "responseCode": "200", "bytes": "6245" }







 Check the landed data 

You can check the landed data in the Data Engine UI and also in the Object Storage bucket.



1. Navigate to the [resource list](https://cloud.ibm.com/resources) and under Databases, click on log-analysis-sql service.
2. Click on Launch Data Engine UI to open the Data Engine UI. You should see the streaming job Running.
3. Click on the Details tab to see the actual SQL statement that was submitted to Data Engine for the stream landing. Notice the Result location it will be used shortly to query the data.

Zoom

![Data Engine console](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution31/sql_query_console.png)

Data Engine console

The Select statement would looks like

SELECT * FROM <EVENT_STREAMS_CRN>/webserver
5. Run the Python script by using python3 <python-file-name> to create a Schematics workspace in the IBM Cloud.
6. You get a successful response if the parameters passed as part of the request are valid and you should be able to see the Schematics workspace that you created in the IBM Cloud console. If you don’t get a successful response, the error response contains the errors that you need to resolve. Resolve those errors and run the script until you are able to get a valid response and create a workspace.
7. Optional: If you want to add one of the variables such as resource_prefix with the value scale-test when you create a workspace, provide the values in the following parameters:



* workspace_variable_request_model = {}
* workspace_variable_request_model['name'] = 'resource_prefix'
* workspace_variable_request_model['value'] = 'scale-test'



8. If you want to update multiple values at the same time, follow the steps for [Updating variables with Schematics API](https://cloud.ibm.com/docs/hpc-spectrum-scale?topic=hpc-spectrum-scale-update-variables).





 Example Python request 

 Create a Schematics workspace using Python API

import json, logging

from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from ibm_schematics.schematics_v1 import SchematicsV1

logging.basicConfig()
logging.root.setLevel(logging.NOTSET)
logging.basicConfig(level=logging.NOTSET)

authenticator = IAMAuthenticator('')

schematics_service = SchematicsV1(authenticator = authenticator)

schematics_service.set_service_url('https://us.schematics.cloud.ibm.com')

template_source_data_request_model = {}
template_source_data_request_model['env_values'] = [
{
Cloud Functions has a size limit for the app code, see maximum codeSize described in the [Action Limits](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-limitslimits_actions). However, you can install large packages and dependencies into a custom Docker image and deploy it with your app code when you create an action. You can then import the packages at run time.

In this example, install large Python packages such as matplotlib and seaborn to build a Cloud Functions web action that generates a PNG file of a joint plot with seaborn.

Before you begin



* Review the packages that are included with the [Python runtime](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-runtimesopenwhisk_ref_python_environments) to see whether a dependency of your app is already included with the runtime. If your dependency is not included, you must package it with your app.
* The following steps assume that you are running the commands on a Linux-based distribution on a processor with AMD64-based architecture.



Only public Docker images are supported.

Package the app in a custom Docker image by completing the following steps.



1. Create a directory that you can use to create your Dockerfile. In this example, a functions directory is created on the desktop. After you create the functions directory, cd to it.

cd desktop; mkdir functions; cd functions
2. Create a [Dockerfile ![External link icon](https://cloud.ibm.com/docs-content/v1/content/adc643f3bedeea02b638bc1c34732852dcb40a45/icons/launch-glyph.svg)](https://docs.docker.com/engine/reference/builder/) in your functions directory.

touch Dockerfile
3. Use vim to edit the Dockerfile file. Enter the names of the pip modules and versions you want to install.
Web chat overview 

You can use the web chat integration to deploy your assistant on your website or embed it as a WebView in your mobile app. The web chat integration provides an easy-to-use chatbot interface that can integrate seamlessly with your site, without requiring the time and effort that would be required to build your own custom user interface.

The web chat can help your customers start the conversation with common questions or tasks; it can display multimedia and interactive elements such as forms, and it can transfer customers to human agents for more help. A developer can customize the web chat to add even more capabilities.



 Why use the web chat? 

Building a custom user interface requires spending time and effort solving typical UI problems. For example, you need to design the layout and styling, keep up with browser changes, manage scrolling behavior, validate input, and comply with accessibility requirements. The time you spend building and maintaining a custom UI is better spent building a high-quality assistant instead.

The web chat widget uses cutting-edge functionality from IBM Design and Research to engage your users when they need help, answer their questions quickly and efficiently, and provide fallback options so there is always a path to a solution. The web chat is easy for you to deploy and easy for customers to use, it is secure, and it supports a wide range of desktop and mobile browsers.

The web chat is also customizable, which means that you can take advantage of the web chat functionality while still maintaining consistency with your website style and branding, adding custom UI elements, and integrating with external systems (such as live agent tools or CRM systems).





 What you can do with the web chat 

You can quickly deploy the web chat to your website (or even to a local test page) and see how it works. You can also use the web chat integration settings in the Watson Assistant user interface to configure the web chat for your website and your customers.

If you are a developer, you can further customize and extend the web chat by writing code and using the web chat API. You can also use a WebView with a JavaScript bridge to add the web chat to your mobile app.

The following documentation topics provide more information about the capabilities of the web chat integration, how to configure and deploy it, and how to customize it.
Integrating the web chat with your website 

Add your assistant to your company website as a web chat widget that can help your customers with common questions and tasks.

When you create a web chat integration, code is generated that calls a script that is written in JavaScript. The script instantiates a unique instance of your assistant. You can then copy and paste the HTML script element into any page or pages on your website where you want users to be able to ask your assistant for help.



 Create a web chat instance to add to your website 

To add the assistant to a web page on your company website, complete the following steps:



1. From the Assistants page, click to open the assistant tile that you want to deploy to your site.
2. From the Integrations section, click the Web chat tile.
3. Optional: Change the web chat integration name from Web chat to something more descriptive.
4. Click Create to create a web chat instance.
5. Optional: Customize the style of the chat window. You can make the following changes:



* Public assistant name. Name by which the assistant is known to users. This name is displayed in the header of the chat window. The name can be up to 18 characters in length.
* Primary color. Sets the color of the web chat header.

Click the white dot to open a color switcher where you can choose a color. The color is saved as an HTML color code, such as FF33FC for pink and 329A1D for green. Alternatively, you can add an HTML color code directly to the field to set the color.
* Secondary color: Sets the color of the user input message bubble.
* Accent color. Sets the color of interactive elements, including:



* Chat launcher button that is embedded in your web page
* Send button associated with the input text field
* Input text field border when in focus
* Marker that shows the start of the assistant’s response
* Border of a button after it is clicked
* Border of the drop-down list field as the user chooses an option
* Typing indicator that is shown to repesent a pause response
Embedding the web chat on your page 

To add the web chat widget to your website, all you need to do is embed a generated script element in your HTML source.

The web chat integration is automatically included for every assistant, and is configured separately for each environment.

To add the web chat to your website, follow these steps:



1. On the ![Integrations icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/integrations-icon.png)Integrations page, find the Web chat tile and click click Open. The Open web chat window opens.
2. In the Environment field, select the environment you want the web chat widget to connect to. Click Confirm.

The Web chat page opens, showing the settings for the web chat integration in the selected environment.

The preview pane shows what the web chat will look like when it is embedded in a web page. If you see a message that starts with, There is an error, you probably haven't added any actions to your assistant yet. After you add an action, you can test the conversation from the preview pane.
3. Click the Embed tab.

A code snippet is generated based on the web chat configuration. You (or a web developer) will add this code snippet to the web page where you want the web chat to appear.

This code snippet contains an HTML script element. The script calls JavaScript code that is hosted on an IBM site and creates an instance of a widget that communicates with the assistant.
4. Click the ![Copy icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/copy-icon.png)Copy to clipboard icon to copy the embed script to the clipboard.
5.
Web chat development overview 

If you are comfortable with JavaScript code, you can customize and extend the web chat by using the web chat API. You can also use a WebView to embed the web chat in your mobile app.

For detailed reference information about the web chat API, see the web chat [developer documentation](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=).

To add the web chat widget to your website or a WebView in your mobile app, all you need to do is embed a generated script element in your HTML source (for more information about the embed script, see [Embedding the web chat on your page](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-web-chat)). Within this embed script, you can use the web chat API to customize or extend the web chat.

The web chat API consists of several components:



* Configuration object: The embed script defines a configuration object named watsonAssistantChatOptions, which specifies configuration objects for the web chat widget. By editing the configuration object, you can customize the appearance and behavior of the web chat before it is rendered. For more information about the available configuration options, see [Configuration options object](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-configurationconfigurationobject) in the web API reference.
* Instance methods: The web chat instance methods provide low-level control of the web chat widget. You can use the instance methods to implement custom behavior such as changing how the web chat widget opens, showing and hiding content, and setting identity information. For more information about the available instance methods, see [List of methods and properties](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodslistofmethods) in the web chat API reference.
* Events: The web chat event system makes it possible for your website to respond to web chat events (such as opening or closing the web chat window, sending or receiving messages).
This documentation is for the classic Watson Assistant experience. To see the documentation for the new Watson Assistant, please go [here](https://cloud.ibm.com/docs/watson-assistant).



 Adding the web chat to your website 

Add your assistant to your company website as a web chat widget that can help your customers with common questions and tasks, and can transfer customers to human agents.

When you create a web chat integration, code is generated that calls a script that is written in JavaScript. The script instantiates a unique instance of your assistant. You can then copy and paste the HTML script element into any page or pages on your website where you want users to be able to ask your assistant for help.

To learn more about how web chat can help your business, read [this Medium blog post](https://medium.com/ibm-watson/building-an-engaging-virtual-assistant-cf39cd0c3730).



 Create a web chat instance to add to your website 

To add the assistant to a web page on your company website, complete the following steps:



1. From the Assistants page, click to open the assistant tile that you want to deploy to your site.
2. From the Integrations section, either click Integrate web chat, or click Add integration, and then choose the Web chat tile.

The web chat integration is added to your first assistant automatically. If you're using the My first assistant, click the Web chat tile to open the integration that was added for you.
3. Optional: Change the web chat integration name from Web chat to something more descriptive.

A preview pane is displayed that shows you what the web chat looks like when it is embedded in a web page. If a message is displayed that starts with, There is an error, it means you haven't added a conversational skill to your assistant yet. After you add a skill, you can test the conversation from the preview pane.
4. Click Create to create a web chat instance.

You can skip this step if the web chat integration was created for you automatically.

!
The code snippet that creates the web chat widget includes a configuration object, which you can modify to change the appearance and behavior of the web chat. The configuration object also specifies details that enable the web chat to connect to your assistant. If you are comfortable writing JavaScript code, you can customize the web chat by modifying the code snippet and using the web chat API.

The web chat uses the Watson Assistant v2 stateful API to communicate with the assistant. By default, the session ends and the conversation ends after 5 minutes of inactivity. This means that if a user stops interacting with the assistant, after 5 minutes, any context variable values that were set during the previous conversation are set to null or back to their initial values. You can change the inactivity timeout setting in the assistant settings (if allowed by your plan).



 Browser support 

The web chat supports a variety of devices and platforms. As a general rule, if the last two versions of a browser account for more than 1% of all desktop or mobile traffic, the web chat supports that browser.

The following list specifies the minimum required browser software for the web chat (including the two most recent versions, except as noted):



* Google Chrome
* Apple Safari
* Mobile Safari
* Chrome for Android
* Microsoft Edge (Chromium and non-Chromium)
* Mozilla Firefox
* Firefox ESR (most recent ESR only)
* Opera
* Samsung Mobile Browser
* UC Browser for Android
* Mobile Firefox



For optimal results when rendering the web chat on mobile devices, the <head> element of your web page must include the following metadata element:

<meta name="viewport" content="width=device-width, initial-scale=1" />





 Accessibility 

IBM strives to provide products with usable access for everyone, regardless of age or ability.

The web chat integration complies with the [Web Content Accessibility 2.1 Level AA](https://www.w3.org/WAI/standards-guidelines/wcag/new-in-21/) standard. It is tested with both screen readers and automated tools on a continual basis.





 Language support
You can configure how and where the web chat widget appears, and you can use theming to align it with your branding and website design. If a customer needs help from a person, the web chat integration can transfer the conversation to an agent.
* [Phone integration](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-phone): The phone integration enables your assistant to converse with customers on the phone by using the IBM Watson Text to Speech and Speech to Text services. If your customer asks to speak to a person, the phone integration can transfer the call to an agent.







 Updating and managing channels 

Each channel has specific settings that you can adjust to adapt the end experience for your user. You can edit these settings by selecting the channel in an environment, or in Integrations.

If you make an update to a channel in the draft environment, the same channel in live environment is not affected in the live environment. Similarly, if you make an update to a channel in the live environment, the same channel in draft environment is not affected. If you select a channel from the Integrations page, you are asked to select which environment you are editing.

For more information about editing your web chat integration, see [Basic web chat configuration](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-overview).





 Deleting channels 

To delete a channel, go to the Integrations page and use the overflow menu on the integration:

![GIF of how to delete a channel](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/delete-channel.gif)

If you deployed your assistant to a channel, then deleting the channel does not remove the assistant from the channel. For example, if you deploy web chat, you paste the JavaScript snippet into the HTML header of your website. Deleting your channel disconnects your content from the customer experience that is shown on your website.
Applying advanced customizations 

Tailor the web chat to match your website and brand, and to behave in ways that meet your business needs.



 API overview 

The following APIs are available:



* Configuration object: When the embedded web chat widget starts, a configuration object named watsonAssistantChatOptions is used to define the widget. By editing the configuration object, you can customize the appearance and behavior of the web chat before it is rendered.
* Runtime methods: Use the instance methods to perform tasks before a conversation between the assistant and your customer begins or after it ends.
* Events: Your website can listen for these events, and then take custom actions.



A developer can use these APIs to customize the web chat in the following ways:



* [Change how the web chat opens and closes](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-web-chat-configweb-chat-config-open-close)
* [Change the conversation](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-web-chat-configweb-chat-config-convo)
* [Change the look of the web chat](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-web-chat-configweb-chat-config-look)







 Change how the web chat opens and closes 

You can change the color of the launcher icon from the Style tab of the web chat configuration page. If you want to make more advanced customizations, you can make the following types of changes:



* Change the launcher icon that is used to open the web chat widget. For a tutorial the shows you how, see [Using a custom launcher](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=tutorials-launcher).
* Change how the web chat widget opens. For example, you might want to launch the web chat from some other button or process that exists on your website, or maybe open it in a different location, or at a different size.
For more information, see [Create a web chat instance to add to your website](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chatdeploy-web-chat-task).
* Fixes to rendering of list items: The rendering of HTML list items in the web chat widget has been updated.







 4.1.0 

Release date: 8 April 2021



* Home screen now generally available: Ease your customers into the conversation by adding a home screen to your web chat window. The home screen greets your customers and shows conversation starter messages that customers can click to easily start chatting with the assistant. For more information about the home screen feature, see [Configuring the home screen](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chatdeploy-web-chat-home-screen).
* Home screen enabled by default: The home screen feature is now enabled by default for all new web chat deployments.
* Home screen context support: You can now access context variables from the home screen. Note that initial context must be set using a conversation_start node. For more information, see [Starting the conversation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-startdialog-start-welcome).







 4.0.0 

Release date: 16 March 2021



* Session history now generally available: Session history allows your web chats to maintain conversation history and context when users refresh a page or change to a different page on the same website. It is enabled by default. For more information about this feature, see [Session history](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=tutorials-session-history).

Session history persists within only one browser tab, not across multiple tabs. The dialog provides an option for links to open in a new tab or the same tab.
You can also use the web chat integration settings in the Watson Assistant user interface to configure the web chat for your website and your customers.

If you are a developer, you can further customize and extend the web chat by writing code and using the web chat API. You can also use a WebView with a JavaScript bridge to add the web chat to your mobile app.

The following documentation topics provide more information about the capabilities of the web chat integration, how to configure and deploy it, and how to customize it.



* [How the web chat works](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-architecture): Overview of web chat capabilities and architecture
* [Embedding the web chat on your page](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-web-chat): How to embed the web chat widget on your website
* [Web chat setup](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-config): How to configure the web chat using the integration settings
* [Web chat development](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-config): How to customize and extend the web chat by writing code
* [Adding contact center support](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-web-chat-haa): How to integrate the web chat with a contact center platform so you can connect your customers to human agents