|
1 | 1 | /**
|
2 |
| -* (C) Copyright IBM Corp. 2017, 2022. |
| 2 | +* (C) Copyright IBM Corp. 2022. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
16 | 16 | */
|
17 | 17 |
|
18 | 18 | /**
|
19 |
| -* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428 |
| 19 | +* IBM OpenAPI SDK Code Generator Version: 3.53.0-9710cac3-20220713-193508 |
20 | 20 | */
|
21 | 21 |
|
22 | 22 | using System.Collections.Generic;
|
@@ -1150,8 +1150,10 @@ public DetailedResponse<DeleteModelResults> DeleteCategoriesModel(string modelId
|
1150 | 1150 | /// <param name="workspaceId">ID of the Watson Knowledge Studio workspace that deployed this model to Natural
|
1151 | 1151 | /// Language Understanding. (optional)</param>
|
1152 | 1152 | /// <param name="versionDescription">The description of the version. (optional)</param>
|
| 1153 | + /// <param name="trainingParameters">Optional classifications training parameters along with model train |
| 1154 | + /// requests. (optional)</param> |
1153 | 1155 | /// <returns><see cref="ClassificationsModel" />ClassificationsModel</returns>
|
1154 |
| - public DetailedResponse<ClassificationsModel> CreateClassificationsModel(string language, System.IO.MemoryStream trainingData, string trainingDataContentType = null, string name = null, string description = null, string modelVersion = null, string workspaceId = null, string versionDescription = null) |
| 1156 | + public DetailedResponse<ClassificationsModel> CreateClassificationsModel(string language, System.IO.MemoryStream trainingData, string trainingDataContentType = null, string name = null, string description = null, string modelVersion = null, string workspaceId = null, string versionDescription = null, ClassificationsTrainingParameters trainingParameters = null) |
1155 | 1157 | {
|
1156 | 1158 | if (string.IsNullOrEmpty(Version))
|
1157 | 1159 | {
|
@@ -1222,6 +1224,13 @@ public DetailedResponse<ClassificationsModel> CreateClassificationsModel(string
|
1222 | 1224 | formData.Add(versionDescriptionContent, "version_description");
|
1223 | 1225 | }
|
1224 | 1226 |
|
| 1227 | + if (trainingParameters != null) |
| 1228 | + { |
| 1229 | + var trainingParametersContent = new StringContent(JsonConvert.SerializeObject(trainingParameters), Encoding.UTF8, HttpMediaType.APPLICATION_JSON); |
| 1230 | + trainingParametersContent.Headers.ContentType = null; |
| 1231 | + formData.Add(trainingParametersContent, "training_parameters"); |
| 1232 | + } |
| 1233 | + |
1225 | 1234 | IClient client = this.Client;
|
1226 | 1235 | SetAuthentication();
|
1227 | 1236 |
|
@@ -1391,8 +1400,10 @@ public DetailedResponse<ClassificationsModel> GetClassificationsModel(string mod
|
1391 | 1400 | /// <param name="workspaceId">ID of the Watson Knowledge Studio workspace that deployed this model to Natural
|
1392 | 1401 | /// Language Understanding. (optional)</param>
|
1393 | 1402 | /// <param name="versionDescription">The description of the version. (optional)</param>
|
| 1403 | + /// <param name="trainingParameters">Optional classifications training parameters along with model train |
| 1404 | + /// requests. (optional)</param> |
1394 | 1405 | /// <returns><see cref="ClassificationsModel" />ClassificationsModel</returns>
|
1395 |
| - public DetailedResponse<ClassificationsModel> UpdateClassificationsModel(string modelId, string language, System.IO.MemoryStream trainingData, string trainingDataContentType = null, string name = null, string description = null, string modelVersion = null, string workspaceId = null, string versionDescription = null) |
| 1406 | + public DetailedResponse<ClassificationsModel> UpdateClassificationsModel(string modelId, string language, System.IO.MemoryStream trainingData, string trainingDataContentType = null, string name = null, string description = null, string modelVersion = null, string workspaceId = null, string versionDescription = null, ClassificationsTrainingParameters trainingParameters = null) |
1396 | 1407 | {
|
1397 | 1408 | if (string.IsNullOrEmpty(Version))
|
1398 | 1409 | {
|
@@ -1471,6 +1482,13 @@ public DetailedResponse<ClassificationsModel> UpdateClassificationsModel(string
|
1471 | 1482 | formData.Add(versionDescriptionContent, "version_description");
|
1472 | 1483 | }
|
1473 | 1484 |
|
| 1485 | + if (trainingParameters != null) |
| 1486 | + { |
| 1487 | + var trainingParametersContent = new StringContent(JsonConvert.SerializeObject(trainingParameters), Encoding.UTF8, HttpMediaType.APPLICATION_JSON); |
| 1488 | + trainingParametersContent.Headers.ContentType = null; |
| 1489 | + formData.Add(trainingParametersContent, "training_parameters"); |
| 1490 | + } |
| 1491 | + |
1474 | 1492 | IClient client = this.Client;
|
1475 | 1493 | SetAuthentication();
|
1476 | 1494 |
|
|
0 commit comments