Class FineTuningJob.Builder
-
- All Implemented Interfaces:
public final class FineTuningJob.Builder
A builder for FineTuningJob.
-
-
Method Summary
Modifier and Type Method Description final FineTuningJob.Builder
id(String id)
The object identifier, which can be referenced in the API endpoints. final FineTuningJob.Builder
id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value. final FineTuningJob.Builder
createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the fine-tuning job was created. final FineTuningJob.Builder
createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value. final FineTuningJob.Builder
error(FineTuningJob.Error error)
For fine-tuning jobs that have failed
, this will contain more information on the cause of the failure.final FineTuningJob.Builder
error(Optional<FineTuningJob.Error> error)
Alias for calling Builder.error with error.orElse(null)
.final FineTuningJob.Builder
error(JsonField<FineTuningJob.Error> error)
Sets Builder.error to an arbitrary JSON value. final FineTuningJob.Builder
fineTunedModel(String fineTunedModel)
The name of the fine-tuned model that is being created. final FineTuningJob.Builder
fineTunedModel(Optional<String> fineTunedModel)
Alias for calling Builder.fineTunedModel with fineTunedModel.orElse(null)
.final FineTuningJob.Builder
fineTunedModel(JsonField<String> fineTunedModel)
Sets Builder.fineTunedModel to an arbitrary JSON value. final FineTuningJob.Builder
finishedAt(Long finishedAt)
The Unix timestamp (in seconds) for when the fine-tuning job was finished. final FineTuningJob.Builder
finishedAt(Long finishedAt)
Alias for Builder.finishedAt. final FineTuningJob.Builder
finishedAt(Optional<Long> finishedAt)
Alias for calling Builder.finishedAt with finishedAt.orElse(null)
.final FineTuningJob.Builder
finishedAt(JsonField<Long> finishedAt)
Sets Builder.finishedAt to an arbitrary JSON value. final FineTuningJob.Builder
hyperparameters(FineTuningJob.Hyperparameters hyperparameters)
The hyperparameters used for the fine-tuning job. final FineTuningJob.Builder
hyperparameters(JsonField<FineTuningJob.Hyperparameters> hyperparameters)
Sets Builder.hyperparameters to an arbitrary JSON value. final FineTuningJob.Builder
model(String model)
The base model that is being fine-tuned. final FineTuningJob.Builder
model(JsonField<String> model)
Sets Builder.model to an arbitrary JSON value. final FineTuningJob.Builder
object_(JsonValue object_)
Sets the field to an arbitrary JSON value. final FineTuningJob.Builder
organizationId(String organizationId)
The organization that owns the fine-tuning job. final FineTuningJob.Builder
organizationId(JsonField<String> organizationId)
Sets Builder.organizationId to an arbitrary JSON value. final FineTuningJob.Builder
resultFiles(List<String> resultFiles)
The compiled results file ID(s) for the fine-tuning job. final FineTuningJob.Builder
resultFiles(JsonField<List<String>> resultFiles)
Sets Builder.resultFiles to an arbitrary JSON value. final FineTuningJob.Builder
addResultFile(String resultFile)
Adds a single String to resultFiles. final FineTuningJob.Builder
seed(Long seed)
The seed used for the fine-tuning job. final FineTuningJob.Builder
seed(JsonField<Long> seed)
Sets Builder.seed to an arbitrary JSON value. final FineTuningJob.Builder
status(FineTuningJob.Status status)
The current status of the fine-tuning job, which can be either validating_files
,queued
,running
,succeeded
,failed
, orcancelled
.final FineTuningJob.Builder
status(JsonField<FineTuningJob.Status> status)
Sets Builder.status to an arbitrary JSON value. final FineTuningJob.Builder
trainedTokens(Long trainedTokens)
The total number of billable tokens processed by this fine-tuning job. final FineTuningJob.Builder
trainedTokens(Long trainedTokens)
Alias for Builder.trainedTokens. final FineTuningJob.Builder
trainedTokens(Optional<Long> trainedTokens)
Alias for calling Builder.trainedTokens with trainedTokens.orElse(null)
.final FineTuningJob.Builder
trainedTokens(JsonField<Long> trainedTokens)
Sets Builder.trainedTokens to an arbitrary JSON value. final FineTuningJob.Builder
trainingFile(String trainingFile)
The file ID used for training. final FineTuningJob.Builder
trainingFile(JsonField<String> trainingFile)
Sets Builder.trainingFile to an arbitrary JSON value. final FineTuningJob.Builder
validationFile(String validationFile)
The file ID used for validation. final FineTuningJob.Builder
validationFile(Optional<String> validationFile)
Alias for calling Builder.validationFile with validationFile.orElse(null)
.final FineTuningJob.Builder
validationFile(JsonField<String> validationFile)
Sets Builder.validationFile to an arbitrary JSON value. final FineTuningJob.Builder
estimatedFinish(Long estimatedFinish)
The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. final FineTuningJob.Builder
estimatedFinish(Long estimatedFinish)
Alias for Builder.estimatedFinish. final FineTuningJob.Builder
estimatedFinish(Optional<Long> estimatedFinish)
Alias for calling Builder.estimatedFinish with estimatedFinish.orElse(null)
.final FineTuningJob.Builder
estimatedFinish(JsonField<Long> estimatedFinish)
Sets Builder.estimatedFinish to an arbitrary JSON value. final FineTuningJob.Builder
integrations(List<FineTuningJobWandbIntegrationObject> integrations)
A list of integrations to enable for this fine-tuning job. final FineTuningJob.Builder
integrations(Optional<List<FineTuningJobWandbIntegrationObject>> integrations)
Alias for calling Builder.integrations with integrations.orElse(null)
.final FineTuningJob.Builder
integrations(JsonField<List<FineTuningJobWandbIntegrationObject>> integrations)
Sets Builder.integrations to an arbitrary JSON value. final FineTuningJob.Builder
addIntegration(FineTuningJobWandbIntegrationObject integration)
Adds a single FineTuningJobWandbIntegrationObject to integrations. final FineTuningJob.Builder
addWandbIntegration(FineTuningJobWandbIntegration wandb)
Alias for calling addIntegration with the following: FineTuningJobWandbIntegrationObject.builder() .wandb(wandb) .build()
final FineTuningJob.Builder
metadata(FineTuningJob.Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. final FineTuningJob.Builder
metadata(Optional<FineTuningJob.Metadata> metadata)
Alias for calling Builder.metadata with metadata.orElse(null)
.final FineTuningJob.Builder
metadata(JsonField<FineTuningJob.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value. final FineTuningJob.Builder
method(FineTuningJob.Method method)
The method used for fine-tuning. final FineTuningJob.Builder
method(JsonField<FineTuningJob.Method> method)
Sets Builder.method to an arbitrary JSON value. final FineTuningJob.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final FineTuningJob.Builder
putAdditionalProperty(String key, JsonValue value)
final FineTuningJob.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final FineTuningJob.Builder
removeAdditionalProperty(String key)
final FineTuningJob.Builder
removeAllAdditionalProperties(Set<String> keys)
final FineTuningJob
build()
Returns an immutable instance of FineTuningJob. -
-
Method Detail
-
id
final FineTuningJob.Builder id(String id)
The object identifier, which can be referenced in the API endpoints.
-
id
final FineTuningJob.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final FineTuningJob.Builder createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the fine-tuning job was created.
-
createdAt
final FineTuningJob.Builder createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
error
final FineTuningJob.Builder error(FineTuningJob.Error error)
For fine-tuning jobs that have
failed
, this will contain more information on the cause of the failure.
-
error
final FineTuningJob.Builder error(Optional<FineTuningJob.Error> error)
Alias for calling Builder.error with
error.orElse(null)
.
-
error
final FineTuningJob.Builder error(JsonField<FineTuningJob.Error> error)
Sets Builder.error to an arbitrary JSON value.
You should usually call Builder.error with a well-typed Error value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
fineTunedModel
final FineTuningJob.Builder fineTunedModel(String fineTunedModel)
The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.
-
fineTunedModel
final FineTuningJob.Builder fineTunedModel(Optional<String> fineTunedModel)
Alias for calling Builder.fineTunedModel with
fineTunedModel.orElse(null)
.
-
fineTunedModel
final FineTuningJob.Builder fineTunedModel(JsonField<String> fineTunedModel)
Sets Builder.fineTunedModel to an arbitrary JSON value.
You should usually call Builder.fineTunedModel with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
finishedAt
final FineTuningJob.Builder finishedAt(Long finishedAt)
The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
-
finishedAt
final FineTuningJob.Builder finishedAt(Long finishedAt)
Alias for Builder.finishedAt.
This unboxed primitive overload exists for backwards compatibility.
-
finishedAt
final FineTuningJob.Builder finishedAt(Optional<Long> finishedAt)
Alias for calling Builder.finishedAt with
finishedAt.orElse(null)
.
-
finishedAt
final FineTuningJob.Builder finishedAt(JsonField<Long> finishedAt)
Sets Builder.finishedAt to an arbitrary JSON value.
You should usually call Builder.finishedAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
hyperparameters
final FineTuningJob.Builder hyperparameters(FineTuningJob.Hyperparameters hyperparameters)
The hyperparameters used for the fine-tuning job. This value will only be returned when running
supervised
jobs.
-
hyperparameters
final FineTuningJob.Builder hyperparameters(JsonField<FineTuningJob.Hyperparameters> hyperparameters)
Sets Builder.hyperparameters to an arbitrary JSON value.
You should usually call Builder.hyperparameters with a well-typed Hyperparameters value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final FineTuningJob.Builder model(String model)
The base model that is being fine-tuned.
-
model
final FineTuningJob.Builder model(JsonField<String> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
object_
final FineTuningJob.Builder object_(JsonValue object_)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("fine_tuning.job")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
organizationId
final FineTuningJob.Builder organizationId(String organizationId)
The organization that owns the fine-tuning job.
-
organizationId
final FineTuningJob.Builder organizationId(JsonField<String> organizationId)
Sets Builder.organizationId to an arbitrary JSON value.
You should usually call Builder.organizationId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
resultFiles
final FineTuningJob.Builder resultFiles(List<String> resultFiles)
The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the Files API.
-
resultFiles
final FineTuningJob.Builder resultFiles(JsonField<List<String>> resultFiles)
Sets Builder.resultFiles to an arbitrary JSON value.
You should usually call Builder.resultFiles with a well-typed
List<String>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addResultFile
final FineTuningJob.Builder addResultFile(String resultFile)
Adds a single String to resultFiles.
-
seed
final FineTuningJob.Builder seed(Long seed)
The seed used for the fine-tuning job.
-
seed
final FineTuningJob.Builder seed(JsonField<Long> seed)
Sets Builder.seed to an arbitrary JSON value.
You should usually call Builder.seed with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
status
final FineTuningJob.Builder status(FineTuningJob.Status status)
The current status of the fine-tuning job, which can be either
validating_files
,queued
,running
,succeeded
,failed
, orcancelled
.
-
status
final FineTuningJob.Builder status(JsonField<FineTuningJob.Status> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
trainedTokens
final FineTuningJob.Builder trainedTokens(Long trainedTokens)
The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
-
trainedTokens
final FineTuningJob.Builder trainedTokens(Long trainedTokens)
Alias for Builder.trainedTokens.
This unboxed primitive overload exists for backwards compatibility.
-
trainedTokens
final FineTuningJob.Builder trainedTokens(Optional<Long> trainedTokens)
Alias for calling Builder.trainedTokens with
trainedTokens.orElse(null)
.
-
trainedTokens
final FineTuningJob.Builder trainedTokens(JsonField<Long> trainedTokens)
Sets Builder.trainedTokens to an arbitrary JSON value.
You should usually call Builder.trainedTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
trainingFile
final FineTuningJob.Builder trainingFile(String trainingFile)
The file ID used for training. You can retrieve the training data with the Files API.
-
trainingFile
final FineTuningJob.Builder trainingFile(JsonField<String> trainingFile)
Sets Builder.trainingFile to an arbitrary JSON value.
You should usually call Builder.trainingFile with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
validationFile
final FineTuningJob.Builder validationFile(String validationFile)
The file ID used for validation. You can retrieve the validation results with the Files API.
-
validationFile
final FineTuningJob.Builder validationFile(Optional<String> validationFile)
Alias for calling Builder.validationFile with
validationFile.orElse(null)
.
-
validationFile
final FineTuningJob.Builder validationFile(JsonField<String> validationFile)
Sets Builder.validationFile to an arbitrary JSON value.
You should usually call Builder.validationFile with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
estimatedFinish
final FineTuningJob.Builder estimatedFinish(Long estimatedFinish)
The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.
-
estimatedFinish
final FineTuningJob.Builder estimatedFinish(Long estimatedFinish)
Alias for Builder.estimatedFinish.
This unboxed primitive overload exists for backwards compatibility.
-
estimatedFinish
final FineTuningJob.Builder estimatedFinish(Optional<Long> estimatedFinish)
Alias for calling Builder.estimatedFinish with
estimatedFinish.orElse(null)
.
-
estimatedFinish
final FineTuningJob.Builder estimatedFinish(JsonField<Long> estimatedFinish)
Sets Builder.estimatedFinish to an arbitrary JSON value.
You should usually call Builder.estimatedFinish with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
integrations
final FineTuningJob.Builder integrations(List<FineTuningJobWandbIntegrationObject> integrations)
A list of integrations to enable for this fine-tuning job.
-
integrations
final FineTuningJob.Builder integrations(Optional<List<FineTuningJobWandbIntegrationObject>> integrations)
Alias for calling Builder.integrations with
integrations.orElse(null)
.
-
integrations
final FineTuningJob.Builder integrations(JsonField<List<FineTuningJobWandbIntegrationObject>> integrations)
Sets Builder.integrations to an arbitrary JSON value.
You should usually call Builder.integrations with a well-typed
List<FineTuningJobWandbIntegrationObject>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addIntegration
final FineTuningJob.Builder addIntegration(FineTuningJobWandbIntegrationObject integration)
Adds a single FineTuningJobWandbIntegrationObject to integrations.
-
addWandbIntegration
final FineTuningJob.Builder addWandbIntegration(FineTuningJobWandbIntegration wandb)
Alias for calling addIntegration with the following:
FineTuningJobWandbIntegrationObject.builder() .wandb(wandb) .build()
-
metadata
final FineTuningJob.Builder metadata(FineTuningJob.Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
metadata
final FineTuningJob.Builder metadata(Optional<FineTuningJob.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null)
.
-
metadata
final FineTuningJob.Builder metadata(JsonField<FineTuningJob.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
method
final FineTuningJob.Builder method(FineTuningJob.Method method)
The method used for fine-tuning.
-
method
final FineTuningJob.Builder method(JsonField<FineTuningJob.Method> method)
Sets Builder.method to an arbitrary JSON value.
You should usually call Builder.method with a well-typed Method value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final FineTuningJob.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final FineTuningJob.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final FineTuningJob.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final FineTuningJob.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final FineTuningJob.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final FineTuningJob build()
Returns an immutable instance of FineTuningJob.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .createdAt() .error() .fineTunedModel() .finishedAt() .hyperparameters() .model() .organizationId() .resultFiles() .seed() .status() .trainedTokens() .trainingFile() .validationFile()
-
-
-
-