Skip to main content
DocsEmbed scriptConfiguration
Embed script

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

AttributeTypeDefaultPurpose
data-assistant-idstringrequired Identifier that derives the config / scenarios / vectors URLs from the configured base URL.
data-config-base-urlstring (URL)https://cdn.zupport.chatOverride the bucket base URL used to derive paths.
data-config-urlstring (URL)derived Fully-qualified config.json URL. Bypasses the assistant-id → URL derivation entirely.
data-mode-overridemobile | desktopauto-detected Force the layout regardless of device. Useful for QA on a desktop browser.
data-engine-overridellm | scenariosauto-selected Pin the answer engine. llm runs Qwen3-0.6B in-browser (WebGPU then WASM); scenarios matches curated Q&A only.
data-previewbooleanfalse Enable in-app preview mode with a desktop/mobile toggle. Used by the assistant detail page.
data-disable-cachebooleanfalse Skip IndexedDB caching of model weights and vectors. Re-downloads everything on each visit — useful when debugging.
data-model-base-urlstring (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-previewtrue
  • data-preview="true"true
  • data-preview="false"false

Where the URLs come from

The embed resolves URLs in this order:

  1. If data-config-url is set, use it verbatim.
  2. Else derive {baseUrl}/assistants/{id}/config.json, where baseUrl is data-config-base-url (or the default https://cdn.zupport.chat) and {id} is data-assistant-id.
Self-hosting the config
Setting 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.