BVector Chat
Configuration
All options passed to new ChatWidget(options) or window.BangdbChatWidget.init(options).
ChatWidgetOptions
Top-level object passed to the widget constructor.
| Property | Type | Required | Description |
|---|---|---|---|
| config | ApiConfig | required | BangDB connection settings — see ApiConfig below. |
| title | string | optional | Widget header title shown at the top of the chat panel. |
| logo | string | optional | URL of an image to display in the widget header. |
| colorTokens | ColorTokens | optional | Theme override tokens — see Theming for the full list. |
ApiConfig
Nested under config. All fields are required.
| Property | Type | Required | Description |
|---|---|---|---|
| apikey | string | required | BangDB authentication token. Obtain from the BangDB dashboard. |
| backendURL | string | required | BangDB service endpoint. Typically port 18080 on your instance. |
| resourceURL | string | required | Resource service endpoint. Typically port 18082 on your instance. |
| userid | string | required | Unique identifier for the current user. Used to scope conversation history. |
| indexName | string | required | Name of the BVector index to query for semantic search. |
Notes
apikey securityNever expose your apikey in client-side code for production applications. Use a backend proxy or environment variables that are scoped to your server.
userid uniquenessThe userid ties conversation history to a user. Use your app's authenticated user ID or a stable session ID — avoid using random values that change on page reload.
indexNameMust match an existing index on your BVector instance. Create indexes via the BVector REST API before using them with the chat widget.