azure.ai.language.conversations.authoring.aio package

class azure.ai.language.conversations.authoring.aio.ConversationAuthoringClient(endpoint: str, credential: Union[azure.core.credentials.AzureKeyCredential, azure.core.credentials_async.AsyncTokenCredential], **kwargs: Any)[source]

The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring for more information about requests and responses you can pass to this client.

Parameters
  • endpoint (str) – Supported Cognitive Services endpoint (e.g., https://<resource-name>.cognitiveservices.azure.com). Required.

  • credential (AzureKeyCredential or AsyncTokenCredential) – Credential needed for the client to connect to Azure. This can be the an instance of AzureKeyCredential if using a Language API key or a token credential from azure.identity.

Keyword Arguments
  • api_version (str) – Api Version. Available values are “2022-05-15-preview” and “2022-05-01”. Default value is “2022-05-15-preview”. Note that overriding this default value may result in unsupported behavior.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

async begin_cancel_training_job(project_name: str, job_id: str, **kwargs: Any)azure.core.polling._async_poller.AsyncLROPoller[collections.abc.MutableMapping[str, Any]]

Triggers a cancellation for a running training job.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/cancel-training-job for more information.

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

  • job_id (str) – The job ID. Required.

Keyword Arguments
  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or AsyncPollingMethod) – By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns JSON object

Return type

AsyncLROPoller[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "result": {
        "estimatedEndDateTime": "2020-02-20 00:00:00",  # Optional.
          Represents the estimated end date time for training and evaluation.
        "evaluationStatus": {
            "endDateTime": "2020-02-20 00:00:00",  # Optional. Represents
              the end date time.
            "percentComplete": 0,  # Represents progress percentage.
              Required.
            "startDateTime": "2020-02-20 00:00:00",  # Optional.
              Represents the start date time.
            "status": "str"  # Represents the status of the
              sub-operation. Required. Known values are: "notStarted", "running",
              "succeeded", "failed", "cancelled", "cancelling", and
              "partiallyCompleted".
        },
        "modelLabel": "str",  # Represents trained model label. Required.
        "trainingConfigVersion": "str",  # Represents training config
          version. Required.
        "trainingMode": "str",  # Optional. Represents the mode of the
          training operation. Known values are: "advanced" and "standard".
        "trainingStatus": {
            "endDateTime": "2020-02-20 00:00:00",  # Optional. Represents
              the end date time.
            "percentComplete": 0,  # Represents progress percentage.
              Required.
            "startDateTime": "2020-02-20 00:00:00",  # Optional.
              Represents the start date time.
            "status": "str"  # Represents the status of the
              sub-operation. Required. Known values are: "notStarted", "running",
              "succeeded", "failed", "cancelled", "cancelling", and
              "partiallyCompleted".
        }
    },
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async begin_delete_deployment(project_name: str, deployment_name: str, **kwargs: Any)azure.core.polling._async_poller.AsyncLROPoller[collections.abc.MutableMapping[str, Any]]

Deletes a project deployment.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/delete-deployment for more information.

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

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

Keyword Arguments
  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or AsyncPollingMethod) – By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns JSON object

Return type

AsyncLROPoller[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async begin_delete_project(project_name: str, **kwargs: Any)azure.core.polling._async_poller.AsyncLROPoller[collections.abc.MutableMapping[str, Any]]

Deletes a project.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/delete-project for more information.

Parameters

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

Keyword Arguments
  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or AsyncPollingMethod) – By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns JSON object

Return type

AsyncLROPoller[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async begin_deploy_project(project_name: str, deployment_name: str, deployment: Union[collections.abc.MutableMapping[str, Any], IO], **kwargs: Any)azure.core.polling._async_poller.AsyncLROPoller[collections.abc.MutableMapping[str, Any]]

Creates a new deployment or replaces an existing one.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/deploy-project for more information.

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

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

  • deployment (JSON or IO) – The new deployment info. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or AsyncPollingMethod) – By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns JSON object

Return type

AsyncLROPoller[JSON]

Raises

HttpResponseError

Example

# JSON input template you can fill out and use as your body input.
deployment = {
    "trainedModelLabel": "str"  # Represents the trained model label. Required.
}

