azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.0/luis/runtime Index | Files | Directories

package runtime

import "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.0/luis/runtime"

Package runtime implements the Azure ARM Runtime service API version 3.0-preview.

Index

Package Files

client.go models.go prediction.go version.go

func UserAgent Uses

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version Uses

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

type BaseClient Uses

type BaseClient struct {
    autorest.Client
    Endpoint string
}

BaseClient is the base client for Runtime.

func New Uses

func New(endpoint string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults Uses

func NewWithoutDefaults(endpoint string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type DynamicList Uses

type DynamicList struct {
    // ListEntityName - The name of the list entity to extend.
    ListEntityName *string `json:"listEntityName,omitempty"`
    // RequestLists - The lists to append on the extended list entity.
    RequestLists *[]RequestList `json:"requestLists,omitempty"`
}

DynamicList defines an extension for a list entity.

type Error Uses

type Error struct {
    Error *ErrorBody `json:"error,omitempty"`
}

Error represents the error that occurred.

type ErrorBody Uses

type ErrorBody struct {
    // Code - The error code.
    Code *string `json:"code,omitempty"`
    // Message - The error message.
    Message *string `json:"message,omitempty"`
}

ErrorBody represents the definition of the error that occurred.

type ExternalEntity Uses

type ExternalEntity struct {
    // EntityName - The name of the entity to extend.
    EntityName *string `json:"entityName,omitempty"`
    // StartIndex - The start character index of the predicted entity.
    StartIndex *int32 `json:"startIndex,omitempty"`
    // EntityLength - The length of the predicted entity.
    EntityLength *int32 `json:"entityLength,omitempty"`
    // Resolution - A user supplied custom resolution to return as the entity's prediction.
    Resolution interface{} `json:"resolution,omitempty"`
}

ExternalEntity defines a user predicted entity that extends an already existing one.

type Intent Uses

type Intent struct {
    // Score - The score of the fired intent.
    Score *float64 `json:"score,omitempty"`
    // ChildApp - The prediction of the dispatched application.
    ChildApp *Prediction `json:"childApp,omitempty"`
}

Intent represents an intent prediction.

type Prediction Uses

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 map[string]interface{} `json:"entities"`
    // Sentiment - The result of the sentiment analysis.
    Sentiment *Sentiment `json:"sentiment,omitempty"`
}

Prediction represents the prediction of a query.

func (Prediction) MarshalJSON Uses

func (p Prediction) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Prediction.

type PredictionClient Uses

type PredictionClient struct {
    BaseClient
}

PredictionClient is the client for the Prediction methods of the Runtime service.

func NewPredictionClient Uses

func NewPredictionClient(endpoint string) PredictionClient

NewPredictionClient creates an instance of the PredictionClient client.

func (PredictionClient) GetSlotPrediction Uses

func (client PredictionClient) GetSlotPrediction(ctx context.Context, appID uuid.UUID, slotName string, predictionRequest PredictionRequest, verbose *bool, showAllIntents *bool, logParameter *bool) (result PredictionResponse, err error)

GetSlotPrediction gets the predictions for an application slot. Parameters: appID - the application ID. slotName - the application slot name. predictionRequest - the prediction request parameters. verbose - indicates whether to get extra metadata for the entities predictions or not. showAllIntents - indicates whether to return all the intents in the response or just the top intent. logParameter - indicates whether to log the endpoint query or not.

func (PredictionClient) GetSlotPredictionPreparer Uses

func (client PredictionClient) GetSlotPredictionPreparer(ctx context.Context, appID uuid.UUID, slotName string, predictionRequest PredictionRequest, verbose *bool, showAllIntents *bool, logParameter *bool) (*http.Request, error)

GetSlotPredictionPreparer prepares the GetSlotPrediction request.

func (PredictionClient) GetSlotPredictionResponder Uses

func (client PredictionClient) GetSlotPredictionResponder(resp *http.Response) (result PredictionResponse, err error)

GetSlotPredictionResponder handles the response to the GetSlotPrediction request. The method always closes the http.Response Body.

func (PredictionClient) GetSlotPredictionSender Uses

func (client PredictionClient) GetSlotPredictionSender(req *http.Request) (*http.Response, error)

GetSlotPredictionSender sends the GetSlotPrediction request. The method will close the http.Response Body if it receives an error.

func (PredictionClient) GetVersionPrediction Uses

func (client PredictionClient) GetVersionPrediction(ctx context.Context, appID uuid.UUID, versionID string, predictionRequest PredictionRequest, verbose *bool, showAllIntents *bool, logParameter *bool) (result PredictionResponse, err error)

GetVersionPrediction gets the predictions for an application version. Parameters: appID - the application ID. versionID - the application version ID. predictionRequest - the prediction request parameters. verbose - indicates whether to get extra metadata for the entities predictions or not. showAllIntents - indicates whether to return all the intents in the response or just the top intent. logParameter - indicates whether to log the endpoint query or not.

func (PredictionClient) GetVersionPredictionPreparer Uses

func (client PredictionClient) GetVersionPredictionPreparer(ctx context.Context, appID uuid.UUID, versionID string, predictionRequest PredictionRequest, verbose *bool, showAllIntents *bool, logParameter *bool) (*http.Request, error)

GetVersionPredictionPreparer prepares the GetVersionPrediction request.

func (PredictionClient) GetVersionPredictionResponder Uses

func (client PredictionClient) GetVersionPredictionResponder(resp *http.Response) (result PredictionResponse, err error)

GetVersionPredictionResponder handles the response to the GetVersionPrediction request. The method always closes the http.Response Body.

func (PredictionClient) GetVersionPredictionSender Uses

func (client PredictionClient) GetVersionPredictionSender(req *http.Request) (*http.Response, error)

GetVersionPredictionSender sends the GetVersionPrediction request. The method will close the http.Response Body if it receives an error.

type PredictionRequest Uses

type PredictionRequest struct {
    // Query - The query to predict.
    Query *string `json:"query,omitempty"`
    // Options - The custom options defined for this request.
    Options *PredictionRequestOptions `json:"options,omitempty"`
    // ExternalEntities - The externally predicted entities for this request.
    ExternalEntities *[]ExternalEntity `json:"externalEntities,omitempty"`
    // DynamicLists - The dynamically created list entities for this request.
    DynamicLists *[]DynamicList `json:"dynamicLists,omitempty"`
}

PredictionRequest represents the prediction request parameters.

type PredictionRequestOptions Uses

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"`
}

