runtime

package
Version: v60.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 10 Imported by: 135

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

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

func Version

func Version() string

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

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	Endpoint string
}

BaseClient is the base client for Runtime.

func New

func New(endpoint string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(endpoint string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type DynamicList

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

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

Error represents the error that occurred.

type ErrorBody

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

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"`
	// Score - A user supplied score to return as the entity's prediction score.
	Score *float64 `json:"score,omitempty"`
}

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

type Intent

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

type Prediction struct {
	// 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 - 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"`
}

Prediction represents the prediction of a query.

func (Prediction) MarshalJSON

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

MarshalJSON is the custom marshaler for Prediction.

type PredictionClient

type PredictionClient struct {
	BaseClient
}

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

func NewPredictionClient

func NewPredictionClient(endpoint string) PredictionClient

NewPredictionClient creates an instance of the PredictionClient client.

func (PredictionClient) GetSlotPrediction

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

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

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

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

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

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

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

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

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

type PredictionRequestOptions struct {
	// DatetimeReference - The reference DateTime used for predicting datetime entities.
	DatetimeReference *date.Time `json:"datetimeReference,omitempty"`
	// PreferExternalEntities - Whether to make the external entities resolution override the predictions if an overlap occurs.
	PreferExternalEntities *bool `json:"preferExternalEntities,omitempty"`
}

PredictionRequestOptions the custom options for the prediction request.

type PredictionResponse

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

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

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

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL