The AI Assistant is a securely embeddable, conversational interface that lets users ask natural-language questions inside your application and receive context-aware insights, with persistent chat history and full adherence to user permissions.
Before you begin, ensure the following:
embedSecret is highly sensitive and should never be exposed in frontend code, browsers, or client applications.Note: You can reuse the Embed Token generated for dashboard embedding case. Due to a current limitation, Embed Tokens are generated using a dashboardId but are not dashboard-specific; they are user-specific. This limitation will be addressed in a future release.
<div> in your frontend where the AI Assistant will load.loadAIAssistant(). <body onload="embedSample();">
<div id="embed_container"></div>
<script>
function embedSample() {
var boldbiEmbedInstance = BoldBI.create({
serverUrl: "<Bold BI Server URL>",
mode: Bold.Mode.AIAssistant,
embedContainerId: "<Embed Container Id>",
embedToken: "<Embed token generated from backend server>"
});
boldbiEmbedInstance.loadAIAssistant();
}
</script>
</body>Note: For more information on AI Assistant members and methods, refer to this link