Skip to main content
RunAnywhere.llm.generate is a suspending function that runs a single completion.
With options:

Signatures

The messages form is covered in Chat.

LlmOptions

The defaults are public constants read from the proto defaults at class-init, so quote the constant rather than a literal:

Structured output

CONSTRAINED throws SDKException.unsupportedCapability. It needs engine-level constrained decoding, which is not wired in yet. Use VALIDATION_ONLY or REPAIR.

Reasoning

The C++ core owns tag parsing and /no_think directives. You toggle the mode and render what comes back.

Errors

Throws SDKException when no model can be loaded or generation fails. See Error handling.