Skip to content

Commit 0318904

Browse files
committed
📝 explicit params in samples to ease documentation
1 parent 61c42d4 commit 0318904

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public final class InferenceParameters {
2929
* IDs of webhooks to propagate the API response to (may be empty).
3030
*/
3131
private final List<String> webhookIds;
32-
/*
33-
* Asynchronous polling options.
32+
/**
33+
* Polling options. Set only if having timeout issues.
3434
*/
3535
private final AsyncPollingOptions pollingOptions;
3636

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ void parseFile_emptyMultiPage_mustSucceed() throws IOException, InterruptedExcep
3030
LocalInputSource source = new LocalInputSource(
3131
new File("src/test/resources/file_types/pdf/multipage_cut-2.pdf"));
3232

33-
InferenceParameters options =
34-
InferenceParameters.builder(modelId).build();
33+
InferenceParameters options = InferenceParameters
34+
.builder(modelId)
35+
.rag(false)
36+
.alias("java-integration-test")
37+
.build();
3538

3639
InferenceResponse response = mindeeClient.enqueueAndGetInference(source, options);
3740

@@ -54,8 +57,10 @@ void parseFile_filledSinglePage_mustSucceed() throws IOException, InterruptedExc
5457
LocalInputSource source = new LocalInputSource(
5558
new File("src/test/resources/products/financial_document/default_sample.jpg"));
5659

57-
InferenceParameters options = InferenceParameters.builder(modelId)
60+
InferenceParameters options = InferenceParameters
61+
.builder(modelId)
5862
.rag(false)
63+
.alias("java-integration-test")
5964
.build();
6065

6166
InferenceResponse response = mindeeClient.enqueueAndGetInference(source, options);
@@ -90,8 +95,9 @@ void invalidModel_mustThrowError() throws IOException {
9095
LocalInputSource source = new LocalInputSource(
9196
new File("src/test/resources/file_types/pdf/multipage_cut-2.pdf"));
9297

93-
InferenceParameters options =
94-
InferenceParameters.builder("INVALID MODEL ID").build();
98+
InferenceParameters options = InferenceParameters
99+
.builder("INVALID MODEL ID")
100+
.build();
95101

96102
MindeeHttpExceptionV2 ex = assertThrows(
97103
MindeeHttpExceptionV2.class,
@@ -118,8 +124,9 @@ void urlInputSource_mustNotRaiseErrors() throws IOException, InterruptedExceptio
118124
"https://upload.wikimedia.org/wikipedia/commons/1/1d/Blank_Page.pdf"
119125
).build();
120126

121-
InferenceParameters options =
122-
InferenceParameters.builder(modelId).build();
127+
InferenceParameters options = InferenceParameters
128+
.builder(modelId)
129+
.build();
123130

124131
InferenceResponse response = mindeeClient.enqueueAndGetInference(urlSource, options);
125132

0 commit comments

Comments
 (0)