com.oracle.bmc.generativeai.GenerativeAi Maven / Gradle / Ivy
Show all versions of oci-java-sdk-generativeai Show documentation
/**
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/
package com.oracle.bmc.generativeai;
import com.oracle.bmc.generativeai.requests.*;
import com.oracle.bmc.generativeai.responses.*;
/**
* 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 {@link DedicatedAiCluster},
* {@link Endpoint}, {@link Model}, and {@link 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/#/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.
*/
@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20231130")
public interface GenerativeAi extends AutoCloseable {
/** Rebuilds the client from scratch. Useful to refresh certificates. */
void refreshClient();
/**
* Sets the endpoint to call (ex, https://www.example.com).
*
* @param endpoint The endpoint of the service.
*/
void setEndpoint(String endpoint);
/** Gets the set endpoint for REST call (ex, https://www.example.com) */
String getEndpoint();
/**
* Sets the region to call (ex, Region.US_PHOENIX_1).
*
*
Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the
* endpoint. If the service is not available in this Region, however, an
* IllegalArgumentException will be raised.
*
* @param region The region of the service.
*/
void setRegion(com.oracle.bmc.Region region);
/**
* 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 {@link
* #setRegion(Region) setRegion}.
*
*
If no known Region could be determined, it will create an endpoint based on the default
* endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)}
* and then call {@link #setEndpoint(String) setEndpoint}.
*
* @param regionId The public region ID.
*/
void setRegion(String regionId);
/**
* 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"
*
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint
* template
*/
void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled);
/**
* 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](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ChangeDedicatedAiClusterCompartmentResponse changeDedicatedAiClusterCompartment(
ChangeDedicatedAiClusterCompartmentRequest 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](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ChangeEndpointCompartmentResponse changeEndpointCompartment(
ChangeEndpointCompartmentRequest request);
/**
* Moves a custom model into a different compartment. For information about moving resources
* between compartments, see [Moving Resources to a Different
* Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ChangeModelCompartmentResponse changeModelCompartment(ChangeModelCompartmentRequest request);
/**
* Creates a dedicated AI cluster.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
CreateDedicatedAiClusterResponse createDedicatedAiCluster(
CreateDedicatedAiClusterRequest 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.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
CreateEndpointResponse createEndpoint(CreateEndpointRequest 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.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
CreateModelResponse createModel(CreateModelRequest 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.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
DeleteDedicatedAiClusterResponse deleteDedicatedAiCluster(
DeleteDedicatedAiClusterRequest request);
/**
* Deletes an endpoint.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
DeleteEndpointResponse deleteEndpoint(DeleteEndpointRequest request);
/**
* Deletes a custom model. A model shouldn't be deleted if there's one or more active endpoints
* associated with that model.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
DeleteModelResponse deleteModel(DeleteModelRequest request);
/**
* Gets information about a dedicated AI cluster.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
GetDedicatedAiClusterResponse getDedicatedAiCluster(GetDedicatedAiClusterRequest request);
/**
* Gets information about an endpoint.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
GetEndpointResponse getEndpoint(GetEndpointRequest request);
/**
* Gets information about a custom model.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
GetModelResponse getModel(GetModelRequest request);
/**
* Gets the details of a work request.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request);
/**
* Lists the dedicated AI clusters in a specific compartment.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ListDedicatedAiClustersResponse listDedicatedAiClusters(ListDedicatedAiClustersRequest request);
/**
* Lists the endpoints of a specific compartment.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ListEndpointsResponse listEndpoints(ListEndpointsRequest request);
/**
* Lists the models in a specific compartment. Includes pretrained base models and fine-tuned
* custom models.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ListModelsResponse listModels(ListModelsRequest request);
/**
* Lists the errors for a work request.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request);
/**
* Lists the logs for a work request.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request);
/**
* Lists the work requests in a compartment.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request);
/**
* Updates a dedicated AI cluster.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
UpdateDedicatedAiClusterResponse updateDedicatedAiCluster(
UpdateDedicatedAiClusterRequest request);
/**
* Updates the properties of an endpoint.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
UpdateEndpointResponse updateEndpoint(UpdateEndpointRequest request);
/**
* Updates the properties of a custom model such as name, description, version, freeform tags,
* and defined tags.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException 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.
*/
UpdateModelResponse updateModel(UpdateModelRequest request);
/**
* Gets the pre-configured waiters available for resources for this service.
*
* @return The service waiters.
*/
GenerativeAiWaiters getWaiters();
/**
* Gets the pre-configured paginators available for list operations in this service which may
* return multiple pages of data. These paginators provide an {@link java.lang.Iterable}
* interface so that service responses, or resources/records, can be iterated through without
* having to manually deal with pagination and page tokens.
*
* @return The service paginators.
*/
GenerativeAiPaginators getPaginators();
}