Package com.google.genai
Class AsyncTunings
java.lang.Object
com.google.genai.AsyncTunings
Async module of
Tunings-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(String name, GetTuningJobConfig config) Asynchronously makes an API request to get a tuning job.list(ListTuningJobsConfig config) Asynchronously makes an API request to list the available tuning jobs.tune(String baseModel, TuningDataset trainingDataset, CreateTuningJobConfig config) Asynchronously makes an API request to create a supervised fine-tuning job.
-
Constructor Details
-
AsyncTunings
public AsyncTunings(com.google.genai.ApiClient apiClient)
-
-
Method Details
-
get
Asynchronously makes an API request to get a tuning job.- Parameters:
name- The resource name of the tuning job.config- AGetTuningJobConfigfor configuring the get request.- Returns:
- A CompletableFuture that resolves to a
TuningJobobject.
-
list
Asynchronously makes an API request to list the available tuning jobs.- Parameters:
config- AListTuningJobsConfigfor configuring the list request.- Returns:
- A CompletableFuture that resolves to a
AsyncPager. The AsyncPager has a `forEach` method that can be used to asynchronously process items in the page and automatically query the next page once the current page is exhausted.
-
tune
public CompletableFuture<TuningJob> tune(String baseModel, TuningDataset trainingDataset, CreateTuningJobConfig config) Asynchronously 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- ACreateTuningJobConfigfor configuring the create request.- Returns:
- A CompletableFuture that resolves to a
TuningJobobject.
-