azure.ai.language.conversations.models package

class azure.ai.language.conversations.models.AgeResolution(*, value: float, unit: Union[str, _models.AgeUnit], **kwargs)[source]

Represents the Age entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • unit (str or AgeUnit) – Required. The Age Unit of measurement. Known values are: “Unspecified”, “Year”, “Month”, “Week”, “Day”.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • unit (str or AgeUnit) – Required. The Age Unit of measurement. Known values are: “Unspecified”, “Year”, “Month”, “Week”, “Day”.

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.AgeUnit(value)[source]

The Age Unit of measurement

DAY = 'Day'
MONTH = 'Month'
UNSPECIFIED = 'Unspecified'
WEEK = 'Week'
YEAR = 'Year'
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. Known values are: “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: _models.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 in BCP 47 language representation..

  • 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 in BCP 47 language representation..

  • 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.AnalyzeConversationTask(**kwargs)[source]

The base class of a conversation input task.

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

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

Variables

kind (str or AnalyzeConversationTaskKind) – Required. Enumeration of supported Conversation tasks.Constant filled by server. Known values are: “CustomConversation”.

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.AnalyzeConversationTaskKind(value)[source]

Enumeration of supported Conversation tasks.

CUSTOM_CONVERSATION = 'CustomConversation'
class azure.ai.language.conversations.models.AnalyzeConversationTaskResult(**kwargs)[source]

The base class of a conversation task result.

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

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

Variables

kind (str or AnalyzeConversationTaskResultsKind) – Required. Enumeration of supported conversational task results.Constant filled by server. Known values are: “CustomConversationResult”.

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.AnalyzeConversationTaskResultsKind(value)[source]

Enumeration of supported conversational task results

