modzyClient.submitJobEmbedded

Submit a job using bytes as inputs

modzyClient.submitJobEmbedded(String modelId, String versionId, List<EmbeddedData> embeddedSource)

Submits a job based on an input of a byte array. It is possible to configure the mime type on the EmbeddedData object.

Parameters

Parameter

Type

Description

Example

modelId

java.lang.String

Model identifier provided by Modzy.

"ed542963de"

versionId

java.lang.String

The model’s version number. It follows the semantic versioning format.

"1.0.1"

embeddedSources

java.util.List<com.modzy.sdk.dto.EmbeddedData>

A list of inputs to process

inputs.add( new EmbeddedData());

Returns

com.modzy.sdk.model.Job object with the job status obtained from the server

Examples

List<EmbeddedData> inputs = new ArrayList<>();
inputs.add( new EmbeddedData("plain/text", "") );
Job job = modzyClient.submitJobEmbedded("ed542963de", "1.0.1", inputs);

More specific customization options are provided by the method [modzyClient.getJobClient.submitJob]{doc:javamodzyclientsubmitjob}

JobInput<EmbeddedData> jobInput = new JobInputEmbedded();
Map<String,EmbeddedData> mapSource = new HashMap<>();
mapSource.put("input.txt", new EmbeddedData("text/plain", "Modzy is great!".getBytes(StandardCharsets.UTF_8)));
jobInput.addSource("my-input", mapSource);
Job job = modzyClient.submitJob("ed542963de", "1.0.1", jobInput, false);

Did this page help you?