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) ~ OptionsParameters
| Name | Type | Description |
|---|---|---|
| t | Float | temperature value |
Return
| Type | Description |
|---|---|
| Options | self for chaining |
SetTopK
Sets the top-k sampling value.
method : public : SetTopK(k:Int) ~ OptionsParameters
| Name | Type | Description |
|---|---|---|
| k | Int | top-k value |
Return
| Type | Description |
|---|---|
| Options | self for chaining |
SetTopP
Sets the top-p (nucleus sampling) value.
method : public : SetTopP(p:Float) ~ OptionsParameters
| Name | Type | Description |
|---|---|---|
| p | Float | top-p value (0.0 to 1.0) |
Return
| Type | Description |
|---|---|
| Options | self for chaining |
ToJson
Converts options to JSON for the request.
method : public : ToJson() ~ JsonElementReturn
| Type | Description |
|---|---|
| JsonElement | JSON element, or Nil if no options set |