azure.cognitiveservices.language.luis.runtime.models module¶
-
exception
azure.cognitiveservices.language.luis.runtime.models.
ErrorException
(deserialize, response, *args)[source]¶ Bases:
msrest.exceptions.HttpOperationError
Server responsed with exception of type: ‘Error’.
- Parameters
deserialize – A deserializer
response – Server response to be deserialized.
-
class
azure.cognitiveservices.language.luis.runtime.models.
DynamicList
(*, list_entity_name: str, request_lists, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Defines an extension for a list entity.
All required parameters must be populated in order to send to Azure.
- Parameters
list_entity_name (str) – Required. The name of the list entity to extend.
request_lists (list[RequestList]) – Required. The lists to append on the extended list entity.
-
class
azure.cognitiveservices.language.luis.runtime.models.
Error
(*, error, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Represents the error that occurred.
All required parameters must be populated in order to send to Azure.
- Parameters
error (ErrorBody) – Required.
-
class
azure.cognitiveservices.language.luis.runtime.models.
ErrorBody
(*, code: str, message: str, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Represents the definition of the error that occurred.
All required parameters must be populated in order to send to Azure.
-
class
azure.cognitiveservices.language.luis.runtime.models.
ExternalEntity
(*, entity_name: str, start_index: int, entity_length: int, resolution=None, score: float = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Defines a user predicted entity that extends an already existing one.
All required parameters must be populated in order to send to Azure.
- Parameters
entity_name (str) – Required. The name of the entity to extend.
start_index (int) – Required. The start character index of the predicted entity.
entity_length (int) – Required. The length of the predicted entity.
resolution (object) – A user supplied custom resolution to return as the entity’s prediction.
score (float) – A user supplied score to return as the entity’s prediction score.
-
class
azure.cognitiveservices.language.luis.runtime.models.
Intent
(*, score: float = None, child_app=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Represents an intent prediction.
- Parameters
score (float) – The score of the fired intent.
child_app (Prediction) – The prediction of the dispatched application.
-
class
azure.cognitiveservices.language.luis.runtime.models.
Prediction
(*, top_intent: str, intents, entities, altered_query: str = None, sentiment=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Represents the prediction of a query.
All required parameters must be populated in order to send to Azure.
- Parameters
altered_query (str) – The query after spell checking. Only set if spell check was enabled and a spelling mistake was found.
top_intent (str) – Required. The name of the top scoring intent.
intents (dict[str, Intent]) – Required. A dictionary representing the intents that fired.
entities (dict[str, object]) – Required. A dictionary representing the entities that fired.
sentiment (Sentiment) – The result of the sentiment analysis.
-
class
azure.cognitiveservices.language.luis.runtime.models.
PredictionRequest
(*, query: str, options=None, external_entities=None, dynamic_lists=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Represents the prediction request parameters.
All required parameters must be populated in order to send to Azure.
- Parameters
query (str) – Required. The query to predict.
options (PredictionRequestOptions) – The custom options defined for this request.
external_entities (list[ExternalEntity]) – The externally predicted entities for this request.
dynamic_lists (list[DynamicList]) – The dynamically created list entities for this request.
-
class
azure.cognitiveservices.language.luis.runtime.models.
PredictionRequestOptions
(*, datetime_reference=None, prefer_external_entities: bool = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
The custom options for the prediction request.
- Parameters
datetime_reference (datetime) – The reference DateTime used for predicting datetime entities.
prefer_external_entities (bool) – Whether to make the external entities resolution override the predictions if an overlap occurs.
-
class
azure.cognitiveservices.language.luis.runtime.models.
PredictionResponse
(*, query: str, prediction, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Represents the prediction response.
All required parameters must be populated in order to send to Azure.
- Parameters
query (str) – Required. The query used in the prediction.
prediction (Prediction) – Required. The prediction of the requested query.
-
class
azure.cognitiveservices.language.luis.runtime.models.
RequestList
(*, canonical_form: str, name: str = None, synonyms=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Defines a sub-list to append to an existing list entity.
All required parameters must be populated in order to send to Azure.