Class GenerativeAiClient
Service client instance for GenerativeAi.
Implements
Inherited Members
Namespace: Oci.GenerativeaiService
Assembly: OCI.DotNetSDK.Generativeai.dll
Syntax
public class GenerativeAiClient : RegionalClientBase, IDisposable
Constructors
GenerativeAiClient(IBasicAuthenticationDetailsProvider, ClientConfiguration, string)
Creates a new service instance using the given authentication provider and/or client configuration and/or endpoint. A client configuration can also be provided optionally to adjust REST client behaviors.
Declaration
public GenerativeAiClient(IBasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration clientConfiguration = null, string endpoint = null)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authenticationDetailsProvider | The authentication details provider. Required. |
ClientConfiguration | clientConfiguration | The client configuration that contains settings to adjust REST client behaviors. Optional. |
string | endpoint | The endpoint of the service. If not provided and the client is a regional client, the endpoint will be constructed based on region information. Optional. |
Properties
Paginators
Declaration
public GenerativeAiPaginators Paginators { get; }
Property Value
Type | Description |
---|---|
GenerativeAiPaginators |
Waiters
Declaration
public GenerativeAiWaiters Waiters { get; }
Property Value
Type | Description |
---|---|
GenerativeAiWaiters |
Methods
ChangeDedicatedAiClusterCompartment(ChangeDedicatedAiClusterCompartmentRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Moves a dedicated AI cluster into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
Declaration
public Task<ChangeDedicatedAiClusterCompartmentResponse> ChangeDedicatedAiClusterCompartment(ChangeDedicatedAiClusterCompartmentRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ChangeDedicatedAiClusterCompartmentRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ChangeDedicatedAiClusterCompartmentResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ChangeDedicatedAiClusterCompartment API.
ChangeEndpointCompartment(ChangeEndpointCompartmentRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
Declaration
public Task<ChangeEndpointCompartmentResponse> ChangeEndpointCompartment(ChangeEndpointCompartmentRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ChangeEndpointCompartmentRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ChangeEndpointCompartmentResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ChangeEndpointCompartment API.
ChangeModelCompartment(ChangeModelCompartmentRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Moves a custom model into a different compartment. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
Declaration
public Task<ChangeModelCompartmentResponse> ChangeModelCompartment(ChangeModelCompartmentRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ChangeModelCompartmentRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ChangeModelCompartmentResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ChangeModelCompartment API.
CreateDedicatedAiCluster(CreateDedicatedAiClusterRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Creates a dedicated AI cluster.
Declaration
public Task<CreateDedicatedAiClusterResponse> CreateDedicatedAiCluster(CreateDedicatedAiClusterRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
CreateDedicatedAiClusterRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<CreateDedicatedAiClusterResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use CreateDedicatedAiCluster API.
CreateEndpoint(CreateEndpointRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Creates an endpoint. <br/> The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the endpoint creation progress.
Declaration
public Task<CreateEndpointResponse> CreateEndpoint(CreateEndpointRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
CreateEndpointRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<CreateEndpointResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use CreateEndpoint API.
CreateModel(CreateModelRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Creates a custom model by fine-tuning a base model with your own dataset. You can create a new custom models or create a new version of existing custom model.. <br/> The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the model creation progress.
Declaration
public Task<CreateModelResponse> CreateModel(CreateModelRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
CreateModelRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<CreateModelResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use CreateModel API.
DeleteDedicatedAiCluster(DeleteDedicatedAiClusterRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Deletes a dedicated AI cluster. <br/> You can only delete clusters without attached resources. Before you delete a hosting dedicated AI cluster, you must delete the endpoints associated to that cluster. Before you delete a fine-tuning dedicated AI cluster, you must delete the custom model on that cluster. The delete action permanently deletes the cluster. This action can't be undone.
Declaration
public Task<DeleteDedicatedAiClusterResponse> DeleteDedicatedAiCluster(DeleteDedicatedAiClusterRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
DeleteDedicatedAiClusterRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<DeleteDedicatedAiClusterResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use DeleteDedicatedAiCluster API.
DeleteEndpoint(DeleteEndpointRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Deletes an endpoint.
Declaration
public Task<DeleteEndpointResponse> DeleteEndpoint(DeleteEndpointRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
DeleteEndpointRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<DeleteEndpointResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use DeleteEndpoint API.
DeleteModel(DeleteModelRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Deletes a custom model. A model shouldn't be deleted if there's one or more active endpoints associated with that model.
Declaration
public Task<DeleteModelResponse> DeleteModel(DeleteModelRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
DeleteModelRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<DeleteModelResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use DeleteModel API.
GetDedicatedAiCluster(GetDedicatedAiClusterRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Gets information about a dedicated AI cluster.
Declaration
public Task<GetDedicatedAiClusterResponse> GetDedicatedAiCluster(GetDedicatedAiClusterRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetDedicatedAiClusterRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetDedicatedAiClusterResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetDedicatedAiCluster API.
GetEndpoint(GetEndpointRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Gets information about an endpoint.
Declaration
public Task<GetEndpointResponse> GetEndpoint(GetEndpointRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetEndpointRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetEndpointResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetEndpoint API.
GetModel(GetModelRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Gets information about a custom model.
Declaration
public Task<GetModelResponse> GetModel(GetModelRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetModelRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetModelResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetModel API.
GetWorkRequest(GetWorkRequestRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Gets the details of a work request.
Declaration
public Task<GetWorkRequestResponse> GetWorkRequest(GetWorkRequestRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetWorkRequestRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetWorkRequestResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetWorkRequest API.
ListDedicatedAiClusters(ListDedicatedAiClustersRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Lists the dedicated AI clusters in a specific compartment.
Declaration
public Task<ListDedicatedAiClustersResponse> ListDedicatedAiClusters(ListDedicatedAiClustersRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListDedicatedAiClustersRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListDedicatedAiClustersResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListDedicatedAiClusters API.
ListEndpoints(ListEndpointsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Lists the endpoints of a specific compartment.
Declaration
public Task<ListEndpointsResponse> ListEndpoints(ListEndpointsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListEndpointsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListEndpointsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListEndpoints API.
ListModels(ListModelsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Lists the models in a specific compartment. Includes pretrained base models and fine-tuned custom models.
Declaration
public Task<ListModelsResponse> ListModels(ListModelsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListModelsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListModelsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListModels API.
ListWorkRequestErrors(ListWorkRequestErrorsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Lists the errors for a work request.
Declaration
public Task<ListWorkRequestErrorsResponse> ListWorkRequestErrors(ListWorkRequestErrorsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListWorkRequestErrorsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListWorkRequestErrorsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListWorkRequestErrors API.
ListWorkRequestLogs(ListWorkRequestLogsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Lists the logs for a work request.
Declaration
public Task<ListWorkRequestLogsResponse> ListWorkRequestLogs(ListWorkRequestLogsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListWorkRequestLogsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListWorkRequestLogsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListWorkRequestLogs API.
ListWorkRequests(ListWorkRequestsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Lists the work requests in a compartment.
Declaration
public Task<ListWorkRequestsResponse> ListWorkRequests(ListWorkRequestsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListWorkRequestsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListWorkRequestsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListWorkRequests API.
UpdateDedicatedAiCluster(UpdateDedicatedAiClusterRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Updates a dedicated AI cluster.
Declaration
public Task<UpdateDedicatedAiClusterResponse> UpdateDedicatedAiCluster(UpdateDedicatedAiClusterRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
UpdateDedicatedAiClusterRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<UpdateDedicatedAiClusterResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use UpdateDedicatedAiCluster API.
UpdateEndpoint(UpdateEndpointRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Updates the properties of an endpoint.
Declaration
public Task<UpdateEndpointResponse> UpdateEndpoint(UpdateEndpointRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
UpdateEndpointRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<UpdateEndpointResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use UpdateEndpoint API.
UpdateModel(UpdateModelRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Updates the properties of a custom model such as name, description, version, freeform tags, and defined tags.
Declaration
public Task<UpdateModelResponse> UpdateModel(UpdateModelRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
UpdateModelRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<UpdateModelResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use UpdateModel API.