Class AIServiceLanguageClient
- java.lang.Object
-
- com.oracle.bmc.http.internal.BaseSyncClient
-
- com.oracle.bmc.ailanguage.AIServiceLanguageClient
-
- All Implemented Interfaces:
AIServiceLanguage
,AutoCloseable
@Generated(value="OracleSDKGenerator", comments="API Version: 20221001") public class AIServiceLanguageClient extends BaseSyncClient implements AIServiceLanguage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIServiceLanguageClient.Builder
Builder class for this client.
-
Field Summary
Fields Modifier and Type Field Description String
clientCommonLibraryVersion
Compatible SDK version, provided by the codegen.Optional<String>
minimumClientCommonLibraryVersionFromClient
Minimum compatible SDK version, maybe provided by the codegen.static Service
SERVICE
Service instance for AIServiceLanguage.
-
Constructor Summary
Constructors Constructor Description AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Deprecated.Use thebuilder
instead.AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Deprecated.Use thebuilder
instead.AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint, ExecutorService executorService)
Deprecated.Use thebuilder
instead.AIServiceLanguageClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.Use thebuilder
instead.AIServiceLanguageClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Deprecated.Use thebuilder
instead.AIServiceLanguageClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Deprecated.Use thebuilder
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchDetectDominantLanguageResponse
batchDetectDominantLanguage(BatchDetectDominantLanguageRequest request)
The API returns the detected language and a related confidence score (between 0 and 1).BatchDetectHealthEntityResponse
batchDetectHealthEntity(BatchDetectHealthEntityRequest request)
The API extracts health entities in text records.BatchDetectLanguageEntitiesResponse
batchDetectLanguageEntities(BatchDetectLanguageEntitiesRequest request)
The API extracts entities in text records.BatchDetectLanguageKeyPhrasesResponse
batchDetectLanguageKeyPhrases(BatchDetectLanguageKeyPhrasesRequest request)
The API extracts key-phrases in text records.BatchDetectLanguagePiiEntitiesResponse
batchDetectLanguagePiiEntities(BatchDetectLanguagePiiEntitiesRequest request)
The API extracts pii entities in text records.BatchDetectLanguageSentimentsResponse
batchDetectLanguageSentiments(BatchDetectLanguageSentimentsRequest request)
The API extracts aspect-based and sentence level sentiment in text records.BatchDetectLanguageTextClassificationResponse
batchDetectLanguageTextClassification(BatchDetectLanguageTextClassificationRequest request)
The API automatically classifies text into a set of pre-determined classes and sub-classes.BatchLanguageTranslationResponse
batchLanguageTranslation(BatchLanguageTranslationRequest request)
Translates a batch of text documents from source to target language.static AIServiceLanguageClient.Builder
builder()
Create a builder for this client.CancelJobResponse
cancelJob(CancelJobRequest request)
Canceling the job cancels all the tasks under it.ChangeEndpointCompartmentResponse
changeEndpointCompartment(ChangeEndpointCompartmentRequest request)
Moves a Endpoint into a different compartment.ChangeJobCompartmentResponse
changeJobCompartment(ChangeJobCompartmentRequest request)
Moves a Job into a different compartment.ChangeModelCompartmentResponse
changeModelCompartment(ChangeModelCompartmentRequest request)
Moves a Model into a different compartment.ChangeProjectCompartmentResponse
changeProjectCompartment(ChangeProjectCompartmentRequest request)
Moves a Project into a different compartment.void
close()
CreateEndpointResponse
createEndpoint(CreateEndpointRequest request)
Creates a new endpoint and deploy the trained modelCreateJobResponse
createJob(CreateJobRequest request)
Creates a new language service async job.CreateModelResponse
createModel(CreateModelRequest request)
Creates a new model for training and train the model with date provided.CreateProjectResponse
createProject(CreateProjectRequest request)
Creates a new Project.DeleteEndpointResponse
deleteEndpoint(DeleteEndpointRequest request)
Deletes a provisioned endpoint resource by identifier.DeleteJobResponse
deleteJob(DeleteJobRequest request)
Deletes the language service async JobDeleteModelResponse
deleteModel(DeleteModelRequest request)
Deletes a provisioned model resource by identifier.DeleteProjectResponse
deleteProject(DeleteProjectRequest request)
Deletes a Project resource by identifier.DetectDominantLanguageResponse
detectDominantLanguage(DetectDominantLanguageRequest request)
Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.DetectLanguageEntitiesResponse
detectLanguageEntities(DetectLanguageEntitiesRequest request)
Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.DetectLanguageKeyPhrasesResponse
detectLanguageKeyPhrases(DetectLanguageKeyPhrasesRequest request)
Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.DetectLanguageSentimentsResponse
detectLanguageSentiments(DetectLanguageSentimentsRequest request)
Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.DetectLanguageTextClassificationResponse
detectLanguageTextClassification(DetectLanguageTextClassificationRequest request)
Deprecated: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.String
getClientCommonLibraryVersion()
protected ClientConfigurator
getDefaultConfigurator()
String
getEndpoint()
GetEndpointResponse
getEndpoint(GetEndpointRequest request)
Gets an endpoint by identifierGetJobResponse
getJob(GetJobRequest request)
Gets a language service async jobOptional<String>
getMinimumClientCommonLibraryVersionFromClient()
GetModelResponse
getModel(GetModelRequest request)
Gets a model by identifierGetModelTypeResponse
getModelType(GetModelTypeRequest request)
Gets model capabilitiesAIServiceLanguagePaginators
getPaginators()
Gets the pre-configured paginators available for list operations in this service which may return multiple pages of data.GetProjectResponse
getProject(GetProjectRequest request)
Gets a Project by identifierAIServiceLanguageWaiters
getWaiters()
Gets the pre-configured waiters available for resources for this service.GetWorkRequestResponse
getWorkRequest(GetWorkRequestRequest request)
Gets the status of the work request with the given ID.ListEndpointsResponse
listEndpoints(ListEndpointsRequest request)
Returns a list of Endpoints.ListEvaluationResultsResponse
listEvaluationResults(ListEvaluationResultsRequest request)
Get a (paginated) list of evaluation results for a given model.ListJobsResponse
listJobs(ListJobsRequest request)
Returns a list of language service async Jobs.ListModelsResponse
listModels(ListModelsRequest request)
Returns a list of models.ListProjectsResponse
listProjects(ListProjectsRequest request)
Returns a list of Projects.ListWorkRequestErrorsResponse
listWorkRequestErrors(ListWorkRequestErrorsRequest request)
Return a (paginated) list of errors for a given work request.ListWorkRequestLogsResponse
listWorkRequestLogs(ListWorkRequestLogsRequest request)
Return a (paginated) list of logs for a given work request.ListWorkRequestsResponse
listWorkRequests(ListWorkRequestsRequest request)
Lists the work requests in a compartment.void
populateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)
Populate the parameters in the endpoint with its corresponding value and update the base endpoint.void
refreshClient()
Rebuild the backingHttpClient
.void
setEndpoint(String endpoint)
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’).void
updateBaseEndpoint(String endpoint)
This method should be used for parameterized endpoint templates only.UpdateEndpointResponse
updateEndpoint(UpdateEndpointRequest request)
Update the Endpoint identified by the idUpdateJobResponse
updateJob(UpdateJobRequest request)
Updates the language service async JobUpdateModelResponse
updateModel(UpdateModelRequest request)
Updates the modelUpdateProjectResponse
updateProject(UpdateProjectRequest request)
Updates the Projectvoid
useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
This method should be used to enable or disable the use of realm-specific endpoint template.-
Methods inherited from class com.oracle.bmc.http.internal.BaseSyncClient
clientCall
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.oracle.bmc.ailanguage.AIServiceLanguage
getEndpoint, refreshClient, setEndpoint, useRealmSpecificEndpointTemplate
-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Constructor Detail
-
AIServiceLanguageClient
@Deprecated public AIServiceLanguageClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeAIServiceLanguageClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)
-
AIServiceLanguageClient
@Deprecated public AIServiceLanguageClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeAIServiceLanguageClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
-
AIServiceLanguageClient
@Deprecated public AIServiceLanguageClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeAIServiceLanguageClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
-
AIServiceLanguageClient
@Deprecated public AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeAIServiceLanguageClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
-
AIServiceLanguageClient
@Deprecated public AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeAIServiceLanguageClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
-
AIServiceLanguageClient
@Deprecated public AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeAIServiceLanguageClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
endpoint
-ClientBuilderBase.endpoint(java.lang.String)
-
AIServiceLanguageClient
@Deprecated public AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeAIServiceLanguageClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
endpoint
-ClientBuilderBase.endpoint(java.lang.String)
signingStrategyRequestSignerFactories
-ClientBuilderBase.signingStrategyRequestSignerFactories
-
AIServiceLanguageClient
@Deprecated public AIServiceLanguageClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint, ExecutorService executorService)
Deprecated.Use thebuilder
instead.Create a new client instance.- Parameters:
authenticationDetailsProvider
- The authentication details (seeAIServiceLanguageClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
-ClientBuilderBase.configuration
clientConfigurator
-ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
-ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
-ClientBuilderBase.additionalClientConfigurators
endpoint
-ClientBuilderBase.endpoint(java.lang.String)
signingStrategyRequestSignerFactories
-ClientBuilderBase.signingStrategyRequestSignerFactories
executorService
-AIServiceLanguageClient.Builder.executorService
-
-
Method Detail
-
builder
public static AIServiceLanguageClient.Builder builder()
Create a builder for this client.- Returns:
- builder
-
setRegion
public void setRegion(Region region)
Description copied from interface:AIServiceLanguage
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.- Specified by:
setRegion
in interfaceAIServiceLanguage
- Parameters:
region
- The region of the service.
-
setRegion
public void setRegion(String regionId)
Description copied from interface:AIServiceLanguage
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 callsetEndpoint
.- Specified by:
setRegion
in interfaceAIServiceLanguage
- Parameters:
regionId
- The public region ID.
-
batchDetectDominantLanguage
public BatchDetectDominantLanguageResponse batchDetectDominantLanguage(BatchDetectDominantLanguageRequest request)
Description copied from interface:AIServiceLanguage
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.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.
- Specified by:
batchDetectDominantLanguage
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
batchDetectHealthEntity
public BatchDetectHealthEntityResponse batchDetectHealthEntity(BatchDetectHealthEntityRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
batchDetectHealthEntity
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
batchDetectLanguageEntities
public BatchDetectLanguageEntitiesResponse batchDetectLanguageEntities(BatchDetectLanguageEntitiesRequest request)
Description copied from interface:AIServiceLanguage
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.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.
- Specified by:
batchDetectLanguageEntities
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
batchDetectLanguageKeyPhrases
public BatchDetectLanguageKeyPhrasesResponse batchDetectLanguageKeyPhrases(BatchDetectLanguageKeyPhrasesRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
batchDetectLanguageKeyPhrases
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
batchDetectLanguagePiiEntities
public BatchDetectLanguagePiiEntitiesResponse batchDetectLanguagePiiEntities(BatchDetectLanguagePiiEntitiesRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
batchDetectLanguagePiiEntities
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
batchDetectLanguageSentiments
public BatchDetectLanguageSentimentsResponse batchDetectLanguageSentiments(BatchDetectLanguageSentimentsRequest request)
Description copied from interface:AIServiceLanguage
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.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.
- Specified by:
batchDetectLanguageSentiments
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
batchDetectLanguageTextClassification
public BatchDetectLanguageTextClassificationResponse batchDetectLanguageTextClassification(BatchDetectLanguageTextClassificationRequest request)
Description copied from interface:AIServiceLanguage
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.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.
- Specified by:
batchDetectLanguageTextClassification
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
batchLanguageTranslation
public BatchLanguageTranslationResponse batchLanguageTranslation(BatchLanguageTranslationRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
batchLanguageTranslation
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
cancelJob
public CancelJobResponse cancelJob(CancelJobRequest request)
Description copied from interface:AIServiceLanguage
Canceling the job cancels all the tasks under it.- Specified by:
cancelJob
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
changeEndpointCompartment
public ChangeEndpointCompartmentResponse changeEndpointCompartment(ChangeEndpointCompartmentRequest request)
Description copied from interface:AIServiceLanguage
Moves a Endpoint into a different compartment.When provided, If-Match is checked against ETag values of the resource.
- Specified by:
changeEndpointCompartment
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
changeJobCompartment
public ChangeJobCompartmentResponse changeJobCompartment(ChangeJobCompartmentRequest request)
Description copied from interface:AIServiceLanguage
Moves a Job into a different compartment.When provided, If-Match is checked against ETag values of the resource.
- Specified by:
changeJobCompartment
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
changeModelCompartment
public ChangeModelCompartmentResponse changeModelCompartment(ChangeModelCompartmentRequest request)
Description copied from interface:AIServiceLanguage
Moves a Model into a different compartment.When provided, If-Match is checked against ETag values of the resource.
- Specified by:
changeModelCompartment
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
changeProjectCompartment
public ChangeProjectCompartmentResponse changeProjectCompartment(ChangeProjectCompartmentRequest request)
Description copied from interface:AIServiceLanguage
Moves a Project into a different compartment.When provided, If-Match is checked against ETag values of the resource.
- Specified by:
changeProjectCompartment
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
createEndpoint
public CreateEndpointResponse createEndpoint(CreateEndpointRequest request)
Description copied from interface:AIServiceLanguage
Creates a new endpoint and deploy the trained model- Specified by:
createEndpoint
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
createJob
public CreateJobResponse createJob(CreateJobRequest request)
Description copied from interface:AIServiceLanguage
Creates a new language service async job.- Specified by:
createJob
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
createModel
public CreateModelResponse createModel(CreateModelRequest request)
Description copied from interface:AIServiceLanguage
Creates a new model for training and train the model with date provided.- Specified by:
createModel
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
createProject
public CreateProjectResponse createProject(CreateProjectRequest request)
Description copied from interface:AIServiceLanguage
Creates a new Project.- Specified by:
createProject
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
deleteEndpoint
public DeleteEndpointResponse deleteEndpoint(DeleteEndpointRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
deleteEndpoint
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
deleteJob
public DeleteJobResponse deleteJob(DeleteJobRequest request)
Description copied from interface:AIServiceLanguage
Deletes the language service async Job- Specified by:
deleteJob
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
deleteModel
public DeleteModelResponse deleteModel(DeleteModelRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
deleteModel
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
deleteProject
public DeleteProjectResponse deleteProject(DeleteProjectRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
deleteProject
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
detectDominantLanguage
public DetectDominantLanguageResponse detectDominantLanguage(DetectDominantLanguageRequest request)
Description copied from interface:AIServiceLanguage
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.oracle.com/iaas/language/using/pretrain-models.htm#lang-detect)
Limitations: - A record may be up to 1000 characters long.
- Specified by:
detectDominantLanguage
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
detectLanguageEntities
public DetectLanguageEntitiesResponse detectLanguageEntities(DetectLanguageEntitiesRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
detectLanguageEntities
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
detectLanguageKeyPhrases
public DetectLanguageKeyPhrasesResponse detectLanguageKeyPhrases(DetectLanguageKeyPhrasesRequest request)
Description copied from interface:AIServiceLanguage
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.
- Specified by:
detectLanguageKeyPhrases
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
detectLanguageSentiments
public DetectLanguageSentimentsResponse detectLanguageSentiments(DetectLanguageSentimentsRequest request)
Description copied from interface:AIServiceLanguage
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.oracle.com/iaas/language/using/pretrain-models.htm#sentiment).
Limitations: - A record may be up to 1000 characters long.
- Specified by:
detectLanguageSentiments
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
detectLanguageTextClassification
public DetectLanguageTextClassificationResponse detectLanguageTextClassification(DetectLanguageTextClassificationRequest request)
Description copied from interface:AIServiceLanguage
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.oracle.com/iaas/language/using/pretrain-models.htm#text-class).
Limitations: - A record may be up to 1000 characters long.
- Specified by:
detectLanguageTextClassification
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getEndpoint
public GetEndpointResponse getEndpoint(GetEndpointRequest request)
Description copied from interface:AIServiceLanguage
Gets an endpoint by identifier- Specified by:
getEndpoint
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getJob
public GetJobResponse getJob(GetJobRequest request)
Description copied from interface:AIServiceLanguage
Gets a language service async job- Specified by:
getJob
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getModel
public GetModelResponse getModel(GetModelRequest request)
Description copied from interface:AIServiceLanguage
Gets a model by identifier- Specified by:
getModel
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getModelType
public GetModelTypeResponse getModelType(GetModelTypeRequest request)
Description copied from interface:AIServiceLanguage
Gets model capabilities- Specified by:
getModelType
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getProject
public GetProjectResponse getProject(GetProjectRequest request)
Description copied from interface:AIServiceLanguage
Gets a Project by identifier- Specified by:
getProject
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getWorkRequest
public GetWorkRequestResponse getWorkRequest(GetWorkRequestRequest request)
Description copied from interface:AIServiceLanguage
Gets the status of the work request with the given ID.- Specified by:
getWorkRequest
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listEndpoints
public ListEndpointsResponse listEndpoints(ListEndpointsRequest request)
Description copied from interface:AIServiceLanguage
Returns a list of Endpoints.- Specified by:
listEndpoints
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listEvaluationResults
public ListEvaluationResultsResponse listEvaluationResults(ListEvaluationResultsRequest request)
Description copied from interface:AIServiceLanguage
Get a (paginated) list of evaluation results for a given model.- Specified by:
listEvaluationResults
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listJobs
public ListJobsResponse listJobs(ListJobsRequest request)
Description copied from interface:AIServiceLanguage
Returns a list of language service async Jobs.- Specified by:
listJobs
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listModels
public ListModelsResponse listModels(ListModelsRequest request)
Description copied from interface:AIServiceLanguage
Returns a list of models.- Specified by:
listModels
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listProjects
public ListProjectsResponse listProjects(ListProjectsRequest request)
Description copied from interface:AIServiceLanguage
Returns a list of Projects.- Specified by:
listProjects
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listWorkRequestErrors
public ListWorkRequestErrorsResponse listWorkRequestErrors(ListWorkRequestErrorsRequest request)
Description copied from interface:AIServiceLanguage
Return a (paginated) list of errors for a given work request.- Specified by:
listWorkRequestErrors
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listWorkRequestLogs
public ListWorkRequestLogsResponse listWorkRequestLogs(ListWorkRequestLogsRequest request)
Description copied from interface:AIServiceLanguage
Return a (paginated) list of logs for a given work request.- Specified by:
listWorkRequestLogs
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
listWorkRequests
public ListWorkRequestsResponse listWorkRequests(ListWorkRequestsRequest request)
Description copied from interface:AIServiceLanguage
Lists the work requests in a compartment.- Specified by:
listWorkRequests
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
updateEndpoint
public UpdateEndpointResponse updateEndpoint(UpdateEndpointRequest request)
Description copied from interface:AIServiceLanguage
Update the Endpoint identified by the id- Specified by:
updateEndpoint
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
updateJob
public UpdateJobResponse updateJob(UpdateJobRequest request)
Description copied from interface:AIServiceLanguage
Updates the language service async Job- Specified by:
updateJob
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
updateModel
public UpdateModelResponse updateModel(UpdateModelRequest request)
Description copied from interface:AIServiceLanguage
Updates the model- Specified by:
updateModel
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
updateProject
public UpdateProjectResponse updateProject(UpdateProjectRequest request)
Description copied from interface:AIServiceLanguage
Updates the Project- Specified by:
updateProject
in interfaceAIServiceLanguage
- Parameters:
request
- The request object containing the details to send- Returns:
- A response object containing details about the completed operation
-
getWaiters
public AIServiceLanguageWaiters getWaiters()
Description copied from interface:AIServiceLanguage
Gets the pre-configured waiters available for resources for this service.- Specified by:
getWaiters
in interfaceAIServiceLanguage
- Returns:
- The service waiters.
-
getPaginators
public AIServiceLanguagePaginators getPaginators()
Description copied from interface:AIServiceLanguage
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.- Specified by:
getPaginators
in interfaceAIServiceLanguage
- Returns:
- The service paginators.
-
getDefaultConfigurator
protected ClientConfigurator getDefaultConfigurator()
-
useRealmSpecificEndpointTemplate
public void useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
This method should be used to enable or disable the use of realm-specific endpoint template.The default value is null. To enable the use of endpoint template defined for the realm in use, set the flag to true To disable the use of endpoint template defined for the realm in use, set the flag to false
- Parameters:
useOfRealmSpecificEndpointTemplateEnabled
- This flag can be set to true or false to enable or disable the use of realm-specific endpoint template respectively
-
populateServiceParametersInEndpoint
public final void populateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)
Populate the parameters in the endpoint with its corresponding value and update the base endpoint.The value will be populated iff the parameter in endpoint is a required request path parameter or a required request query parameter. If not, the parameter in the endpoint will be ignored and left blank.
- Parameters:
endpoint
- The endpoint template in userequiredParametersMap
- Map of parameter name as key and value set in request path or query parameter as value
-
updateBaseEndpoint
public final void updateBaseEndpoint(String endpoint)
This method should be used for parameterized endpoint templates only.This does not include {region} and {secondLevelDomain} parameters.
- Parameters:
endpoint
- The updated endpoint to use
-
setEndpoint
public final void setEndpoint(String endpoint)
-
getEndpoint
public final String getEndpoint()
-
refreshClient
public final void refreshClient()
Rebuild the backingHttpClient
.This will call
ClientConfigurator
s again, and can be used to e.g. refresh the SSL certificate.
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
-
getClientCommonLibraryVersion
public String getClientCommonLibraryVersion()
-
-