@@ -31,11 +31,11 @@ async function createJobWithEmbeddedInput() {
31
31
// Or if you already know the model id and want to know more about the model, you can use this instead:
32
32
//let model = await modzyClient.getModel("c60c8dbd79");
33
33
//You can find more information about how to query the models on the model_samples.js file.
34
-
35
34
// The model identifier is under the modelId key. You can take a look at the other keys by uncommenting the following line
36
35
logger . info ( Object . keys ( model ) . toString ( ) . replace ( '\n' , ' ' ) ) ;
37
36
// Or just log the model identifier and the latest version
38
37
logger . info ( `The model identifier is ${ model . modelId } and the latest version is ${ model . latestVersion } ` ) ;
38
+
39
39
// Get the model version object:
40
40
// If you already know the model version and the input key(s) of the model version, you can skip this step. Also, you can
41
41
// use the following code block to know about the input keys and skip the call on future job submissions.
@@ -82,6 +82,7 @@ async function createJobWithEmbeddedInput() {
82
82
// We provide a helper method to listen until the job finishes processing. It listens until the job finishes
83
83
// and moves to COMPLETED, CANCELED, or TIMEOUT.
84
84
job = await modzyClient . blockUntilComplete ( job ) ;
85
+
85
86
// Get the results:
86
87
// Check the status of the job. Jobs may be canceled or may reach a timeout.
87
88
if ( job . status === "COMPLETED" ) {
@@ -96,7 +97,7 @@ async function createJobWithEmbeddedInput() {
96
97
// results.json, so we can get the results as follows:
97
98
if ( result . results [ key ] ) {
98
99
let model_res = result . results [ key ] [ "results.json" ] ;
99
- // The output for this model comes in a JSON format, so we can directly log the model results:
100
+ // The output for this model comes in a JSON format, so we can directly log the results:
100
101
logger . info ( ` ${ key } : ${ JSON . stringify ( model_res ) } ` ) ;
101
102
}
102
103
else {
0 commit comments