# response body for status code(s): 200
response == {
    "deploymentExpirationDate": "2020-02-20",  # Represents deployment expiration
      date in the runtime. Required.
    "deploymentName": "str",  # Represents deployment name. Required.
    "lastDeployedDateTime": "2020-02-20 00:00:00",  # Represents deployment last
      deployed time. Required.
    "lastTrainedDateTime": "2020-02-20 00:00:00",  # Represents deployment last
      trained time. Required.
    "modelId": "str",  # Represents deployment modelId. Required.
    "modelTrainingConfigVersion": "str"  # Represents model training config
      version. Required.
}
async begin_export_project(project_name: str, *, string_index_type: str, exported_project_format: Optional[str] = None, asset_kind: Optional[str] = None, **kwargs: Any)azure.core.polling._async_poller.AsyncLROPoller[collections.abc.MutableMapping[str, Any]]

Triggers a job to export a project’s data.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/export for more information.

Parameters

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

Keyword Arguments
  • string_index_type (str) – Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. “Utf16CodeUnit” Required.

  • exported_project_format (str) – The format of the exported project file to use. Known values are: “Conversation” and “Luis”. Default value is None.

  • asset_kind (str) – Kind of asset to export. Default value is None.

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or AsyncPollingMethod) – By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns JSON object

Return type

AsyncLROPoller[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "resultUrl": "str",  # Optional. The URL to use in order to download the
      exported project.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async begin_import_project(project_name: str, project: Union[collections.abc.MutableMapping[str, Any], IO], *, exported_project_format: Optional[str] = None, **kwargs: Any)azure.core.polling._async_poller.AsyncLROPoller[collections.abc.MutableMapping[str, Any]]

Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/import for more information.

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

  • project (JSON or IO) – The project data to import. Is either a model type or a IO type. Required.

Keyword Arguments
  • exported_project_format (str) – The format of the exported project file to use. Known values are: “Conversation” and “Luis”. Default value is None.

  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or AsyncPollingMethod) – By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns JSON object

Return type

AsyncLROPoller[JSON]

Raises

HttpResponseError

Example

# JSON input template you can fill out and use as your body input.
project = {
    "assets": exported_project_assets,
    "metadata": {
        "description": "str",  # Optional. The project description.
        "language": "str",  # The project language. This is BCP-47
          representation of a language. For example, use "en" for English, "en-gb" for
          English (UK), "es" for Spanish etc. Required.
        "multilingual": bool,  # Optional. Whether the project would be used
          for multiple languages or not.
        "projectKind": "str",  # Represents the project kind. Required. Known
          values are: "Conversation" and "Orchestration".
        "projectName": "str",  # The new project name. Required.
        "settings": {
            "confidenceThreshold": 0.0  # The threshold of the intent
              with the highest confidence, at which the prediction will automatically
              be changed to "None". Required.
        }
    },
    "projectFileVersion": "str",  # The version of the exported file. Required.
    "stringIndexType": "str"  # Specifies the method used to interpret string
      offsets. For additional information see https://aka.ms/text-analytics-offsets.
      Required. "Utf16CodeUnit"
}

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async begin_swap_deployments(project_name: str, deployments: Union[collections.abc.MutableMapping[str, Any], IO], **kwargs: Any)azure.core.polling._async_poller.AsyncLROPoller[collections.abc.MutableMapping[str, Any]]

Swaps two existing deployments with each other.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/swap-deployments for more information.

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

  • deployments (JSON or IO) – The job object to swap two deployments. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or AsyncPollingMethod) – By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns JSON object

Return type

AsyncLROPoller[JSON]

Raises

HttpResponseError

Example

# JSON input template you can fill out and use as your body input.
deployments = {
    "firstDeploymentName": "str",  # Represents the first deployment name.
      Required.
    "secondDeploymentName": "str"  # Represents the second deployment name.
      Required.
}

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async begin_train(project_name: str, configuration: Union[collections.abc.MutableMapping[str, Any], IO], **kwargs: Any)azure.core.polling._async_poller.AsyncLROPoller[collections.abc.MutableMapping[str, Any]]

Triggers a training job for a project.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/train for more information.

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

  • configuration (JSON or IO) – The training input parameters. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or AsyncPollingMethod) – By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns JSON object

