From 1590f93219ddf3e7f8b2c9486275b8fc9b818820 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 24 Apr 2019 07:58:53 -0700 Subject: [PATCH] [AutoPR] cognitiveservices/data-plane/LUIS/Runtime (#4260) * [AutoPR cognitiveservices/data-plane/LUIS/Runtime] Add dispatch child to LUIS Runtime response (#4245) * Generated from 59e0c9edb7b7859abb45c76c118343b7998eb5c0 Add dispatch child to LUIS Runtime response * Packaging update of azure-cognitiveservices-language-luis * [AutoPR cognitiveservices/data-plane/LUIS/Runtime] LUIS runtime changes (#4611) * Generated from faaca6c0dec3efe45b35a48607afa09ed360645a LUIS runtime changes * Packaging update of azure-cognitiveservices-language-luis * Generated from 1e7415ddfdb783e444a35846cf77aeedce475373 Reverting some changes * Packaging update of azure-cognitiveservices-language-luis --- .../MANIFEST.in | 5 +++++ .../README.rst | 19 ------------------- .../luis/runtime/models/luis_result.py | 7 ++++++- .../luis/runtime/models/luis_result_py3.py | 9 +++++++-- .../operations/prediction_operations.py | 2 +- .../setup.py | 2 ++ 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/azure-cognitiveservices-language-luis/MANIFEST.in b/azure-cognitiveservices-language-luis/MANIFEST.in index bb37a2723dae..8d9b981dde9c 100644 --- a/azure-cognitiveservices-language-luis/MANIFEST.in +++ b/azure-cognitiveservices-language-luis/MANIFEST.in @@ -1 +1,6 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/cognitiveservices/__init__.py +include azure/cognitiveservices/language/__init__.py + diff --git a/azure-cognitiveservices-language-luis/README.rst b/azure-cognitiveservices-language-luis/README.rst index 33f66f518c17..c14ef3756354 100644 --- a/azure-cognitiveservices-language-luis/README.rst +++ b/azure-cognitiveservices-language-luis/README.rst @@ -8,25 +8,6 @@ This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result.py index 15b9ac3de342..7dfd35e8aa1f 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result.py @@ -15,7 +15,7 @@ class LuisResult(Model): """Prediction, based on the input query, containing intent(s) and entities. - :param query: The input utterance that was analized. + :param query: The input utterance that was analyzed. :type query: str :param altered_query: The corrected utterance (when spell checking was enabled). @@ -37,6 +37,9 @@ class LuisResult(Model): :param sentiment_analysis: :type sentiment_analysis: ~azure.cognitiveservices.language.luis.runtime.models.Sentiment + :param connected_service_result: + :type connected_service_result: + ~azure.cognitiveservices.language.luis.runtime.models.LuisResult """ _attribute_map = { @@ -47,6 +50,7 @@ class LuisResult(Model): 'entities': {'key': 'entities', 'type': '[EntityModel]'}, 'composite_entities': {'key': 'compositeEntities', 'type': '[CompositeEntityModel]'}, 'sentiment_analysis': {'key': 'sentimentAnalysis', 'type': 'Sentiment'}, + 'connected_service_result': {'key': 'connectedServiceResult', 'type': 'LuisResult'}, } def __init__(self, **kwargs): @@ -58,3 +62,4 @@ def __init__(self, **kwargs): self.entities = kwargs.get('entities', None) self.composite_entities = kwargs.get('composite_entities', None) self.sentiment_analysis = kwargs.get('sentiment_analysis', None) + self.connected_service_result = kwargs.get('connected_service_result', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result_py3.py index 180a2aaf6114..6c14b42dc8d3 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result_py3.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/models/luis_result_py3.py @@ -15,7 +15,7 @@ class LuisResult(Model): """Prediction, based on the input query, containing intent(s) and entities. - :param query: The input utterance that was analized. + :param query: The input utterance that was analyzed. :type query: str :param altered_query: The corrected utterance (when spell checking was enabled). @@ -37,6 +37,9 @@ class LuisResult(Model): :param sentiment_analysis: :type sentiment_analysis: ~azure.cognitiveservices.language.luis.runtime.models.Sentiment + :param connected_service_result: + :type connected_service_result: + ~azure.cognitiveservices.language.luis.runtime.models.LuisResult """ _attribute_map = { @@ -47,9 +50,10 @@ class LuisResult(Model): 'entities': {'key': 'entities', 'type': '[EntityModel]'}, 'composite_entities': {'key': 'compositeEntities', 'type': '[CompositeEntityModel]'}, 'sentiment_analysis': {'key': 'sentimentAnalysis', 'type': 'Sentiment'}, + 'connected_service_result': {'key': 'connectedServiceResult', 'type': 'LuisResult'}, } - def __init__(self, *, query: str=None, altered_query: str=None, top_scoring_intent=None, intents=None, entities=None, composite_entities=None, sentiment_analysis=None, **kwargs) -> None: + def __init__(self, *, query: str=None, altered_query: str=None, top_scoring_intent=None, intents=None, entities=None, composite_entities=None, sentiment_analysis=None, connected_service_result=None, **kwargs) -> None: super(LuisResult, self).__init__(**kwargs) self.query = query self.altered_query = altered_query @@ -58,3 +62,4 @@ def __init__(self, *, query: str=None, altered_query: str=None, top_scoring_inte self.entities = entities self.composite_entities = composite_entities self.sentiment_analysis = sentiment_analysis + self.connected_service_result = connected_service_result diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/prediction_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/prediction_operations.py index 295ea6133f3d..77912c1616a8 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/prediction_operations.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/runtime/operations/prediction_operations.py @@ -53,7 +53,7 @@ def resolve( :param spell_check: Enable spell checking. :type spell_check: bool :param bing_spell_check_subscription_key: The subscription key to use - when enabling bing spell check + when enabling Bing spell check :type bing_spell_check_subscription_key: str :param log: Log query (default is true) :type log: bool diff --git a/azure-cognitiveservices-language-luis/setup.py b/azure-cognitiveservices-language-luis/setup.py index c47a8246eabf..aeaf30f818b2 100644 --- a/azure-cognitiveservices-language-luis/setup.py +++ b/azure-cognitiveservices-language-luis/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -79,6 +80,7 @@ ]), install_requires=[ 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], extras_require={