Skip to main content

Signature

One method takes either a prompt or a conversation:

With options

Generation auto-loads what it needs, and downloads when options.model names a model that is absent.

LlmOptions

A desktop has real headroom, so maxOutputTokens can be higher here than on a phone. It is still the biggest lever on how long the user waits.

From the renderer

The same call works through the context bridge:

Errors

Throws SDKException when no model is loaded and options.model is absent, or when generation fails. See Error handling.