Return type

AsyncLROPoller[JSON]

Raises

HttpResponseError

Example

# JSON input template you can fill out and use as your body input.
configuration = {
    "evaluationOptions": {
        "kind": "str",  # Optional. Represents the evaluation kind. By
          default, the evaluation kind is set to percentage. Known values are:
          "percentage" and "manual".
        "testingSplitPercentage": 0,  # Optional. Represents the testing
          dataset split percentage. Only needed in case the evaluation kind is
          percentage.
        "trainingSplitPercentage": 0  # Optional. Represents the training
          dataset split percentage. Only needed in case the evaluation kind is
          percentage.
    },
    "modelLabel": "str",  # Represents the output model label. Required.
    "trainingConfigVersion": "str",  # Optional. Represents training config
      version. By default, "latest" value is used which uses the latest released
      training config version.
    "trainingMode": "str"  # Represents the mode of the training operation.
      Required. Known values are: "advanced" and "standard".
}

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "result": {
        "estimatedEndDateTime": "2020-02-20 00:00:00",  # Optional.
          Represents the estimated end date time for training and evaluation.
        "evaluationStatus": {
            "endDateTime": "2020-02-20 00:00:00",  # Optional. Represents
              the end date time.
            "percentComplete": 0,  # Represents progress percentage.
              Required.
            "startDateTime": "2020-02-20 00:00:00",  # Optional.
              Represents the start date time.
            "status": "str"  # Represents the status of the
              sub-operation. Required. Known values are: "notStarted", "running",
              "succeeded", "failed", "cancelled", "cancelling", and
              "partiallyCompleted".
        },
        "modelLabel": "str",  # Represents trained model label. Required.
        "trainingConfigVersion": "str",  # Represents training config
          version. Required.
        "trainingMode": "str",  # Optional. Represents the mode of the
          training operation. Known values are: "advanced" and "standard".
        "trainingStatus": {
            "endDateTime": "2020-02-20 00:00:00",  # Optional. Represents
              the end date time.
            "percentComplete": 0,  # Represents progress percentage.
              Required.
            "startDateTime": "2020-02-20 00:00:00",  # Optional.
              Represents the start date time.
            "status": "str"  # Represents the status of the
              sub-operation. Required. Known values are: "notStarted", "running",
              "succeeded", "failed", "cancelled", "cancelling", and
              "partiallyCompleted".
        }
    },
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async close()None[source]
async create_project(project_name: str, project: Union[collections.abc.MutableMapping[str, Any], IO], **kwargs: Any)collections.abc.MutableMapping[str, Any]

Creates a new project or updates an existing one.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/create-project for more information.

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

  • project (JSON or IO) – The project parameters. Is either a model type or a IO type. Required.

Keyword Arguments

content_type (str) – Body Parameter content-type. Known values are: ‘application/merge-patch+json’. Default value is None.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# JSON input template you can fill out and use as your body input.
project = {
    "description": "str",  # Optional. The project description.
    "language": "str",  # The project language. This is BCP-47 representation of
      a language. For example, use "en" for English, "en-gb" for English (UK), "es" for
      Spanish etc. Required.
    "multilingual": bool,  # Optional. Whether the project would be used for
      multiple languages or not.
    "projectKind": "str",  # Represents the project kind. Required. Known values
      are: "Conversation" and "Orchestration".
    "projectName": "str",  # The new project name. Required.
    "settings": {
        "confidenceThreshold": 0.0  # The threshold of the intent with the
          highest confidence, at which the prediction will automatically be changed to
          "None". Required.
    }
}

# response body for status code(s): 200, 201
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # Represents the project creation
      datetime. Required.
    "description": "str",  # Optional. The project description.
    "language": "str",  # The project language. This is BCP-47 representation of
      a language. For example, use "en" for English, "en-gb" for English (UK), "es" for
      Spanish etc. Required.
    "lastDeployedDateTime": "2020-02-20 00:00:00",  # Optional. Represents the
      project last deployed datetime.
    "lastModifiedDateTime": "2020-02-20 00:00:00",  # Represents the project
      creation datetime. Required.
    "lastTrainedDateTime": "2020-02-20 00:00:00",  # Optional. Represents the
      project last trained datetime.
    "multilingual": bool,  # Optional. Whether the project would be used for
      multiple languages or not.
    "projectKind": "str",  # Represents the project kind. Required. Known values
      are: "Conversation" and "Orchestration".
    "projectName": "str",  # The new project name. Required.
    "settings": {
        "confidenceThreshold": 0.0  # The threshold of the intent with the
          highest confidence, at which the prediction will automatically be changed to
          "None". Required.
    }
}
async delete_trained_model(project_name: str, trained_model_label: str, **kwargs: Any)None

