Integration via iframe
The iframe integration method is the simplest. You only need to add an iframe element to your HTML file (or Vue/React component) and set its src
attribute to the URL of the AI Assistant.
<iframe
src="https://develop.hengshi.org/copilot"
width="100%"
height="100%">
</iframe>
URL Query String Parameter Description
We provide some optional URL parameters that you can adjust as needed.
Data Source
You can specify the data source when interacting with the AI assistant in the following ways:
- Interact with the data source of the chart
?appId={App ID}&chartId={Chart ID}
- Interact with the data model of the dataset
?dataAppId={App ID}&datasetId={Dataset ID}
- Interact with multiple data sources at the same time
?dataSources=[{"dataAppId":{App ID1},"datasetId":{Dataset ID1}},{"dataAppId":{App ID2},"datasetId":{Dataset ID2}]
Pay attention that the parameters need to be url encoded.
Theme Colors
You can specify the theme colors for the charts within the AI assistant conversation using the following method:
?chartTheme={Dashboard Theme ID}
The Dashboard Theme ID can be found in the theme dropdown menu while editing a dashboard in your app creation area, as shown in the image below:
Display Only Specified Conversations
We also provide the conversationId
and chatUid
parameters, allowing multiple values to be passed separated by commas, to specify displaying only certain conversations. These two parameters can be used independently or in combination.
?conversationId={conversationID1,conversationID2}&chatUid={uid1,uid2}
Login Authentication
If you need to integrate with other systems, login authentication may be required. You can pass login information through the jwt
parameter:
?activeAuth=jwt-param&jwtParam={JWT parameter}