Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR cognitiveservices/data-plane/LUIS/Authoring] Add ErrorResponse to "AddIntent" post #4940

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ClosedListEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ClosedListEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class CompositeEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class CompositeEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class CustomPrebuiltModel(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param custom_prebuilt_domain_name: The domain name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class CustomPrebuiltModel(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param custom_prebuilt_domain_name: The domain name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class EntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class EntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class EntityModelInfo(ModelInfo):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class EntityModelInfo(ModelInfo):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class HierarchicalChildEntity(ChildEntity):
'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor',
'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity
Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regular
Expression Entity Extractor'
Expression Entity Extractor', 'Closed List Entity Extractor', 'Regex
Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class HierarchicalChildEntity(ChildEntity):
'Hierarchical Entity Extractor', 'Hierarchical Child Entity Extractor',
'Composite Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity
Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', 'Regular
Expression Entity Extractor'
Expression Entity Extractor', 'Closed List Entity Extractor', 'Regex
Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class HierarchicalEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class HierarchicalEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class IntentClassifier(ModelInfo):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param custom_prebuilt_domain_name: The domain name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class IntentClassifier(ModelInfo):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param custom_prebuilt_domain_name: The domain name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ModelInfo(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ModelInfo(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ModelInfoResponse(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ModelInfoResponse(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class PatternAnyEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class PatternAnyEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class PrebuiltEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class PrebuiltEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class RegexEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class RegexEntityExtractor(Model):
Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
Extractor', 'Composite Entity Extractor', 'List Entity Extractor',
'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
Extractor', 'Regular Expression Entity Extractor'
Extractor', 'Regular Expression Entity Extractor', 'Closed List Entity
Extractor', 'Regex Entity Extractor'
:type readable_type: str or
~azure.cognitiveservices.language.luis.authoring.models.enum
:param roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# --------------------------------------------------------------------------

from msrest.pipeline import ClientRawResponse
from msrest.exceptions import HttpOperationError

from .. import models

Expand Down Expand Up @@ -52,7 +51,7 @@ def add_intent(
:return: str or ClientRawResponse if raw=true
:rtype: str or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`HttpOperationError<msrest.exceptions.HttpOperationError>`
:class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
"""
intent_create_object = models.ModelCreateObject(name=name)

Expand Down Expand Up @@ -83,7 +82,7 @@ def add_intent(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [201]:
raise HttpOperationError(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

Expand Down
1 change: 1 addition & 0 deletions azure-cognitiveservices-language-luis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down