modzyClient.submitJobText
Submit a job using text as inputs
modzyClient.submitJobText(String modelId, String versionId, List<String> textSource)
Submits a job based on text inputs. Any item on the list will be considered as an input.
The SDK will search the model and version provided in order to find the right input item keys.
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" |
textSources | java.util.List<java.lang.String> | A List of inputs to process. | List<String> inputs = new ArrayList<>(); inputs.add("Some text"); |
Returns
com.modzy.sdk.model.Job
object with the status from the server
Examples
List<String> inputs = new ArrayList<>();
inputs.add("Modzy is great!".getBytes(StandardCharsets.UTF_8));
Job job = modzyClient.submitJobText("ed542963de", "1.0.1", inputs);
More specific customization options are provided by the method [modzyClient.getJobClient.submitJob
]{doc:javamodzyclientsubmitjob}
JobInput<String> jobInput = new JobInputText();
Map<String,String> mapSource = new HashMap<>();
mapSource.put("input.txt", "Modzy is great!");
jobInput.addSource("my-input", mapSource);
Job job = modzyClient.submitJob("ed542963de", "1.0.1", jobInput, false);
Updated about 2 years ago