BVector Chat
Installation
Install via a package manager for bundler-based projects, or load directly from CDN for zero-build integration.
Package manager
npm
npm install @bangdb/web-sdkyarn
yarn add @bangdb/web-sdkpnpm
pnpm add @bangdb/web-sdkbun
bun add @bangdb/web-sdkCDN (no build step)
For vanilla HTML or CMS-based projects, load the global bundle from jsDelivr and call window.BangdbChatWidget.init():
index.html
<!-- Add before </body> -->
<script
src="https://cdn.jsdelivr.net/npm/@bangdb/web-sdk@latest/dist/index.global.js"
></script>
<script>
window.BangdbChatWidget.init({
title: 'Chat with AI',
config: {
apikey: 'your-api-key',
backendURL: 'https://your-instance.com:18080',
resourceURL: 'https://your-instance.com:18082',
userid: 'user-123',
indexName: 'my-index',
},
});
</script>Direct URL: https://cdn.jsdelivr.net/npm/@bangdb/web-sdk@latest/dist/index.global.js
Version pinning
The CDN URL above uses @latest, which always resolves to the newest release. For production, pin a specific version:
pinned CDN URL
https://cdn.jsdelivr.net/npm/@bangdb/web-sdk@1.0.9/dist/index.global.jsNEXT
Once installed, follow the Quickstart guide to initialize the widget in your framework of choice.