Class JobCreateParams.Builder
-
- All Implemented Interfaces:
public final class JobCreateParams.Builder
A builder for JobCreateParams.
-
-
Method Summary
-
-
Method Detail
-
model
final JobCreateParams.Builder model(JobCreateParams.Model model)
The name of the model to fine-tune. You can select one of the supported models.
-
model
final JobCreateParams.Builder model(JsonField<JobCreateParams.Model> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final JobCreateParams.Builder model(String value)
Sets model to an arbitrary String.
You should usually call model with a well-typed Model constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
trainingFile
final JobCreateParams.Builder trainingFile(String trainingFile)
The ID of an uploaded file that contains training data.
See upload file for how to upload a file.
Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose
fine-tune
.The contents of the file should differ depending on if the model uses the chat, completions format, or if the fine-tuning method uses the preference format.
See the fine-tuning guide for more details.
-
trainingFile
final JobCreateParams.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.
-
hyperparameters
@Deprecated(message = "deprecated") final JobCreateParams.Builder hyperparameters(JobCreateParams.Hyperparameters hyperparameters)
The hyperparameters used for the fine-tuning job. This value is now deprecated in favor of
method
, and should be passed in under themethod
parameter.
-
hyperparameters
@Deprecated(message = "deprecated") final JobCreateParams.Builder hyperparameters(JsonField<JobCreateParams.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.
-
integrations
final JobCreateParams.Builder integrations(List<JobCreateParams.Integration> integrations)
A list of integrations to enable for your fine-tuning job.
-
integrations
final JobCreateParams.Builder integrations(Optional<List<JobCreateParams.Integration>> integrations)
Alias for calling Builder.integrations with
integrations.orElse(null)
.
-
integrations
final JobCreateParams.Builder integrations(JsonField<List<JobCreateParams.Integration>> integrations)
Sets Builder.integrations to an arbitrary JSON value.
You should usually call Builder.integrations with a well-typed
List<Integration>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addIntegration
final JobCreateParams.Builder addIntegration(JobCreateParams.Integration integration)
Adds a single Integration to integrations.
-
metadata
final JobCreateParams.Builder metadata(JobCreateParams.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 JobCreateParams.Builder metadata(Optional<JobCreateParams.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null)
.
-
metadata
final JobCreateParams.Builder metadata(JsonField<JobCreateParams.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 JobCreateParams.Builder method(JobCreateParams.Method method)
The method used for fine-tuning.
-
method
final JobCreateParams.Builder method(JsonField<JobCreateParams.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.
-
seed
final JobCreateParams.Builder seed(Long seed)
The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you.
-
seed
final JobCreateParams.Builder seed(Long seed)
Alias for Builder.seed.
This unboxed primitive overload exists for backwards compatibility.
-
seed
final JobCreateParams.Builder seed(Optional<Long> seed)
Alias for calling Builder.seed with
seed.orElse(null)
.
-
seed
final JobCreateParams.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.
-
suffix
final JobCreateParams.Builder suffix(String suffix)
A string of up to 64 characters that will be added to your fine-tuned model name.
For example, a
suffix
of "custom-model-name" would produce a model name likeft:gpt-4o-mini:openai:custom-model-name:7p4lURel
.
-
suffix
final JobCreateParams.Builder suffix(Optional<String> suffix)
Alias for calling Builder.suffix with
suffix.orElse(null)
.
-
suffix
final JobCreateParams.Builder suffix(JsonField<String> suffix)
Sets Builder.suffix to an arbitrary JSON value.
You should usually call Builder.suffix 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 JobCreateParams.Builder validationFile(String validationFile)
The ID of an uploaded file that contains validation data.
If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should not be present in both train and validation files.
Your dataset must be formatted as a JSONL file. You must upload your file with the purpose
fine-tune
.See the fine-tuning guide for more details.
-
validationFile
final JobCreateParams.Builder validationFile(Optional<String> validationFile)
Alias for calling Builder.validationFile with
validationFile.orElse(null)
.
-
validationFile
final JobCreateParams.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.
-
additionalBodyProperties
final JobCreateParams.Builder additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
putAdditionalBodyProperty
final JobCreateParams.Builder putAdditionalBodyProperty(String key, JsonValue value)
-
putAllAdditionalBodyProperties
final JobCreateParams.Builder putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
removeAdditionalBodyProperty
final JobCreateParams.Builder removeAdditionalBodyProperty(String key)
-
removeAllAdditionalBodyProperties
final JobCreateParams.Builder removeAllAdditionalBodyProperties(Set<String> keys)
-
additionalHeaders
final JobCreateParams.Builder additionalHeaders(Headers additionalHeaders)
-
additionalHeaders
final JobCreateParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
putAdditionalHeader
final JobCreateParams.Builder putAdditionalHeader(String name, String value)
-
putAdditionalHeaders
final JobCreateParams.Builder putAdditionalHeaders(String name, Iterable<String> values)
-
putAllAdditionalHeaders
final JobCreateParams.Builder putAllAdditionalHeaders(Headers additionalHeaders)
-
putAllAdditionalHeaders
final JobCreateParams.Builder putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
replaceAdditionalHeaders
final JobCreateParams.Builder replaceAdditionalHeaders(String name, String value)
-
replaceAdditionalHeaders
final JobCreateParams.Builder replaceAdditionalHeaders(String name, Iterable<String> values)
-
replaceAllAdditionalHeaders
final JobCreateParams.Builder replaceAllAdditionalHeaders(Headers additionalHeaders)
-
replaceAllAdditionalHeaders
final JobCreateParams.Builder replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
removeAdditionalHeaders
final JobCreateParams.Builder removeAdditionalHeaders(String name)
-
removeAllAdditionalHeaders
final JobCreateParams.Builder removeAllAdditionalHeaders(Set<String> names)
-
additionalQueryParams
final JobCreateParams.Builder additionalQueryParams(QueryParams additionalQueryParams)
-
additionalQueryParams
final JobCreateParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
putAdditionalQueryParam
final JobCreateParams.Builder putAdditionalQueryParam(String key, String value)
-
putAdditionalQueryParams
final JobCreateParams.Builder putAdditionalQueryParams(String key, Iterable<String> values)
-
putAllAdditionalQueryParams
final JobCreateParams.Builder putAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
putAllAdditionalQueryParams
final JobCreateParams.Builder putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
replaceAdditionalQueryParams
final JobCreateParams.Builder replaceAdditionalQueryParams(String key, String value)
-
replaceAdditionalQueryParams
final JobCreateParams.Builder replaceAdditionalQueryParams(String key, Iterable<String> values)
-
replaceAllAdditionalQueryParams
final JobCreateParams.Builder replaceAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
replaceAllAdditionalQueryParams
final JobCreateParams.Builder replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
removeAdditionalQueryParams
final JobCreateParams.Builder removeAdditionalQueryParams(String key)
-
removeAllAdditionalQueryParams
final JobCreateParams.Builder removeAllAdditionalQueryParams(Set<String> keys)
-
build
final JobCreateParams build()
Returns an immutable instance of JobCreateParams.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.model() .trainingFile()
-
-
-
-