Package com.google.genai
Class Tunings
-
- All Implemented Interfaces:
public final class Tunings
-
-
Method Summary
Modifier and Type Method Description CancelTuningJobResponsecancel(String name, CancelTuningJobConfig config)Cancels a tuning job resource. Pager<TuningJob>list(ListTuningJobsConfig config)Makes an API request to list the available tuning jobs. TuningJobget(String name, GetTuningJobConfig config)Makes an API request to get a tuning job. TuningJobtune(String baseModel, TuningDataset trainingDataset, CreateTuningJobConfig config)Makes an API request to create a supervised fine-tuning job. -
-
Constructor Detail
-
Tunings
Tunings(ApiClient apiClient)
-
-
Method Detail
-
cancel
CancelTuningJobResponse cancel(String name, CancelTuningJobConfig config)
Cancels a tuning job resource.
- Parameters:
name- The resource name of the tuning job.config- A CancelTuningJobConfig for configuring the cancel request.
-
list
Pager<TuningJob> list(ListTuningJobsConfig config)
Makes an API request to list the available tuning jobs.
- Parameters:
config- A ListTuningJobsConfig for configuring the list request.- Returns:
A Pager object that contains the list of tuning jobs. The pager is an iterable and automatically queries the next page once the current page is exhausted.
-
get
TuningJob get(String name, GetTuningJobConfig config)
Makes an API request to get a tuning job.
- Parameters:
name- The resource name of the tuning job.config- A GetTuningJobConfig for configuring the get request.- Returns:
A TuningJob object.
-
tune
TuningJob tune(String baseModel, TuningDataset trainingDataset, CreateTuningJobConfig config)
Makes an API request to create a supervised fine-tuning job.
This method is experimental.
- Parameters:
baseModel- The base model to tune.trainingDataset- The training dataset to use for tuning.config- A CreateTuningJobConfig for configuring the create request.- Returns:
A TuningJob object.
-
-
-
-