Skip to content

Commit

Permalink
Merge remote-tracking branch 'bitbucket/github' into release_2024-04-16
Browse files Browse the repository at this point in the history
  • Loading branch information
oci-dex-release-bot committed Apr 16, 2024
2 parents f1179e5 + bd46995 commit 49451b0
Show file tree
Hide file tree
Showing 137 changed files with 5,594 additions and 75 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)

## 65.63.2 - 2024-04-16
### Added
- Support for calling Oracle Cloud Infrastructure services in the me-abudhabi-3 region
- Support for new Image resource for an Autonomous Database in the Database service
- Support for creating Autonomous Container Database using Autonomous Database Software Image in the Database service
- Support for new dedicated AI cluster unit shape in the Generative AI service
- Support for Chat API for LLM models in the Generative AI service
- Support for network security groups (NSGs) in the Redis service
- Support for custom public egress on model deployments in the Data Science service
- Support for a new data transfer parameter for AWS S3 bucket in the Database Migration service
- Support for Oracle Process Automation instance start and stop operations in the Process Automation service
- Support for healthcare Natural Language Processing (NLP) in the AI Language service
- Support for identification and de-identification of Private Health Information (PHI) service in the AI Language service
- Support for multilingual content for using machine learning models in the AI Language service
- Support for usage statements in cost management in the Usage service


## 65.63.1 - 2024-04-09
### Added
- Support for calling Oracle Cloud Infrastructure services in the ap-dcc-gazipur-1 region
Expand Down
61 changes: 61 additions & 0 deletions ailanguage/ailanguage_aiservicelanguage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,67 @@ func (client AIServiceLanguageClient) batchDetectDominantLanguage(ctx context.Co
return response, err
}

// 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.
//
// # See also
//
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ailanguage/BatchDetectHealthEntity.go.html to see an example of how to use BatchDetectHealthEntity API.
func (client AIServiceLanguageClient) BatchDetectHealthEntity(ctx context.Context, request BatchDetectHealthEntityRequest) (response BatchDetectHealthEntityResponse, err error) {
var ociResponse common.OCIResponse
policy := common.NoRetryPolicy()
if client.RetryPolicy() != nil {
policy = *client.RetryPolicy()
}
if request.RetryPolicy() != nil {
policy = *request.RetryPolicy()
}
ociResponse, err = common.Retry(ctx, request, client.batchDetectHealthEntity, policy)
if err != nil {
if ociResponse != nil {
if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil {
opcRequestId := httpResponse.Header.Get("opc-request-id")
response = BatchDetectHealthEntityResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId}
} else {
response = BatchDetectHealthEntityResponse{}
}
}
return
}
if convertedResponse, ok := ociResponse.(BatchDetectHealthEntityResponse); ok {
response = convertedResponse
} else {
err = fmt.Errorf("failed to convert OCIResponse into BatchDetectHealthEntityResponse")
}
return
}

// batchDetectHealthEntity implements the OCIOperation interface (enables retrying operations)
func (client AIServiceLanguageClient) batchDetectHealthEntity(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) {

httpRequest, err := request.HTTPRequest(http.MethodPost, "/actions/batchDetectHealthEntities", binaryReqBody, extraHeaders)
if err != nil {
return nil, err
}

var response BatchDetectHealthEntityResponse
var httpResponse *http.Response
httpResponse, err = client.Call(ctx, &httpRequest)
defer common.CloseBodyIfValid(httpResponse)
response.RawResponse = httpResponse
if err != nil {
apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/language/20221001/BatchDetectHealthEntityDetails/BatchDetectHealthEntity"
err = common.PostProcessServiceError(err, "AIServiceLanguage", "BatchDetectHealthEntity", apiReferenceLink)
return response, err
}

err = common.UnmarshalResponse(httpResponse, &response)
return response, err
}

// 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:
Expand Down
50 changes: 50 additions & 0 deletions ailanguage/assertion_details.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Copyright (c) 2016, 2018, 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.
// Code generated. DO NOT EDIT.

// Language API
//
// OCI Language Service solutions can help enterprise customers integrate AI into their products immediately using our proven,
// pre-trained and custom models or containers, without a need to set up an house team of AI and ML experts.
// This allows enterprises to focus on business drivers and development work rather than AI and ML operations, which shortens the time to market.
//

package ailanguage

import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)

// AssertionDetails The assertion details for health ner.
type AssertionDetails struct {

// id of the relation
Id *string `mandatory:"true" json:"id"`

// type of assertion ex, Status, Certainty, Temporality, Actor, etc.
Type *string `mandatory:"true" json:"type"`

// Possible value for assertion type
Value *string `mandatory:"true" json:"value"`

// Score or confidence for health detected entity.
Score *float64 `mandatory:"true" json:"score"`
}

func (m AssertionDetails) String() string {
return common.PointerString(m)
}

// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m AssertionDetails) ValidateEnumValue() (bool, error) {
errMessage := []string{}

if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
55 changes: 55 additions & 0 deletions ailanguage/batch_detect_health_entity_details.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright (c) 2016, 2018, 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.
// Code generated. DO NOT EDIT.

// Language API
//
// OCI Language Service solutions can help enterprise customers integrate AI into their products immediately using our proven,
// pre-trained and custom models or containers, without a need to set up an house team of AI and ML experts.
// This allows enterprises to focus on business drivers and development work rather than AI and ML operations, which shortens the time to market.
//

