azure.ai.language.conversations.models package

class azure.ai.language.conversations.models.AnalysisParameters(*, api_version: Optional[str] = None, **kwargs)[source]

This is the parameter set of either the Orchestration project itself or one of the target services.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ConversationParameters, LUISParameters, QuestionAnsweringParameters.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. The type of a target service.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version to use when call a specific target service.

Keyword Arguments

api_version (str) – The API version to use when call a specific target service.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.AnalyzeConversationResult(*, query: str, prediction: azure.ai.language.conversations.models._models_py3.BasePrediction, detected_language: Optional[str] = None, **kwargs)[source]

Represents a conversation analysis response.

All required parameters must be populated in order to send to Azure.

Variables
  • query (str) – Required. The conversation utterance given by the caller.

  • detected_language (str) – The system detected language for the query.

  • prediction (BasePrediction) – Required. The prediction result of a conversation project.

Keyword Arguments
  • query (str) – Required. The conversation utterance given by the caller.

  • detected_language (str) – The system detected language for the query.

  • prediction (BasePrediction) – Required. The prediction result of a conversation project.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.AnswerSpan(*, text: Optional[str] = None, confidence_score: Optional[float] = None, offset: Optional[int] = None, length: Optional[int] = None, **kwargs)[source]

Answer span object of QnA.

Variables
  • text (str) – Predicted text of answer span.

  • confidence_score (float) – Predicted score of answer span, value ranges from 0 to 1.

  • offset (int) – The answer span offset from the start of answer.

  • length (int) – The length of the answer span.

Keyword Arguments
  • text (str) – Predicted text of answer span.

  • confidence_score (float) – Predicted score of answer span, value ranges from 0 to 1.

  • offset (int) – The answer span offset from the start of answer.

  • length (int) – The length of the answer span.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.BasePrediction(*, top_intent: Optional[str] = None, **kwargs)[source]

This is the base class of prediction.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ConversationPrediction, OrchestratorPrediction.

All required parameters must be populated in order to send to Azure.

Variables
  • project_kind (str or ProjectKind) – Required. The type of the project.Constant filled by server. Possible values include: “conversation”, “workflow”.

  • top_intent (str) – The intent with the highest score.

Keyword Arguments

top_intent (str) – The intent with the highest score.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ConversationAnalysisOptions(*, query: str, direct_target: Optional[str] = None, language: Optional[str] = None, verbose: Optional[bool] = None, is_logging_enabled: Optional[bool] = None, parameters: Optional[Dict[str, azure.ai.language.conversations.models._models_py3.AnalysisParameters]] = None, **kwargs)[source]

The request body.

All required parameters must be populated in order to send to Azure.

Variables
  • query (str) – Required. The conversation utterance to be analyzed.

  • direct_target (str) – The name of the target project this request is sending to directly.

  • language (str) – The language to use in this request. This will be the language setting when communicating with all other target projects.

  • verbose (bool) – If true, the service will return more detailed information in the response.

  • is_logging_enabled (bool) – If true, the query will be kept by the service for customers to further review, to improve the model quality.

  • parameters (dict[str, AnalysisParameters]) – A dictionary representing the input for each target project.

Keyword Arguments
  • query (str) – Required. The conversation utterance to be analyzed.

  • direct_target (str) – The name of the target project this request is sending to directly.

  • language (str) – The language to use in this request. This will be the language setting when communicating with all other target projects.

  • verbose (bool) – If true, the service will return more detailed information in the response.

  • is_logging_enabled (bool) – If true, the query will be kept by the service for customers to further review, to improve the model quality.

  • parameters (dict[str, AnalysisParameters]) – A dictionary representing the input for each target project.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ConversationCallingOptions(*, language: Optional[str] = None, verbose: Optional[bool] = None, is_logging_enabled: Optional[bool] = None, **kwargs)[source]

The option to set to call a Conversation project.

Variables
  • language (str) – The language of the query.

  • verbose (bool) – If true, the service will return more detailed information.

  • is_logging_enabled (bool) – If true, the query will be saved for customers to further review in authoring, to improve the model quality.

Keyword Arguments
  • language (str) – The language of the query.

  • verbose (bool) – If true, the service will return more detailed information.

  • is_logging_enabled (bool) – If true, the query will be saved for customers to further review in authoring, to improve the model quality.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ConversationEntity(*, category: str, text: str, offset: int, length: int, confidence_score: float, list_keys: Optional[List[str]] = None, **kwargs)[source]

The entity extraction result of a Conversation project.

