你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Train - Train Version

Sends a training request for a version of a specified LUIS app. This POST request initiates a request asynchronously. To determine whether the training request is successful, submit a GET request to get training status. Note: The application version is not fully trained unless all the models (intents and entities) are trained successfully or are up to date. To verify training success, get the training status at least once after training is complete.

POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/train

URI Parameters

Name In Required Type Description
appId
path True

string

uuid

The application ID.

Endpoint
path True

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).

versionId
path True

string

The version ID.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Responses

Name Type Description
202 Accepted

EnqueueTrainingResponse

This response indicates the initial training status.

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Train Application Version request

Sample request

POST {Endpoint}/luis/api/v2.0/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/train

Sample response

{
  "statusId": 9,
  "status": "Queued"
}

Definitions

Name Description
EnqueueTrainingResponse

Response model when requesting to train the model.

ErrorResponse

Error response when invoking an operation on the API.

TrainingStatus

The Training status.

EnqueueTrainingResponse

Response model when requesting to train the model.

Name Type Description
status

TrainingStatus

The Training status.

statusId

integer

The train request status ID.

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string

TrainingStatus

The Training status.

Name Type Description
Fail

string

InProgress

string

Queued

string

Success

string

UpToDate

string