diff --git a/profiles/latest/cognitiveservices/luis/runtime/models.go b/profiles/latest/cognitiveservices/luis/runtime/models.go index 874c6edc8fb4..d667bc94c344 100644 --- a/profiles/latest/cognitiveservices/luis/runtime/models.go +++ b/profiles/latest/cognitiveservices/luis/runtime/models.go @@ -19,18 +19,20 @@ package runtime -import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime" +import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/luis/runtime" -type APIError = original.APIError type BaseClient = original.BaseClient -type CompositeChildModel = original.CompositeChildModel -type CompositeEntityModel = original.CompositeEntityModel -type EntityModel = original.EntityModel -type EntityWithResolution = original.EntityWithResolution -type EntityWithScore = original.EntityWithScore -type IntentModel = original.IntentModel -type LuisResult = original.LuisResult +type DynamicList = original.DynamicList +type Error = original.Error +type ErrorBody = original.ErrorBody +type ExternalEntity = original.ExternalEntity +type Intent = original.Intent +type Prediction = original.Prediction type PredictionClient = original.PredictionClient +type PredictionRequest = original.PredictionRequest +type PredictionRequestOptions = original.PredictionRequestOptions +type PredictionResponse = original.PredictionResponse +type RequestList = original.RequestList type Sentiment = original.Sentiment func New(endpoint string) BaseClient { diff --git a/profiles/latest/cognitiveservices/luis/runtime/runtimeapi/models.go b/profiles/latest/cognitiveservices/luis/runtime/runtimeapi/models.go index bd78fd1355eb..2ab87e1823d9 100644 --- a/profiles/latest/cognitiveservices/luis/runtime/runtimeapi/models.go +++ b/profiles/latest/cognitiveservices/luis/runtime/runtimeapi/models.go @@ -19,6 +19,6 @@ package runtimeapi -import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime/runtimeapi" +import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/luis/runtime/runtimeapi" type PredictionClientAPI = original.PredictionClientAPI diff --git a/profiles/preview/cognitiveservices/luis/runtime/models.go b/profiles/preview/cognitiveservices/luis/runtime/models.go index 12591d37c0d6..f33485fca269 100644 --- a/profiles/preview/cognitiveservices/luis/runtime/models.go +++ b/profiles/preview/cognitiveservices/luis/runtime/models.go @@ -19,18 +19,20 @@ package runtime -import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime" +import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/luis/runtime" -type APIError = original.APIError type BaseClient = original.BaseClient -type CompositeChildModel = original.CompositeChildModel -type CompositeEntityModel = original.CompositeEntityModel -type EntityModel = original.EntityModel -type EntityWithResolution = original.EntityWithResolution -type EntityWithScore = original.EntityWithScore -type IntentModel = original.IntentModel -type LuisResult = original.LuisResult +type DynamicList = original.DynamicList +type Error = original.Error +type ErrorBody = original.ErrorBody +type ExternalEntity = original.ExternalEntity +type Intent = original.Intent +type Prediction = original.Prediction type PredictionClient = original.PredictionClient +type PredictionRequest = original.PredictionRequest +type PredictionRequestOptions = original.PredictionRequestOptions +type PredictionResponse = original.PredictionResponse +type RequestList = original.RequestList type Sentiment = original.Sentiment func New(endpoint string) BaseClient { diff --git a/profiles/preview/cognitiveservices/luis/runtime/runtimeapi/models.go b/profiles/preview/cognitiveservices/luis/runtime/runtimeapi/models.go index bd78fd1355eb..2ab87e1823d9 100644 --- a/profiles/preview/cognitiveservices/luis/runtime/runtimeapi/models.go +++ b/profiles/preview/cognitiveservices/luis/runtime/runtimeapi/models.go @@ -19,6 +19,6 @@ package runtimeapi -import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime/runtimeapi" +import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/luis/runtime/runtimeapi" type PredictionClientAPI = original.PredictionClientAPI diff --git a/profiles/preview/preview/cognitiveservices/luis/runtime/models.go b/profiles/preview/preview/cognitiveservices/luis/runtime/models.go deleted file mode 100644 index 07f74266913b..000000000000 --- a/profiles/preview/preview/cognitiveservices/luis/runtime/models.go +++ /dev/null @@ -1,52 +0,0 @@ -// +build go1.9 - -// Copyright 2019 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This code was auto-generated by: -// github.com/Azure/azure-sdk-for-go/tools/profileBuilder - -package runtime - -import original "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.0/luis/runtime" - -type BaseClient = original.BaseClient -type DynamicList = original.DynamicList -type Error = original.Error -type ErrorBody = original.ErrorBody -type ExternalEntity = original.ExternalEntity -type Intent = original.Intent -type Prediction = original.Prediction -type PredictionClient = original.PredictionClient -type PredictionRequest = original.PredictionRequest -type PredictionRequestOptions = original.PredictionRequestOptions -type PredictionResponse = original.PredictionResponse -type RequestList = original.RequestList -type Sentiment = original.Sentiment - -func New(endpoint string) BaseClient { - return original.New(endpoint) -} -func NewPredictionClient(endpoint string) PredictionClient { - return original.NewPredictionClient(endpoint) -} -func NewWithoutDefaults(endpoint string) BaseClient { - return original.NewWithoutDefaults(endpoint) -} -func UserAgent() string { - return original.UserAgent() + " profiles/preview" -} -func Version() string { - return original.Version() -} diff --git a/profiles/preview/preview/cognitiveservices/luis/runtime/runtimeapi/models.go b/profiles/preview/preview/cognitiveservices/luis/runtime/runtimeapi/models.go deleted file mode 100644 index 8a2b27b774f6..000000000000 --- a/profiles/preview/preview/cognitiveservices/luis/runtime/runtimeapi/models.go +++ /dev/null @@ -1,24 +0,0 @@ -// +build go1.9 - -// Copyright 2019 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This code was auto-generated by: -// github.com/Azure/azure-sdk-for-go/tools/profileBuilder - -package runtimeapi - -import original "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.0/luis/runtime/runtimeapi" - -type PredictionClientAPI = original.PredictionClientAPI diff --git a/services/preview/cognitiveservices/v3.0/luis/runtime/client.go b/services/cognitiveservices/v3.0/luis/runtime/client.go similarity index 98% rename from services/preview/cognitiveservices/v3.0/luis/runtime/client.go rename to services/cognitiveservices/v3.0/luis/runtime/client.go index 3d946d05f1ad..b9e8440b450c 100644 --- a/services/preview/cognitiveservices/v3.0/luis/runtime/client.go +++ b/services/cognitiveservices/v3.0/luis/runtime/client.go @@ -1,4 +1,4 @@ -// Package runtime implements the Azure ARM Runtime service API version 3.0-preview. +// Package runtime implements the Azure ARM Runtime service API version 3.0. // // package runtime diff --git a/services/preview/cognitiveservices/v3.0/luis/runtime/models.go b/services/cognitiveservices/v3.0/luis/runtime/models.go similarity index 90% rename from services/preview/cognitiveservices/v3.0/luis/runtime/models.go rename to services/cognitiveservices/v3.0/luis/runtime/models.go index f4892aa81015..f87f972b82eb 100644 --- a/services/preview/cognitiveservices/v3.0/luis/runtime/models.go +++ b/services/cognitiveservices/v3.0/luis/runtime/models.go @@ -24,7 +24,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.0/luis/runtime" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/luis/runtime" // DynamicList defines an extension for a list entity. type DynamicList struct { @@ -57,6 +57,8 @@ type ExternalEntity struct { EntityLength *int32 `json:"entityLength,omitempty"` // Resolution - A user supplied custom resolution to return as the entity's prediction. Resolution interface{} `json:"resolution,omitempty"` + // Score - A user supplied score to return as the entity's prediction score. + Score *float64 `json:"score,omitempty"` } // Intent represents an intent prediction. @@ -69,15 +71,13 @@ type Intent struct { // Prediction represents the prediction of a query. type Prediction struct { - // NormalizedQuery - The query after pre-processing and normalization. - NormalizedQuery *string `json:"normalizedQuery,omitempty"` // AlteredQuery - The query after spell checking. Only set if spell check was enabled and a spelling mistake was found. AlteredQuery *string `json:"alteredQuery,omitempty"` // TopIntent - The name of the top scoring intent. TopIntent *string `json:"topIntent,omitempty"` // Intents - A dictionary representing the intents that fired. Intents map[string]*Intent `json:"intents"` - // Entities - The dictionary representing the entities that fired. + // Entities - A dictionary representing the entities that fired. Entities map[string]interface{} `json:"entities"` // Sentiment - The result of the sentiment analysis. Sentiment *Sentiment `json:"sentiment,omitempty"` @@ -86,9 +86,6 @@ type Prediction struct { // MarshalJSON is the custom marshaler for Prediction. func (p Prediction) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if p.NormalizedQuery != nil { - objectMap["normalizedQuery"] = p.NormalizedQuery - } if p.AlteredQuery != nil { objectMap["alteredQuery"] = p.AlteredQuery } @@ -123,8 +120,8 @@ type PredictionRequest struct { type PredictionRequestOptions struct { // DatetimeReference - The reference DateTime used for predicting datetime entities. DatetimeReference *date.Time `json:"datetimeReference,omitempty"` - // OverridePredictions - Whether to make the external entities resolution override the predictions if an overlap occurs. - OverridePredictions *bool `json:"overridePredictions,omitempty"` + // PreferExternalEntities - Whether to make the external entities resolution override the predictions if an overlap occurs. + PreferExternalEntities *bool `json:"preferExternalEntities,omitempty"` } // PredictionResponse represents the prediction response. diff --git a/services/preview/cognitiveservices/v3.0/luis/runtime/prediction.go b/services/cognitiveservices/v3.0/luis/runtime/prediction.go similarity index 98% rename from services/preview/cognitiveservices/v3.0/luis/runtime/prediction.go rename to services/cognitiveservices/v3.0/luis/runtime/prediction.go index 35d0fcff814f..1493c9f637a6 100644 --- a/services/preview/cognitiveservices/v3.0/luis/runtime/prediction.go +++ b/services/cognitiveservices/v3.0/luis/runtime/prediction.go @@ -108,7 +108,7 @@ func (client PredictionClient) GetSlotPredictionPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/v3.0-preview", urlParameters), + autorest.WithCustomBaseURL("{Endpoint}/luis/prediction/v3.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/slots/{slotName}/predict", pathParameters), autorest.WithJSON(predictionRequest), autorest.WithQueryParameters(queryParameters)) @@ -206,7 +206,7 @@ func (client PredictionClient) GetVersionPredictionPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/v3.0-preview", urlParameters), + autorest.WithCustomBaseURL("{Endpoint}/luis/prediction/v3.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/predict", pathParameters), autorest.WithJSON(predictionRequest), autorest.WithQueryParameters(queryParameters)) diff --git a/services/preview/cognitiveservices/v3.0/luis/runtime/runtimeapi/interfaces.go b/services/cognitiveservices/v3.0/luis/runtime/runtimeapi/interfaces.go similarity index 94% rename from services/preview/cognitiveservices/v3.0/luis/runtime/runtimeapi/interfaces.go rename to services/cognitiveservices/v3.0/luis/runtime/runtimeapi/interfaces.go index 94480a303c64..187195a67c71 100644 --- a/services/preview/cognitiveservices/v3.0/luis/runtime/runtimeapi/interfaces.go +++ b/services/cognitiveservices/v3.0/luis/runtime/runtimeapi/interfaces.go @@ -19,7 +19,7 @@ package runtimeapi import ( "context" - "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.0/luis/runtime" + "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/luis/runtime" "github.com/satori/go.uuid" ) diff --git a/services/preview/cognitiveservices/v3.0/luis/runtime/version.go b/services/cognitiveservices/v3.0/luis/runtime/version.go similarity index 93% rename from services/preview/cognitiveservices/v3.0/luis/runtime/version.go rename to services/cognitiveservices/v3.0/luis/runtime/version.go index 5851af6578ae..5c5aa27eab02 100644 --- a/services/preview/cognitiveservices/v3.0/luis/runtime/version.go +++ b/services/cognitiveservices/v3.0/luis/runtime/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " runtime/3.0-preview" + return "Azure-SDK-For-Go/" + version.Number + " runtime/3.0" } // Version returns the semantic version (see http://semver.org) of the client.