Configuration
Every data-* attribute the embed accepts — types, defaults, behaviour, and worked examples.
Last updated 2026-05-23
All options are data-* attributes. Put them on the <script> tag (they cascade to the auto-injected element) or directly on a manually-mounted <zupport-chat> (for inline previews). The same attribute name is used in both places.
Attribute reference
| Attribute | Type | Default | Purpose |
|---|---|---|---|
data-assistant-id | string | required | Identifier that derives the config / scenarios / vectors URLs from the configured base URL. |
data-config-base-url | string (URL) | https://cdn.zupport.chat | Override the bucket base URL used to derive paths. |
data-config-url | string (URL) | derived | Fully-qualified config.json URL. Bypasses the assistant-id → URL derivation entirely. |
data-mode-override | mobile | desktop | auto-detected | Force the layout regardless of device. Useful for QA on a desktop browser. |
data-engine-override | llm | scenarios | auto-selected | Pin the answer engine. llm runs Qwen3-0.6B in-browser (WebGPU then WASM); scenarios matches curated Q&A only. |
data-preview | boolean | false | Enable in-app preview mode with a desktop/mobile toggle. Used by the assistant detail page. |
data-disable-cache | boolean | false | Skip IndexedDB caching of model weights and vectors. Re-downloads everything on each visit — useful when debugging. |
data-model-base-url | string (URL) | Hugging Face Hub | Self-host the model weights (Qwen3 + embedder) instead of hitting HF Hub. |
Worked example
Multiple overrides on one script tag:
<script
src="https://github.com/pavelsima/zupport-embed/releases/latest/download/embed.js"
data-assistant-id="my-assistant"
data-config-base-url="https://cdn.mycompany.com"
data-mode-override="mobile"
data-disable-cache="true"
defer
></script>Putting attributes on the element instead
If you mount the element manually (for inline previews with data-preview="true"), set the same attributes directly:
<zupport-chat
data-assistant-id="my-assistant"
data-mode-override="desktop"
data-engine-override="llm"
></zupport-chat>Attribute changes are reactive — see JavaScript API for the property-based alternatives.
Boolean attribute parsing
The embed treats these values as true: "true", "" (attribute present with no value), and "1". Anything else parses to false. Examples:
data-preview→truedata-preview="true"→truedata-preview="false"→false
Where the URLs come from
The embed resolves URLs in this order:
- If
data-config-urlis set, use it verbatim. - Else derive
{baseUrl}/assistants/{id}/config.json, wherebaseUrlisdata-config-base-url(or the defaulthttps://cdn.zupport.chat) and{id}isdata-assistant-id.
data-config-base-url to your own bucket lets you serve the JSON files yourself — useful for caching, CDN policies, or air-gapped deploys. The bucket layout matches Zupport.chat's: /assistants/{id}/config.json, scenarios.json, vectors.json.