Skip to content

Commit b5d89ae

Browse files
committed
eclipse test
1 parent b8ad08e commit b5d89ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+574
-405
lines changed

src/main/java/com/mindee/AsyncPollingOptions.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ public class AsyncPollingOptions {
2222
Integer maxRetries;
2323

2424
@Builder
25-
private AsyncPollingOptions(
26-
Double initialDelaySec,
27-
Double intervalSec,
28-
Integer maxRetries
29-
) {
25+
private AsyncPollingOptions(Double initialDelaySec, Double intervalSec, Integer maxRetries) {
3026
this.initialDelaySec = initialDelaySec == null ? 2.0 : initialDelaySec;
3127
this.intervalSec = intervalSec == null ? 1.5 : intervalSec;
3228
this.maxRetries = maxRetries == null ? 80 : maxRetries;

src/main/java/com/mindee/InferenceParameters.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@ public final class InferenceParameters {
3636
*/
3737
private final String alias;
3838
/**
39-
* Webhook IDs to call after all processing is finished. If empty, no webhooks will be used.
39+
* Webhook IDs to call after all processing is finished.
40+
* If empty, no webhooks will be used.
4041
*/
4142
private final String[] webhookIds;
4243
/**
4344
* Polling options. Set only if having timeout issues.
4445
*/
4546
private final AsyncPollingOptions pollingOptions;
4647
/**
47-
* Additional text context used by the model during inference. Not recommended, for specific use only.
48+
* Additional text context used by the model during inference.
49+
* Not recommended, for specific use only.
4850
*/
4951
private final String textContext;
5052
/**
@@ -73,7 +75,7 @@ public static final class Builder {
7375
private Boolean polygon = null;
7476
private Boolean confidence = null;
7577
private String alias;
76-
private String[] webhookIds = new String[]{};
78+
private String[] webhookIds = new String[] {};
7779
private String textContext;
7880
private String dataSchema;
7981
private AsyncPollingOptions pollingOptions = AsyncPollingOptions.builder().build();
@@ -142,16 +144,16 @@ public Builder pollingOptions(AsyncPollingOptions pollingOptions) {
142144
/** Build an immutable {@link InferenceParameters} instance. */
143145
public InferenceParameters build() {
144146
return new InferenceParameters(
145-
modelId,
146-
rag,
147-
rawText,
148-
polygon,
149-
confidence,
150-
alias,
151-
webhookIds,
152-
pollingOptions,
153-
textContext,
154-
dataSchema
147+
modelId,
148+
rag,
149+
rawText,
150+
polygon,
151+
confidence,
152+
alias,
153+
webhookIds,
154+
pollingOptions,
155+
textContext,
156+
dataSchema
155157
);
156158
}
157159
}

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public MindeeClientV2(String apiKey) {
2626
this(createDefaultApiV2(apiKey));
2727
}
2828

29-
3029
/** Inject both a PDF implementation and an HTTP implementation. */
3130
public MindeeClientV2(MindeeApiV2 mindeeApi) {
3231
this.mindeeApi = mindeeApi;
@@ -42,7 +41,6 @@ public JobResponse enqueueInference(
4241
return mindeeApi.reqPostInferenceEnqueue(inputSource, params);
4342
}
4443

45-
4644
/**
4745
* Enqueue a document in the asynchronous queue.
4846
*/
@@ -77,6 +75,7 @@ public InferenceResponse getInference(String inferenceId) {
7775

7876
/**
7977
* Send a local file to an async queue, poll, and parse when complete.
78+
*
8079
* @param inputSource The input source to send.
8180
* @param options The options to send along with the file.
8281
* @return an instance of {@link InferenceResponse}.
@@ -92,10 +91,9 @@ public InferenceResponse enqueueAndGetInference(
9291
return pollAndFetch(job, options);
9392
}
9493

95-
96-
9794
/**
9895
* Send a local file to an async queue, poll, and parse when complete.
96+
*
9997
* @param inputSource The input source to send.
10098
* @param options The options to send along with the file.
10199
* @return an instance of {@link InferenceResponse}.
@@ -111,9 +109,9 @@ public InferenceResponse enqueueAndGetInference(
111109
return pollAndFetch(job, options);
112110
}
113111

114-
115112
/**
116113
* Common logic for polling an asynchronous job for local & url files.
114+
*
117115
* @param initialJob The initial job response.
118116
* @return an instance of {@link InferenceResponse}.
119117
* @throws InterruptedException Throws if interrupted.
@@ -152,9 +150,7 @@ private static MindeeApiV2 createDefaultApiV2(String apiKey) {
152150
MindeeSettingsV2 settings = apiKey == null || apiKey.trim().isEmpty()
153151
? new MindeeSettingsV2()
154152
: new MindeeSettingsV2(apiKey);
155-
return MindeeHttpApiV2.builder()
156-
.mindeeSettings(settings)
157-
.build();
153+
return MindeeHttpApiV2.builder().mindeeSettings(settings).build();
158154
}
159155

160156
private static void validatePollingOptions(AsyncPollingOptions p) {

0 commit comments

Comments
 (0)