Deletes an existing trained model.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/delete-trained-model for more information.

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

  • trained_model_label (str) – The trained model label. Required.

Returns

None

Return type

None

Raises

HttpResponseError

async get_deployment(project_name: str, deployment_name: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the details of a deployment.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-deployment for more information.

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

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

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "deploymentExpirationDate": "2020-02-20",  # Represents deployment expiration
      date in the runtime. Required.
    "deploymentName": "str",  # Represents deployment name. Required.
    "lastDeployedDateTime": "2020-02-20 00:00:00",  # Represents deployment last
      deployed time. Required.
    "lastTrainedDateTime": "2020-02-20 00:00:00",  # Represents deployment last
      trained time. Required.
    "modelId": "str",  # Represents deployment modelId. Required.
    "modelTrainingConfigVersion": "str"  # Represents model training config
      version. Required.
}
async get_deployment_job_status(project_name: str, deployment_name: str, job_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the status of an existing deployment job.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-deployment-status for more information.

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

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

  • job_id (str) – The job ID. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async get_export_project_job_status(project_name: str, job_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the status of an export job. Once job completes, returns the project metadata, and assets.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-export-status for more information.

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

  • job_id (str) – The job ID. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "resultUrl": "str",  # Optional. The URL to use in order to download the
      exported project.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async get_import_project_job_status(project_name: str, job_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the status for an import.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-import-status for more information.

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

  • job_id (str) – The job ID. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async get_model_evaluation_summary(project_name: str, trained_model_label: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-model-evaluation-summary for more information.

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

  • trained_model_label (str) – The trained model label. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "entitiesEvaluation": {
        "confusionMatrix": {
            "str": {
                "str": {
                    "normalizedValue": 0.0,  # Represents
                      normalized value in percentages. Required.
                    "rawValue": 0.0  # Represents raw value.
                      Required.
                }
            }
        },
        "entities": {
            "str": {
                "f1": 0.0,  # Represents the model precision.
                  Required.
                "falseNegativeCount": 0,  # Represents the count of
                  false negative. Required.
                "falsePositiveCount": 0,  # Represents the count of
                  false positive. Required.
                "precision": 0.0,  # Represents the model recall.
                  Required.
                "recall": 0.0,  # Represents the model F1 score.
                  Required.
                "trueNegativeCount": 0,  # Represents the count of
                  true negative. Required.
                "truePositiveCount": 0  # Represents the count of
                  true positive. Required.
            }
        },
        "macroF1": 0.0,  # Represents the macro F1. Required.
        "macroPrecision": 0.0,  # Represents the macro precision. Required.
        "macroRecall": 0.0,  # Represents the macro recall. Required.
        "microF1": 0.0,  # Represents the micro F1. Required.
        "microPrecision": 0.0,  # Represents the micro precision. Required.
        "microRecall": 0.0  # Represents the micro recall. Required.
    },
    "evaluationOptions": {
        "kind": "str",  # Optional. Represents the evaluation kind. By
          default, the evaluation kind is set to percentage. Known values are:
          "percentage" and "manual".
        "testingSplitPercentage": 0,  # Optional. Represents the testing
          dataset split percentage. Only needed in case the evaluation kind is
          percentage.
        "trainingSplitPercentage": 0  # Optional. Represents the training
          dataset split percentage. Only needed in case the evaluation kind is
          percentage.
    },
    "intentsEvaluation": {
        "confusionMatrix": {
            "str": {
                "str": {
                    "normalizedValue": 0.0,  # Represents
                      normalized value in percentages. Required.
                    "rawValue": 0.0  # Represents raw value.
                      Required.
                }
            }
        },
        "intents": {
            "str": {
                "f1": 0.0,  # Represents the model precision.
                  Required.
                "falseNegativeCount": 0,  # Represents the count of
                  false negative. Required.
                "falsePositiveCount": 0,  # Represents the count of
                  false positive. Required.
                "precision": 0.0,  # Represents the model recall.
                  Required.
                "recall": 0.0,  # Represents the model F1 score.
                  Required.
                "trueNegativeCount": 0,  # Represents the count of
                  true negative. Required.
                "truePositiveCount": 0  # Represents the count of
                  true positive. Required.
            }
        },
        "macroF1": 0.0,  # Represents the macro F1. Required.
        "macroPrecision": 0.0,  # Represents the macro precision. Required.
        "macroRecall": 0.0,  # Represents the macro recall. Required.
        "microF1": 0.0,  # Represents the micro F1. Required.
        "microPrecision": 0.0,  # Represents the micro precision. Required.
        "microRecall": 0.0  # Represents the micro recall. Required.
    }
}
async get_project(project_name: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the details of a project.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-project for more information.

Parameters

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

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # Represents the project creation
      datetime. Required.
    "description": "str",  # Optional. The project description.
    "language": "str",  # The project language. This is BCP-47 representation of
      a language. For example, use "en" for English, "en-gb" for English (UK), "es" for
      Spanish etc. Required.
    "lastDeployedDateTime": "2020-02-20 00:00:00",  # Optional. Represents the
      project last deployed datetime.
    "lastModifiedDateTime": "2020-02-20 00:00:00",  # Represents the project
      creation datetime. Required.
    "lastTrainedDateTime": "2020-02-20 00:00:00",  # Optional. Represents the
      project last trained datetime.
    "multilingual": bool,  # Optional. Whether the project would be used for
      multiple languages or not.
    "projectKind": "str",  # Represents the project kind. Required. Known values
      are: "Conversation" and "Orchestration".
    "projectName": "str",  # The new project name. Required.
    "settings": {
        "confidenceThreshold": 0.0  # The threshold of the intent with the
          highest confidence, at which the prediction will automatically be changed to
          "None". Required.
    }
}
async get_project_deletion_job_status(job_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the status for a project deletion job.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-project-deletion-status for more information.

Parameters

job_id (str) – The job ID. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async get_swap_deployments_job_status(project_name: str, job_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the status of an existing swap deployment job.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-swap-deployments-status for more information.

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

  • job_id (str) – The job ID. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
async get_trained_model(project_name: str, trained_model_label: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the details of a trained model.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-trained-model for more information.

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

  • trained_model_label (str) – The trained model label. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "label": "str",  # The trained model label. Required.
    "lastTrainedDateTime": "2020-02-20 00:00:00",  # The last trained date time
      of the model. Required.
    "lastTrainingDurationInSeconds": 0,  # The duration of the model's last
      training request in seconds. Required.
    "modelExpirationDate": "2020-02-20",  # The model expiration date. Required.
    "modelId": "str",  # The model ID. Required.
    "modelTrainingConfigVersion": "str"  # The model training config version.
      Required.
}
async get_training_job_status(project_name: str, job_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any]

Gets the status for a training job.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-training-status for more information.

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

  • job_id (str) – The job ID. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "result": {
        "estimatedEndDateTime": "2020-02-20 00:00:00",  # Optional.
          Represents the estimated end date time for training and evaluation.
        "evaluationStatus": {
            "endDateTime": "2020-02-20 00:00:00",  # Optional. Represents
              the end date time.
            "percentComplete": 0,  # Represents progress percentage.
              Required.
            "startDateTime": "2020-02-20 00:00:00",  # Optional.
              Represents the start date time.
            "status": "str"  # Represents the status of the
              sub-operation. Required. Known values are: "notStarted", "running",
              "succeeded", "failed", "cancelled", "cancelling", and
              "partiallyCompleted".
        },
        "modelLabel": "str",  # Represents trained model label. Required.
        "trainingConfigVersion": "str",  # Represents training config
          version. Required.
        "trainingMode": "str",  # Optional. Represents the mode of the
          training operation. Known values are: "advanced" and "standard".
        "trainingStatus": {
            "endDateTime": "2020-02-20 00:00:00",  # Optional. Represents
              the end date time.
            "percentComplete": 0,  # Represents progress percentage.
              Required.
            "startDateTime": "2020-02-20 00:00:00",  # Optional.
              Represents the start date time.
            "status": "str"  # Represents the status of the
              sub-operation. Required. Known values are: "notStarted", "running",
              "succeeded", "failed", "cancelled", "cancelling", and
              "partiallyCompleted".
        }
    },
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
list_deployments(project_name: str, *, top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any)AsyncIterable[collections.abc.MutableMapping[str, Any]]

Lists the deployments belonging to a project.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/list-deployments for more information.

Parameters

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

Keyword Arguments
  • top (int) – The maximum number of resources to return from the collection. Default value is None.

  • skip (int) – An offset into the collection of the first resource to be returned. Default value is None.

Returns

An iterator like instance of JSON object

Return type

AsyncItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "deploymentExpirationDate": "2020-02-20",  # Represents deployment expiration
      date in the runtime. Required.
    "deploymentName": "str",  # Represents deployment name. Required.
    "lastDeployedDateTime": "2020-02-20 00:00:00",  # Represents deployment last
      deployed time. Required.
    "lastTrainedDateTime": "2020-02-20 00:00:00",  # Represents deployment last
      trained time. Required.
    "modelId": "str",  # Represents deployment modelId. Required.
    "modelTrainingConfigVersion": "str"  # Represents model training config
      version. Required.
}
list_model_evaluation_results(project_name: str, trained_model_label: str, *, string_index_type: str, top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any)AsyncIterable[collections.abc.MutableMapping[str, Any]]

Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-model-evaluation-results for more information.

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

  • trained_model_label (str) – The trained model label. Required.

Keyword Arguments
  • string_index_type (str) – Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. “Utf16CodeUnit” Required.

  • top (int) – The maximum number of resources to return from the collection. Default value is None.

  • skip (int) – An offset into the collection of the first resource to be returned. Default value is None.

Returns

An iterator like instance of JSON object

Return type

AsyncItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "entitiesResult": {
        "expectedEntities": [
            {
                "category": "str",  # Represents the entity category.
                  Required.
                "length": 0,  # Represents the entity length.
                  Required.
                "offset": 0  # Represents the entity offset index
                  relative to the original text. Required.
            }
        ],
        "predictedEntities": [
            {
                "category": "str",  # Represents the entity category.
                  Required.
                "length": 0,  # Represents the entity length.
                  Required.
                "offset": 0  # Represents the entity offset index
                  relative to the original text. Required.
            }
        ]
    },
    "intentsResult": {
        "expectedIntent": "str",  # Represents the utterance's expected
          intent. Required.
        "predictedIntent": "str"  # Represents the utterance's predicted
          intent. Required.
    },
    "language": "str",  # Represents the utterance language. This is BCP-47
      representation of a language. For example, use "en" for English, "en-gb" for
      English (UK), "es" for Spanish etc. Required.
    "text": "str"  # Represents the utterance text. Required.
}
list_projects(*, top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any)AsyncIterable[collections.abc.MutableMapping[str, Any]]

Lists the existing projects.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/list-projects for more information.

Keyword Arguments
  • top (int) – The maximum number of resources to return from the collection. Default value is None.

  • skip (int) – An offset into the collection of the first resource to be returned. Default value is None.

Returns

An iterator like instance of JSON object

Return type

AsyncItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # Represents the project creation
      datetime. Required.
    "description": "str",  # Optional. The project description.
    "language": "str",  # The project language. This is BCP-47 representation of
      a language. For example, use "en" for English, "en-gb" for English (UK), "es" for
      Spanish etc. Required.
    "lastDeployedDateTime": "2020-02-20 00:00:00",  # Optional. Represents the
      project last deployed datetime.
    "lastModifiedDateTime": "2020-02-20 00:00:00",  # Represents the project
      creation datetime. Required.
    "lastTrainedDateTime": "2020-02-20 00:00:00",  # Optional. Represents the
      project last trained datetime.
    "multilingual": bool,  # Optional. Whether the project would be used for
      multiple languages or not.
    "projectKind": "str",  # Represents the project kind. Required. Known values
      are: "Conversation" and "Orchestration".
    "projectName": "str",  # The new project name. Required.
    "settings": {
        "confidenceThreshold": 0.0  # The threshold of the intent with the
          highest confidence, at which the prediction will automatically be changed to
          "None". Required.
    }
}
list_supported_languages(*, project_kind: str, top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any)AsyncIterable[collections.abc.MutableMapping[str, Any]]

Lists the supported languages for the given project type.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-supported-languages for more information.

Keyword Arguments
  • project_kind (str) – The project kind. Known values are: “Conversation” and “Orchestration”. Required.

  • top (int) – The maximum number of resources to return from the collection. Default value is None.

  • skip (int) – An offset into the collection of the first resource to be returned. Default value is None.

Returns

An iterator like instance of JSON object

Return type

AsyncItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "languageCode": "str",  # The language code. This is BCP-47 representation of
      a language. For example, "en" for English, "en-gb" for English (UK), "es" for
      Spanish etc. Required.
    "languageName": "str"  # The language name. Required.
}
list_supported_prebuilt_entities(*, language: Optional[str] = None, multilingual: Optional[bool] = None, top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any)AsyncIterable[collections.abc.MutableMapping[str, Any]]

Lists the supported prebuilt entities that can be used while creating composed entities.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/get-supported-prebuilt-entities for more information.

Keyword Arguments
  • language (str) – The language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use “en” for English, “en-gb” for English (UK), “es” for Spanish etc. Default value is None.

  • multilingual (bool) – Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. Default value is None.

  • top (int) – The maximum number of resources to return from the collection. Default value is None.

  • skip (int) – An offset into the collection of the first resource to be returned. Default value is None.

Returns

An iterator like instance of JSON object

Return type

AsyncItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "category": "str",  # The prebuilt entity category. Required.
    "description": "str",  # The description. Required.
    "examples": "str"  # English examples for the entity. Required.
}
list_trained_models(project_name: str, *, top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any)AsyncIterable[collections.abc.MutableMapping[str, Any]]

