@@ -2,7 +2,7 @@ import com.mindee.MindeeClientV2;
22import com.mindee.InferenceParameters;
33import com.mindee.input.LocalInputSource;
44import com.mindee.parsing.v2.InferenceResponse;
5- import com.mindee.parsing.v2.InferenceResult ;
5+ import com.mindee.parsing.v2.field.InferenceFields ;
66import java.io.IOException;
77
88public class SimpleMindeeClientV2 {
@@ -18,7 +18,6 @@ public class SimpleMindeeClientV2 {
1818 MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);
1919
2020 // Set inference parameters
21- // Note: modelId is mandatory.
2221 InferenceParameters extractionParams = InferenceParameters
2322 // ID of the model, required.
2423 .builder(modelId)
@@ -40,7 +39,7 @@ public class SimpleMindeeClientV2 {
4039 // Load a file from disk
4140 LocalInputSource inputSource = new LocalInputSource(filePath);
4241
43- // Send for processing
42+ // Send for processing using polling
4443 InferenceResponse response = mindeeClient.enqueueAndGetResult(
4544 InferenceResponse.class,
4645 inputSource,
@@ -51,6 +50,6 @@ public class SimpleMindeeClientV2 {
5150 System.out.println(response.getInference().toString());
5251
5352 // Access the result fields
54- InferenceResult result = response.getInference().getResult();
53+ InferenceFields fields = response.getInference().getResult().getFields ();
5554 }
5655}
0 commit comments