Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GenerativeAiClient

This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.

Hierarchy

  • GenerativeAiClient

Constructors

constructor

  • new GenerativeAiClient(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration): GenerativeAiClient

Properties

Protected _bodyDuplexMode

_bodyDuplexMode: any = undefined

Protected _circuitBreaker

_circuitBreaker: typeof Breaker | null = null

Protected _clientConfiguration

_clientConfiguration: ClientConfiguration

Protected _defaultHeaders

_defaultHeaders: any

Protected _endpoint

_endpoint: string = ""

Protected _httpClient

_httpClient: HttpClient

Protected _httpOptions

_httpOptions: any = undefined

Protected _lastSetRegionOrRegionId

_lastSetRegionOrRegionId: string = ""

Protected _realmSpecificEndpointTemplateEnabled

_realmSpecificEndpointTemplateEnabled: boolean | undefined = undefined

Protected _region

_region: Region

Protected _regionId

_regionId: string = ""

Protected _waiters

targetService

targetService: string = "GenerativeAi"

Static Protected endpointServiceName

endpointServiceName: string = ""

Static Protected serviceEndpointTemplate

serviceEndpointTemplate: string = "https://generativeai.{region}.oci.{secondLevelDomain}"

Accessors

endpoint

  • get endpoint(): string
  • set endpoint(endpoint: string): void

logger

region

  • set region(region: Region): void
  • Sets the region to call (ex, Region.US_PHOENIX_1). Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.

    Parameters

    • region: Region

      The region of the service.

    Returns void

regionId

  • set regionId(regionId: string): void
  • Sets the regionId to call (ex, 'us-phoenix-1').

    Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}. If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1 and then call {@link #endpoint(String) endpoint}.

    Parameters

    • regionId: string

      The public region ID.

    Returns void

useRealmSpecificEndpointTemplate

  • set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled: boolean): void
  • 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"

    Parameters

    • realmSpecificEndpointTemplateEnabled: boolean

      flag to enable the use of realm specific endpoint template

    Returns void

Methods

changeDedicatedAiClusterCompartment

changeEndpointCompartment

changeModelCompartment

close

  • close(): void

createDedicatedAiCluster

createEndpoint

  • Creates an endpoint.

    The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the endpoint creation progress.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateEndpoint API.

    Parameters

    Returns Promise<CreateEndpointResponse>

    CreateEndpointResponse

createModel

  • 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.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateModel API.

    Parameters

    Returns Promise<CreateModelResponse>

    CreateModelResponse

createWaiters

  • Creates a new GenerativeAiWaiter for resources for this service.

    Parameters

    • Optional config: common.WaiterConfiguration

      The waiter configuration for termination and delay strategy

    Returns GenerativeAiWaiter

    The service waiters.

deleteDedicatedAiCluster

  • 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.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DeleteDedicatedAiCluster API.

    Parameters

    Returns Promise<DeleteDedicatedAiClusterResponse>

    DeleteDedicatedAiClusterResponse

deleteEndpoint

deleteModel

  • Deletes a custom model. A model shouldn't be deleted if there's one or more active endpoints associated with that model. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DeleteModel API.

    Parameters

    Returns Promise<DeleteModelResponse>

    DeleteModelResponse

getDedicatedAiCluster

getEndpoint

  • Gets information about an endpoint. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetEndpoint API.

    Parameters

    Returns Promise<GetEndpointResponse>

    GetEndpointResponse

getModel

  • Gets information about a custom model. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetModel API.

    Parameters

    Returns Promise<GetModelResponse>

    GetModelResponse

getWaiters

getWorkRequest

  • Gets the details of a work request. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetWorkRequest API.

    Parameters

    Returns Promise<GetWorkRequestResponse>

    GetWorkRequestResponse

listDedicatedAiClusters

listEndpoints

  • Lists the endpoints of a specific compartment. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListEndpoints API.

    Parameters

    Returns Promise<ListEndpointsResponse>

    ListEndpointsResponse

listModels

  • Lists the models in a specific compartment. Includes pretrained base models and fine-tuned custom models. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListModels API.

    Parameters

    Returns Promise<ListModelsResponse>

    ListModelsResponse

listWorkRequestErrors

listWorkRequestLogs

listWorkRequests

  • Lists the work requests in a compartment. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListWorkRequests API.

    Parameters

    Returns Promise<ListWorkRequestsResponse>

    ListWorkRequestsResponse

shutdownCircuitBreaker

  • shutdownCircuitBreaker(): void

updateDedicatedAiCluster

updateEndpoint

  • Updates the properties of an endpoint. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateEndpoint API.

    Parameters

    Returns Promise<UpdateEndpointResponse>

    UpdateEndpointResponse

updateModel

  • Updates the properties of a custom model such as name, description, version, freeform tags, and defined tags. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateModel API.

    Parameters

    Returns Promise<UpdateModelResponse>

    UpdateModelResponse