Lists the trained models belonging to a project.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/list-trained-models for more information.

Parameters

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

Keyword Arguments
  • top (int) – The maximum number of resources to return from the collection. Default value is None.

  • skip (int) – An offset into the collection of the first resource to be returned. Default value is None.

Returns

An iterator like instance of JSON object

Return type

AsyncItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "label": "str",  # The trained model label. Required.
    "lastTrainedDateTime": "2020-02-20 00:00:00",  # The last trained date time
      of the model. Required.
    "lastTrainingDurationInSeconds": 0,  # The duration of the model's last
      training request in seconds. Required.
    "modelExpirationDate": "2020-02-20",  # The model expiration date. Required.
    "modelId": "str",  # The model ID. Required.
    "modelTrainingConfigVersion": "str"  # The model training config version.
      Required.
}
list_training_config_versions(*, project_kind: str, top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any)AsyncIterable[collections.abc.MutableMapping[str, Any]]

Lists the support training config version for a given project type.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/list-training-config-versions for more information.

Keyword Arguments
  • project_kind (str) – The project kind. Known values are: “Conversation” and “Orchestration”. Required.

  • top (int) – The maximum number of resources to return from the collection. Default value is None.

  • skip (int) – An offset into the collection of the first resource to be returned. Default value is None.

