| | | 1 | | // <auto-generated> |
| | | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | | 4 | | // license information. |
| | | 5 | | // |
| | | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | | 8 | | // regenerated. |
| | | 9 | | // </auto-generated> |
| | | 10 | | |
| | | 11 | | namespace Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring |
| | | 12 | | { |
| | | 13 | | using Models; |
| | | 14 | | using System.Collections; |
| | | 15 | | using System.Collections.Generic; |
| | | 16 | | using System.Threading; |
| | | 17 | | using System.Threading.Tasks; |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// Extension methods for Train. |
| | | 21 | | /// </summary> |
| | | 22 | | public static partial class TrainExtensions |
| | | 23 | | { |
| | | 24 | | /// <summary> |
| | | 25 | | /// Sends a training request for a version of a specified LUIS app. This POST |
| | | 26 | | /// request initiates a request asynchronously. To determine whether the |
| | | 27 | | /// training request is successful, submit a GET request to get training |
| | | 28 | | /// status. Note: The application version is not fully trained unless all the |
| | | 29 | | /// models (intents and entities) are trained successfully or are up to date. |
| | | 30 | | /// To verify training success, get the training status at least once after |
| | | 31 | | /// training is complete. |
| | | 32 | | /// </summary> |
| | | 33 | | /// <param name='operations'> |
| | | 34 | | /// The operations group for this extension method. |
| | | 35 | | /// </param> |
| | | 36 | | /// <param name='appId'> |
| | | 37 | | /// The application ID. |
| | | 38 | | /// </param> |
| | | 39 | | /// <param name='versionId'> |
| | | 40 | | /// The version ID. |
| | | 41 | | /// </param> |
| | | 42 | | /// <param name='cancellationToken'> |
| | | 43 | | /// The cancellation token. |
| | | 44 | | /// </param> |
| | | 45 | | public static async Task<EnqueueTrainingResponse> TrainVersionAsync(this ITrain operations, System.Guid appI |
| | | 46 | | { |
| | 3 | 47 | | using (var _result = await operations.TrainVersionWithHttpMessagesAsync(appId, versionId, null, cancella |
| | | 48 | | { |
| | 3 | 49 | | return _result.Body; |
| | | 50 | | } |
| | 3 | 51 | | } |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Gets the training status of all models (intents and entities) for the |
| | | 55 | | /// specified LUIS app. You must call the train API to train the LUIS app |
| | | 56 | | /// before you call this API to get training status. "appID" specifies the LUIS |
| | | 57 | | /// app ID. "versionId" specifies the version number of the LUIS app. For |
| | | 58 | | /// example, "0.1". |
| | | 59 | | /// </summary> |
| | | 60 | | /// <param name='operations'> |
| | | 61 | | /// The operations group for this extension method. |
| | | 62 | | /// </param> |
| | | 63 | | /// <param name='appId'> |
| | | 64 | | /// The application ID. |
| | | 65 | | /// </param> |
| | | 66 | | /// <param name='versionId'> |
| | | 67 | | /// The version ID. |
| | | 68 | | /// </param> |
| | | 69 | | /// <param name='cancellationToken'> |
| | | 70 | | /// The cancellation token. |
| | | 71 | | /// </param> |
| | | 72 | | public static async Task<IList<ModelTrainingInfo>> GetStatusAsync(this ITrain operations, System.Guid appId, |
| | | 73 | | { |
| | 7 | 74 | | using (var _result = await operations.GetStatusWithHttpMessagesAsync(appId, versionId, null, cancellatio |
| | | 75 | | { |
| | 7 | 76 | | return _result.Body; |
| | | 77 | | } |
| | 7 | 78 | | } |
| | | 79 | | |
| | | 80 | | } |
| | | 81 | | } |