All required parameters must be populated in order to send to Azure.

Variables
  • category (str) – Required. The entity category.

  • text (str) – Required. The predicted entity text.

  • offset (int) – Required. The starting index of this entity in the query.

  • length (int) – Required. The length of the text.

  • confidence_score (float) – Required. The entity confidence score.

  • list_keys (list[str]) – List of keys.

Keyword Arguments
  • category (str) – Required. The entity category.

  • text (str) – Required. The predicted entity text.

  • offset (int) – Required. The starting index of this entity in the query.

  • length (int) – Required. The length of the text.

  • confidence_score (float) – Required. The entity confidence score.

  • list_keys (list[str]) – List of keys.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ConversationIntent(*, category: str, confidence_score: float, **kwargs)[source]

The intent classification result of a Conversation project.

All required parameters must be populated in order to send to Azure.

Variables
  • category (str) – Required. A predicted class.

  • confidence_score (float) – Required. The confidence score of the class from 0.0 to 1.0.

Keyword Arguments
  • category (str) – Required. A predicted class.

  • confidence_score (float) – Required. The confidence score of the class from 0.0 to 1.0.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ConversationParameters(*, api_version: Optional[str] = None, calling_options: Optional[azure.ai.language.conversations.models._models_py3.ConversationCallingOptions] = None, **kwargs)[source]

This is a set of request parameters for Customized Conversation projects.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. The type of a target service.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version to use when call a specific target service.

  • calling_options (ConversationCallingOptions) – The option to set to call a Conversation project.

Keyword Arguments
  • api_version (str) – The API version to use when call a specific target service.

  • calling_options (ConversationCallingOptions) – The option to set to call a Conversation project.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ConversationPrediction(*, intents: List[azure.ai.language.conversations.models._models_py3.ConversationIntent], entities: List[azure.ai.language.conversations.models._models_py3.ConversationEntity], top_intent: Optional[str] = None, **kwargs)[source]

Represents the prediction section of a Conversation project.

All required parameters must be populated in order to send to Azure.

Variables
  • project_kind (str or ProjectKind) – Required. The type of the project.Constant filled by server. Possible values include: “conversation”, “workflow”.

  • top_intent (str) – The intent with the highest score.

  • intents (list[ConversationIntent]) – Required. The intent classification results.

  • entities (list[ConversationEntity]) – Required. The entity extraction results.

Keyword Arguments
as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ConversationResult(*, query: str, prediction: azure.ai.language.conversations.models._models_py3.ConversationPrediction, detected_language: Optional[str] = None, **kwargs)[source]

The response returned by a Conversation project.

All required parameters must be populated in order to send to Azure.

Variables
  • query (str) – Required. The same query given in request.

  • detected_language (str) – The detected language from the query.

  • prediction (ConversationPrediction) – Required. The predicted result for the query.

Keyword Arguments
  • query (str) – Required. The same query given in request.

  • detected_language (str) – The detected language from the query.

  • prediction (ConversationPrediction) – Required. The predicted result for the query.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ConversationTargetIntentResult(*, confidence_score: float, api_version: Optional[str] = None, result: Optional[azure.ai.language.conversations.models._models_py3.ConversationResult] = None, **kwargs)[source]

A wrap up of Conversation project response.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. This discriminator property specifies the type of the target project that returns the response.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

  • result (ConversationResult) – The actual response from a Conversation project.

Keyword Arguments
  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

  • result (ConversationResult) – The actual response from a Conversation project.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.Error(*, code: str, message: str, target: Optional[str] = None, details: Optional[List[azure.ai.language.conversations.models._models_py3.Error]] = None, innererror: Optional[azure.ai.language.conversations.models._models_py3.InnerErrorModel] = None, **kwargs)[source]

The error object.

All required parameters must be populated in order to send to Azure.

Variables
  • code (str or ErrorCode) – Required. One of a server-defined set of error codes. Possible values include: “InvalidRequest”, “InvalidArgument”, “Unauthorized”, “Forbidden”, “NotFound”, “ProjectNotFound”, “OperationNotFound”, “AzureCognitiveSearchNotFound”, “AzureCognitiveSearchIndexNotFound”, “TooManyRequests”, “AzureCognitiveSearchThrottling”, “AzureCognitiveSearchIndexLimitReached”, “InternalServerError”, “ServiceUnavailable”.

  • message (str) – Required. A human-readable representation of the error.

  • target (str) – The target of the error.

  • details (list[Error]) – An array of details about specific errors that led to this reported error.

  • innererror (InnerErrorModel) – An object containing more specific information than the current object about the error.

