diff --git a/docs/code_samples/v2_classification.txt b/docs/code_samples/v2_classification.txt index 6ddfb4967..fc9339c84 100644 --- a/docs/code_samples/v2_classification.txt +++ b/docs/code_samples/v2_classification.txt @@ -4,7 +4,6 @@ import com.mindee.v2.product.classification.ClassificationClassifier; import com.mindee.v2.product.classification.ClassificationResponse; import com.mindee.v2.product.classification.ClassificationResult; import com.mindee.v2.product.classification.params.ClassificationParameters; -import java.io.File; import java.io.IOException; public class SimpleMindeeClientV2 { @@ -29,7 +28,7 @@ public class SimpleMindeeClientV2 { // Load a file from disk LocalInputSource inputSource = new LocalInputSource(filePath); - // Send for processing + // Send for processing using polling ClassificationResponse response = mindeeClient.enqueueAndGetResult( ClassificationResponse.class, inputSource, diff --git a/docs/code_samples/v2_crop.txt b/docs/code_samples/v2_crop.txt index 97242b00b..3d80e5751 100644 --- a/docs/code_samples/v2_crop.txt +++ b/docs/code_samples/v2_crop.txt @@ -3,7 +3,6 @@ import com.mindee.input.LocalInputSource; import com.mindee.v2.product.crop.CropResponse; import com.mindee.v2.product.crop.CropResult; import com.mindee.v2.product.crop.params.CropParameters; -import java.io.File; import java.io.IOException; public class SimpleMindeeClientV2 { @@ -19,7 +18,6 @@ public class SimpleMindeeClientV2 { MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey); // Set inference parameters - // Note: modelId is mandatory. CropParameters cropParams = CropParameters // ID of the model, required. .builder(modelId) @@ -28,7 +26,7 @@ public class SimpleMindeeClientV2 { // Load a file from disk LocalInputSource inputSource = new LocalInputSource(filePath); - // Send for processing + // Send for processing using polling CropResponse response = mindeeClient.enqueueAndGetResult( CropResponse.class, inputSource, diff --git a/docs/code_samples/v2_extraction.txt b/docs/code_samples/v2_extraction.txt index 4f6dce58d..954b550c4 100644 --- a/docs/code_samples/v2_extraction.txt +++ b/docs/code_samples/v2_extraction.txt @@ -2,7 +2,7 @@ import com.mindee.MindeeClientV2; import com.mindee.InferenceParameters; import com.mindee.input.LocalInputSource; import com.mindee.parsing.v2.InferenceResponse; -import com.mindee.parsing.v2.InferenceResult; +import com.mindee.parsing.v2.field.InferenceFields; import java.io.IOException; public class SimpleMindeeClientV2 { @@ -18,7 +18,6 @@ public class SimpleMindeeClientV2 { MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey); // Set inference parameters - // Note: modelId is mandatory. InferenceParameters extractionParams = InferenceParameters // ID of the model, required. .builder(modelId) @@ -40,7 +39,7 @@ public class SimpleMindeeClientV2 { // Load a file from disk LocalInputSource inputSource = new LocalInputSource(filePath); - // Send for processing + // Send for processing using polling InferenceResponse response = mindeeClient.enqueueAndGetResult( InferenceResponse.class, inputSource, @@ -51,6 +50,6 @@ public class SimpleMindeeClientV2 { System.out.println(response.getInference().toString()); // Access the result fields - InferenceResult result = response.getInference().getResult(); + InferenceFields fields = response.getInference().getResult().getFields(); } } diff --git a/docs/code_samples/v2_ocr.txt b/docs/code_samples/v2_ocr.txt index a6cdcd771..95c676021 100644 --- a/docs/code_samples/v2_ocr.txt +++ b/docs/code_samples/v2_ocr.txt @@ -3,7 +3,6 @@ import com.mindee.input.LocalInputSource; import com.mindee.v2.product.ocr.OcrResponse; import com.mindee.v2.product.ocr.OcrResult; import com.mindee.v2.product.ocr.params.OcrParameters; -import java.io.File; import java.io.IOException; public class SimpleMindeeClientV2 { @@ -19,7 +18,6 @@ public class SimpleMindeeClientV2 { MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey); // Set inference parameters - // Note: modelId is mandatory. OcrParameters ocrParams = OcrParameters // ID of the model, required. .builder(modelId) @@ -28,7 +26,7 @@ public class SimpleMindeeClientV2 { // Load a file from disk LocalInputSource inputSource = new LocalInputSource(filePath); - // Send for processing + // Send for processing using polling OcrResponse response = mindeeClient.enqueueAndGetResult( OcrResponse.class, inputSource, diff --git a/docs/code_samples/v2_split.txt b/docs/code_samples/v2_split.txt index cd9b56b8f..b71623d36 100644 --- a/docs/code_samples/v2_split.txt +++ b/docs/code_samples/v2_split.txt @@ -3,7 +3,6 @@ import com.mindee.input.LocalInputSource; import com.mindee.v2.product.split.SplitResponse; import com.mindee.v2.product.split.SplitResult; import com.mindee.v2.product.split.params.SplitParameters; -import java.io.File; import java.io.IOException; public class SimpleMindeeClientV2 { @@ -19,7 +18,6 @@ public class SimpleMindeeClientV2 { MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey); // Set inference parameters - // Note: modelId is mandatory. SplitParameters splitParams = SplitParameters // ID of the model, required. .builder(modelId) @@ -28,7 +26,7 @@ public class SimpleMindeeClientV2 { // Load a file from disk LocalInputSource inputSource = new LocalInputSource(filePath); - // Send for processing + // Send for processing using polling SplitResponse response = mindeeClient.enqueueAndGetResult( SplitResponse.class, inputSource,