murmur-rag 1.1.0 → 1.3.0

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.
Files changed (45) hide show
  1. package/README.md +28 -19
  2. package/dist/cdn/{anthropic-dc7h9prc.js → anthropic-tw416spz.js} +2 -2
  3. package/dist/cdn/chunk-xyp6nm65.js +1 -0
  4. package/dist/cdn/{embed-fd96s8qk.js → embed-3am76qfd.js} +9 -9
  5. package/dist/cdn/embed-50pfy67v.js +83 -0
  6. package/dist/cdn/{embed-z32y952f.js → embed-cx1r66ch.js} +6 -6
  7. package/dist/cdn/{embed-ssqsb38w.js → embed-g0p6yc29.js} +2 -2
  8. package/dist/cdn/{embed-krrjjyf5.js → embed-q81wdr1z.js} +4 -4
  9. package/dist/cdn/embed-rjpq8psf.js +10 -0
  10. package/dist/cdn/{embed-acjpjh6t.js → embed-yz75savs.js} +3 -3
  11. package/dist/cdn/{google-yywkqdph.js → google-556tp13p.js} +8 -8
  12. package/dist/cdn/index-8r44b2wt.js +1 -0
  13. package/dist/cdn/index-a5j4aat5.js +1 -0
  14. package/dist/cdn/index-ft8r539a.js +1 -0
  15. package/dist/cdn/index-pjxy71n5.js +1 -0
  16. package/dist/cdn/{index-gyd02jvt.js → index-qpy1k923.js} +2 -2
  17. package/dist/cdn/mistral-25w1nsx5.js +3 -0
  18. package/dist/cdn/{murmur-j1ky5vmr.js → murmur-1a55et82.js} +3 -3
  19. package/dist/cdn/murmur.js +7 -7
  20. package/dist/cdn/openai-bjrbem49.js +18 -0
  21. package/dist/cdn/{openai-compatible-zhaj1r43.js → openai-compatible-sg25g0vj.js} +6 -6
  22. package/dist/cdn/retriever-06ybegpd.js +1 -0
  23. package/dist/cdn/{transformers.web-3kmbvcbt.js → transformers.web-49m0ht4a.js} +9 -9
  24. package/dist/lib/chunks/{index-92w507gk.js → index-4ftk20yq.js} +164 -50
  25. package/dist/lib/embed.js +10 -4
  26. package/dist/lib/llm/index.js +23 -0
  27. package/dist/lib/local/index.js +38 -2
  28. package/dist/lib/widget/index.js +2 -2
  29. package/dist/types/llm/index.d.ts +8 -0
  30. package/dist/types/local/index.d.ts +12 -0
  31. package/dist/types/widget/element.d.ts +4 -0
  32. package/dist/types/widget/i18n.d.ts +1 -0
  33. package/dist/types/widget/session.d.ts +56 -8
  34. package/dist/types/widget/styles.d.ts +1 -1
  35. package/package.json +1 -1
  36. package/dist/cdn/chunk-hpx6rpea.js +0 -1
  37. package/dist/cdn/embed-6gef7ym5.js +0 -10
  38. package/dist/cdn/embed-jdraznwg.js +0 -83
  39. package/dist/cdn/index-bq0x71h1.js +0 -1
  40. package/dist/cdn/index-jt6n0d28.js +0 -1
  41. package/dist/cdn/index-nesgnf2n.js +0 -1
  42. package/dist/cdn/index-wgzgvzaf.js +0 -1
  43. package/dist/cdn/mistral-0mg4kk7s.js +0 -3
  44. package/dist/cdn/openai-g1685z9v.js +0 -18
  45. package/dist/cdn/retriever-dqxzjaqk.js +0 -1
package/README.md CHANGED
@@ -10,20 +10,22 @@ An AI chat bubble for any website that answers from the site's own pages, cites
10
10
 
11
11
  ## The widget
12
12
 