Keyword Arguments
  • code (str or ErrorCode) – Required. One of a server-defined set of error codes. Possible values include: “InvalidRequest”, “InvalidArgument”, “Unauthorized”, “Forbidden”, “NotFound”, “ProjectNotFound”, “OperationNotFound”, “AzureCognitiveSearchNotFound”, “AzureCognitiveSearchIndexNotFound”, “TooManyRequests”, “AzureCognitiveSearchThrottling”, “AzureCognitiveSearchIndexLimitReached”, “InternalServerError”, “ServiceUnavailable”.

  • message (str) – Required. A human-readable representation of the error.

  • target (str) – The target of the error.

  • details (list[Error]) – An array of details about specific errors that led to this reported error.

  • innererror (InnerErrorModel) – An object containing more specific information than the current object about the error.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ErrorCode(value)[source]

Human-readable error code.

AZURE_COGNITIVE_SEARCH_INDEX_LIMIT_REACHED = 'AzureCognitiveSearchIndexLimitReached'
AZURE_COGNITIVE_SEARCH_INDEX_NOT_FOUND = 'AzureCognitiveSearchIndexNotFound'
AZURE_COGNITIVE_SEARCH_NOT_FOUND = 'AzureCognitiveSearchNotFound'
AZURE_COGNITIVE_SEARCH_THROTTLING = 'AzureCognitiveSearchThrottling'
FORBIDDEN = 'Forbidden'
INTERNAL_SERVER_ERROR = 'InternalServerError'
INVALID_ARGUMENT = 'InvalidArgument'
INVALID_REQUEST = 'InvalidRequest'
NOT_FOUND = 'NotFound'
OPERATION_NOT_FOUND = 'OperationNotFound'
PROJECT_NOT_FOUND = 'ProjectNotFound'
SERVICE_UNAVAILABLE = 'ServiceUnavailable'
TOO_MANY_REQUESTS = 'TooManyRequests'
UNAUTHORIZED = 'Unauthorized'
class azure.ai.language.conversations.models.ErrorResponse(*, error: Optional[azure.ai.language.conversations.models._models_py3.Error] = None, **kwargs)[source]

Error response.

Variables

error (Error) – The error object.

Keyword Arguments

error (Error) – The error object.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.InnerErrorCode(value)[source]

Human-readable error code.

AZURE_COGNITIVE_SEARCH_NOT_FOUND = 'AzureCognitiveSearchNotFound'
AZURE_COGNITIVE_SEARCH_THROTTLING = 'AzureCognitiveSearchThrottling'
EXTRACTION_FAILURE = 'ExtractionFailure'
INVALID_PARAMETER_VALUE = 'InvalidParameterValue'
INVALID_REQUEST = 'InvalidRequest'
KNOWLEDGE_BASE_NOT_FOUND = 'KnowledgeBaseNotFound'
class azure.ai.language.conversations.models.InnerErrorModel(*, code: str, message: str, details: Optional[Dict[str, str]] = None, target: Optional[str] = None, innererror: Optional[azure.ai.language.conversations.models._models_py3.InnerErrorModel] = None, **kwargs)[source]

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

All required parameters must be populated in order to send to Azure.

Variables
  • code (str or InnerErrorCode) – Required. One of a server-defined set of error codes. Possible values include: “InvalidRequest”, “InvalidParameterValue”, “KnowledgeBaseNotFound”, “AzureCognitiveSearchNotFound”, “AzureCognitiveSearchThrottling”, “ExtractionFailure”.

  • message (str) – Required. Error message.

  • details (dict[str, str]) – Error details.

  • target (str) – Error target.

  • innererror (InnerErrorModel) – An object containing more specific information than the current object about the error.

Keyword Arguments
  • code (str or InnerErrorCode) – Required. One of a server-defined set of error codes. Possible values include: “InvalidRequest”, “InvalidParameterValue”, “KnowledgeBaseNotFound”, “AzureCognitiveSearchNotFound”, “AzureCognitiveSearchThrottling”, “ExtractionFailure”.

  • message (str) – Required. Error message.

  • details (dict[str, str]) – Error details.

  • target (str) – Error target.

  • innererror (InnerErrorModel) – An object containing more specific information than the current object about the error.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.KnowledgeBaseAnswer(*, questions: Optional[List[str]] = None, answer: Optional[str] = None, confidence_score: Optional[float] = None, id: Optional[int] = None, source: Optional[str] = None, metadata: Optional[Dict[str, str]] = None, dialog: Optional[azure.ai.language.conversations.models._models_py3.KnowledgeBaseAnswerDialog] = None, answer_span: Optional[azure.ai.language.conversations.models._models_py3.AnswerSpan] = None, **kwargs)[source]

