Expand description
Local image generation — submit a prompt straight to the engine, no studio.
Mirrors the studio job path (ws::session::run_offered_job): resolve the
model’s [ModelSource] (here from the local Catalog instead of a studio
offer), build a Task::Image, dispatch, and record the finished job — into
the dedicated local-queue ring so it shows up in the app.
Structs§
- Local
Image Request - A local image-generation request. Optional fields fall back to the model’s CLI defaults from the catalog.
Enums§
- Local
Error - Why a local generation could not run.
Functions§
- chat_
on_ lane - Serve a chat on the lane of a loaded model, recording it like any
local job.
Nonewhen the resolved model is not loaded (or is not a chat model): the caller runs it as a transient job instead. - resolve_
llm - The chat model a request names, or the default one: it must exist and be an LLM.
- run_
image - Run one local image job: resolve the model from
catalog, dispatch it onengine, record it in the local-queue ring, and return the image bytes. - run_
kind - Resolve a model of
kind(an explicit id, else the catalog’s default for that kind), dispatchtask, record the local job, and return the result. The generic core behind every non-image local endpoint (chat / tts / stt / video) so each stays a thin adapter. - stream_
on_ lane - Stream a chat on
model_id’s lane as server-sent events throughsend(which answersfalseonce the client has gone, ending the generation). Recorded like any local job. The caller has checked the model is loaded; if it unloads first, the stream carries the error. - tokenize_
on_ lane - Token ids for
textfrom a loaded chat model, on its lane.