Encode an image on the box for model, returning an ImageEmbeddingRef
to reuse across prompts. The ref is only valid for model.
Optionaloptions: { abortSignal?: AbortSignal }Load a model onto the box (starts/keeps it resident). Rejects if it fails.
Run a one-shot prompt against a loaded model and return the full response.
Optionaloptions: PromptOptionsTranscribe complete audio with a loaded speech model and return the whole
transcript. Takes only a finished buffer: a feed has no result until it ends,
so there would be nothing to return.
Run a prompt and stream the generated tokens as they arrive (SSE).
Optionaloptions: Omit<PromptOptions, "abortSignal">Transcribe audio with a loaded speech model, streaming results as they are
decoded. Consume with for await; call cancel() to stop early.
audio may be a finished buffer or a feed that produces samples over time; a
feed is sent as the request body arrives rather than being collected first.
Tokenise prompt on the box with model's tokenizer.
Optionaloptions: { abortSignal?: AbortSignal }StaticnewCreate a EdgeAi instance.
If the feature is not enabled or the info is undefined then a stub is returned that will error.
TODO IGNT-895: Make sure the returned stub properly returns an error state
The
edgeAinamespace on a BoxApplet. Talks directly to the box over HTTP. Obtained viaapplet.edgeAi.