@@ -123,16 +123,18 @@ class JobClient{
123
123
* @param {string } modelId - the model id string
124
124
* @param {versionId } versionId - version id string
125
125
* @param {Object[] } textSources - The source(s) of the model
126
+ * @param {boolean } explain - Explainability flag
126
127
* @return {Object } the updated instance of the Job returned by Modzy API
127
128
* @throws {ApiError } If there is something wrong with the service or the call
128
129
*/
129
- submitJobText ( modelId , versionId , textSources ) {
130
+ submitJobText ( modelId , versionId , textSources , explain = false ) {
130
131
return this . submitJob (
131
132
{
132
133
"model" : {
133
134
"identifier" : modelId ,
134
135
"version" : versionId
135
136
} ,
137
+ "explain" : explain ,
136
138
"input" : {
137
139
"type" : "text" ,
138
140
"sources" : textSources
@@ -148,18 +150,20 @@ class JobClient{
148
150
* @param {string } modelId - the model id string
149
151
* @param {string } versionId - version id string
150
152
* @param {Object[] } fileSources the source(s) of the model
153
+ * @param {boolean } explain - Explainability flag
151
154
* @return {Object } the updated instance of the Job returned by Modzy API
152
155
* @throws {ApiError } if there is something wrong with the service or the call
153
156
*/
154
- submitJobFiles ( modelId , versionId , fileSources ) {
157
+ submitJobFile ( modelId , versionId , fileSources , explain = false ) {
155
158
let job = { } ;
156
159
let chunkSize = 1024 * 1024 ;
157
160
return this . submitJob (
158
161
{
159
162
"model" : {
160
163
"identifier" : modelId ,
161
164
"version" : versionId
162
- }
165
+ } ,
166
+ "explain" : explain
163
167
}
164
168
) . then (
165
169
( openJob ) => {
@@ -211,10 +215,11 @@ class JobClient{
211
215
* @param {string } versionId - version id string
212
216
* @param {string } mediaType - the media type of the embedded source
213
217
* @param {Object[] } embeddedSources the source(s) of the model
218
+ * @param {boolean } explain - Explainability flag
214
219
* @return {Object } the updated instance of the Job returned by Modzy API
215
220
* @throws {ApiError } if there is something wrong with the service or the call
216
221
*/
217
- submitJobEmbedded ( modelId , versionId , mediaType , embeddedSources ) {
222
+ submitJobEmbedded ( modelId , versionId , mediaType , embeddedSources , explain = false ) {
218
223
let encodedSources = { } ;
219
224
Object . keys ( embeddedSources ) . forEach (
220
225
sourceKey => {
@@ -237,6 +242,7 @@ class JobClient{
237
242
"identifier" : modelId ,
238
243
"version" : versionId
239
244
} ,
245
+ "explain" : explain ,
240
246
"input" : {
241
247
"type" : "embedded" ,
242
248
"sources" : encodedSources
@@ -251,20 +257,22 @@ class JobClient{
251
257
*
252
258
* @param {string } modelId - the model id string
253
259
* @param {string } versionId - version id string
254
- * @param {string } accessKeyID - access key of aws-s3
260
+ * @param {string } accessKeyId - access key of aws-s3
255
261
* @param {string } secretAccessKey - secret access key of aws-s3
256
262
* @param {string } region - aws-s3 region
257
263
* @param {Object[] } awss3Sources - the source(s) of the model
264
+ * @param {boolean } explain - Explainability flag
258
265
* @return {Object } the updated instance of the Job returned by Modzy API
259
266
* @throws {ApiError } if there is something wrong with the service or the call
260
267
*/
261
- submitJobAWSS3 ( modelId , versionId , accessKeyID , secretAccessKey , region , awss3Sources ) {
268
+ submitJobAWSS3 ( modelId , versionId , accessKeyId , secretAccessKey , region , awss3Sources , explain = false ) {
262
269
return this . submitJob (
263
270
{
264
271
"model" : {
265
272
"identifier" : modelId ,
266
273
"version" : versionId
267
274
} ,
275
+ "explain" : explain ,
268
276
"input" : {
269
277
"type" : "aws-s3" ,
270
278
"accessKeyID" : accessKeyID ,
@@ -291,16 +299,18 @@ class JobClient{
291
299
* @param {string } password - database password
292
300
* @param {string } driver - fully qualified name of the driver class for jdbc
293
301
* @param {string } query - the query to get the inputs of the model
302
+ * @param {boolean } explain - Explainability flag
294
303
* @return {Object } the updated instance of the Job returned by Modzy API
295
304
* @throws {ApiError } if there is something wrong with the service or the call
296
305
*/
297
- submitJobJDBC ( modelId , versionId , url , username , password , driver , query ) {
306
+ submitJobJDBC ( modelId , versionId , url , username , password , driver , query , explain = false ) {
298
307
return this . submitJob (
299
308
{
300
309
"model" : {
301
310
"identifier" : modelId ,
302
311
"version" : versionId
303
312
} ,
313
+ "explain" : explain ,
304
314
"input" : {
305
315
"type" : "jdbc" ,
306
316
"url" : url ,
0 commit comments