Skip to content

Commit 973781d

Browse files
authored
Merge pull request #898 from evanshortiss/vr3-positive-update-params
fix: use Record instead of Map type for classifier update
2 parents 2ed1100 + 3ded63a commit 973781d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

visual-recognition/v3.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class VisualRecognitionV3 extends BaseService {
249249
*
250250
* @param {Object} params - The parameters to send to the service.
251251
* @param {string} params.name - The name of the new classifier. Encode special characters in UTF-8.
252-
* @param {Map<string, NodeJS.ReadableStream|FileObject|Buffer>} params.positive_examples - A dictionary that contains
252+
* @param {Record<string, NodeJS.ReadableStream|FileObject|Buffer>} params.positive_examples - A dictionary that contains
253253
* the value for each classname. The value is a .zip file of images that depict the visual subject of a class in the
254254
* new classifier. You can include more than one positive example file in a call.
255255
*
@@ -443,7 +443,7 @@ class VisualRecognitionV3 extends BaseService {
443443
});
444444
});
445445
}
446-
446+
447447
const query = {
448448
'verbose': _params.verbose
449449
};
@@ -482,7 +482,7 @@ class VisualRecognitionV3 extends BaseService {
482482
*
483483
* @param {Object} params - The parameters to send to the service.
484484
* @param {string} params.classifier_id - The ID of the classifier.
485-
* @param {Map<string, NodeJS.ReadableStream|FileObject|Buffer>} [params.positive_examples] - A dictionary that
485+
* @param {Record<string, NodeJS.ReadableStream|FileObject|Buffer>} [params.positive_examples] - A dictionary that
486486
* contains the value for each classname. The value is a .zip file of images that depict the visual subject of a class
487487
* in the classifier. The positive examples create or update classes in the classifier. You can include more than one
488488
* positive example file in a call.
@@ -654,7 +654,7 @@ class VisualRecognitionV3 extends BaseService {
654654
if (missingParams) {
655655
return _callback(missingParams);
656656
}
657-
657+
658658
const query = {
659659
'customer_id': _params.customer_id
660660
};
@@ -810,7 +810,7 @@ namespace VisualRecognitionV3 {
810810
/** The name of the new classifier. Encode special characters in UTF-8. */
811811
name: string;
812812
/** A dictionary that contains the value for each classname. The value is a .zip file of images that depict the visual subject of a class in the new classifier. You can include more than one positive example file in a call. Specify the parameter name by appending `_positive_examples` to the class name. For example, `goldenretriever_positive_examples` creates the class **goldenretriever**. Include at least 10 images in .jpg or .png format. The minimum recommended image resolution is 32X32 pixels. The maximum number of images is 10,000 images or 100 MB per .zip file. Encode special characters in the file name in UTF-8. */
813-
positive_examples: Map<string, NodeJS.ReadableStream|FileObject|Buffer>;
813+
positive_examples: Record<string, NodeJS.ReadableStream|FileObject|Buffer>;
814814
/** A .zip file of images that do not depict the visual subject of any of the classes of the new classifier. Must contain a minimum of 10 images. Encode special characters in the file name in UTF-8. */
815815
negative_examples?: NodeJS.ReadableStream|FileObject|Buffer;
816816
/** The filename for negative_examples. */
@@ -848,7 +848,7 @@ namespace VisualRecognitionV3 {
848848
/** The ID of the classifier. */
849849
classifier_id: string;
850850
/** A dictionary that contains the value for each classname. The value is a .zip file of images that depict the visual subject of a class in the classifier. The positive examples create or update classes in the classifier. You can include more than one positive example file in a call. Specify the parameter name by appending `_positive_examples` to the class name. For example, `goldenretriever_positive_examples` creates the class `goldenretriever`. Include at least 10 images in .jpg or .png format. The minimum recommended image resolution is 32X32 pixels. The maximum number of images is 10,000 images or 100 MB per .zip file. Encode special characters in the file name in UTF-8. */
851-
positive_examples?: Map<string, NodeJS.ReadableStream|FileObject|Buffer>;
851+
positive_examples?: Record<string, NodeJS.ReadableStream|FileObject|Buffer>;
852852
/** A .zip file of images that do not depict the visual subject of any of the classes of the new classifier. Must contain a minimum of 10 images. Encode special characters in the file name in UTF-8. */
853853
negative_examples?: NodeJS.ReadableStream|FileObject|Buffer;
854854
/** The filename for negative_examples. */

0 commit comments

Comments
 (0)