PredictionRequestOptions the custom options for the prediction request.

type PredictionResponse Uses

type PredictionResponse struct {
    autorest.Response `json:"-"`
    // Query - The query used in the prediction.
    Query *string `json:"query,omitempty"`
    // Prediction - The prediction of the requested query.
    Prediction *Prediction `json:"prediction,omitempty"`
}

PredictionResponse represents the prediction response.

type RequestList Uses

type RequestList struct {
    // Name - The name of the sub-list.
    Name *string `json:"name,omitempty"`
    // CanonicalForm - The canonical form of the sub-list.
    CanonicalForm *string `json:"canonicalForm,omitempty"`
    // Synonyms - The synonyms of the canonical form.
    Synonyms *[]string `json:"synonyms,omitempty"`
}

RequestList defines a sub-list to append to an existing list entity.

type Sentiment Uses

type Sentiment struct {
    // Label - The label of the sentiment analysis result.
    Label *string `json:"label,omitempty"`
    // Score - The sentiment score of the query.
    Score *float64 `json:"score,omitempty"`
}

Sentiment the result of the sentiment analysis.

Directories

PathSynopsis
runtimeapi

Package runtime imports 10 packages (graph) and is imported by 4 packages. Updated 2019-07-30. Refresh now. Tools for package owners.