Class FineTuningJob.Hyperparameters.NEpochs
-
- All Implemented Interfaces:
public final class FineTuningJob.Hyperparameters.NEpochsThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceFineTuningJob.Hyperparameters.NEpochs.VisitorAn interface that defines how to map each variant of NEpochs to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<JsonValue>auto()final Optional<Long>integer()final BooleanisAuto()final BooleanisInteger()final JsonValueasAuto()final LongasInteger()final Optional<JsonValue>_json()final <T extends Any> Taccept(FineTuningJob.Hyperparameters.NEpochs.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final FineTuningJob.Hyperparameters.NEpochsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static FineTuningJob.Hyperparameters.NEpochsofAuto()final static FineTuningJob.Hyperparameters.NEpochsofInteger(Long integer)-
-
Method Detail
-
accept
final <T extends Any> T accept(FineTuningJob.Hyperparameters.NEpochs.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.openai.core.JsonValue; import java.util.Optional; Optional<String> result = nEpochs.accept(new NEpochs.Visitor<Optional<String>>() { @Override public Optional<String> visitAuto(JsonValue auto) { return Optional.of(auto.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final FineTuningJob.Hyperparameters.NEpochs validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofAuto
final static FineTuningJob.Hyperparameters.NEpochs ofAuto()
-
ofInteger
final static FineTuningJob.Hyperparameters.NEpochs ofInteger(Long integer)
-
-
-
-