- 3.13.0 (latest)
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
public abstract class GenAiTuningServiceClient
Reference documentation and code samples for the Cloud AI Platform v1 API class GenAiTuningServiceClient.
GenAiTuningService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.AIPlatform.V1Assembly
Google.Cloud.AIPlatform.V1.dll
Remarks
A service for creating and managing GenAI Tuning Jobs.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the GenAiTuningService service, which is a host of "aiplatform.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default GenAiTuningService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default GenAiTuningService scopes are:
GrpcClient
public virtual GenAiTuningService.GenAiTuningServiceClient GrpcClient { get; }
The underlying gRPC GenAiTuningService client
Property Value | |
---|---|
Type | Description |
GenAiTuningServiceGenAiTuningServiceClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
RebaseTunedModelOperationsClient
public virtual OperationsClient RebaseTunedModelOperationsClient { get; }
The long-running operations client for RebaseTunedModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
CancelTuningJob(CancelTuningJobRequest, CallSettings)
public virtual void CancelTuningJob(CancelTuningJobRequest request, CallSettings callSettings = null)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
CancelTuningJobRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
CancelTuningJobRequest request = new CancelTuningJobRequest
{
TuningJobName = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"),
};
// Make the request
genAiTuningServiceClient.CancelTuningJob(request);
CancelTuningJob(TuningJobName, CallSettings)
public virtual void CancelTuningJob(TuningJobName name, CallSettings callSettings = null)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
name |
TuningJobName Required. The name of the TuningJob to cancel. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
TuningJobName name = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
// Make the request
genAiTuningServiceClient.CancelTuningJob(name);
CancelTuningJob(string, CallSettings)
public virtual void CancelTuningJob(string name, CallSettings callSettings = null)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the TuningJob to cancel. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tuningJobs/[TUNING_JOB]";
// Make the request
genAiTuningServiceClient.CancelTuningJob(name);
CancelTuningJobAsync(CancelTuningJobRequest, CallSettings)
public virtual Task CancelTuningJobAsync(CancelTuningJobRequest request, CallSettings callSettings = null)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
CancelTuningJobRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
CancelTuningJobRequest request = new CancelTuningJobRequest
{
TuningJobName = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"),
};
// Make the request
await genAiTuningServiceClient.CancelTuningJobAsync(request);
CancelTuningJobAsync(CancelTuningJobRequest, CancellationToken)
public virtual Task CancelTuningJobAsync(CancelTuningJobRequest request, CancellationToken cancellationToken)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
CancelTuningJobRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
CancelTuningJobRequest request = new CancelTuningJobRequest
{
TuningJobName = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"),
};
// Make the request
await genAiTuningServiceClient.CancelTuningJobAsync(request);
CancelTuningJobAsync(TuningJobName, CallSettings)
public virtual Task CancelTuningJobAsync(TuningJobName name, CallSettings callSettings = null)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
name |
TuningJobName Required. The name of the TuningJob to cancel. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
TuningJobName name = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
// Make the request
await genAiTuningServiceClient.CancelTuningJobAsync(name);
CancelTuningJobAsync(TuningJobName, CancellationToken)
public virtual Task CancelTuningJobAsync(TuningJobName name, CancellationToken cancellationToken)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
name |
TuningJobName Required. The name of the TuningJob to cancel. Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
TuningJobName name = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
// Make the request
await genAiTuningServiceClient.CancelTuningJobAsync(name);
CancelTuningJobAsync(string, CallSettings)
public virtual Task CancelTuningJobAsync(string name, CallSettings callSettings = null)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the TuningJob to cancel. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tuningJobs/[TUNING_JOB]";
// Make the request
await genAiTuningServiceClient.CancelTuningJobAsync(name);
CancelTuningJobAsync(string, CancellationToken)
public virtual Task CancelTuningJobAsync(string name, CancellationToken cancellationToken)
Cancels a TuningJob.
Starts asynchronous cancellation on the TuningJob. The server makes a best
effort to cancel the job, but success is not guaranteed. Clients can use
[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
or other methods to check whether the cancellation succeeded or whether the
job completed despite cancellation. On successful cancellation, the
TuningJob is not deleted; instead it becomes a job with a
[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
Code.CANCELLED
, and
[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
CANCELLED
.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the TuningJob to cancel. Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tuningJobs/[TUNING_JOB]";
// Make the request
await genAiTuningServiceClient.CancelTuningJobAsync(name);
Create()
public static GenAiTuningServiceClient Create()
Synchronously creates a GenAiTuningServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GenAiTuningServiceClientBuilder .
Returns | |
---|---|
Type | Description |
GenAiTuningServiceClient |
The created GenAiTuningServiceClient. |
CreateAsync(CancellationToken)
public static Task<GenAiTuningServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a GenAiTuningServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GenAiTuningServiceClientBuilder .
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskGenAiTuningServiceClient |
The task representing the created GenAiTuningServiceClient. |
CreateTuningJob(LocationName, TuningJob, CallSettings)
public virtual TuningJob CreateTuningJob(LocationName parent, TuningJob tuningJob, CallSettings callSettings = null)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the TuningJob in.
Format: |
tuningJob |
TuningJob Required. The TuningJob to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TuningJob |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
TuningJob tuningJob = new TuningJob();
// Make the request
TuningJob response = genAiTuningServiceClient.CreateTuningJob(parent, tuningJob);
CreateTuningJob(CreateTuningJobRequest, CallSettings)
public virtual TuningJob CreateTuningJob(CreateTuningJobRequest request, CallSettings callSettings = null)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
request |
CreateTuningJobRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TuningJob |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
CreateTuningJobRequest request = new CreateTuningJobRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TuningJob = new TuningJob(),
};
// Make the request
TuningJob response = genAiTuningServiceClient.CreateTuningJob(request);
CreateTuningJob(string, TuningJob, CallSettings)
public virtual TuningJob CreateTuningJob(string parent, TuningJob tuningJob, CallSettings callSettings = null)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the TuningJob in.
Format: |
tuningJob |
TuningJob Required. The TuningJob to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TuningJob |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
TuningJob tuningJob = new TuningJob();
// Make the request
TuningJob response = genAiTuningServiceClient.CreateTuningJob(parent, tuningJob);
CreateTuningJobAsync(LocationName, TuningJob, CallSettings)
public virtual Task<TuningJob> CreateTuningJobAsync(LocationName parent, TuningJob tuningJob, CallSettings callSettings = null)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the TuningJob in.
Format: |
tuningJob |
TuningJob Required. The TuningJob to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
TuningJob tuningJob = new TuningJob();
// Make the request
TuningJob response = await genAiTuningServiceClient.CreateTuningJobAsync(parent, tuningJob);
CreateTuningJobAsync(LocationName, TuningJob, CancellationToken)
public virtual Task<TuningJob> CreateTuningJobAsync(LocationName parent, TuningJob tuningJob, CancellationToken cancellationToken)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the TuningJob in.
Format: |
tuningJob |
TuningJob Required. The TuningJob to create. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
TuningJob tuningJob = new TuningJob();
// Make the request
TuningJob response = await genAiTuningServiceClient.CreateTuningJobAsync(parent, tuningJob);
CreateTuningJobAsync(CreateTuningJobRequest, CallSettings)
public virtual Task<TuningJob> CreateTuningJobAsync(CreateTuningJobRequest request, CallSettings callSettings = null)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
request |
CreateTuningJobRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTuningJobRequest request = new CreateTuningJobRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TuningJob = new TuningJob(),
};
// Make the request
TuningJob response = await genAiTuningServiceClient.CreateTuningJobAsync(request);
CreateTuningJobAsync(CreateTuningJobRequest, CancellationToken)
public virtual Task<TuningJob> CreateTuningJobAsync(CreateTuningJobRequest request, CancellationToken cancellationToken)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
request |
CreateTuningJobRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTuningJobRequest request = new CreateTuningJobRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TuningJob = new TuningJob(),
};
// Make the request
TuningJob response = await genAiTuningServiceClient.CreateTuningJobAsync(request);
CreateTuningJobAsync(string, TuningJob, CallSettings)
public virtual Task<TuningJob> CreateTuningJobAsync(string parent, TuningJob tuningJob, CallSettings callSettings = null)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the TuningJob in.
Format: |
tuningJob |
TuningJob Required. The TuningJob to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
TuningJob tuningJob = new TuningJob();
// Make the request
TuningJob response = await genAiTuningServiceClient.CreateTuningJobAsync(parent, tuningJob);
CreateTuningJobAsync(string, TuningJob, CancellationToken)
public virtual Task<TuningJob> CreateTuningJobAsync(string parent, TuningJob tuningJob, CancellationToken cancellationToken)
Creates a TuningJob. A created TuningJob right away will be attempted to be run.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the TuningJob in.
Format: |
tuningJob |
TuningJob Required. The TuningJob to create. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
TuningJob tuningJob = new TuningJob();
// Make the request
TuningJob response = await genAiTuningServiceClient.CreateTuningJobAsync(parent, tuningJob);
GetTuningJob(GetTuningJobRequest, CallSettings)
public virtual TuningJob GetTuningJob(GetTuningJobRequest request, CallSettings callSettings = null)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
request |
GetTuningJobRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TuningJob |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
GetTuningJobRequest request = new GetTuningJobRequest
{
TuningJobName = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"),
};
// Make the request
TuningJob response = genAiTuningServiceClient.GetTuningJob(request);
GetTuningJob(TuningJobName, CallSettings)
public virtual TuningJob GetTuningJob(TuningJobName name, CallSettings callSettings = null)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
name |
TuningJobName Required. The name of the TuningJob resource. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TuningJob |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
TuningJobName name = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
// Make the request
TuningJob response = genAiTuningServiceClient.GetTuningJob(name);
GetTuningJob(string, CallSettings)
public virtual TuningJob GetTuningJob(string name, CallSettings callSettings = null)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the TuningJob resource. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TuningJob |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tuningJobs/[TUNING_JOB]";
// Make the request
TuningJob response = genAiTuningServiceClient.GetTuningJob(name);
GetTuningJobAsync(GetTuningJobRequest, CallSettings)
public virtual Task<TuningJob> GetTuningJobAsync(GetTuningJobRequest request, CallSettings callSettings = null)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
request |
GetTuningJobRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
GetTuningJobRequest request = new GetTuningJobRequest
{
TuningJobName = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"),
};
// Make the request
TuningJob response = await genAiTuningServiceClient.GetTuningJobAsync(request);
GetTuningJobAsync(GetTuningJobRequest, CancellationToken)
public virtual Task<TuningJob> GetTuningJobAsync(GetTuningJobRequest request, CancellationToken cancellationToken)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
request |
GetTuningJobRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
GetTuningJobRequest request = new GetTuningJobRequest
{
TuningJobName = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"),
};
// Make the request
TuningJob response = await genAiTuningServiceClient.GetTuningJobAsync(request);
GetTuningJobAsync(TuningJobName, CallSettings)
public virtual Task<TuningJob> GetTuningJobAsync(TuningJobName name, CallSettings callSettings = null)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
name |
TuningJobName Required. The name of the TuningJob resource. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
TuningJobName name = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
// Make the request
TuningJob response = await genAiTuningServiceClient.GetTuningJobAsync(name);
GetTuningJobAsync(TuningJobName, CancellationToken)
public virtual Task<TuningJob> GetTuningJobAsync(TuningJobName name, CancellationToken cancellationToken)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
name |
TuningJobName Required. The name of the TuningJob resource. Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
TuningJobName name = TuningJobName.FromProjectLocationTuningJob("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
// Make the request
TuningJob response = await genAiTuningServiceClient.GetTuningJobAsync(name);
GetTuningJobAsync(string, CallSettings)
public virtual Task<TuningJob> GetTuningJobAsync(string name, CallSettings callSettings = null)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the TuningJob resource. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tuningJobs/[TUNING_JOB]";
// Make the request
TuningJob response = await genAiTuningServiceClient.GetTuningJobAsync(name);
GetTuningJobAsync(string, CancellationToken)
public virtual Task<TuningJob> GetTuningJobAsync(string name, CancellationToken cancellationToken)
Gets a TuningJob.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the TuningJob resource. Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTuningJob |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/tuningJobs/[TUNING_JOB]";
// Make the request
TuningJob response = await genAiTuningServiceClient.GetTuningJobAsync(name);
ListTuningJobs(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListTuningJobsResponse, TuningJob> ListTuningJobs(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists TuningJobs in a Location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to list the TuningJobs from.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTuningJobsResponseTuningJob |
A pageable sequence of TuningJob resources. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListTuningJobsResponse, TuningJob> response = genAiTuningServiceClient.ListTuningJobs(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (TuningJob item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTuningJobsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TuningJob item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TuningJob> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TuningJob item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTuningJobs(ListTuningJobsRequest, CallSettings)
public virtual PagedEnumerable<ListTuningJobsResponse, TuningJob> ListTuningJobs(ListTuningJobsRequest request, CallSettings callSettings = null)
Lists TuningJobs in a Location.
Parameters | |
---|---|
Name | Description |
request |
ListTuningJobsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTuningJobsResponseTuningJob |
A pageable sequence of TuningJob resources. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
ListTuningJobsRequest request = new ListTuningJobsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListTuningJobsResponse, TuningJob> response = genAiTuningServiceClient.ListTuningJobs(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (TuningJob item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTuningJobsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TuningJob item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TuningJob> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TuningJob item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTuningJobs(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListTuningJobsResponse, TuningJob> ListTuningJobs(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists TuningJobs in a Location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to list the TuningJobs from.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTuningJobsResponseTuningJob |
A pageable sequence of TuningJob resources. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListTuningJobsResponse, TuningJob> response = genAiTuningServiceClient.ListTuningJobs(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (TuningJob item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTuningJobsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TuningJob item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TuningJob> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TuningJob item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTuningJobsAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListTuningJobsResponse, TuningJob> ListTuningJobsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists TuningJobs in a Location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to list the TuningJobs from.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTuningJobsResponseTuningJob |
A pageable asynchronous sequence of TuningJob resources. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListTuningJobsResponse, TuningJob> response = genAiTuningServiceClient.ListTuningJobsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TuningJob item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTuningJobsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TuningJob item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TuningJob> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TuningJob item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTuningJobsAsync(ListTuningJobsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListTuningJobsResponse, TuningJob> ListTuningJobsAsync(ListTuningJobsRequest request, CallSettings callSettings = null)
Lists TuningJobs in a Location.
Parameters | |
---|---|
Name | Description |
request |
ListTuningJobsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTuningJobsResponseTuningJob |
A pageable asynchronous sequence of TuningJob resources. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
ListTuningJobsRequest request = new ListTuningJobsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListTuningJobsResponse, TuningJob> response = genAiTuningServiceClient.ListTuningJobsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TuningJob item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTuningJobsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TuningJob item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TuningJob> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TuningJob item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTuningJobsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListTuningJobsResponse, TuningJob> ListTuningJobsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists TuningJobs in a Location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to list the TuningJobs from.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTuningJobsResponseTuningJob |
A pageable asynchronous sequence of TuningJob resources. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListTuningJobsResponse, TuningJob> response = genAiTuningServiceClient.ListTuningJobsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TuningJob item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTuningJobsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TuningJob item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TuningJob> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TuningJob item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceRebaseTunedModel(string, CallSettings)
public virtual Operation<TuningJob, RebaseTunedModelOperationMetadata> PollOnceRebaseTunedModel(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of RebaseTunedModel
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTuningJobRebaseTunedModelOperationMetadata |
The result of polling the operation. |
PollOnceRebaseTunedModelAsync(string, CallSettings)
public virtual Task<Operation<TuningJob, RebaseTunedModelOperationMetadata>> PollOnceRebaseTunedModelAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
RebaseTunedModel
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTuningJobRebaseTunedModelOperationMetadata |
A task representing the result of polling the operation. |
RebaseTunedModel(LocationName, TunedModelRef, CallSettings)
public virtual Operation<TuningJob, RebaseTunedModelOperationMetadata> RebaseTunedModel(LocationName parent, TunedModelRef tunedModelRef, CallSettings callSettings = null)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location into which to rebase the Model.
Format: |
tunedModelRef |
TunedModelRef Required. TunedModel reference to retrieve the legacy model information. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTuningJobRebaseTunedModelOperationMetadata |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
TunedModelRef tunedModelRef = new TunedModelRef();
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = genAiTuningServiceClient.RebaseTunedModel(parent, tunedModelRef);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = genAiTuningServiceClient.PollOnceRebaseTunedModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
RebaseTunedModel(RebaseTunedModelRequest, CallSettings)
public virtual Operation<TuningJob, RebaseTunedModelOperationMetadata> RebaseTunedModel(RebaseTunedModelRequest request, CallSettings callSettings = null)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
request |
RebaseTunedModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTuningJobRebaseTunedModelOperationMetadata |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
RebaseTunedModelRequest request = new RebaseTunedModelRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TunedModelRef = new TunedModelRef(),
TuningJob = new TuningJob(),
ArtifactDestination = new GcsDestination(),
DeployToSameEndpoint = false,
};
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = genAiTuningServiceClient.RebaseTunedModel(request);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = genAiTuningServiceClient.PollOnceRebaseTunedModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
RebaseTunedModel(string, TunedModelRef, CallSettings)
public virtual Operation<TuningJob, RebaseTunedModelOperationMetadata> RebaseTunedModel(string parent, TunedModelRef tunedModelRef, CallSettings callSettings = null)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location into which to rebase the Model.
Format: |
tunedModelRef |
TunedModelRef Required. TunedModel reference to retrieve the legacy model information. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationTuningJobRebaseTunedModelOperationMetadata |
The RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
TunedModelRef tunedModelRef = new TunedModelRef();
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = genAiTuningServiceClient.RebaseTunedModel(parent, tunedModelRef);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = genAiTuningServiceClient.PollOnceRebaseTunedModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
RebaseTunedModelAsync(LocationName, TunedModelRef, CallSettings)
public virtual Task<Operation<TuningJob, RebaseTunedModelOperationMetadata>> RebaseTunedModelAsync(LocationName parent, TunedModelRef tunedModelRef, CallSettings callSettings = null)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location into which to rebase the Model.
Format: |
tunedModelRef |
TunedModelRef Required. TunedModel reference to retrieve the legacy model information. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTuningJobRebaseTunedModelOperationMetadata |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
TunedModelRef tunedModelRef = new TunedModelRef();
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = await genAiTuningServiceClient.RebaseTunedModelAsync(parent, tunedModelRef);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = await genAiTuningServiceClient.PollOnceRebaseTunedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
RebaseTunedModelAsync(LocationName, TunedModelRef, CancellationToken)
public virtual Task<Operation<TuningJob, RebaseTunedModelOperationMetadata>> RebaseTunedModelAsync(LocationName parent, TunedModelRef tunedModelRef, CancellationToken cancellationToken)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location into which to rebase the Model.
Format: |
tunedModelRef |
TunedModelRef Required. TunedModel reference to retrieve the legacy model information. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTuningJobRebaseTunedModelOperationMetadata |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
TunedModelRef tunedModelRef = new TunedModelRef();
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = await genAiTuningServiceClient.RebaseTunedModelAsync(parent, tunedModelRef);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = await genAiTuningServiceClient.PollOnceRebaseTunedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
RebaseTunedModelAsync(RebaseTunedModelRequest, CallSettings)
public virtual Task<Operation<TuningJob, RebaseTunedModelOperationMetadata>> RebaseTunedModelAsync(RebaseTunedModelRequest request, CallSettings callSettings = null)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
request |
RebaseTunedModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTuningJobRebaseTunedModelOperationMetadata |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
RebaseTunedModelRequest request = new RebaseTunedModelRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TunedModelRef = new TunedModelRef(),
TuningJob = new TuningJob(),
ArtifactDestination = new GcsDestination(),
DeployToSameEndpoint = false,
};
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = await genAiTuningServiceClient.RebaseTunedModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = await genAiTuningServiceClient.PollOnceRebaseTunedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
RebaseTunedModelAsync(RebaseTunedModelRequest, CancellationToken)
public virtual Task<Operation<TuningJob, RebaseTunedModelOperationMetadata>> RebaseTunedModelAsync(RebaseTunedModelRequest request, CancellationToken cancellationToken)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
request |
RebaseTunedModelRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTuningJobRebaseTunedModelOperationMetadata |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
RebaseTunedModelRequest request = new RebaseTunedModelRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
TunedModelRef = new TunedModelRef(),
TuningJob = new TuningJob(),
ArtifactDestination = new GcsDestination(),
DeployToSameEndpoint = false,
};
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = await genAiTuningServiceClient.RebaseTunedModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = await genAiTuningServiceClient.PollOnceRebaseTunedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
RebaseTunedModelAsync(string, TunedModelRef, CallSettings)
public virtual Task<Operation<TuningJob, RebaseTunedModelOperationMetadata>> RebaseTunedModelAsync(string parent, TunedModelRef tunedModelRef, CallSettings callSettings = null)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location into which to rebase the Model.
Format: |
tunedModelRef |
TunedModelRef Required. TunedModel reference to retrieve the legacy model information. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationTuningJobRebaseTunedModelOperationMetadata |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
TunedModelRef tunedModelRef = new TunedModelRef();
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = await genAiTuningServiceClient.RebaseTunedModelAsync(parent, tunedModelRef);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = await genAiTuningServiceClient.PollOnceRebaseTunedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
RebaseTunedModelAsync(string, TunedModelRef, CancellationToken)
public virtual Task<Operation<TuningJob, RebaseTunedModelOperationMetadata>> RebaseTunedModelAsync(string parent, TunedModelRef tunedModelRef, CancellationToken cancellationToken)
Rebase a TunedModel. Creates a LongRunningOperation that takes a legacy Tuned GenAI model Reference and creates a TuningJob based on newly available model.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location into which to rebase the Model.
Format: |
tunedModelRef |
TunedModelRef Required. TunedModel reference to retrieve the legacy model information. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationTuningJobRebaseTunedModelOperationMetadata |
A Task containing the RPC response. |
// Create client
GenAiTuningServiceClient genAiTuningServiceClient = await GenAiTuningServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
TunedModelRef tunedModelRef = new TunedModelRef();
// Make the request
Operation<TuningJob, RebaseTunedModelOperationMetadata> response = await genAiTuningServiceClient.RebaseTunedModelAsync(parent, tunedModelRef);
// Poll until the returned long-running operation is complete
Operation<TuningJob, RebaseTunedModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TuningJob result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TuningJob, RebaseTunedModelOperationMetadata> retrievedResponse = await genAiTuningServiceClient.PollOnceRebaseTunedModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
TuningJob retrievedResult = retrievedResponse.Result;
}
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.