Class FineTuningClient

java.lang.Object
io.github.stefanbratanov.jvm.openai.FineTuningClient

public final class FineTuningClient extends Object
Manage fine-tuning jobs to tailor a model to your specific training data.

Based on Fine-tuning

  • Method Details

    • createFineTuningJob

      public FineTuningJob createFineTuningJob(CreateFineTuningJobRequest request)
      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.

      Throws:
      OpenAIException - in case of API errors
    • listFineTuningJobs

      public FineTuningClient.PaginatedFineTuningJobs listFineTuningJobs(Optional<Integer> limit, Optional<String> after)
      List your organization's fine-tuning jobs
      Parameters:
      limit - Number of fine-tuning jobs to retrieve.
      after - Identifier for the last job from the previous pagination request.
      Throws:
      OpenAIException - in case of API errors
    • listFineTuningJobEvents

      public FineTuningClient.PaginatedFineTuningEvents listFineTuningJobEvents(String fineTuningJobId, Optional<Integer> limit, Optional<String> after)
      Get status updates for a fine-tuning job.
      Parameters:
      fineTuningJobId - The ID of the fine-tuning job to get events for.
      limit - Number of fine-tuning jobs to retrieve.
      after - Identifier for the last job from the previous pagination request.
      Throws:
      OpenAIException - in case of API errors
    • listFineTuningCheckpoints

      public FineTuningClient.PaginatedFineTuningCheckpoints listFineTuningCheckpoints(String fineTuningJobId, Optional<Integer> limit, Optional<String> after)
      List checkpoints for a fine-tuning job.
      Parameters:
      fineTuningJobId - The ID of the fine-tuning job to get checkpoints for.
      limit - Number of checkpoints to retrieve.
      after - Identifier for the last checkpoint ID from the previous pagination request.
      Throws:
      OpenAIException - in case of API errors
    • retrieveFineTuningJob

      public FineTuningJob retrieveFineTuningJob(String fineTuningJobId)
      Get info about a fine-tuning job.
      Parameters:
      fineTuningJobId - The ID of the fine-tuning job.
      Throws:
      OpenAIException - in case of API errors
    • cancelFineTuningJob

      public FineTuningJob cancelFineTuningJob(String fineTuningJobId)
      Immediately cancel a fine-tune job.
      Parameters:
      fineTuningJobId - The ID of the fine-tuning job to cancel.
      Throws:
      OpenAIException - in case of API errors