@burtson-labs/bandit-engine 2.0.160 → 2.0.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -77
- package/dist/{aiProviderStore-BNZGM6QU.mjs → aiProviderStore-JOB2H4LP.mjs} +2 -2
- package/dist/chat-LB6UEEEW.mjs +16 -0
- package/dist/chat-provider.js +281 -142
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +6 -6
- package/dist/{chunk-MHF76C2F.mjs → chunk-3ACT5BTW.mjs} +1343 -1222
- package/dist/chunk-3ACT5BTW.mjs.map +1 -0
- package/dist/{chunk-LFQH6M6B.mjs → chunk-47MOBOP3.mjs} +5 -5
- package/dist/chunk-47MOBOP3.mjs.map +1 -0
- package/dist/chunk-G5POQT2R.mjs +390 -0
- package/dist/chunk-G5POQT2R.mjs.map +1 -0
- package/dist/{chunk-PDQT564P.mjs → chunk-ODGVCSKV.mjs} +18 -12
- package/dist/{chunk-PDQT564P.mjs.map → chunk-ODGVCSKV.mjs.map} +1 -1
- package/dist/{chunk-TKSOJGHX.mjs → chunk-OGMXL7BF.mjs} +62 -61
- package/dist/chunk-OGMXL7BF.mjs.map +1 -0
- package/dist/{chunk-B3HAQC6F.mjs → chunk-Q6LXVYTC.mjs} +68 -25
- package/dist/chunk-Q6LXVYTC.mjs.map +1 -0
- package/dist/{chunk-LTWMMHFT.mjs → chunk-R6HMLYKQ.mjs} +1820 -3260
- package/dist/chunk-R6HMLYKQ.mjs.map +1 -0
- package/dist/{chunk-IABD4L6K.mjs → chunk-RUXYVMW2.mjs} +3841 -4457
- package/dist/chunk-RUXYVMW2.mjs.map +1 -0
- package/dist/{chunk-XTB6ZLUI.mjs → chunk-WQEBTH2R.mjs} +7 -2
- package/dist/{chunk-XTB6ZLUI.mjs.map → chunk-WQEBTH2R.mjs.map} +1 -1
- package/dist/{chunk-PXCIDXRP.mjs → chunk-YHSYHU5P.mjs} +6 -6
- package/dist/{chunk-P6SLB5RC.mjs → chunk-ZNK3ELTZ.mjs} +3 -3
- package/dist/index.d.mts +85 -2
- package/dist/index.d.ts +85 -2
- package/dist/index.js +8080 -9868
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -15
- package/dist/index.mjs.map +1 -1
- package/dist/management/management.js +7681 -9478
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +9 -9
- package/dist/modals/chat-modal/chat-modal.js +1714 -3302
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +5 -5
- package/dist/{modelStore-NMCRL3FR.mjs → modelStore-FGUGOWTL.mjs} +2 -2
- package/package.json +4 -2
- package/dist/chat-4BOIV4VP.mjs +0 -16
- package/dist/chunk-B3HAQC6F.mjs.map +0 -1
- package/dist/chunk-IABD4L6K.mjs.map +0 -1
- package/dist/chunk-LFQH6M6B.mjs.map +0 -1
- package/dist/chunk-LNGF2XAZ.mjs +0 -311
- package/dist/chunk-LNGF2XAZ.mjs.map +0 -1
- package/dist/chunk-LTWMMHFT.mjs.map +0 -1
- package/dist/chunk-MHF76C2F.mjs.map +0 -1
- package/dist/chunk-TKSOJGHX.mjs.map +0 -1
- /package/dist/{aiProviderStore-BNZGM6QU.mjs.map → aiProviderStore-JOB2H4LP.mjs.map} +0 -0
- /package/dist/{chat-4BOIV4VP.mjs.map → chat-LB6UEEEW.mjs.map} +0 -0
- /package/dist/{chunk-PXCIDXRP.mjs.map → chunk-YHSYHU5P.mjs.map} +0 -0
- /package/dist/{chunk-P6SLB5RC.mjs.map → chunk-ZNK3ELTZ.mjs.map} +0 -0
- /package/dist/{modelStore-NMCRL3FR.mjs.map → modelStore-FGUGOWTL.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</picture>
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
-
# Bandit Engine <img src="https://
|
|
9
|
+
# Bandit Engine <img src="https://icons.burtson.ai/svg-accent/zap.svg" width="18" align="center" alt="" />
|
|
10
10
|
|
|
11
11
|
An AI chat toolkit built for speed, design, and control. Power branded AI assistants with battle-tested React components and a secure gateway contract.
|
|
12
12
|
|
|
@@ -97,7 +97,7 @@ Want to feel the UX without wiring a gateway or signing in? Visit the hosted pla
|
|
|
97
97
|
|
|
98
98
|
The playground is ideal for product demos, initial stakeholder reviews, or QA before you connect real providers. When you’re ready to go live, swap the provider back to your gateway for production traffic.
|
|
99
99
|
|
|
100
|
-
## <img src="https://
|
|
100
|
+
## <img src="https://icons.burtson.ai/svg-accent/wrench.svg" width="18" align="center" alt="" /> Getting Started – Plug & Play AI
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
Bandit ships with responsive layouts baked in — the chat surface, management console, and modal all collapse gracefully on phones and tablets. Install it inside a Vite project and you can ship a polished PWA: the package works offline when cached, supports mobile nav patterns, and plays nicely with add-to-home-screen flows.
|
|
@@ -170,9 +170,9 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
|
170
170
|
);
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
> <img src="https://
|
|
173
|
+
> <img src="https://icons.burtson.ai/svg-accent/rocket.svg" width="18" align="center" alt="" /> Within minutes, you'll have a fully functional chat interface that can read, speak, and reason – all brandable, themeable, and extensible.
|
|
174
174
|
|
|
175
|
-
### <img src="https://
|
|
175
|
+
### <img src="https://icons.burtson.ai/svg-accent/refresh.svg" width="18" align="center" alt="" /> Quick Provider Setup
|
|
176
176
|
|
|
177
177
|
**Option 1: Gateway Provider (Recommended)**
|
|
178
178
|
```tsx
|
|
@@ -223,7 +223,7 @@ aiProvider: {
|
|
|
223
223
|
- `POST /api/feedback` — submit in-app feedback
|
|
224
224
|
- `GET /subscription/{userId}` and `PUT /subscription/{userId}` — synchronize subscription tiers used by the feature-flag system
|
|
225
225
|
|
|
226
|
-
> **<img src="https://
|
|
226
|
+
> **<img src="https://icons.burtson.ai/svg-accent/alert-triangle.svg" width="16" align="center" alt="" /> Important:** The Bandit Engine automatically routes to provider-specific endpoints:
|
|
227
227
|
> - **Bandit AI** → `/api/bandit/chat/completions` (OpenAI format, token or API key)
|
|
228
228
|
> - **Ollama** → `/api/ollama/chat` (native Ollama format)
|
|
229
229
|
> - **OpenAI/Azure/xAI/Anthropic** → `/api/{provider}/chat/completions` (OpenAI format)
|
|
@@ -255,7 +255,7 @@ To run the quickstart purely against an Ollama daemon:
|
|
|
255
255
|
> **Gateway tip**
|
|
256
256
|
> Set `VITE_DEFAULT_MODEL` / `VITE_FALLBACK_MODEL` to the exact Ollama model tags you have available (`gemma`, `llava`, `moondream`, or your own custom builds). Bandit automatically detects multimodal Ollama models, so using `llava`, `moondream`, or other vision-capable variants enables image understanding with no extra code.
|
|
257
257
|
|
|
258
|
-
### <img src="https://
|
|
258
|
+
### <img src="https://icons.burtson.ai/svg-accent/mic.svg" width="18" align="center" alt="" /> Voice Services (TTS/STT)
|
|
259
259
|
|
|
260
260
|
The Bandit Engine supports Text-to-Speech (TTS) and Speech-to-Text (STT) through your gateway API. These services are **technology-agnostic** - you can implement them using any backend technology:
|
|
261
261
|
|
|
@@ -286,7 +286,7 @@ Use the Management interface to switch providers anytime or migrate from direct
|
|
|
286
286
|
|
|
287
287
|
---
|
|
288
288
|
|
|
289
|
-
## <img src="https://
|
|
289
|
+
## <img src="https://icons.burtson.ai/svg-accent/badge-check.svg" width="18" align="center" alt="" /> Compatibility
|
|
290
290
|
|
|
291
291
|
What each release is tested against. `scripts/check-consumer.sh` packs the build and loads it in a fresh app with these versions.
|
|
292
292
|
|
|
@@ -295,6 +295,7 @@ What each release is tested against. `scripts/check-consumer.sh` packs the build
|
|
|
295
295
|
| React | 19.x | The engine ships its own React for custom-element hosts. A React app must be on 19 so both share one copy; on 18 the engine's hooks fail. |
|
|
296
296
|
| MUI (`@mui/material`) | 7.x | Earlier versions are not tested. |
|
|
297
297
|
| Module formats | ESM and CommonJS | Both entry points are loaded by the consumer check. |
|
|
298
|
+
| Icons | [`@burtson-labs/icons`](https://icons.burtson.ai) 0.5 | A dependency, not a peer: the engine's icons are Burtson Icons through its MUI entry (`@burtson-labs/icons/mui/<name>`), so nothing extra is installed and no other icon library is bundled. |
|
|
298
299
|
| Angular / Vue | Experimental | Through `defineCustomElement`. Not covered by the consumer check. |
|
|
299
300
|
|
|
300
301
|
Earlier releases declared `react >=18` and `@mui/material >=5`. Those ranges were never tested; the declarations now match what is.
|
|
@@ -303,7 +304,7 @@ Earlier releases declared `react >=18` and `@mui/material >=5`. Those ranges wer
|
|
|
303
304
|
|
|
304
305
|
In `<Chat />`, a message that fails before the model starts answering goes back into the composer with its attachments, and the thread shows that nothing came back. Enter that confirms an IME candidate doesn't send, and a second Enter while a send is in flight is ignored. Attached documents keep their text as written (accents, CJK, emoji, code blocks); a file that can't be read, or has no text, stops the send with a message instead of being dropped.
|
|
305
306
|
|
|
306
|
-
## <img src="https://
|
|
307
|
+
## <img src="https://icons.burtson.ai/svg-accent/extension-slot.svg" width="18" align="center" alt="" /> Consuming the Components
|
|
307
308
|
|
|
308
309
|
Once you've wrapped your app with `ChatProvider`, you can selectively integrate Bandit's components as needed:
|
|
309
310
|
|
|
@@ -341,7 +342,7 @@ function YourPage() {
|
|
|
341
342
|
}
|
|
342
343
|
```
|
|
343
344
|
|
|
344
|
-
### <img src="https://
|
|
345
|
+
### <img src="https://icons.burtson.ai/svg-accent/wrench.svg" width="18" align="center" alt="" /> Utility Functions & Hooks
|
|
345
346
|
|
|
346
347
|
Bandit Engine exports several utility functions for advanced use cases:
|
|
347
348
|
|
|
@@ -382,36 +383,36 @@ const mood = await detectMessageMood("I'm so excited about this project!");
|
|
|
382
383
|
#### Date/Time Context
|
|
383
384
|
All AI interactions automatically include current date/time context to improve relevance and accuracy of responses.
|
|
384
385
|
|
|
385
|
-
> <img src="https://
|
|
386
|
+
> <img src="https://icons.burtson.ai/svg-accent/alert-triangle.svg" width="16" align="center" alt="" /> **Important:** Each component (`<Chat />`, `<Management />`, `<ChatModal />`) **must** be wrapped in a `ChatProvider` to function correctly.
|
|
386
387
|
> In React, you can wrap your app once at the root.
|
|
387
388
|
> In Angular or Vue, you may need to wrap each usage with a `<bandit-chat-provider>` tag and pass settings each time until full reactive context is supported.
|
|
388
389
|
|
|
389
390
|
---
|
|
390
391
|
|
|
391
|
-
## <img src="https://
|
|
392
|
+
## <img src="https://icons.burtson.ai/svg-accent/sliders.svg" width="18" align="center" alt="" /> Chat Control Center (ChatModal Feature)
|
|
392
393
|
|
|
393
394
|
The `<ChatModal />` includes a comprehensive Chat Control Center that provides advanced session management:
|
|
394
395
|
|
|
395
|
-
### <img src="https://
|
|
396
|
+
### <img src="https://icons.burtson.ai/svg-accent/wrench.svg" width="18" align="center" alt="" /> Core Features
|
|
396
397
|
- **Session vs. Conversation Context**: Toggle between local modal session and persistent conversation history
|
|
397
398
|
- **Voice Model Selection**: Real-time voice switching with preview greetings (requires TTS gateway configuration)
|
|
398
399
|
- **Memory Management**: View and manage AI personal memory entries
|
|
399
400
|
- **Conversation Navigation**: Seamless transition from modal to full chat interface
|
|
400
401
|
- **Manual Refresh**: Force reload of conversations and voice models for troubleshooting
|
|
401
402
|
|
|
402
|
-
### <img src="https://
|
|
403
|
+
### <img src="https://icons.burtson.ai/svg-accent/mic.svg" width="18" align="center" alt="" /> Voice Integration
|
|
403
404
|
When your gateway API includes TTS endpoints, the Chat Control Center provides:
|
|
404
405
|
- **Voice Selection Dropdown**: Choose from available voice models (e.g., Mark, Amy, Kathleen, Lessac, Ryan)
|
|
405
406
|
- **Real-time Preview**: Hear voice greetings when switching models
|
|
406
407
|
- **Consistent Formatting**: Voice names display as proper titles (e.g., "Mark" instead of "en_US-mark-premium")
|
|
407
408
|
- **Availability Detection**: Automatic detection and fallback when voice services are unavailable
|
|
408
409
|
|
|
409
|
-
### <img src="https://
|
|
410
|
+
### <img src="https://icons.burtson.ai/svg-accent/refresh.svg" width="18" align="center" alt="" /> Context Switching
|
|
410
411
|
- **Local Session**: Quick interactions within the modal scope
|
|
411
412
|
- **Main Conversation**: Access full conversation history with automatic navigation to `/chat` route
|
|
412
413
|
- **Smart Conversation Selection**: Automatically loads most recent conversation when switching contexts
|
|
413
414
|
|
|
414
|
-
### <img src="https://
|
|
415
|
+
### <img src="https://icons.burtson.ai/svg-accent/save.svg" width="18" align="center" alt="" /> Memory Features
|
|
415
416
|
- **Personal Memory Display**: View AI's stored personal information about the user
|
|
416
417
|
- **Memory Entry Count**: Real-time count of stored memory entries
|
|
417
418
|
- **Memory Management Modal**: Full CRUD operations for memory entries
|
|
@@ -438,7 +439,7 @@ function App() {
|
|
|
438
439
|
}
|
|
439
440
|
```
|
|
440
441
|
|
|
441
|
-
### <img src="https://
|
|
442
|
+
### <img src="https://icons.burtson.ai/svg-accent/mail.svg" width="18" align="center" alt="" /> Feedback System
|
|
442
443
|
|
|
443
444
|
The Bandit Engine includes a comprehensive feedback system that can be configured and customized for your application.
|
|
444
445
|
|
|
@@ -474,13 +475,13 @@ import { FeedbackButton } from '@burtson-labs/bandit-engine';
|
|
|
474
475
|
```
|
|
475
476
|
|
|
476
477
|
**Features:**
|
|
477
|
-
- <img src="https://
|
|
478
|
-
- <img src="https://
|
|
479
|
-
- <img src="https://
|
|
480
|
-
- <img src="https://
|
|
481
|
-
- <img src="https://
|
|
482
|
-
- <img src="https://
|
|
483
|
-
- <img src="https://
|
|
478
|
+
- <img src="https://icons.burtson.ai/svg-accent/smartphone.svg" width="18" align="center" alt="" /> **Responsive Design**: Automatic floating FAB on desktop, inline button on mobile
|
|
479
|
+
- <img src="https://icons.burtson.ai/svg-accent/palette.svg" width="18" align="center" alt="" /> **Category System**: Bug reports, feature requests, general feedback
|
|
480
|
+
- <img src="https://icons.burtson.ai/svg-accent/chart-bar.svg" width="18" align="center" alt="" /> **Priority Levels**: Low, medium, high, critical
|
|
481
|
+
- <img src="https://icons.burtson.ai/svg-accent/frown.svg" width="18" align="center" alt="" /> **Annoyance Slider**: Measure user frustration (1-5 scale)
|
|
482
|
+
- <img src="https://icons.burtson.ai/svg-accent/paperclip.svg" width="18" align="center" alt="" /> **Single Image Support**: Automatic clipboard integration
|
|
483
|
+
- <img src="https://icons.burtson.ai/svg-accent/mail.svg" width="18" align="center" alt="" /> **Email Fallback**: Generates mailto URLs when API unavailable
|
|
484
|
+
- <img src="https://icons.burtson.ai/svg-accent/settings.svg" width="18" align="center" alt="" /> **User Preferences**: Can be enabled/disabled in management UI
|
|
484
485
|
|
|
485
486
|
**Auto-Integration:**
|
|
486
487
|
- Desktop: Floating feedback button (when `preferences.feedbackEnabled` is true)
|
|
@@ -489,7 +490,7 @@ import { FeedbackButton } from '@burtson-labs/bandit-engine';
|
|
|
489
490
|
|
|
490
491
|
---
|
|
491
492
|
|
|
492
|
-
## <img src="https://
|
|
493
|
+
## <img src="https://icons.burtson.ai/svg-accent/settings.svg" width="18" align="center" alt="" /> Angular Integration (Experimental)
|
|
493
494
|
|
|
494
495
|
To use Bandit Engine in an Angular project:
|
|
495
496
|
|
|
@@ -528,7 +529,7 @@ Note: You only need to define the elements you intend to use. Don't mount all co
|
|
|
528
529
|
|
|
529
530
|
---
|
|
530
531
|
|
|
531
|
-
## <img src="https://
|
|
532
|
+
## <img src="https://icons.burtson.ai/svg-accent/settings.svg" width="18" align="center" alt="" /> Vue.js Integration (Experimental)
|
|
532
533
|
|
|
533
534
|
To use Bandit Engine in a Vue 3 project:
|
|
534
535
|
|
|
@@ -567,7 +568,7 @@ Note: You only need to define the elements you intend to use. Don't mount all co
|
|
|
567
568
|
|
|
568
569
|
> `defineCustomElement` allows usage in Vue and Angular apps via native Web Components, making Bandit fully framework-agnostic.
|
|
569
570
|
|
|
570
|
-
> <img src="https://
|
|
571
|
+
> <img src="https://icons.burtson.ai/svg-accent/refresh.svg" width="18" align="center" alt="" /> Similar to Angular, when using `<Management />` or `<ChatModal />`, wrap each one with a `<bandit-chat-provider>` to ensure proper context injection.
|
|
571
572
|
|
|
572
573
|
> Make sure `packageSettings` is passed as a serialized JSON string when using with HTML-based custom elements.
|
|
573
574
|
|
|
@@ -575,7 +576,7 @@ Note: You only need to define the elements you intend to use. Don't mount all co
|
|
|
575
576
|
|
|
576
577
|
---
|
|
577
578
|
|
|
578
|
-
## <img src="https://
|
|
579
|
+
## <img src="https://icons.burtson.ai/svg-accent/package-build.svg" width="18" align="center" alt="" /> Custom Element Support
|
|
579
580
|
|
|
580
581
|
To use Bandit components (`Chat`, `Management`, `ChatModal`) in any modern JS framework (Angular, Vue, Svelte, etc.), you can register them as native custom elements:
|
|
581
582
|
|
|
@@ -588,7 +589,7 @@ customElements.define('bandit-modal', BanditModal);
|
|
|
588
589
|
|
|
589
590
|
Wrap it in `<bandit-chat-provider>` and you’re ready to go. Ideal for environments where React isn’t used directly.
|
|
590
591
|
|
|
591
|
-
> <img src="https://
|
|
592
|
+
> <img src="https://icons.burtson.ai/svg-accent/memory-layers.svg" width="18" align="center" alt="" /> **Note for Non-React Users:**
|
|
592
593
|
> When using Bandit components as custom elements (e.g., in Angular, Vue, or static HTML), make sure the compiled custom elements script is loaded before usage. You can do this by importing or referencing it in your HTML or entry file. This ensures the custom elements are defined before being rendered.
|
|
593
594
|
|
|
594
595
|
To create custom elements, you must import the React components and pass them to `defineCustomElement`. For example:
|
|
@@ -601,7 +602,7 @@ customElements.define('bandit-modal', defineCustomElement(ChatModal));
|
|
|
601
602
|
|
|
602
603
|
---
|
|
603
604
|
|
|
604
|
-
## <img src="https://
|
|
605
|
+
## <img src="https://icons.burtson.ai/svg-accent/camera.svg" width="18" align="center" alt="" /> Live Preview
|
|
605
606
|
|
|
606
607
|
Here are some screenshots of Bandit Chat in action:
|
|
607
608
|
|
|
@@ -648,7 +649,7 @@ Here are some screenshots of Bandit Chat in action:
|
|
|
648
649
|
</p>
|
|
649
650
|
|
|
650
651
|
|
|
651
|
-
4. **<img src="https://
|
|
652
|
+
4. **<img src="https://icons.burtson.ai/svg-accent/globe.svg" width="18" align="center" alt="" /> CDN-Based Config (Optional)**
|
|
652
653
|
|
|
653
654
|
To streamline configuration, you can host your `config.json` (and related assets like model presets or branding) via your own CDN or edge cache.
|
|
654
655
|
|
|
@@ -667,11 +668,11 @@ Update the `brandingConfigUrl` like this:
|
|
|
667
668
|
|
|
668
669
|
This enables remote control of Bandit appearance, available models, and more — without redeploying your frontend.
|
|
669
670
|
|
|
670
|
-
> <img src="https://
|
|
671
|
+
> <img src="https://icons.burtson.ai/svg-accent/info.svg" width="16" align="center" alt="" /> Note: All CDN assets such as logos, avatars, config, and workers are available at `https://cdn.burtson.ai/`. You may override these by hosting your own versions and pointing `packageSettings` to the appropriate URLs.
|
|
671
672
|
|
|
672
673
|
---
|
|
673
674
|
|
|
674
|
-
## <img src="https://
|
|
675
|
+
## <img src="https://icons.burtson.ai/svg-accent/settings.svg" width="18" align="center" alt="" /> Configuration Options
|
|
675
676
|
- `defaultModel`: Primary chat model (string; required)
|
|
676
677
|
- `fallbackModel`: Optional fallback model if the default is unavailable
|
|
677
678
|
- `gatewayApiUrl`: Gateway API base URL for AI, TTS, STT, and MCP
|
|
@@ -698,13 +699,13 @@ These file operations are invoked in tandem with the `/api/embedding/*` endpoint
|
|
|
698
699
|
|
|
699
700
|
> Quickstart note: the bundled Express gateway does not implement these upload/download routes; they currently return `501` until you connect real storage.
|
|
700
701
|
|
|
701
|
-
## <img src="https://
|
|
702
|
+
## <img src="https://icons.burtson.ai/svg-accent/agent.svg" width="18" align="center" alt="" /> AI Provider System
|
|
702
703
|
|
|
703
704
|
Bandit Engine features a unified, gateway-based AI provider architecture that supports multiple AI services through a secure backend:
|
|
704
705
|
|
|
705
706
|
### Supported Providers
|
|
706
707
|
|
|
707
|
-
- **<img src="https://
|
|
708
|
+
- **<img src="https://icons.burtson.ai/svg-accent/star.svg" width="18" align="center" alt="" /> Gateway Provider** (Recommended): Routes all requests through your secure backend
|
|
708
709
|
- **Bandit AI**: Bandit Core models served through the secure gateway
|
|
709
710
|
- **Ollama**: Self-hosted models and Ollama-compatible endpoints
|
|
710
711
|
- **OpenAI**: GPT models via OpenAI API
|
|
@@ -731,11 +732,11 @@ const chatPackageSettings = {
|
|
|
731
732
|
```
|
|
732
733
|
|
|
733
734
|
**Benefits:**
|
|
734
|
-
- <img src="https://
|
|
735
|
-
- <img src="https://
|
|
736
|
-
- <img src="https://
|
|
737
|
-
- <img src="https://
|
|
738
|
-
- <img src="https://
|
|
735
|
+
- <img src="https://icons.burtson.ai/svg-accent/lock.svg" width="18" align="center" alt="" /> **Control**: Your gateway owns credentials, routing, and policy enforcement
|
|
736
|
+
- <img src="https://icons.burtson.ai/svg-accent/chart-bar.svg" width="18" align="center" alt="" /> **Monitoring**: Request logging and usage analytics
|
|
737
|
+
- <img src="https://icons.burtson.ai/svg-accent/gauge.svg" width="18" align="center" alt="" /> **Rate Limiting**: Built-in throttling and quotas
|
|
738
|
+
- <img src="https://icons.burtson.ai/svg-accent/refresh.svg" width="18" align="center" alt="" /> **Provider Switching**: Change backends without frontend updates
|
|
739
|
+
- <img src="https://icons.burtson.ai/svg-accent/shield.svg" width="18" align="center" alt="" /> **Authentication**: Unified auth and request validation across services
|
|
739
740
|
|
|
740
741
|
**Gateway Requirements:**
|
|
741
742
|
Your gateway API can be built with any technology (Node.js, Python, .NET, Java, etc.) as long as it implements:
|
|
@@ -782,10 +783,10 @@ The Bandit Engine provides comprehensive image support across all AI providers t
|
|
|
782
783
|
- **Anthropic**: `claude-3-opus`, `claude-3-sonnet`, `claude-3-haiku`
|
|
783
784
|
|
|
784
785
|
**Key Features:**
|
|
785
|
-
- <img src="https://
|
|
786
|
-
- <img src="https://
|
|
787
|
-
- <img src="https://
|
|
788
|
-
- <img src="https://
|
|
786
|
+
- <img src="https://icons.burtson.ai/svg-accent/image.svg" width="18" align="center" alt="" /> **Universal Image Input**: Drop, paste, or upload images directly in chat
|
|
787
|
+
- <img src="https://icons.burtson.ai/svg-accent/refresh.svg" width="18" align="center" alt="" /> **Provider-Specific Formatting**: Automatic conversion to each provider's image format
|
|
788
|
+
- <img src="https://icons.burtson.ai/svg-accent/smartphone.svg" width="18" align="center" alt="" /> **Multi-Image Support**: Send multiple images in a single message
|
|
789
|
+
- <img src="https://icons.burtson.ai/svg-accent/crosshair.svg" width="18" align="center" alt="" /> **Vision Models**: Seamless integration with multimodal AI models
|
|
789
790
|
|
|
790
791
|
**Usage Example:**
|
|
791
792
|
```tsx
|
|
@@ -851,7 +852,7 @@ function MyComponent() {
|
|
|
851
852
|
}
|
|
852
853
|
```
|
|
853
854
|
|
|
854
|
-
## <img src="https://
|
|
855
|
+
## <img src="https://icons.burtson.ai/svg-accent/wrench.svg" width="18" align="center" alt="" /> Model Context Protocol (MCP) Integration
|
|
855
856
|
|
|
856
857
|
Bandit Engine now supports **Model Context Protocol (MCP)** for extending AI capabilities with external tools and services:
|
|
857
858
|
|
|
@@ -930,7 +931,7 @@ if (isMCPAvailable()) {
|
|
|
930
931
|
|
|
931
932
|
---
|
|
932
933
|
|
|
933
|
-
## <img src="https://
|
|
934
|
+
## <img src="https://icons.burtson.ai/svg-accent/sliders.svg" width="18" align="center" alt="" /> Feature Flags & Subscription Tiers
|
|
934
935
|
|
|
935
936
|
Bandit Engine includes a comprehensive **tier-based feature flag system** that enables subscription-based access control and feature gating:
|
|
936
937
|
|
|
@@ -982,15 +983,15 @@ Different subscription tiers have access to different features:
|
|
|
982
983
|
|
|
983
984
|
| Feature | Basic | Premium | Pro | Team | Trial |
|
|
984
985
|
|---------|-------|---------|-----|------|-------|
|
|
985
|
-
| **Core Chat** | <img src="https://
|
|
986
|
-
| **Text-to-Speech** | <img src="https://
|
|
987
|
-
| **Speech-to-Text** | <img src="https://
|
|
988
|
-
| **Document Upload** | <img src="https://
|
|
989
|
-
| **Model Management** | <img src="https://
|
|
990
|
-
| **Admin Dashboard** | <img src="https://
|
|
991
|
-
| **API Access** | <img src="https://
|
|
992
|
-
| **Team Collaboration** | <img src="https://
|
|
993
|
-
| **Custom Branding** | <img src="https://
|
|
986
|
+
| **Core Chat** | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> |
|
|
987
|
+
| **Text-to-Speech** | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> |
|
|
988
|
+
| **Speech-to-Text** | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> |
|
|
989
|
+
| **Document Upload** | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> |
|
|
990
|
+
| **Model Management** | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> |
|
|
991
|
+
| **Admin Dashboard** | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> |
|
|
992
|
+
| **API Access** | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> |
|
|
993
|
+
| **Team Collaboration** | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> |
|
|
994
|
+
| **Custom Branding** | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> | <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> |
|
|
994
995
|
|
|
995
996
|
### JWT-Based Authentication
|
|
996
997
|
|
|
@@ -1127,7 +1128,7 @@ This feature flag system enables you to build sophisticated subscription-based A
|
|
|
1127
1128
|
|
|
1128
1129
|
---
|
|
1129
1130
|
|
|
1130
|
-
## <img src="https://
|
|
1131
|
+
## <img src="https://icons.burtson.ai/svg-accent/bug.svg" width="18" align="center" alt="" /> Debug Logger
|
|
1131
1132
|
|
|
1132
1133
|
Bandit Engine exports a debug logger for consistent logging across your application:
|
|
1133
1134
|
|
|
@@ -1140,9 +1141,9 @@ debugLogger.warn('Fallback model used');
|
|
|
1140
1141
|
debugLogger.error('Failed to connect to AI service');
|
|
1141
1142
|
```
|
|
1142
1143
|
|
|
1143
|
-
## <img src="https://
|
|
1144
|
+
## <img src="https://icons.burtson.ai/svg-accent/lock.svg" width="18" align="center" alt="" /> Security Best Practices
|
|
1144
1145
|
|
|
1145
|
-
**<img src="https://
|
|
1146
|
+
**<img src="https://icons.burtson.ai/svg-accent/alert-triangle.svg" width="16" align="center" alt="" /> Important Security Notice:**
|
|
1146
1147
|
|
|
1147
1148
|
While Bandit Engine supports direct API key configuration for development and testing, **we strongly recommend against using API keys directly in frontend applications** for production environments.
|
|
1148
1149
|
|
|
@@ -1178,7 +1179,7 @@ const chatPackageSettings = {
|
|
|
1178
1179
|
|
|
1179
1180
|
### Legacy Configuration (Deprecated)
|
|
1180
1181
|
|
|
1181
|
-
<img src="https://
|
|
1182
|
+
<img src="https://icons.burtson.ai/svg-accent/alert-triangle.svg" width="16" align="center" alt="" /> **Legacy TTS/STT URLs are deprecated.** Use the unified `gatewayApiUrl` instead:
|
|
1182
1183
|
|
|
1183
1184
|
```tsx
|
|
1184
1185
|
// ❌ Deprecated (still works but not recommended)
|
|
@@ -1244,7 +1245,7 @@ The Bandit Engine only requires that your endpoints follow the expected input/ou
|
|
|
1244
1245
|
- **PDF Worker**: For document embedding features, the engine uses the PDF parsing worker from `https://cdn.burtson.ai/scripts/pdf.worker.js`
|
|
1245
1246
|
- **CDN Resources**: Default avatars, logos, and configurations load from `https://cdn.burtson.ai/` if not overridden locally
|
|
1246
1247
|
|
|
1247
|
-
## <img src="https://
|
|
1248
|
+
## <img src="https://icons.burtson.ai/svg-accent/lightbulb.svg" width="18" align="center" alt="" /> Vision & Roadmap
|
|
1248
1249
|
|
|
1249
1250
|
Bandit Engine isn't just a component – it's a foundation. Coming soon:
|
|
1250
1251
|
- Multi-modal input: image, voice, document uploads
|
|
@@ -1257,7 +1258,7 @@ We’re building this to be the interface layer of your AI-first products. Own t
|
|
|
1257
1258
|
|
|
1258
1259
|
---
|
|
1259
1260
|
|
|
1260
|
-
## <img src="https://
|
|
1261
|
+
## <img src="https://icons.burtson.ai/svg-accent/pin.svg" width="18" align="center" alt="" /> Migration Guide
|
|
1261
1262
|
|
|
1262
1263
|
### From Legacy TTS/STT URLs to Gateway API
|
|
1263
1264
|
|
|
@@ -1285,26 +1286,26 @@ const settings = {
|
|
|
1285
1286
|
```
|
|
1286
1287
|
|
|
1287
1288
|
The new approach provides:
|
|
1288
|
-
- <img src="https://
|
|
1289
|
-
- <img src="https://
|
|
1290
|
-
- <img src="https://
|
|
1291
|
-
- <img src="https://
|
|
1289
|
+
- <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> **Unified API**: One endpoint for all services
|
|
1290
|
+
- <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> **Better Security**: Centralized authentication and rate limiting
|
|
1291
|
+
- <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> **Technology Flexibility**: Use any backend implementation
|
|
1292
|
+
- <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> **Automatic Discovery**: Real-time service availability detection
|
|
1292
1293
|
|
|
1293
1294
|
---
|
|
1294
1295
|
|
|
1295
|
-
## <img src="https://
|
|
1296
|
+
## <img src="https://icons.burtson.ai/svg-accent/shield.svg" width="18" align="center" alt="" /> License & Protection
|
|
1296
1297
|
|
|
1297
1298
|
This software is protected under the **Business Source License (BUSL) 1.1** by Burtson Labs LLC.
|
|
1298
1299
|
|
|
1299
|
-
### <img src="https://
|
|
1300
|
+
### <img src="https://icons.burtson.ai/svg-accent/scale.svg" width="18" align="center" alt="" /> License Summary
|
|
1300
1301
|
|
|
1301
|
-
- <img src="https://
|
|
1302
|
-
- <img src="https://
|
|
1303
|
-
- <img src="https://
|
|
1304
|
-
- <img src="https://
|
|
1305
|
-
- <img src="https://
|
|
1302
|
+
- <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> **Development & Evaluation**: Free for internal development, testing, and evaluation
|
|
1303
|
+
- <img src="https://icons.burtson.ai/svg-accent/check-circle.svg" width="16" align="center" alt="" /> **Non-Commercial Use**: Free for educational, research, and personal projects
|
|
1304
|
+
- <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> **Commercial Production**: Requires commercial license for production deployment
|
|
1305
|
+
- <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> **Competitive Use**: Cannot be used to create competing AI chat products
|
|
1306
|
+
- <img src="https://icons.burtson.ai/svg-accent/x-circle.svg" width="16" align="center" alt="" /> **AI Training**: Cannot be used as training data for AI models
|
|
1306
1307
|
|
|
1307
|
-
### <img src="https://
|
|
1308
|
+
### <img src="https://icons.burtson.ai/svg-accent/clipboard-list.svg" width="18" align="center" alt="" /> Usage Rights
|
|
1308
1309
|
|
|
1309
1310
|
**Permitted:**
|
|
1310
1311
|
- Internal development and testing
|
|
@@ -1318,7 +1319,7 @@ This software is protected under the **Business Source License (BUSL) 1.1** by B
|
|
|
1318
1319
|
- Using as training data for AI/ML models
|
|
1319
1320
|
- Removing or modifying license notices and watermarks
|
|
1320
1321
|
|
|
1321
|
-
### <img src="https://
|
|
1322
|
+
### <img src="https://icons.burtson.ai/svg-accent/lock.svg" width="18" align="center" alt="" /> Protection Features
|
|
1322
1323
|
|
|
1323
1324
|
This codebase includes multiple protection layers:
|
|
1324
1325
|
- **Embedded Watermarks**: Visible and stealth fingerprints in all source files
|
|
@@ -1326,9 +1327,9 @@ This codebase includes multiple protection layers:
|
|
|
1326
1327
|
- **License Validation**: Runtime checks for compliance
|
|
1327
1328
|
- **Honey Pot Files**: Trap files that trigger license violations when accessed
|
|
1328
1329
|
|
|
1329
|
-
**<img src="https://
|
|
1330
|
+
**<img src="https://icons.burtson.ai/svg-accent/alert-triangle.svg" width="16" align="center" alt="" /> Warning**: Removing, modifying, or bypassing these protection mechanisms constitutes a license violation and may result in immediate license termination.
|
|
1330
1331
|
|
|
1331
|
-
### <img src="https://
|
|
1332
|
+
### <img src="https://icons.burtson.ai/svg-accent/briefcase.svg" width="18" align="center" alt="" /> Commercial Licensing
|
|
1332
1333
|
|
|
1333
1334
|
**Production License**: Required for commercial deployment
|
|
1334
1335
|
- Full production rights
|
|
@@ -1341,7 +1342,7 @@ This codebase includes multiple protection layers:
|
|
|
1341
1342
|
- **Website**: https://burtson.ai/license
|
|
1342
1343
|
- **Sales**: sales@burtson.ai
|
|
1343
1344
|
|
|
1344
|
-
### <img src="https://
|
|
1345
|
+
### <img src="https://icons.burtson.ai/svg-accent/code.svg" width="18" align="center" alt="" /> For Contributors & Developers
|
|
1345
1346
|
|
|
1346
1347
|
Before contributing or publishing a new Pull Request, run the available validation scripts:
|
|
1347
1348
|
|
|
@@ -1358,7 +1359,7 @@ npm run validate-protection # Ensure license headers and fingerprints are intact
|
|
|
1358
1359
|
- **[PROTECTION-NOTICE.md](./PROTECTION-NOTICE.md)** - Legal notices and compliance requirements
|
|
1359
1360
|
- **[LICENSE](./LICENSE)** - Full BUSL 1.1 license text
|
|
1360
1361
|
|
|
1361
|
-
### <img src="https://
|
|
1362
|
+
### <img src="https://icons.burtson.ai/svg-accent/edit.svg" width="18" align="center" alt="" /> License Compliance
|
|
1362
1363
|
|
|
1363
1364
|
All source files must include proper license headers and watermarks. The protection system automatically:
|
|
1364
1365
|
- Adds license headers to new files
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAIProviderStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q6LXVYTC.mjs";
|
|
4
4
|
import "./chunk-KCI46M23.mjs";
|
|
5
5
|
import "./chunk-BJTO5JO5.mjs";
|
|
6
6
|
export {
|
|
7
7
|
useAIProviderStore
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=aiProviderStore-
|
|
9
|
+
//# sourceMappingURL=aiProviderStore-JOB2H4LP.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
chat_default
|
|
3
|
+
} from "./chunk-3ACT5BTW.mjs";
|
|
4
|
+
import "./chunk-ONQMRE2G.mjs";
|
|
5
|
+
import "./chunk-47MOBOP3.mjs";
|
|
6
|
+
import "./chunk-G5POQT2R.mjs";
|
|
7
|
+
import "./chunk-R6HMLYKQ.mjs";
|
|
8
|
+
import "./chunk-ODGVCSKV.mjs";
|
|
9
|
+
import "./chunk-WQEBTH2R.mjs";
|
|
10
|
+
import "./chunk-Q6LXVYTC.mjs";
|
|
11
|
+
import "./chunk-KCI46M23.mjs";
|
|
12
|
+
import "./chunk-BJTO5JO5.mjs";
|
|
13
|
+
export {
|
|
14
|
+
chat_default as default
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chat-LB6UEEEW.mjs.map
|