Returns

An iterator like instance of JSON object

Return type

AsyncItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "modelExpirationDate": "2020-02-20",  # Represents the training config
      version expiration date. Required.
    "trainingConfigVersion": "str"  # Represents the version of the config.
      Required.
}
list_training_jobs(project_name: str, *, top: Optional[int] = None, skip: Optional[int] = None, **kwargs: Any)AsyncIterable[collections.abc.MutableMapping[str, Any]]

Lists the non-expired training jobs created for a project.

See https://docs.microsoft.com/rest/api/language/conversational-analysis-authoring/list-training-jobs for more information.

Parameters

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

Keyword Arguments
  • top (int) – The maximum number of resources to return from the collection. Default value is None.

  • skip (int) – An offset into the collection of the first resource to be returned. Default value is None.

Returns

An iterator like instance of JSON object

Return type

AsyncItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "createdDateTime": "2020-02-20 00:00:00",  # The creation date time of the
      job. Required.
    "errors": [
        {
            "code": "str",  # One of a server-defined set of error codes.
              Required. Known values are: "InvalidRequest", "InvalidArgument",
              "Unauthorized", "Forbidden", "NotFound", "ProjectNotFound",
              "OperationNotFound", "AzureCognitiveSearchNotFound",
              "AzureCognitiveSearchIndexNotFound", "TooManyRequests",
              "AzureCognitiveSearchThrottling",
              "AzureCognitiveSearchIndexLimitReached", "InternalServerError",
              "ServiceUnavailable", "Timeout", "QuotaExceeded", "Conflict", and
              "Warning".
            "details": [
                ...
            ],
            "innererror": {
                "code": "str",  # One of a server-defined set of
                  error codes. Required. Known values are: "InvalidRequest",
                  "InvalidParameterValue", "KnowledgeBaseNotFound",
                  "AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling",
                  "ExtractionFailure", "InvalidRequestBodyFormat", "EmptyRequest",
                  "MissingInputDocuments", "InvalidDocument", "ModelVersionIncorrect",
                  "InvalidDocumentBatch", "UnsupportedLanguageCode", and
                  "InvalidCountryHint".
                "details": {
                    "str": "str"  # Optional. Error details.
                },
                "innererror": ...,
                "message": "str",  # Error message. Required.
                "target": "str"  # Optional. Error target.
            },
            "message": "str",  # A human-readable representation of the
              error. Required.
            "target": "str"  # Optional. The target of the error.
        }
    ],
    "expirationDateTime": "2020-02-20 00:00:00",  # Optional. The expiration date
      time of the job.
    "jobId": "str",  # The job ID. Required.
    "lastUpdatedDateTime": "2020-02-20 00:00:00",  # The last date time the job
      was updated. Required.
    "result": {
        "estimatedEndDateTime": "2020-02-20 00:00:00",  # Optional.
          Represents the estimated end date time for training and evaluation.
        "evaluationStatus": {
            "endDateTime": "2020-02-20 00:00:00",  # Optional. Represents
              the end date time.
            "percentComplete": 0,  # Represents progress percentage.
              Required.
            "startDateTime": "2020-02-20 00:00:00",  # Optional.
              Represents the start date time.
            "status": "str"  # Represents the status of the
              sub-operation. Required. Known values are: "notStarted", "running",
              "succeeded", "failed", "cancelled", "cancelling", and
              "partiallyCompleted".
        },
        "modelLabel": "str",  # Represents trained model label. Required.
        "trainingConfigVersion": "str",  # Represents training config
          version. Required.
        "trainingMode": "str",  # Optional. Represents the mode of the
          training operation. Known values are: "advanced" and "standard".
        "trainingStatus": {
            "endDateTime": "2020-02-20 00:00:00",  # Optional. Represents
              the end date time.
            "percentComplete": 0,  # Represents progress percentage.
              Required.
            "startDateTime": "2020-02-20 00:00:00",  # Optional.
              Represents the start date time.
            "status": "str"  # Represents the status of the
              sub-operation. Required. Known values are: "notStarted", "running",
              "succeeded", "failed", "cancelled", "cancelling", and
              "partiallyCompleted".
        }
    },
    "status": "str",  # The job status. Required. Known values are: "notStarted",
      "running", "succeeded", "failed", "cancelled", "cancelling", and
      "partiallyCompleted".
    "warnings": [
        {
            "code": "str",  # The warning code. Required.
            "message": "str"  # The warning message. Required.
        }
    ]
}
send_request(request: azure.core.rest._rest_py3.HttpRequest, **kwargs: Any)Awaitable[azure.core.rest._rest_py3.AsyncHttpResponse][source]

Runs the network request through the client’s chained policies.

>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = await client.send_request(request)
<AsyncHttpResponse: 200 OK>

For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request

Parameters

request (HttpRequest) – The network request you want to make. Required.

Keyword Arguments

stream (bool) – Whether the response payload will be streamed. Defaults to False.

Returns

The response of your network call. Does not do error handling on your response.

Return type

AsyncHttpResponse