File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed
Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,10 @@ public InferenceResponse enqueueAndGetInference(
114114
115115
116116 /**
117- * Common logic for polling an asynchronous job until it is either processed
118- * successfully or fails / times out.
117+ * Common logic for polling an asynchronous job for local & url files.
119118 * @param initialJob The initial job response.
120119 * @return an instance of {@link InferenceResponse}.
121- * @throws InterruptedException Throws if the thread is interrupted.
120+ * @throws InterruptedException Throws if interrupted.
122121 */
123122 private InferenceResponse pollAndFetch (JobResponse initialJob ,
124123 InferenceParameters options ) throws InterruptedException {
Original file line number Diff line number Diff line change 1313public abstract class MindeeApiV2 extends MindeeApiCommon {
1414 /**
1515 * Send a file to the prediction queue with a local file.
16+ * @param inputSource Local input source from URL.
17+ * @param options parameters.
1618 */
1719 public abstract JobResponse reqPostInferenceEnqueue (
1820 LocalInputSource inputSource ,
@@ -21,6 +23,8 @@ public abstract JobResponse reqPostInferenceEnqueue(
2123
2224 /**
2325 * Send a file to the prediction queue with a remote file.
26+ * @param inputSource Remote input source from URL.
27+ * @param options parameters.
2428 */
2529 public abstract JobResponse reqPostInferenceEnqueue (
2630 URLInputSource inputSource ,
@@ -29,13 +33,15 @@ public abstract JobResponse reqPostInferenceEnqueue(
2933
3034 /**
3135 * Attempts to poll the queue.
36+ * @param jobId id of the job to get.
3237 */
3338 public abstract JobResponse reqGetJob (
3439 String jobId
3540 );
3641
3742 /**
3843 * Retrieves the inference from a 302 redirect.
44+ * @param inferenceId ID of the inference to poll.
3945 */
40- abstract public InferenceResponse reqGetInference (String jobId );
46+ abstract public InferenceResponse reqGetInference (String inferenceId );
4147}
Original file line number Diff line number Diff line change @@ -191,9 +191,9 @@ public JobResponse reqGetJob(
191191 }
192192
193193 @ Override
194- public InferenceResponse reqGetInference (String jobId ) {
194+ public InferenceResponse reqGetInference (String inferenceId ) {
195195
196- String url = this .mindeeSettings .getBaseUrl () + "/inferences/" + jobId ;
196+ String url = this .mindeeSettings .getBaseUrl () + "/inferences/" + inferenceId ;
197197 HttpGet get = new HttpGet (url );
198198
199199 if (this .mindeeSettings .getApiKey ().isPresent ()) {
Original file line number Diff line number Diff line change 44import com .mindee .input .LocalInputSource ;
55import com .mindee .input .URLInputSource ;
66import com .mindee .parsing .v2 .InferenceResponse ;
7-
87import java .io .File ;
98import java .io .IOException ;
10-
119import org .junit .jupiter .api .*;
12-
1310import static org .junit .jupiter .api .Assertions .*;
14- import static org .junit .jupiter .api .Assumptions .assumeTrue ;
1511
1612@ TestInstance (TestInstance .Lifecycle .PER_CLASS )
1713@ Tag ("integration" )
You can’t perform that action at this time.
0 commit comments