@Generated(value="OracleSDKGenerator", comments="API Version: 20231130") public interface GenerativeAiAsync extends AutoCloseable
OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
Use the Generative AI service management API to create and manage DedicatedAiCluster
,
Endpoint
, Model
, and WorkRequest
in the Generative AI service. For
example, create a custom model by fine-tuning an out-of-the-box model using your own data, on a
fine-tuning dedicated AI cluster. Then, create a hosting dedicated AI cluster with an endpoint to
host your custom model.
To access your custom model endpoints, or to try the out-of-the-box models to generate text, summarize, and create text embeddings see the [Generative AI Inference API](https://docs.cloud.oracle.com/iaas/api/#/en/generative-ai-inference/latest/).
To learn more about the service, see the [Generative AI documentation](https://docs.cloud.oracle.com/iaas/Content/generative-ai/home.htm).
close
void refreshClient()
Rebuilds the client from scratch. Useful to refresh certificates.
void setEndpoint(String endpoint)
Sets the endpoint to call (ex, https://www.example.com).
endpoint
- The endpoint of the serice.String getEndpoint()
Gets the set endpoint for REST call (ex, https://www.example.com)
void setRegion(Region region)
Sets the region to call (ex, Region.US_PHOENIX_1).
Note, this will call setEndpoint
after resolving the
endpoint. If the service is not available in this region, however, an
IllegalArgumentException will be raised.
region
- The region of the service.void setRegion(String regionId)
Sets the region to call (ex, ‘us-phoenix-1’).
Note, this will first try to map the region ID to a known Region and call setRegion
.
If no known Region could be determined, it will create an endpoint based on the default
endpoint format (Region.formatDefaultRegionEndpoint(Service, String)
and then call setEndpoint
.
regionId
- The public region ID.void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled)
Determines whether realm specific endpoint should be used or not. Set realmSpecificEndpointTemplateEnabled to “true” if the user wants to enable use of realm specific endpoint template, otherwise set it to “false”
realmSpecificEndpointTemplateEnabled
- flag to enable the use of realm specific endpoint
templateFuture<ChangeDedicatedAiClusterCompartmentResponse> changeDedicatedAiClusterCompartment(ChangeDedicatedAiClusterCompartmentRequest request, AsyncHandler<ChangeDedicatedAiClusterCompartmentRequest,ChangeDedicatedAiClusterCompartmentResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ChangeEndpointCompartmentResponse> changeEndpointCompartment(ChangeEndpointCompartmentRequest request, AsyncHandler<ChangeEndpointCompartmentRequest,ChangeEndpointCompartmentResponse> handler)
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ChangeModelCompartmentResponse> changeModelCompartment(ChangeModelCompartmentRequest request, AsyncHandler<ChangeModelCompartmentRequest,ChangeModelCompartmentResponse> handler)
Moves a custom model into a different compartment. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<CreateDedicatedAiClusterResponse> createDedicatedAiCluster(CreateDedicatedAiClusterRequest request, AsyncHandler<CreateDedicatedAiClusterRequest,CreateDedicatedAiClusterResponse> handler)
Creates a dedicated AI cluster.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<CreateEndpointResponse> createEndpoint(CreateEndpointRequest request, AsyncHandler<CreateEndpointRequest,CreateEndpointResponse> handler)
Creates an endpoint.
The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the endpoint creation progress.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<CreateModelResponse> createModel(CreateModelRequest request, AsyncHandler<CreateModelRequest,CreateModelResponse> handler)
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..
The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the model creation progress.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DeleteDedicatedAiClusterResponse> deleteDedicatedAiCluster(DeleteDedicatedAiClusterRequest request, AsyncHandler<DeleteDedicatedAiClusterRequest,DeleteDedicatedAiClusterResponse> handler)
Deletes a dedicated AI cluster.
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.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DeleteEndpointResponse> deleteEndpoint(DeleteEndpointRequest request, AsyncHandler<DeleteEndpointRequest,DeleteEndpointResponse> handler)
Deletes an endpoint.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DeleteModelResponse> deleteModel(DeleteModelRequest request, AsyncHandler<DeleteModelRequest,DeleteModelResponse> handler)
Deletes a custom model. A model shouldn’t be deleted if there’s one or more active endpoints associated with that model.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetDedicatedAiClusterResponse> getDedicatedAiCluster(GetDedicatedAiClusterRequest request, AsyncHandler<GetDedicatedAiClusterRequest,GetDedicatedAiClusterResponse> handler)
Gets information about a dedicated AI cluster.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetEndpointResponse> getEndpoint(GetEndpointRequest request, AsyncHandler<GetEndpointRequest,GetEndpointResponse> handler)
Gets information about an endpoint.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetModelResponse> getModel(GetModelRequest request, AsyncHandler<GetModelRequest,GetModelResponse> handler)
Gets information about a custom model.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetWorkRequestResponse> getWorkRequest(GetWorkRequestRequest request, AsyncHandler<GetWorkRequestRequest,GetWorkRequestResponse> handler)
Gets the details of a work request.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListDedicatedAiClustersResponse> listDedicatedAiClusters(ListDedicatedAiClustersRequest request, AsyncHandler<ListDedicatedAiClustersRequest,ListDedicatedAiClustersResponse> handler)
Lists the dedicated AI clusters in a specific compartment.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListEndpointsResponse> listEndpoints(ListEndpointsRequest request, AsyncHandler<ListEndpointsRequest,ListEndpointsResponse> handler)
Lists the endpoints of a specific compartment.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListModelsResponse> listModels(ListModelsRequest request, AsyncHandler<ListModelsRequest,ListModelsResponse> handler)
Lists the models in a specific compartment. Includes pretrained base models and fine-tuned custom models.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestErrorsResponse> listWorkRequestErrors(ListWorkRequestErrorsRequest request, AsyncHandler<ListWorkRequestErrorsRequest,ListWorkRequestErrorsResponse> handler)
Lists the errors for a work request.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestLogsResponse> listWorkRequestLogs(ListWorkRequestLogsRequest request, AsyncHandler<ListWorkRequestLogsRequest,ListWorkRequestLogsResponse> handler)
Lists the logs for a work request.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestsResponse> listWorkRequests(ListWorkRequestsRequest request, AsyncHandler<ListWorkRequestsRequest,ListWorkRequestsResponse> handler)
Lists the work requests in a compartment.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<UpdateDedicatedAiClusterResponse> updateDedicatedAiCluster(UpdateDedicatedAiClusterRequest request, AsyncHandler<UpdateDedicatedAiClusterRequest,UpdateDedicatedAiClusterResponse> handler)
Updates a dedicated AI cluster.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<UpdateEndpointResponse> updateEndpoint(UpdateEndpointRequest request, AsyncHandler<UpdateEndpointRequest,UpdateEndpointResponse> handler)
Updates the properties of an endpoint.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<UpdateModelResponse> updateModel(UpdateModelRequest request, AsyncHandler<UpdateModelRequest,UpdateModelResponse> handler)
Updates the properties of a custom model such as name, description, version, freeform tags, and defined tags.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Copyright © 2016–2024. All rights reserved.