@@ -34,16 +34,17 @@ public MindeeClientV2(MindeeApiV2 mindeeApi) {
3434 }
3535
3636 /**
37- * Enqueue a document in the asynchronous “Generated” queue.
37+ * Enqueue a document in the asynchronous queue.
3838 */
39- public JobResponse enqueue (
39+ public JobResponse enqueueInference (
4040 LocalInputSource inputSource ,
4141 InferenceParameters params ) throws IOException {
4242 return mindeeApi .reqPostInferenceEnqueue (inputSource , params );
4343 }
4444
4545 /**
46- * Poll queue for a previously enqueued document.
46+ * Get the status of an inference that was previously enqueued.
47+ * Can be used for polling.
4748 */
4849 public JobResponse getJob (String jobId ) {
4950 if (jobId == null || jobId .trim ().isEmpty ()) {
@@ -53,11 +54,12 @@ public JobResponse getJob(String jobId) {
5354 }
5455
5556 /**
56- * Retrieve results for a previously enqueued document.
57+ * Get the result of an inference that was previously enqueued.
58+ * The inference will only be available after it has finished processing.
5759 */
5860 public InferenceResponse getInference (String inferenceId ) {
5961 if (inferenceId == null || inferenceId .trim ().isEmpty ()) {
60- throw new IllegalArgumentException ("jobId must not be null or blank." );
62+ throw new IllegalArgumentException ("inferenceId must not be null or blank." );
6163 }
6264
6365 return mindeeApi .reqGetInference (inferenceId );
@@ -77,7 +79,7 @@ public InferenceResponse enqueueAndGetInference(
7779
7880 validatePollingOptions (options .getPollingOptions ());
7981
80- JobResponse job = enqueue (inputSource , options );
82+ JobResponse job = enqueueInference (inputSource , options );
8183
8284 Thread .sleep ((long ) (options .getPollingOptions ().getInitialDelaySec () * 1000 ));
8385 JobResponse resp = job ;
@@ -102,7 +104,7 @@ else if (resp.getJob().getStatus().equals("Processed")) {
102104 }
103105
104106 /**
105- * Deserialize a webhook payload (or any saved response) into
107+ * Deserialize a webhook payload (or any saved response) into an
106108 * {@link InferenceResponse}.
107109 */
108110 public InferenceResponse loadInference (LocalResponse localResponse ) throws IOException {
0 commit comments