CUSTOM_CONVERSATION_RESULT = 'CustomConversationResult'
class azure.ai.language.conversations.models.AnswerSpan(*, text: Optional[str] = None, confidence: 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 (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 (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.AreaResolution(*, value: float, unit: Union[str, _models.AreaUnit], **kwargs)[source]

Represents the area entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • unit (str or AreaUnit) – Required. The area Unit of measurement. Known values are: “Unspecified”, “SquareKilometer”, “SquareHectometer”, “SquareDecameter”, “SquareDecimeter”, “SquareMeter”, “SquareCentimeter”, “SquareMillimeter”, “SquareInch”, “SquareFoot”, “SquareMile”, “SquareYard”, “Acre”.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • unit (str or AreaUnit) – Required. The area Unit of measurement. Known values are: “Unspecified”, “SquareKilometer”, “SquareHectometer”, “SquareDecameter”, “SquareDecimeter”, “SquareMeter”, “SquareCentimeter”, “SquareMillimeter”, “SquareInch”, “SquareFoot”, “SquareMile”, “SquareYard”, “Acre”.

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.AreaUnit(value)[source]

The area Unit of measurement

ACRE = 'Acre'
SQUARE_CENTIMETER = 'SquareCentimeter'
SQUARE_DECAMETER = 'SquareDecameter'
SQUARE_DECIMETER = 'SquareDecimeter'
SQUARE_FOOT = 'SquareFoot'
SQUARE_HECTOMETER = 'SquareHectometer'
SQUARE_INCH = 'SquareInch'
SQUARE_KILOMETER = 'SquareKilometer'
SQUARE_METER = 'SquareMeter'
SQUARE_MILE = 'SquareMile'
SQUARE_MILLIMETER = 'SquareMillimeter'
SQUARE_YARD = 'SquareYard'
UNSPECIFIED = 'Unspecified'
class azure.ai.language.conversations.models.BaseExtraInformation(**kwargs)[source]

The abstract base object for entity extra information.

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

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

Variables

extra_information_kind (str or ExtraInformationKind) – Required. The extra information object kind.Constant filled by server. Known values are: “EntitySubtype”, “ListKey”.

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. Known values are: “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.BaseResolution(**kwargs)[source]

The abstract base class for entity resolutions.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: AgeResolution, AreaResolution, BooleanResolution, CurrencyResolution, DateTimeResolution, InformationResolution, LengthResolution, NumberResolution, NumericRangeResolution, OrdinalResolution, SpeedResolution, TemperatureResolution, TemporalSpanResolution, VolumeResolution, WeightResolution.

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

Variables

resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

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.BooleanResolution(*, value: bool, **kwargs)[source]

A resolution for boolean expressions.

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

Variables
  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • value (bool) – Required.

Keyword Arguments

value (bool) – Required.

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(*, conversation_item: _models.ConversationItemBase, **kwargs)[source]

The input ConversationItem and its optional parameters.

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

Variables

conversation_item (ConversationItemBase) – Required. The abstract base for a user input formatted conversation (e.g., Text, Transcript).

Keyword Arguments

conversation_item (ConversationItemBase) – Required. The abstract base for a user input formatted conversation (e.g., Text, Transcript).

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 in BCP 47 language representation..

  • 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 in BCP 47 language representation..

  • 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: float, resolutions: Optional[List[_models.BaseResolution]] = None, extra_information: Optional[List[_models.BaseExtraInformation]] = 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 (float) – Required. The entity confidence score.

  • resolutions (list[BaseResolution]) – The collection of entity resolution objects.

  • extra_information (list[BaseExtraInformation]) – The collection of entity extra information objects.

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 (float) – Required. The entity confidence score.

  • resolutions (list[BaseResolution]) – The collection of entity resolution objects.

  • extra_information (list[BaseExtraInformation]) – The collection of entity extra information objects.

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: 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 (float) – Required. The confidence score of the class from 0.0 to 1.0.

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

  • confidence (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.ConversationItemBase(*, participant_id: str = '1', id: str = '1', language: Optional[str] = None, **kwargs)[source]

The abstract base for a user input formatted conversation (e.g., Text, Transcript).

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

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

Variables
  • participant_id (str) – Required. The participant Id of a ConversationItem.

  • id (str) – Required. The Id of a ConversationItem.

  • language (str) – The input language of a ConversationItem in BCP 47 language representation.

  • modality (str or Modality) – Required. The modality (format) of ConversationItem (e.g., Text, Transcript).Constant filled by server. Known values are: “text”.

Keyword Arguments
  • participant_id (str) – Required. The participant Id of a ConversationItem.

  • id (str) – Required. The Id of a ConversationItem.

  • language (str) – The input language of a ConversationItem in BCP 47 language representation.

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[_models.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. Known values are: “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[_models.ConversationIntent], entities: List[_models.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. Known values are: “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: _models.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 in BCP 47 language representation..

  • 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 in BCP 47 language representation..

  • 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: float, api_version: Optional[str] = None, result: Optional[_models.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. Known values are: “luis”, “conversation”, “question_answering”, “non_linked”.

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

  • confidence (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 (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.CurrencyResolution(*, value: float, unit: str, iso4217: Optional[str] = None, **kwargs)[source]

Represents the currency entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • iso4217 (str) – The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name.

  • unit (str) – Required. The unit of the amount captured in the extracted entity.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • iso4217 (str) – The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name.

  • unit (str) – Required. The unit of the amount captured in the extracted entity.

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.CustomConversationTaskParameters(*, project_name: str, deployment_name: str, verbose: Optional[bool] = None, is_logging_enabled: Optional[bool] = None, direct_target: Optional[str] = None, target_project_parameters: Optional[Dict[str, _models.AnalysisParameters]] = None, **kwargs)[source]

Input parameters necessary for a CustomConversation task.

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

Variables
  • project_name (str) – Required. The name of the project to use.

  • deployment_name (str) – Required. The name of the deployment to use.

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

  • is_logging_enabled (bool) – If true, the service will keep the query for further review.

  • direct_target (str) – The name of a target project to forward the request to.

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

Keyword Arguments
  • project_name (str) – Required. The name of the project to use.

  • deployment_name (str) – Required. The name of the deployment to use.

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

  • is_logging_enabled (bool) – If true, the service will keep the query for further review.

  • direct_target (str) – The name of a target project to forward the request to.

  • target_project_parameters (dict[str, AnalysisParameters]) – A dictionary representing the parameters 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.CustomConversationalTask(*, analysis_input: _models.ConversationAnalysisOptions, parameters: _models.CustomConversationTaskParameters, **kwargs)[source]

The input for a custom conversation task.

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

Variables
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.CustomConversationalTaskResult(*, results: _models.AnalyzeConversationResult, **kwargs)[source]

The results of a CustomConversation task.

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

Variables
Keyword Arguments

results (AnalyzeConversationResult) – Required. Represents a conversation analysis response.

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.DateTimeResolution(*, timex: str, date_time_sub_kind: Union[str, _models.DateTimeSubKind], value: str, modifier: Optional[Union[str, _models.Modifier]] = None, **kwargs)[source]

A resolution for datetime entity instances.

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

Variables
  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • timex (str) – Required. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml).

  • date_time_sub_kind (str or DateTimeSubKind) – Required. The DateTime SubKind. Known values are: “Time”, “Date”, “DateTime”, “Duration”, “Set”.

  • value (str) – Required. The actual time that the extracted text denote.

  • modifier (str or Modifier) – An optional modifier of a date/time instance. Known values are: “AfterApprox”, “Before”, “BeforeStart”, “Approx”, “ReferenceUndefined”, “SinceEnd”, “AfterMid”, “Start”, “After”, “BeforeEnd”, “Until”, “End”, “Less”, “Since”, “AfterStart”, “BeforeApprox”, “Mid”, “More”.

Keyword Arguments
  • timex (str) – Required. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml).

  • date_time_sub_kind (str or DateTimeSubKind) – Required. The DateTime SubKind. Known values are: “Time”, “Date”, “DateTime”, “Duration”, “Set”.

  • value (str) – Required. The actual time that the extracted text denote.

  • modifier (str or Modifier) – An optional modifier of a date/time instance. Known values are: “AfterApprox”, “Before”, “BeforeStart”, “Approx”, “ReferenceUndefined”, “SinceEnd”, “AfterMid”, “Start”, “After”, “BeforeEnd”, “Until”, “End”, “Less”, “Since”, “AfterStart”, “BeforeApprox”, “Mid”, “More”.

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.DateTimeSubKind(value)[source]

The DateTime SubKind

DATE = 'Date'
DATE_TIME = 'DateTime'
DURATION = 'Duration'
SET = 'Set'
TIME = 'Time'
class azure.ai.language.conversations.models.EntitySubtype(*, value: Optional[str] = None, **kwargs)[source]

The concrete entity Subtype model of extra information.

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

Variables
  • extra_information_kind (str or ExtraInformationKind) – Required. The extra information object kind.Constant filled by server. Known values are: “EntitySubtype”, “ListKey”.

  • value (str) – The Subtype of an extracted entity type.

Keyword Arguments

value (str) – The Subtype of an extracted entity type.

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: Union[str, _models.ErrorCode], message: str, additional_properties: Optional[Dict[str, Any]] = None, target: Optional[str] = None, details: Optional[List[_models.Error]] = None, innererror: Optional[_models.InnerErrorModel] = None, **kwargs)[source]

The error object.

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

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

  • code (str or ErrorCode) – Required. One of a server-defined set of error codes. Known values are: “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
  • additional_properties (dict[str, any]) – Unmatched properties from the message are deserialized to this collection.

  • code (str or ErrorCode) – Required. One of a server-defined set of error codes. Known values are: “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: _models.Error, **kwargs)[source]

Error response.

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

Variables

error (Error) – Required. The error object.

Keyword Arguments

error (Error) – Required. 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.ExtraInformationKind(value)[source]

The extra information object kind.

ENTITY_SUBTYPE = 'EntitySubtype'
LIST_KEY = 'ListKey'
class azure.ai.language.conversations.models.InformationResolution(*, value: float, unit: Union[str, _models.InformationUnit], **kwargs)[source]

Represents the information (data) entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • unit (str or InformationUnit) – Required. The information (data) Unit of measurement. Known values are: “Unspecified”, “Bit”, “Kilobit”, “Megabit”, “Gigabit”, “Terabit”, “Petabit”, “Byte”, “Kilobyte”, “Megabyte”, “Gigabyte”, “Terabyte”, “Petabyte”.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • unit (str or InformationUnit) – Required. The information (data) Unit of measurement. Known values are: “Unspecified”, “Bit”, “Kilobit”, “Megabit”, “Gigabit”, “Terabit”, “Petabit”, “Byte”, “Kilobyte”, “Megabyte”, “Gigabyte”, “Terabyte”, “Petabyte”.

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.InformationUnit(value)[source]

The information (data) Unit of measurement.

BIT = 'Bit'
BYTE = 'Byte'
GIGABIT = 'Gigabit'
GIGABYTE = 'Gigabyte'
KILOBIT = 'Kilobit'
KILOBYTE = 'Kilobyte'
MEGABIT = 'Megabit'
MEGABYTE = 'Megabyte'
PETABIT = 'Petabit'
PETABYTE = 'Petabyte'
TERABIT = 'Terabit'
TERABYTE = 'Terabyte'
UNSPECIFIED = 'Unspecified'
class azure.ai.language.conversations.models.InnerErrorCode(value)[source]

Human-readable error code.

AZURE_COGNITIVE_SEARCH_NOT_FOUND = 'AzureCognitiveSearchNotFound'
AZURE_COGNITIVE_SEARCH_THROTTLING = 'AzureCognitiveSearchThrottling'
EMPTY_REQUEST = 'EmptyRequest'
EXTRACTION_FAILURE = 'ExtractionFailure'
INVALID_COUNTRY_HINT = 'InvalidCountryHint'
INVALID_DOCUMENT = 'InvalidDocument'
INVALID_DOCUMENT_BATCH = 'InvalidDocumentBatch'
INVALID_PARAMETER_VALUE = 'InvalidParameterValue'
INVALID_REQUEST = 'InvalidRequest'
INVALID_REQUEST_BODY_FORMAT = 'InvalidRequestBodyFormat'
KNOWLEDGE_BASE_NOT_FOUND = 'KnowledgeBaseNotFound'
MISSING_INPUT_DOCUMENTS = 'MissingInputDocuments'
MODEL_VERSION_INCORRECT = 'ModelVersionIncorrect'
UNSUPPORTED_LANGUAGE_CODE = 'UnsupportedLanguageCode'
class azure.ai.language.conversations.models.InnerErrorModel(*, code: Union[str, _models.InnerErrorCode], message: str, details: Optional[Dict[str, str]] = None, target: Optional[str] = None, innererror: Optional[_models.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. Known values are: “InvalidRequest”, “InvalidParameterValue”, “KnowledgeBaseNotFound”, “AzureCognitiveSearchNotFound”, “AzureCognitiveSearchThrottling”, “ExtractionFailure”, “InvalidRequestBodyFormat”, “EmptyRequest”, “MissingInputDocuments”, “InvalidDocument”, “ModelVersionIncorrect”, “InvalidDocumentBatch”, “UnsupportedLanguageCode”, “InvalidCountryHint”.

  • 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. Known values are: “InvalidRequest”, “InvalidParameterValue”, “KnowledgeBaseNotFound”, “AzureCognitiveSearchNotFound”, “AzureCognitiveSearchThrottling”, “ExtractionFailure”, “InvalidRequestBodyFormat”, “EmptyRequest”, “MissingInputDocuments”, “InvalidDocument”, “ModelVersionIncorrect”, “InvalidDocumentBatch”, “UnsupportedLanguageCode”, “InvalidCountryHint”.

  • 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: Optional[float] = None, id: Optional[int] = None, source: Optional[str] = None, metadata: Optional[Dict[str, str]] = None, dialog: Optional[_models.KnowledgeBaseAnswerDialog] = None, answer_span: Optional[_models.AnswerSpan] = None, **kwargs)[source]

Represents knowledge base answer.

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

  • answer (str) – Answer text.

  • confidence (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 (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[_models.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[_models.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[_models.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. Known values are: “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: 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. Known values are: “luis”, “conversation”, “question_answering”, “non_linked”.

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

  • confidence (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 (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.LengthResolution(*, value: float, unit: Union[str, _models.LengthUnit], **kwargs)[source]

Represents the length entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • unit (str or LengthUnit) – Required. The length Unit of measurement. Known values are: “Unspecified”, “Kilometer”, “Hectometer”, “Decameter”, “Meter”, “Decimeter”, “Centimeter”, “Millimeter”, “Micrometer”, “Nanometer”, “Picometer”, “Mile”, “Yard”, “Inch”, “Foot”, “LightYear”, “Pt”.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • unit (str or LengthUnit) – Required. The length Unit of measurement. Known values are: “Unspecified”, “Kilometer”, “Hectometer”, “Decameter”, “Meter”, “Decimeter”, “Centimeter”, “Millimeter”, “Micrometer”, “Nanometer”, “Picometer”, “Mile”, “Yard”, “Inch”, “Foot”, “LightYear”, “Pt”.

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.LengthUnit(value)[source]

The length Unit of measurement

CENTIMETER = 'Centimeter'
DECAMETER = 'Decameter'
DECIMETER = 'Decimeter'
FOOT = 'Foot'
HECTOMETER = 'Hectometer'
INCH = 'Inch'
KILOMETER = 'Kilometer'
LIGHT_YEAR = 'LightYear'
METER = 'Meter'
MICROMETER = 'Micrometer'
MILE = 'Mile'
MILLIMETER = 'Millimeter'
NANOMETER = 'Nanometer'
PICOMETER = 'Picometer'
PT = 'Pt'
UNSPECIFIED = 'Unspecified'
YARD = 'Yard'
class azure.ai.language.conversations.models.ListKey(*, key: Optional[str] = None, **kwargs)[source]

The list key extra data kind.

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

Variables
  • extra_information_kind (str or ExtraInformationKind) – Required. The extra information object kind.Constant filled by server. Known values are: “EntitySubtype”, “ListKey”.

  • key (str) – The canonical form of the extracted entity.

Keyword Arguments

key (str) – The canonical form of the extracted entity.

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.Modality(value)[source]

The modality (format) of ConversationItem (e.g., Text, Transcript)

TEXT = 'text'
class azure.ai.language.conversations.models.Modifier(value)[source]

An optional modifier of a date/time instance.

AFTER = 'After'
AFTER_APPROX = 'AfterApprox'
AFTER_MID = 'AfterMid'
AFTER_START = 'AfterStart'
APPROX = 'Approx'
BEFORE = 'Before'
BEFORE_APPROX = 'BeforeApprox'
BEFORE_END = 'BeforeEnd'
BEFORE_START = 'BeforeStart'
END = 'End'
LESS = 'Less'
MID = 'Mid'
MORE = 'More'
REFERENCE_UNDEFINED = 'ReferenceUndefined'
SINCE = 'Since'
SINCE_END = 'SinceEnd'
START = 'Start'
UNTIL = 'Until'
class azure.ai.language.conversations.models.NoneLinkedTargetIntentResult(*, confidence: float, api_version: Optional[str] = None, result: Optional[_models.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. Known values are: “luis”, “conversation”, “question_answering”, “non_linked”.

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

  • confidence (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 (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.NumberKind(value)[source]

The type of the extracted number entity.

DECIMAL = 'Decimal'
FRACTION = 'Fraction'
INTEGER = 'Integer'
PERCENT = 'Percent'
POWER = 'Power'
UNSPECIFIED = 'Unspecified'
class azure.ai.language.conversations.models.NumberResolution(*, number_kind: Union[str, _models.NumberKind], value: str, **kwargs)[source]

A resolution for numeric entity instances.

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

Variables
  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • number_kind (str or NumberKind) – Required. The type of the extracted number entity. Known values are: “Integer”, “Decimal”, “Power”, “Fraction”, “Percent”, “Unspecified”.

  • value (str) – Required. A numeric representation of what the extracted text denotes.

Keyword Arguments
  • number_kind (str or NumberKind) – Required. The type of the extracted number entity. Known values are: “Integer”, “Decimal”, “Power”, “Fraction”, “Percent”, “Unspecified”.

  • value (str) – Required. A numeric representation of what the extracted text denotes.

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.NumericRangeResolution(*, range_kind: Union[str, _models.RangeKind], minimum: float, maximum: float, **kwargs)[source]

represents the resolution of numeric intervals.

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

Variables
  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • range_kind (str or RangeKind) – Required. The kind of range that the resolution object represents. Known values are: “Number”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”.

  • minimum (float) – Required. The beginning value of the interval.

  • maximum (float) – Required. The ending value of the interval.

Keyword Arguments
  • range_kind (str or RangeKind) – Required. The kind of range that the resolution object represents. Known values are: “Number”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”.

  • minimum (float) – Required. The beginning value of the interval.

  • maximum (float) – Required. The ending value of the interval.

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, _models.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. Known values are: “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.OrdinalResolution(*, offset: str, relative_to: Union[str, _models.RelativeTo], value: str, **kwargs)[source]

A resolution for ordinal numbers entity instances.

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

Variables
  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • offset (str) – Required. The offset With respect to the reference (e.g., offset = -1 in “show me the second to last”.

  • relative_to (str or RelativeTo) – Required. The reference point that the ordinal number denotes. Known values are: “Current”, “End”, “Start”.

  • value (str) – Required. A simple arithmetic expression that the ordinal denotes.

Keyword Arguments
  • offset (str) – Required. The offset With respect to the reference (e.g., offset = -1 in “show me the second to last”.

  • relative_to (str or RelativeTo) – Required. The reference point that the ordinal number denotes. Known values are: “Current”, “End”, “Start”.

  • value (str) – Required. A simple arithmetic expression that the ordinal denotes.

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.QuantityResolution(*, value: float, **kwargs)[source]

represents resolutions for quantities.

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

Variables

value (float) – Required. The numeric value that the extracted text denotes.

Keyword Arguments

value (float) – Required. The numeric value that the extracted text denotes.

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.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. Known values are: “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: float, api_version: Optional[str] = None, result: Optional[_models.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. Known values are: “luis”, “conversation”, “question_answering”, “non_linked”.

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

  • confidence (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 (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.RangeKind(value)[source]

The kind of range that the resolution object represents.

AGE = 'Age'
AREA = 'Area'
CURRENCY = 'Currency'
INFORMATION = 'Information'
LENGTH = 'Length'
NUMBER = 'Number'
SPEED = 'Speed'
TEMPERATURE = 'Temperature'
VOLUME = 'Volume'
WEIGHT = 'Weight'
class azure.ai.language.conversations.models.RelativeTo(value)[source]

The reference point that the ordinal number denotes.

CURRENT = 'Current'
END = 'End'
START = 'Start'
class azure.ai.language.conversations.models.ResolutionKind(value)[source]

The entity resolution object kind.

AGE = 'Age'
AREA = 'Area'
BOOLEAN = 'Boolean'
CURRENCY = 'Currency'
DATE_TIME = 'DateTime'
INFORMATION = 'Information'
LENGTH = 'Length'
NUMBER = 'Number'
NUMERIC_RANGE = 'NumericRange'
ORDINAL = 'Ordinal'
SPEED = 'Speed'
TEMPERATURE = 'Temperature'
TEMPORAL_SPAN = 'TemporalSpan'
VOLUME = 'Volume'
WEIGHT = 'Weight'
class azure.ai.language.conversations.models.SpeedResolution(*, value: float, unit: Union[str, _models.SpeedUnit], **kwargs)[source]

Represents the speed entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • unit (str or SpeedUnit) – Required. The speed Unit of measurement. Known values are: “Unspecified”, “MetersPerSecond”, “KilometersPerHour”, “KilometersPerMinute”, “KilometersPerSecond”, “MilesPerHour”, “Knot”, “FootPerSecond”, “FootPerMinute”, “YardsPerMinute”, “YardsPerSecond”, “MetersPerMillisecond”, “CentimetersPerMillisecond”, “KilometersPerMillisecond”.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • unit (str or SpeedUnit) – Required. The speed Unit of measurement. Known values are: “Unspecified”, “MetersPerSecond”, “KilometersPerHour”, “KilometersPerMinute”, “KilometersPerSecond”, “MilesPerHour”, “Knot”, “FootPerSecond”, “FootPerMinute”, “YardsPerMinute”, “YardsPerSecond”, “MetersPerMillisecond”, “CentimetersPerMillisecond”, “KilometersPerMillisecond”.

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.SpeedUnit(value)[source]

The speed Unit of measurement

CENTIMETERS_PER_MILLISECOND = 'CentimetersPerMillisecond'
FOOT_PER_MINUTE = 'FootPerMinute'
FOOT_PER_SECOND = 'FootPerSecond'
KILOMETERS_PER_HOUR = 'KilometersPerHour'
KILOMETERS_PER_MILLISECOND = 'KilometersPerMillisecond'
KILOMETERS_PER_MINUTE = 'KilometersPerMinute'
KILOMETERS_PER_SECOND = 'KilometersPerSecond'
KNOT = 'Knot'
METERS_PER_MILLISECOND = 'MetersPerMillisecond'
METERS_PER_SECOND = 'MetersPerSecond'
MILES_PER_HOUR = 'MilesPerHour'
UNSPECIFIED = 'Unspecified'
YARDS_PER_MINUTE = 'YardsPerMinute'
YARDS_PER_SECOND = 'YardsPerSecond'
class azure.ai.language.conversations.models.TargetIntentResult(*, confidence: 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. Known values are: “luis”, “conversation”, “question_answering”, “non_linked”.

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

  • confidence (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 (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'
class azure.ai.language.conversations.models.TemperatureResolution(*, value: float, unit: Union[str, _models.TemperatureUnit], **kwargs)[source]

Represents the temperature entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • unit (str or TemperatureUnit) – Required. The temperature Unit of measurement. Known values are: “Unspecified”, “Fahrenheit”, “Kelvin”, “Rankine”, “Celsius”.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • unit (str or TemperatureUnit) – Required. The temperature Unit of measurement. Known values are: “Unspecified”, “Fahrenheit”, “Kelvin”, “Rankine”, “Celsius”.

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.TemperatureUnit(value)[source]

The temperature Unit of measurement.

CELSIUS = 'Celsius'
FAHRENHEIT = 'Fahrenheit'
KELVIN = 'Kelvin'
RANKINE = 'Rankine'
UNSPECIFIED = 'Unspecified'
class azure.ai.language.conversations.models.TemporalSpanResolution(*, begin: Optional[str] = None, end: Optional[str] = None, duration: Optional[str] = None, modifier: Optional[Union[str, _models.Modifier]] = None, **kwargs)[source]

represents the resolution of a date and/or time span.

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

Variables
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.TextConversationItem(*, participant_id: str = '1', id: str = '1', text: str, language: Optional[str] = None, **kwargs)[source]

The text modality of an input conversation.

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

Variables
  • participant_id (str) – Required. The participant Id of a ConversationItem.

  • id (str) – Required. The Id of a ConversationItem.

  • language (str) – The input language of a ConversationItem in BCP 47 language representation.

  • modality (str or Modality) – Required. The modality (format) of ConversationItem (e.g., Text, Transcript).Constant filled by server. Known values are: “text”.

  • text (str) – Required. The single input query.

Keyword Arguments
  • participant_id (str) – Required. The participant Id of a ConversationItem.

  • id (str) – Required. The Id of a ConversationItem.

  • language (str) – The input language of a ConversationItem in BCP 47 language representation.

  • text (str) – Required. The single input 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.VolumeResolution(*, value: float, unit: Union[str, _models.VolumeUnit], **kwargs)[source]

Represents the volume entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • unit (str or VolumeUnit) – Required. The Volume Unit of measurement. Known values are: “Unspecified”, “CubicMeter”, “CubicCentimeter”, “CubicMillimeter”, “Hectoliter”, “Decaliter”, “Liter”, “Centiliter”, “Milliliter”, “CubicYard”, “CubicInch”, “CubicFoot”, “CubicMile”, “FluidOunce”, “Teaspoon”, “Tablespoon”, “Pint”, “Quart”, “Cup”, “Gill”, “Pinch”, “FluidDram”, “Barrel”, “Minim”, “Cord”, “Peck”, “Bushel”, “Hogshead”.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • unit (str or VolumeUnit) – Required. The Volume Unit of measurement. Known values are: “Unspecified”, “CubicMeter”, “CubicCentimeter”, “CubicMillimeter”, “Hectoliter”, “Decaliter”, “Liter”, “Centiliter”, “Milliliter”, “CubicYard”, “CubicInch”, “CubicFoot”, “CubicMile”, “FluidOunce”, “Teaspoon”, “Tablespoon”, “Pint”, “Quart”, “Cup”, “Gill”, “Pinch”, “FluidDram”, “Barrel”, “Minim”, “Cord”, “Peck”, “Bushel”, “Hogshead”.

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.VolumeUnit(value)[source]

The Volume Unit of measurement

BARREL = 'Barrel'
BUSHEL = 'Bushel'
CENTILITER = 'Centiliter'
CORD = 'Cord'
CUBIC_CENTIMETER = 'CubicCentimeter'
CUBIC_FOOT = 'CubicFoot'
CUBIC_INCH = 'CubicInch'
CUBIC_METER = 'CubicMeter'
CUBIC_MILE = 'CubicMile'
CUBIC_MILLIMETER = 'CubicMillimeter'
CUBIC_YARD = 'CubicYard'
CUP = 'Cup'
DECALITER = 'Decaliter'
FLUID_DRAM = 'FluidDram'
FLUID_OUNCE = 'FluidOunce'
GILL = 'Gill'
HECTOLITER = 'Hectoliter'
HOGSHEAD = 'Hogshead'
LITER = 'Liter'
MILLILITER = 'Milliliter'
MINIM = 'Minim'
PECK = 'Peck'
PINCH = 'Pinch'
PINT = 'Pint'
QUART = 'Quart'
TABLESPOON = 'Tablespoon'
TEASPOON = 'Teaspoon'
UNSPECIFIED = 'Unspecified'
class azure.ai.language.conversations.models.WeightResolution(*, value: float, unit: Union[str, _models.WeightUnit], **kwargs)[source]

Represents the weight entity resolution model.

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

Variables
  • value (float) – Required. The numeric value that the extracted text denotes.

  • resolution_kind (str or ResolutionKind) – Required. The entity resolution object kind.Constant filled by server. Known values are: “Boolean”, “DateTime”, “Number”, “Ordinal”, “Speed”, “Weight”, “Length”, “Volume”, “Area”, “Age”, “Information”, “Temperature”, “Currency”, “NumericRange”, “TemporalSpan”.

  • unit (str or WeightUnit) – Required. The weight Unit of measurement. Known values are: “Unspecified”, “Kilogram”, “Gram”, “Milligram”, “Gallon”, “MetricTon”, “Ton”, “Pound”, “Ounce”, “Grain”, “PennyWeight”, “LongTonBritish”, “ShortTonUS”, “ShortHundredWeightUS”, “Stone”, “Dram”.

Keyword Arguments
  • value (float) – Required. The numeric value that the extracted text denotes.

  • unit (str or WeightUnit) – Required. The weight Unit of measurement. Known values are: “Unspecified”, “Kilogram”, “Gram”, “Milligram”, “Gallon”, “MetricTon”, “Ton”, “Pound”, “Ounce”, “Grain”, “PennyWeight”, “LongTonBritish”, “ShortTonUS”, “ShortHundredWeightUS”, “Stone”, “Dram”.

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.WeightUnit(value)[source]

The weight Unit of measurement.

DRAM = 'Dram'
GALLON = 'Gallon'
GRAIN = 'Grain'
GRAM = 'Gram'
KILOGRAM = 'Kilogram'
LONG_TON_BRITISH = 'LongTonBritish'
METRIC_TON = 'MetricTon'
MILLIGRAM = 'Milligram'
OUNCE = 'Ounce'
PENNY_WEIGHT = 'PennyWeight'
POUND = 'Pound'
SHORT_HUNDRED_WEIGHT_US = 'ShortHundredWeightUS'
SHORT_TON_US = 'ShortTonUS'
STONE = 'Stone'
TON = 'Ton'
UNSPECIFIED = 'Unspecified'