Skip to content

Commit e8e88dd

Browse files
fixes
1 parent 55a4fd1 commit e8e88dd

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/main/java/com/mindee/MindeeClientV2.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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 {

src/main/java/com/mindee/http/MindeeApiV2.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
public 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
}

src/main/java/com/mindee/http/MindeeHttpApiV2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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()) {

src/test/java/com/mindee/MindeeClientV2IT.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@
44
import com.mindee.input.LocalInputSource;
55
import com.mindee.input.URLInputSource;
66
import com.mindee.parsing.v2.InferenceResponse;
7-
87
import java.io.File;
98
import java.io.IOException;
10-
119
import org.junit.jupiter.api.*;
12-
1310
import 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")

0 commit comments

Comments
 (0)