v2026.5.2
All Bundles

Options

Generation options for controlling model behavior.

options := Options->New();
options->SetTemperature(0.7);
options->SetTopP(0.9);

Operations

SetTemperature

Sets the temperature (0.0 to 2.0). Lower is more deterministic.

method : public : SetTemperature(t:Float) ~ Options

Parameters

NameTypeDescription
tFloattemperature value

Return

TypeDescription
Optionsself for chaining

SetTopK

Sets the top-k sampling value.

method : public : SetTopK(k:Int) ~ Options

Parameters

NameTypeDescription
kInttop-k value

Return

TypeDescription
Optionsself for chaining

SetTopP

Sets the top-p (nucleus sampling) value.

method : public : SetTopP(p:Float) ~ Options

Parameters

NameTypeDescription
pFloattop-p value (0.0 to 1.0)

Return

TypeDescription
Optionsself for chaining

ToJson

Converts options to JSON for the request.

method : public : ToJson() ~ JsonElement

Return

TypeDescription
JsonElementJSON element, or Nil if no options set