Class Tunings
public sealed class Tunings
- Inheritance
-
Tunings
- Inherited Members
Constructors
Tunings(ApiClient)
public Tunings(ApiClient apiClient)
Parameters
apiClientApiClient
Methods
CancelAsync(string, CancelTuningJobConfig?, CancellationToken)
Cancels a tuning job resource.
public Task<CancelTuningJobResponse> CancelAsync(string name, CancelTuningJobConfig? config = null, CancellationToken cancellationToken = default)
Parameters
namestringThe resource name of the tuning job. For Gemini Enterprise Agent Platform , this is the full resource name or
tuningJobs/{id}.configCancelTuningJobConfigA CancelTuningJobConfig for configuring the cancel request.
cancellationTokenCancellationTokenA CancellationToken to cancel the operation.
Returns
GetAsync(string, GetTuningJobConfig?, CancellationToken)
Makes an API request to get a tuning job.
public Task<TuningJob> GetAsync(string name, GetTuningJobConfig? config = null, CancellationToken cancellationToken = default)
Parameters
namestringThe resource name of the tuning job.
configGetTuningJobConfigA GetTuningJobConfig for configuring the get request.
cancellationTokenCancellationTokenThe cancellation token for the request.
Returns
ListAsync(ListTuningJobsConfig?, CancellationToken)
Lists tuning jobs.
public Task<Pager<TuningJob, ListTuningJobsConfig, ListTuningJobsResponse>> ListAsync(ListTuningJobsConfig? config = null, CancellationToken cancellationToken = default)
Parameters
configListTuningJobsConfigA ListTuningJobsConfig instance that specifies the optional configuration for the list request.
cancellationTokenCancellationTokenA CancellationToken to cancel the operation.
Returns
- Task<Pager<TuningJob, ListTuningJobsConfig, ListTuningJobsResponse>>
A Pager object that contains one page of tuning jobs. When iterating over the pager, it automatically fetches the next page if there are more.
TuneAsync(string, TuningDataset, CreateTuningJobConfig?, CancellationToken)
Makes an API request to create a supervised fine-tuning job.
public Task<TuningJob> TuneAsync(string baseModel, TuningDataset trainingDataset, CreateTuningJobConfig? config = null, CancellationToken cancellationToken = default)
Parameters
baseModelstringThe base model to tune.
trainingDatasetTuningDatasetThe training dataset to use for tuning.
configCreateTuningJobConfigA CreateTuningJobConfig for configuring the create request.
cancellationTokenCancellationTokenThe cancellation token for the request.
Returns
ValidateRewardAsync(string, Content, ReinforcementTuningExample, SingleReinforcementTuningRewardConfig?, CompositeReinforcementTuningRewardConfig?, ValidateRewardConfig?, CancellationToken)
public Task<ValidateRewardResponse> ValidateRewardAsync(string parent, Content sampleResponse, ReinforcementTuningExample example, SingleReinforcementTuningRewardConfig? singleRewardConfig = null, CompositeReinforcementTuningRewardConfig? compositeRewardConfig = null, ValidateRewardConfig? config = null, CancellationToken cancellationToken = default)
Parameters
parentstringsampleResponseContentexampleReinforcementTuningExamplesingleRewardConfigSingleReinforcementTuningRewardConfigcompositeRewardConfigCompositeReinforcementTuningRewardConfigconfigValidateRewardConfigcancellationTokenCancellationToken