13
- Paste the line before `</body>`. Without options, the bubble answers from the page the visitor is on and each visitor brings their own AI key. The [configurator](https://maxgfr.github.io/murmur/#wire) writes the line for you.
14
-
15
- | Attribute | |
16
- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
17
- | `data-index` | URL of the index written by `murmur index` (`/murmur-index.json`). Without it, the current page is read |
18
- | `data-endpoint` | Your OpenAI-compatible proxy (https): visitors chat without a key |
19
- | `data-local` | `true`: a model runs in the visitor's browser on WebGPU (LFM3 1.7B, about 1.1 GB once). No key, no server |
20
- | `data-provider`, `data-model` | Provider and model preselected for visitors, or the model asked of the proxy |
21
- | `data-instructions` | Your instructions to the assistant |
22
- | `data-title`, `data-greeting`, `data-placeholder`, `data-button` | Texts of the panel |
23
- | `data-lang` | `en` or `fr` (default: the page's `lang`, then the browser's) |
24
- | `data-position` | `bottom-right` (default) or `bottom-left` |
25
- | `data-accent`, `data-theme` | Any CSS colour; `auto`, `light` or `dark` |
26
- | `data-open`, `data-storage-key` | Open on load; prefix of what the widget stores |
13
+ Paste the line before `</body>`. Without options, the bubble answers from the page the visitor is on, with a small model running in the visitor's browser (after they agree to a one-time 1.1 GB download); visitors can connect their own AI key instead from the AI settings. The [configurator](https://maxgfr.github.io/murmur/#wire) writes the line for you.
14
+
15
+ | Attribute | |
16
+ | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
17
+ | `data-index` | URL of the index written by `murmur index` (`/murmur-index.json`). Without it, the current page is read |
18
+ | `data-endpoint` | Your OpenAI-compatible proxy (https): visitors chat without a key |
19
+ | `data-mode`, `data-preload` | Who answers (`proxy`, `local`, `auto`, `key`) and when the in-browser model downloads (`question`, `open`, `idle`, `consent`) |
20
+ | `data-api-key` | Your own key for every visitor: public, only a key with a spending limit |
21
+ | `data-local` | `false` turns off the in-browser model, the default when there is no proxy: visitors then need their own key |
22
+ | `data-provider`, `data-model` | Provider and model preselected for visitors, or the model asked of the proxy |
23
+ | `data-instructions` | Your instructions to the assistant |
24
+ | `data-title`, `data-greeting`, `data-placeholder`, `data-button` | Texts of the panel |
25
+ | `data-lang` | `en` or `fr` (default: the page's `lang`, then the browser's) |
26
+ | `data-position` | `bottom-right` (default) or `bottom-left` |
27
+ | `data-accent`, `data-theme` | Any CSS colour; `auto`, `light` or `dark` |
28
+ | `data-open`, `data-storage-key` | Open on load; prefix of what the widget stores |
27
29
 
28
30
  The widget lives in a Shadow DOM and is restyled through `--murmur-accent`, `--murmur-accent-ink`, `--murmur-font`, `--murmur-radius` and `--murmur-z`. It emits `murmur:state` events (`searching`, `streaming`, `done`, `error`) with the passages found and cited.
29
31
 
@@ -37,11 +39,18 @@ Reads every `.html`, `.md` and `.txt` file (or a live `sitemap.xml`), keeps the
37
39
 
38
40
  ## AI models and keys
39
41
 
40
- A key in a web page is readable by anyone, so murmur never puts one there:
41
-
42
- - **Your proxy holds the key.** Deploy [`examples/cloudflare-worker`](examples/cloudflare-worker) (about 40 lines): it keeps the key as a secret, allows only your origin, fixes the model and caps answers. Then `data-endpoint="https://murmur-proxy.you.workers.dev/v1"`.
43
- - **No key at all.** `data-local="true"` runs [LFM3 1.7B](https://huggingface.co/LiquidAI/LFM3-1.7B) (Liquid AI, October 2026) in the visitor's browser on WebGPU through Transformers.js. The widget asks before downloading about 1.1 GB, then the weights stay in the browser's cache and questions never leave the device. Slower and less precise than a hosted model; visitors can also pick it from the AI settings.
44
- - **Each visitor brings theirs.** The first question opens the AI settings, built on llm-connect's store: provider and model from the [llm-models](https://github.com/maxgfr/llm-models) catalog, the key encrypted with AES-GCM under a non-extractable browser key and sent only to that provider, or a local Ollama / LM Studio.
42
+ Pick who answers with `data-mode`:
43
+
44
+ | `data-mode` | |
45
+ | ---------------- | -------------------------------------------------------------------------------------------- |
46
+ | `proxy` | Your Worker holds the key (implied by `data-endpoint`). Most sites |
47
+ | `local` | Only a model in the visitor's browser, no key settings |
48
+ | `auto` (default) | Your proxy or key if set, else the browser model with visitors free to connect their own key |
49
+ | `key` | A key only: yours (`data-api-key`), else each visitor's own |
50
+ - **Your Worker.** Deploy [`examples/cloudflare-worker`](examples/cloudflare-worker) (about 40 lines): it keeps the key as a secret, allows only your origin, fixes the model and caps answers. Then `data-endpoint="https://murmur-proxy.you.workers.dev/v1"`.
51
+ - **In the browser.** [LFM3 1.7B](https://huggingface.co/LiquidAI/LFM3-1.7B) (Liquid AI, October 2026) runs on WebGPU through Transformers.js; questions never leave the device. `data-preload` sets when its ~1.1 GB downloads: `question` (default, with a discreet progress bar), `open` (bubble opened), `idle` (page idle) or `consent` (after a prompt). The weights stay in the browser's cache with persistent storage requested, and a cached model is prepared in the background on the next visit.
52
+ - **The visitor's key.** The AI settings, built on llm-connect's store: provider and model from the [llm-models](https://github.com/maxgfr/llm-models) catalog, the key encrypted with AES-GCM under a non-extractable browser key and sent only to that provider, or a local Ollama / LM Studio.
53
+ - **Your key in the page.** `data-api-key` with `data-provider` answers everyone with your key. Anyone can read it: only a key with a spending limit.
45
54
 
46
55
  ## npm package
47
56