Class JobCreateParams

  • All Implemented Interfaces:
    com.openai.core.Params

    
    public final class JobCreateParams
     implements Params
                        

    Creates a fine-tuning job which begins the process of creating a new model from a given dataset.

    Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.

    Learn more about fine-tuning

    • Constructor Detail

    • Method Detail

      • trainingFile

         final 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.

      • metadata

         final Optional<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.

      • seed

         final Optional<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.

      • suffix

         final Optional<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 like ft:gpt-4o-mini:openai:custom-model-name:7p4lURel.

      • validationFile

         final Optional<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.

      • _trainingFile

         final JsonField<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.

      • _metadata

         final JsonField<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.

      • _seed

         final JsonField<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.

      • _suffix

         final JsonField<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 like ft:gpt-4o-mini:openai:custom-model-name:7p4lURel.

      • _validationFile

         final JsonField<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.

      • _headers

         Headers _headers()

        The full set of headers in the parameters, including both fixed and additional headers.

      • _queryParams

         QueryParams _queryParams()

        The full set of query params in the parameters, including both fixed and additional query params.