Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

- Document that LiteRT-LM Web `generate()` wraps the prompt in one user turn of the bundle's chat template, because `@litert-lm/core@0.19.0` has no raw streaming route ([#1863](https://github.com/leehack/llamadart/issues/1863)).

## 0.19.2

- Keep the default WebGPU bridge assets at `v0.1.83` (unchanged from 0.19.1).
Expand Down
3 changes: 2 additions & 1 deletion skills/llamadart-chat-streaming/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ modalities and speculative strategies before offering them.
every call and append the assistant reply yourself.
- `engine.generate(prompt)` only for an already-rendered raw prompt; it skips
the chat template, except on LiteRT-LM Web, which sends the prompt as one
user turn through the bundle's template.
user turn through the bundle's template (`@litert-lm/core@0.19.0` has no
raw streaming route), so never pass it a `chatTemplate()`-rendered prompt.
- Opt in with the portable `LlamaBackend.withTextHistory()` factory, or the
direct Web `LiteRtLmBackend.withTextHistory()` factory, for ordered
system/user/assistant text through
Expand Down
2 changes: 2 additions & 0 deletions website/docs/changelog/recent-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ validate against the exact release tag notes.

## Unreleased

- Document that LiteRT-LM Web `generate()` wraps the prompt in one user turn of the bundle's chat template, because `@litert-lm/core@0.19.0` has no raw streaming route ([#1863](https://github.com/leehack/llamadart/issues/1863)).

## 0.19.2

- Keep default WebGPU bridge assets at `v0.1.83` (unchanged from 0.19.1).
Expand Down
5 changes: 3 additions & 2 deletions website/docs/guides/backend-selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,9 @@ LiteRT-LM Web rejects tool declarations/results, media and user/system thinking
assistant/system message, custom templates (including an empty override),
`enableThinking: false`, template kwargs, explicit template clocks and native-only
`liteRtLm*` controls. Default thinking remains the model's behavior; no template
replacement or thinking-budget support is implied. Raw `generate` sends one user
text. Low-level `backend.applyChatTemplate` accepts one user message only; use
replacement or thinking-budget support is implied. Raw `generate` wraps the
prompt in one user turn of the bundle's template
([#1863](https://github.com/leehack/llamadart/issues/1863)). Low-level `backend.applyChatTemplate` accepts one user message only; use
`engine.create` for structured history. Automatic tool loops remain unavailable.
The remaining #1152 scope is tracked in
[the runtime gap](https://github.com/leehack/llamadart/issues/1152).
Expand Down
7 changes: 6 additions & 1 deletion website/docs/guides/generation-and-streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ adds one, and only one: a prompt that already starts with it, such as a
Native LiteRT-LM throws `LlamaArgumentException` for an empty prompt.
LiteRT-LM Web is the exception: it sends the prompt as one user turn through
the bundle's chat template, because `@litert-lm/core` cannot replace that
template ([#1863](https://github.com/leehack/llamadart/issues/1863)).
template. Its `Session` API skips the template, but it decodes a whole reply
per call, with no streaming or stop cause, so `generate()` does not use it
([#1863](https://github.com/leehack/llamadart/issues/1863)). `create()` and
`ChatSession` are unaffected. Do not pass a prompt you rendered with
`chatTemplate()` to Web LiteRT-LM `generate()`: the bundle would template it
again.

For one-shot instructions, prefer `engine.create(...)`: it applies the chat
template without session state, and a follow-up turn sees only the messages you
Expand Down
2 changes: 2 additions & 0 deletions website/docs/platforms/support-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ video and URL-only images throw `LlamaUnsupportedException`, as do tool-role
image/audio parts and media alongside `LlamaToolResultContent` under any role
([tool-result media](../guides/tool-calling#tool-result-media)).

LiteRT-LM Web `generate(prompt)` wraps the prompt in one user turn of the bundle's chat template (native LiteRT-LM and the other backends send it unchanged). `@litert-lm/core@0.19.0` cannot replace that template, and its `Session` API decodes a whole reply per call, with no streaming or stop cause. `create()` and `ChatSession` are unaffected ([#1863](https://github.com/leehack/llamadart/issues/1863)).

`LlamaEngine.supportsVideo` returns `false` on every runtime, and passing
`LlamaVideoContent` throws `LlamaUnsupportedException`. Web state paths point
into the bridge's WASMFS virtual filesystem; to keep state across reloads,
Expand Down
Loading