Represents knowledge base answer.

Variables
  • questions (list[str]) – List of questions associated with the answer.

  • answer (str) – Answer text.

  • confidence_score (float) – Answer confidence score, value ranges from 0 to 1.

  • id (int) – ID of the QnA result.

  • source (str) – Source of QnA result.

  • metadata (dict[str, str]) – Metadata associated with the answer, useful to categorize or filter question answers.

  • dialog (KnowledgeBaseAnswerDialog) – Dialog associated with Answer.

  • answer_span (AnswerSpan) – Answer span object of QnA with respect to user’s question.

Keyword Arguments
  • questions (list[str]) – List of questions associated with the answer.

  • answer (str) – Answer text.

  • confidence_score (float) – Answer confidence score, value ranges from 0 to 1.

  • id (int) – ID of the QnA result.

  • source (str) – Source of QnA result.

  • metadata (dict[str, str]) – Metadata associated with the answer, useful to categorize or filter question answers.

  • dialog (KnowledgeBaseAnswerDialog) – Dialog associated with Answer.

  • answer_span (AnswerSpan) – Answer span object of QnA with respect to user’s question.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.KnowledgeBaseAnswerDialog(*, is_context_only: Optional[bool] = None, prompts: Optional[List[azure.ai.language.conversations.models._models_py3.KnowledgeBaseAnswerPrompt]] = None, **kwargs)[source]

Dialog associated with Answer.

Variables
  • is_context_only (bool) – To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result.

  • prompts (list[KnowledgeBaseAnswerPrompt]) – List of prompts associated with the answer.

Keyword Arguments
  • is_context_only (bool) – To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result.

  • prompts (list[KnowledgeBaseAnswerPrompt]) – List of prompts associated with the answer.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.KnowledgeBaseAnswerPrompt(*, display_order: Optional[int] = None, qna_id: Optional[int] = None, display_text: Optional[str] = None, **kwargs)[source]

Prompt for an answer.

Variables
  • display_order (int) – Index of the prompt - used in ordering of the prompts.

  • qna_id (int) – QnA ID corresponding to the prompt.

  • display_text (str) – Text displayed to represent a follow up question prompt.

Keyword Arguments
  • display_order (int) – Index of the prompt - used in ordering of the prompts.

  • qna_id (int) – QnA ID corresponding to the prompt.

  • display_text (str) – Text displayed to represent a follow up question prompt.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.KnowledgeBaseAnswers(*, answers: Optional[List[azure.ai.language.conversations.models._models_py3.KnowledgeBaseAnswer]] = None, **kwargs)[source]

Represents List of Question Answers.

Variables

answers (list[KnowledgeBaseAnswer]) – Represents Answer Result list.

Keyword Arguments

answers (list[KnowledgeBaseAnswer]) – Represents Answer Result list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.LUISCallingOptions(*, verbose: Optional[bool] = None, log: Optional[bool] = None, show_all_intents: Optional[bool] = None, timezone_offset: Optional[float] = None, spell_check: Optional[bool] = None, bing_spell_check_subscription_key: Optional[str] = None, **kwargs)[source]

This customizes how the service calls LUIS Generally Available projects.

Variables
  • verbose (bool) – Enable verbose response.

  • log (bool) – Save log to add in training utterances later.

  • show_all_intents (bool) – Set true to show all intents.

  • timezone_offset (float) – The timezone offset for the location of the request.

  • spell_check (bool) – Enable spell checking.

  • bing_spell_check_subscription_key (str) – The subscription key to use when enabling Bing spell check.

Keyword Arguments
  • verbose (bool) – Enable verbose response.

  • log (bool) – Save log to add in training utterances later.

  • show_all_intents (bool) – Set true to show all intents.

  • timezone_offset (float) – The timezone offset for the location of the request.

  • spell_check (bool) – Enable spell checking.

  • bing_spell_check_subscription_key (str) – The subscription key to use when enabling Bing spell check.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.LUISParameters(*, api_version: Optional[str] = None, additional_properties: Optional[Dict[str, Any]] = None, query: Optional[str] = None, calling_options: Optional[azure.ai.language.conversations.models._models_py3.LUISCallingOptions] = None, **kwargs)[source]

