@qoretechnologies/qorus-chat
v0.1.0-beta.0
Published
Embeddable chat widget for Qorus AI endpoints. Drops onto a customer site as a floating bubble or inline mount, or imports as a React component (SDK) — backed by a Qorus ai-endpoint (model + RAG collections + guardrails + tools).
Readme
@qoretechnologies/qorus-chat
Embeddable chat widget for Qorus AI endpoints.
A single <script> tag drops a chatbot onto any website, backed by an ai-endpoint
authored in the Qorus IDE — model + system prompt + tools + RAG collections + guardrails
all wired server-side. The customer's HTML only carries the snippet.
Distribution
- Primary: served by every Qorus instance at
/widget/qorus-chat.js. The IDE generates the snippet pre-filled with the user's Qorus URL and a public API key. - Mirror: same artifact published to npm so jsDelivr / unpkg auto-host a CDN copy for customers who want one URL across instances.
Snippet
<!-- Floating bubble (default) -->
<script src="https://<your-qorus>.example/widget/qorus-chat.js"
data-endpoint="<endpoint-uuid>"
data-key="qw_pk_..."
defer></script>
<!-- Inline mount -->
<div id="chat"></div>
<script src="https://<your-qorus>.example/widget/qorus-chat.js"
data-endpoint="<endpoint-uuid>"
data-key="qw_pk_..."
data-mode="inline"
data-mount="#chat"
defer></script>Theming
The widget ships three curated base looks; the customer picks one and sets a brand accent — they can't pass a broken theme.
| Attribute | JS option | Values | Effect |
|---|---|---|---|
| data-theme | theme | qorus (default), dark, light | Base panel look |
| data-accent | accent | any hex, e.g. #ff5a1f | Launcher, send button, user bubble |
<script src="https://<your-qorus>.example/widget/qorus-chat.js"
data-endpoint="<endpoint-uuid>"
data-key="qw_pk_..."
data-theme="light"
data-accent="#ff5a1f"
defer></script>JS API
window.QorusChat.mount({
endpoint: '<endpoint-uuid>',
apiKey: 'qw_pk_...',
baseUrl: 'https://<your-qorus>.example',
mode: 'bubble', // or 'inline'
mount: '#chat', // required for inline
theme: 'qorus', // 'qorus' | 'dark' | 'light'
accent: '#7b68ee', // brand accent hex
visitorId: 'anon-abc',
});Build
yarn install
yarn build # produces dist/widget.jsThe bundle is self-contained — React, react-dom, styled-components, and Reqore are bundled in. No peer deps on the customer page.
Related
- IDE-side task:
~/Projects/qorus-ide/.tasks/AI_ENDPOINT_PLAYGROUND_AND_EMBED.md - Server prerequisites (umbrella): qoretechnologies/qorus#226