package ailanguage

import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)

// BatchDetectHealthEntityDetails The documents details for health entities detect call.
type BatchDetectHealthEntityDetails struct {

// The endpoint which have to be used for inferencing.
EndpointId *string `mandatory:"true" json:"endpointId"`

// List of Documents for detect health entities.
Documents []TextDocument `mandatory:"true" json:"documents"`

// List of NLP health ontologies to be linked
LinkOntologies []string `mandatory:"false" json:"linkOntologies"`

// is assertion on input text required. default value true.
IsDetectAssertions *bool `mandatory:"false" json:"isDetectAssertions"`

// is relationship on input text required. default value true.
IsDetectRelationships *bool `mandatory:"false" json:"isDetectRelationships"`

Profile *Profile `mandatory:"false" json:"profile"`
}

func (m BatchDetectHealthEntityDetails) String() string {
return common.PointerString(m)
}

// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m BatchDetectHealthEntityDetails) ValidateEnumValue() (bool, error) {
errMessage := []string{}

if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
90 changes: 90 additions & 0 deletions ailanguage/batch_detect_health_entity_request_response.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Copyright (c) 2016, 2018, 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.
// Code generated. DO NOT EDIT.

package ailanguage

import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"net/http"
"strings"
)

// BatchDetectHealthEntityRequest wrapper for the BatchDetectHealthEntity operation
//
// # See also
//
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ailanguage/BatchDetectHealthEntity.go.html to see an example of how to use BatchDetectHealthEntityRequest.
type BatchDetectHealthEntityRequest struct {

// The details to make a health entity detect call.
BatchDetectHealthEntityDetails `contributesTo:"body"`

// The client request ID for tracing.
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

// Metadata about the request. This information will not be transmitted to the service, but
// represents information that the SDK will consume to drive retry behavior.
RequestMetadata common.RequestMetadata
}

func (request BatchDetectHealthEntityRequest) String() string {
return common.PointerString(request)
}

// HTTPRequest implements the OCIRequest interface
func (request BatchDetectHealthEntityRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) {

_, err := request.ValidateEnumValue()
if err != nil {
return http.Request{}, err
}
return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders)
}

// BinaryRequestBody implements the OCIRequest interface
func (request BatchDetectHealthEntityRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) {

return nil, false

}

// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request BatchDetectHealthEntityRequest) RetryPolicy() *common.RetryPolicy {
return request.RequestMetadata.RetryPolicy
}

// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (request BatchDetectHealthEntityRequest) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}

// BatchDetectHealthEntityResponse wrapper for the BatchDetectHealthEntity operation
type BatchDetectHealthEntityResponse struct {

// The underlying http response
RawResponse *http.Response

// The BatchDetectHealthEntityResult instance
BatchDetectHealthEntityResult `presentIn:"body"`

// Unique Oracle-assigned identifier for the request. If you need to contact
// Oracle about a particular request, please provide the request ID.
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}

func (response BatchDetectHealthEntityResponse) String() string {
return common.PointerString(response)
}

// HTTPResponse implements the OCIResponse interface
func (response BatchDetectHealthEntityResponse) HTTPResponse() *http.Response {
return response.RawResponse
}
44 changes: 44 additions & 0 deletions ailanguage/batch_detect_health_entity_result.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) 2016, 2018, 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.
// Code generated. DO NOT EDIT.

// Language API
//
// OCI Language Service solutions can help enterprise customers integrate AI into their products immediately using our proven,
// pre-trained and custom models or containers, without a need to set up an house team of AI and ML experts.
// This allows enterprises to focus on business drivers and development work rather than AI and ML operations, which shortens the time to market.
//

package ailanguage

import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)

// BatchDetectHealthEntityResult Result of health entity detect call.
type BatchDetectHealthEntityResult struct {

// List of succeeded document response.
Documents []HealthEntityDocumentResult `mandatory:"true" json:"documents"`

// List of failed document response.
Errors []DocumentError `mandatory:"false" json:"errors"`
}

func (m BatchDetectHealthEntityResult) String() string {
return common.PointerString(m)
}

// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m BatchDetectHealthEntityResult) ValidateEnumValue() (bool, error) {
errMessage := []string{}

if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
5 changes: 5 additions & 0 deletions ailanguage/batch_detect_language_pii_entities_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type BatchDetectLanguagePiiEntitiesDetails struct {

// Mask recognized PII entities with different modes.
Masking map[string]PiiEntityMasking `mandatory:"false" json:"masking"`

Profile *Profile `mandatory:"false" json:"profile"`
}

func (m BatchDetectLanguagePiiEntitiesDetails) String() string {
Expand All @@ -56,6 +58,7 @@ func (m *BatchDetectLanguagePiiEntitiesDetails) UnmarshalJSON(data []byte) (e er
EndpointId *string `json:"endpointId"`
CompartmentId *string `json:"compartmentId"`
Masking map[string]piientitymasking `json:"masking"`
Profile *Profile `json:"profile"`
Documents []TextDocument `json:"documents"`
}{}

Expand All @@ -81,6 +84,8 @@ func (m *BatchDetectLanguagePiiEntitiesDetails) UnmarshalJSON(data []byte) (e er
}
}

m.Profile = model.Profile

m.Documents = make([]TextDocument, len(model.Documents))
copy(m.Documents, model.Documents)
return
Expand Down
Loading

0 comments on commit 49451b0

Please sign in to comment.