This is a set of request parameters for LUIS Generally Available projects.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. The type of a target service.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version to use when call a specific target service.

  • additional_properties (dict[str, any]) – Unmatched properties from the message are deserialized to this collection.

  • query (str) – The utterance to predict.

  • calling_options (LUISCallingOptions) – This customizes how the service calls LUIS Generally Available projects.

Keyword Arguments
  • api_version (str) – The API version to use when call a specific target service.

  • additional_properties (dict[str, any]) – Unmatched properties from the message are deserialized to this collection.

  • query (str) – The utterance to predict.

  • calling_options (LUISCallingOptions) – This customizes how the service calls LUIS Generally Available projects.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.LUISTargetIntentResult(*, confidence_score: float, api_version: Optional[str] = None, result: Optional[Any] = None, **kwargs)[source]

It is a wrap up of LUIS Generally Available response.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. This discriminator property specifies the type of the target project that returns the response.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

  • result (any) – The actual response from a LUIS Generally Available application.

Keyword Arguments
  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

  • result (any) – The actual response from a LUIS Generally Available application.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.NoneLinkedTargetIntentResult(*, confidence_score: float, api_version: Optional[str] = None, result: Optional[azure.ai.language.conversations.models._models_py3.ConversationResult] = None, **kwargs)[source]

A wrap up of non-linked intent response.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. This discriminator property specifies the type of the target project that returns the response.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

  • result (ConversationResult) – The actual response from a Conversation project.

Keyword Arguments
  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

  • result (ConversationResult) – The actual response from a Conversation project.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.OrchestratorPrediction(*, intents: Dict[str, azure.ai.language.conversations.models._models_py3.TargetIntentResult], top_intent: Optional[str] = None, **kwargs)[source]

This represents the prediction result of an Orchestrator project.

All required parameters must be populated in order to send to Azure.

Variables
  • project_kind (str or ProjectKind) – Required. The type of the project.Constant filled by server. Possible values include: “conversation”, “workflow”.

  • top_intent (str) – The intent with the highest score.

  • intents (dict[str, TargetIntentResult]) – Required. A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent’s value also contains the actual response from the target project.

Keyword Arguments
  • top_intent (str) – The intent with the highest score.

  • intents (dict[str, TargetIntentResult]) – Required. A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent’s value also contains the actual response from the target project.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.ProjectKind(value)[source]

The type of the project.

CONVERSATION = 'conversation'
WORKFLOW = 'workflow'
class azure.ai.language.conversations.models.QuestionAnsweringParameters(*, api_version: Optional[str] = None, calling_options: Optional[Any] = None, **kwargs)[source]

This is a set of request parameters for Question Answering knowledge bases.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. The type of a target service.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version to use when call a specific target service.

  • calling_options (any) – The options sent to a Question Answering KB.

Keyword Arguments
  • api_version (str) – The API version to use when call a specific target service.

  • calling_options (any) – The options sent to a Question Answering KB.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.QuestionAnsweringTargetIntentResult(*, confidence_score: float, api_version: Optional[str] = None, result: Optional[azure.ai.language.conversations.models._models_py3.KnowledgeBaseAnswers] = None, **kwargs)[source]

It is a wrap up a Question Answering KB response.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. This discriminator property specifies the type of the target project that returns the response.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

  • result (KnowledgeBaseAnswers) – The generated answer by a Question Answering KB.

Keyword Arguments
  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

  • result (KnowledgeBaseAnswers) – The generated answer by a Question Answering KB.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.TargetIntentResult(*, confidence_score: float, api_version: Optional[str] = None, **kwargs)[source]

This is the base class of an intent prediction.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ConversationTargetIntentResult, LUISTargetIntentResult, NoneLinkedTargetIntentResult, QuestionAnsweringTargetIntentResult.

All required parameters must be populated in order to send to Azure.

Variables
  • target_kind (str or TargetKind) – Required. This discriminator property specifies the type of the target project that returns the response.Constant filled by server. Possible values include: “luis”, “conversation”, “question_answering”, “non_linked”.

  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

Keyword Arguments
  • api_version (str) – The API version used to call a target service.

  • confidence_score (float) – Required. The prediction score and it ranges from 0.0 to 1.0.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.language.conversations.models.TargetKind(value)[source]

The type of a target service.

CONVERSATION = 'conversation'
LUIS = 'luis'
NON_LINKED = 'non_linked'
QUESTION_ANSWERING = 'question_answering'