Chat Box
Chat Box component offers a complete, fast and reliable chat experience to generate answers based on your index contents and query.
The Chat Box component is included in the Search Box component with no additional configuration needed, but it can also be used as a standalone component.
You can check out a live demo on our main website orama.com.
Installation
To install the Orama UI Components library, you can follow the instructions here.
Usage
The Chat Box
supports the following options.
Option | Description | Default |
---|---|---|
index | The index configuration. An object with the endpoint and api_key properties. These are the Endpoint URL and Public API Key of your index. | Required when clientInstance is not specified. |
clientInstance | The OramaClient instance to use for the search and answer engine. | Required when index is not specified. |
sourceBaseUrl | The base URL for the search results. | Empty |
sourcesMap | An object to mapping your document properties with the ChatBox source results. | {} |
suggestions | An array of suggestions to display in the initial state. | [] |
Example
Here is an example of how to use the Chat Box
component in your application using React.