@Generated(value="OracleSDKGenerator", comments="API Version: 20231130") public interface GenerativeAi 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).
This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit breaker configuration is defined by the user.
Modifier and Type | Method and Description |
---|---|
ChangeDedicatedAiClusterCompartmentResponse |
changeDedicatedAiClusterCompartment(ChangeDedicatedAiClusterCompartmentRequest request)
Moves a dedicated AI cluster into a different compartment within the same tenancy.
|
ChangeEndpointCompartmentResponse |
changeEndpointCompartment(ChangeEndpointCompartmentRequest request)
Moves an endpoint into a different compartment within the same tenancy.
|
ChangeModelCompartmentResponse |
changeModelCompartment(ChangeModelCompartmentRequest request)
Moves a custom model into a different compartment.
|
CreateDedicatedAiClusterResponse |
createDedicatedAiCluster(CreateDedicatedAiClusterRequest request)
Creates a dedicated AI cluster.
|
CreateEndpointResponse |
createEndpoint(CreateEndpointRequest request)
Creates an endpoint.
|
CreateModelResponse |
createModel(CreateModelRequest request)
Creates a custom model by fine-tuning a base model with your own dataset.
|
DeleteDedicatedAiClusterResponse |
deleteDedicatedAiCluster(DeleteDedicatedAiClusterRequest request)
Deletes a dedicated AI cluster.
|
DeleteEndpointResponse |
deleteEndpoint(DeleteEndpointRequest request)
Deletes an endpoint.
|
DeleteModelResponse |
deleteModel(DeleteModelRequest request)
Deletes a custom model.
|
GetDedicatedAiClusterResponse |
getDedicatedAiCluster(GetDedicatedAiClusterRequest request)
Gets information about a dedicated AI cluster.
|
String |
getEndpoint()
Gets the set endpoint for REST call (ex, https://www.example.com)
|
GetEndpointResponse |
getEndpoint(GetEndpointRequest request)
Gets information about an endpoint.
|
GetModelResponse |
getModel(GetModelRequest request)
Gets information about a custom model.
|
GenerativeAiPaginators |
getPaginators()
Gets the pre-configured paginators available for list operations in this service which may
return multiple pages of data.
|
GenerativeAiWaiters |
getWaiters()
Gets the pre-configured waiters available for resources for this service.
|
GetWorkRequestResponse |
getWorkRequest(GetWorkRequestRequest request)
Gets the details of a work request.
|
ListDedicatedAiClustersResponse |
listDedicatedAiClusters(ListDedicatedAiClustersRequest request)
Lists the dedicated AI clusters in a specific compartment.
|
ListEndpointsResponse |
listEndpoints(ListEndpointsRequest request)
Lists the endpoints of a specific compartment.
|
ListModelsResponse |
listModels(ListModelsRequest request)
Lists the models in a specific compartment.
|
ListWorkRequestErrorsResponse |
listWorkRequestErrors(ListWorkRequestErrorsRequest request)
Lists the errors for a work request.
|
ListWorkRequestLogsResponse |
listWorkRequestLogs(ListWorkRequestLogsRequest request)
Lists the logs for a work request.
|
ListWorkRequestsResponse |
listWorkRequests(ListWorkRequestsRequest request)
Lists the work requests in a compartment.
|
void |
refreshClient()
Rebuilds the client from scratch.
|
void |
setEndpoint(String endpoint)
Sets the endpoint to call (ex, https://www.example.com).
|
void |
setRegion(Region region)
Sets the region to call (ex, Region.US_PHOENIX_1).
|
void |
setRegion(String regionId)
Sets the region to call (ex, ‘us-phoenix-1’).
|
UpdateDedicatedAiClusterResponse |
updateDedicatedAiCluster(UpdateDedicatedAiClusterRequest request)
Updates a dedicated AI cluster.
|
UpdateEndpointResponse |
updateEndpoint(UpdateEndpointRequest request)
Updates the properties of an endpoint.
|
UpdateModelResponse |
updateModel(UpdateModelRequest request)
Updates the properties of a custom model such as name, description, version, freeform tags,
and defined tags.
|
void |
useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled)
Determines whether realm specific endpoint should be used or not.
|
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 service.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
templateChangeDedicatedAiClusterCompartmentResponse changeDedicatedAiClusterCompartment(ChangeDedicatedAiClusterCompartmentRequest request)
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 sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ChangeDedicatedAiClusterCompartment API.
ChangeEndpointCompartmentResponse changeEndpointCompartment(ChangeEndpointCompartmentRequest request)
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 sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ChangeEndpointCompartment API.
ChangeModelCompartmentResponse changeModelCompartment(ChangeModelCompartmentRequest request)
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 sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ChangeModelCompartment API.
CreateDedicatedAiClusterResponse createDedicatedAiCluster(CreateDedicatedAiClusterRequest request)
Creates a dedicated AI cluster.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use CreateDedicatedAiCluster API.
CreateEndpointResponse createEndpoint(CreateEndpointRequest request)
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 sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use CreateEndpoint API.
CreateModelResponse createModel(CreateModelRequest request)
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 sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use CreateModel API.
DeleteDedicatedAiClusterResponse deleteDedicatedAiCluster(DeleteDedicatedAiClusterRequest request)
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 sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use DeleteDedicatedAiCluster API.
DeleteEndpointResponse deleteEndpoint(DeleteEndpointRequest request)
Deletes an endpoint.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use DeleteEndpoint API.
DeleteModelResponse deleteModel(DeleteModelRequest request)
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 sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use DeleteModel API.
GetDedicatedAiClusterResponse getDedicatedAiCluster(GetDedicatedAiClusterRequest request)
Gets information about a dedicated AI cluster.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use GetDedicatedAiCluster API.
GetEndpointResponse getEndpoint(GetEndpointRequest request)
Gets information about an endpoint.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use GetEndpoint API.
GetModelResponse getModel(GetModelRequest request)
Gets information about a custom model.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use GetModel API.
GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request)
Gets the details of a work request.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use GetWorkRequest API.
ListDedicatedAiClustersResponse listDedicatedAiClusters(ListDedicatedAiClustersRequest request)
Lists the dedicated AI clusters in a specific compartment.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ListDedicatedAiClusters API.
ListEndpointsResponse listEndpoints(ListEndpointsRequest request)
Lists the endpoints of a specific compartment.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ListEndpoints API.
ListModelsResponse listModels(ListModelsRequest request)
Lists the models in a specific compartment. Includes pretrained base models and fine-tuned custom models.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ListModels API.
ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request)
Lists the errors for a work request.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ListWorkRequestErrors API.
ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request)
Lists the logs for a work request.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ListWorkRequestLogs API.
ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request)
Lists the work requests in a compartment.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use ListWorkRequests API.
UpdateDedicatedAiClusterResponse updateDedicatedAiCluster(UpdateDedicatedAiClusterRequest request)
Updates a dedicated AI cluster.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use UpdateDedicatedAiCluster API.
UpdateEndpointResponse updateEndpoint(UpdateEndpointRequest request)
Updates the properties of an endpoint.
request
- The request object containing the details to sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use UpdateEndpoint API.
UpdateModelResponse updateModel(UpdateModelRequest request)
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 sendBmcException
- when an error occurs. This operation uses
RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is
provided. The specifics of the default retry strategy are described here
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries
Example: Click here to see how to use UpdateModel API.
GenerativeAiWaiters getWaiters()
Gets the pre-configured waiters available for resources for this service.
GenerativeAiPaginators getPaginators()
Gets the pre-configured paginators available for list operations in this service which may
return multiple pages of data. These paginators provide an Iterable
interface so that service responses, or resources/records, can be iterated through without
having to manually deal with pagination and page tokens.
Copyright © 2016–2024. All rights reserved.