Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AIServiceLanguageClient

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

  • AIServiceLanguageClient

Constructors

constructor

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

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 = "AIServiceLanguage"

Static Protected endpointServiceName

endpointServiceName: string = ""

Static Protected serviceEndpointTemplate

serviceEndpointTemplate: string = "https://language.aiservice.{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

batchDetectDominantLanguage

  • The API returns the detected language and a related confidence score (between 0 and 1). It supports passing a batch of records.

    [List of supported languages.](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#lang-detect)

    Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BatchDetectDominantLanguage API.

    Parameters

    Returns Promise<BatchDetectDominantLanguageResponse>

    BatchDetectDominantLanguageResponse

batchDetectHealthEntity

  • The API extracts health entities in text records. For each entity, its type and confidence score (between 0 and 1) is returned. It supports passing a batch of records.

    Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BatchDetectHealthEntity API.

    Parameters

    Returns Promise<BatchDetectHealthEntityResponse>

    BatchDetectHealthEntityResponse

batchDetectLanguageEntities

  • The API extracts entities in text records. For each entity, its type/subtype and confidence score (between 0 and 1) is returned. It supports passing a batch of records.

    [List of supported entities.](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#ner__sup-ner-entity)

    Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BatchDetectLanguageEntities API.

    Parameters

    Returns Promise<BatchDetectLanguageEntitiesResponse>

    BatchDetectLanguageEntitiesResponse

batchDetectLanguageKeyPhrases

  • The API extracts key-phrases in text records. For each key-phrase, a score (between 0 and 1) is returned that highlights the importance of the key-phrase in the context of the text. It supports passing a batch of records.

    Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BatchDetectLanguageKeyPhrases API.

    Parameters

    Returns Promise<BatchDetectLanguageKeyPhrasesResponse>

    BatchDetectLanguageKeyPhrasesResponse

batchDetectLanguagePiiEntities

  • The API extracts pii entities in text records. For each entity, its type and confidence score (between 0 and 1) is returned. It supports passing a batch of records.

    Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BatchDetectLanguagePiiEntities API.

    Parameters

    Returns Promise<BatchDetectLanguagePiiEntitiesResponse>

    BatchDetectLanguagePiiEntitiesResponse

batchDetectLanguageSentiments

  • The API extracts aspect-based and sentence level sentiment in text records.

    For aspect-based sentiment analysis, a set of aspects and their respective sentiment is returned for each record. Similarly, for sentence-level sentiment analysis, the sentiment is returned at the sentence level.

    For sentiment analysis, confidence scores are provided for each of the classes (positive, negative, neutral and mixed).

    Learn more about sentiment analysis [here](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#sentiment).

    Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BatchDetectLanguageSentiments API.

    Parameters

    Returns Promise<BatchDetectLanguageSentimentsResponse>

    BatchDetectLanguageSentimentsResponse

batchDetectLanguageTextClassification

  • The API automatically classifies text into a set of pre-determined classes and sub-classes. A single class/subclass is returned for each record classified.

    It supports passing a batch of records.

    Learn more about text classification [here](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#text-class).

    Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BatchDetectLanguageTextClassification API.

    Parameters

    Returns Promise<BatchDetectLanguageTextClassificationResponse>

    BatchDetectLanguageTextClassificationResponse

batchLanguageTranslation

  • Translates a batch of text documents from source to target language. A batch can contain:

    • up to 100 records.
    • documents length less than 5000 characters.
    • 20,000 characters in total as a sum of all documents length.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use BatchLanguageTranslation API.

    Parameters

    Returns Promise<BatchLanguageTranslationResponse>

    BatchLanguageTranslationResponse

cancelJob

  • Canceling the job cancels all the tasks under it. 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 CancelJob API.

    Parameters

    Returns Promise<CancelJobResponse>

    CancelJobResponse

changeEndpointCompartment

  • Moves a Endpoint into a different compartment. When provided, If-Match is checked against ETag values of the resource. 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 ChangeEndpointCompartment API.

    Parameters

    Returns Promise<ChangeEndpointCompartmentResponse>

    ChangeEndpointCompartmentResponse

changeJobCompartment

  • Moves a Job into a different compartment. When provided, If-Match is checked against ETag values of the resource. 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 ChangeJobCompartment API.

    Parameters

    Returns Promise<ChangeJobCompartmentResponse>

    ChangeJobCompartmentResponse

changeModelCompartment

  • Moves a Model into a different compartment. When provided, If-Match is checked against ETag values of the resource. 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 ChangeModelCompartment API.

    Parameters

    Returns Promise<ChangeModelCompartmentResponse>

    ChangeModelCompartmentResponse

changeProjectCompartment

  • Moves a Project into a different compartment. When provided, If-Match is checked against ETag values of the resource. 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 ChangeProjectCompartment API.

    Parameters

    Returns Promise<ChangeProjectCompartmentResponse>

    ChangeProjectCompartmentResponse

close

  • close(): void

createEndpoint

  • Creates a new endpoint and deploy the trained 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 CreateEndpoint API.

    Parameters

    Returns Promise<CreateEndpointResponse>

    CreateEndpointResponse

createJob

  • Creates a new language service async job.

    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 CreateJob API.

    Parameters

    Returns Promise<CreateJobResponse>

    CreateJobResponse

createModel

  • Creates a new model for training and train the model with date provided.

    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

createProject

  • Creates a new Project.

    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 CreateProject API.

    Parameters

    Returns Promise<CreateProjectResponse>

    CreateProjectResponse

createWaiters

deleteEndpoint

  • Deletes a provisioned endpoint resource by identifier. This operation fails with a 409 error unless all associated resources are in a DELETED state. You must delete all associated resources before deleting a 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 DeleteEndpoint API.

    Parameters

    Returns Promise<DeleteEndpointResponse>

    DeleteEndpointResponse

deleteJob

  • Deletes the language service async Job 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 DeleteJob API.

    Parameters

    Returns Promise<DeleteJobResponse>

    DeleteJobResponse

deleteModel

  • Deletes a provisioned model resource by identifier. This operation fails with a 409 error unless all associated resources are in a DELETED state. You must delete all associated resources before deleting a 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

deleteProject

  • Deletes a Project resource by identifier. This operation fails with a 409 error unless all associated resources (models deployments or data assets) are in a DELETED state. You must delete all associated resources before deleting a project. 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 DeleteProject API.

    Parameters

    Returns Promise<DeleteProjectResponse>

    DeleteProjectResponse

detectDominantLanguage

  • Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT. We recommend you replace this API with the batch API, BatchDetectDominantLanguage.

    The DetectDominantLanguage API returns the detected language and a related confidence score (between 0 and 1).

    [List of supported languages](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#lang-detect)

    Limitations: - A record may be up to 1000 characters long.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DetectDominantLanguage API.

    Parameters

    Returns Promise<DetectDominantLanguageResponse>

    DetectDominantLanguageResponse

detectLanguageEntities

  • Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT. We recommend you replace this API with the batch API, BatchDetectLanguageEntities.

    The DetectLanguageEntities API extracts entities in text records. For each entity, its type and confidence score (between 0 and 1) is returned.

    Limitations: - A text may be up to 1000 characters long.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DetectLanguageEntities API.

    Parameters

    Returns Promise<DetectLanguageEntitiesResponse>

    DetectLanguageEntitiesResponse

detectLanguageKeyPhrases

  • Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT. We recommend you replace this API with the batch API, BatchDetectLanguageKeyPhrases.

    The DetectLanguageKeyPhrases API extracts key-phrases in text records. For each key-phrase, a score (between 0 and 1) is returned that highlights the importance of the key-phrase in the context of the text. Limitations: - A record may be up to 1000 characters long.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DetectLanguageKeyPhrases API.

    Parameters

    Returns Promise<DetectLanguageKeyPhrasesResponse>

    DetectLanguageKeyPhrasesResponse

detectLanguageSentiments

  • Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT. We recommend you replace this API with the batch API, BatchDetectLanguageSentiments.

    The DetectLanguageSentiments API extracts aspect-based in text records.

    For aspect-based sentiment analysis, a set of aspects and their respective sentiment is returned.

    For sentiment analysis, confidence scores are provided for each of the classes (positive, negative, neutral).

    Learn more about sentiment analysis [here](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#sentiment).

    Limitations: - A record may be up to 1000 characters long.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DetectLanguageSentiments API.

    Parameters

    Returns Promise<DetectLanguageSentimentsResponse>

    DetectLanguageSentimentsResponse

detectLanguageTextClassification

  • Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT. We recommend you replace this API with the batch API, BatchDetectLanguageTextClassification.

    The DetectLanguageTextClassification API automatically classifies text into a set of pre-determined classes and sub-classes. A single class/subclass is returned for each record classified.

    Learn more about text classification [here](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#text-class).

    Limitations: - A record may be up to 1000 characters long.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DetectLanguageTextClassification API.

    Parameters

    Returns Promise<DetectLanguageTextClassificationResponse>

    DetectLanguageTextClassificationResponse

getEndpoint

  • Gets an endpoint by identifier 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

getJob

  • Gets a language service async job 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 GetJob API.

    Parameters

    Returns Promise<GetJobResponse>

    GetJobResponse

getModel

  • Gets a model by identifier 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

getModelType

  • Gets model capabilities 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 GetModelType API.

    Parameters

    Returns Promise<GetModelTypeResponse>

    GetModelTypeResponse

getProject

  • Gets a Project by identifier 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 GetProject API.

    Parameters

    Returns Promise<GetProjectResponse>

    GetProjectResponse

getWaiters

getWorkRequest

  • Gets the status of the work request with the given ID. 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

listEndpoints

  • Returns a list of Endpoints.

    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

listEvaluationResults

  • Get a (paginated) list of evaluation results for a given 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 ListEvaluationResults API.

    Parameters

    Returns Promise<ListEvaluationResultsResponse>

    ListEvaluationResultsResponse

listJobs

  • Returns a list of language service async Jobs.

    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 ListJobs API.

    Parameters

    Returns Promise<ListJobsResponse>

    ListJobsResponse

listModels

  • Returns a list of 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

listProjects

  • Returns a list of Projects.

    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 ListProjects API.

    Parameters

    Returns Promise<ListProjectsResponse>

    ListProjectsResponse

listWorkRequestErrors

  • Return a (paginated) list of errors for a given 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 ListWorkRequestErrors API.

    Parameters

    Returns Promise<ListWorkRequestErrorsResponse>

    ListWorkRequestErrorsResponse

listWorkRequestLogs

  • Return a (paginated) list of logs for a given 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 ListWorkRequestLogs API.

    Parameters

    Returns Promise<ListWorkRequestLogsResponse>

    ListWorkRequestLogsResponse

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

updateEndpoint

  • Update the Endpoint identified by the id 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

updateJob

  • Updates the language service async Job 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 UpdateJob API.

    Parameters

    Returns Promise<UpdateJobResponse>

    UpdateJobResponse

updateModel

  • Updates the 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 UpdateModel API.

    Parameters

    Returns Promise<UpdateModelResponse>

    UpdateModelResponse

updateProject

  • Updates the Project 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 UpdateProject API.

    Parameters

    Returns Promise<UpdateProjectResponse>

    UpdateProjectResponse