setThinking

fun setThinking(enable: Boolean)

Enable or disable thinking (reasoning output). Controls whether thinking models (e.g. Gemma4) output their reasoning process. Must be called before setPrompt.

Parameters

enable

true to enable thinking, false to disable (default: disabled)

Throws

if the operation fails or model not loaded