-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathInferenceActiveOptions.java
More file actions
65 lines (53 loc) · 1.36 KB
/
InferenceActiveOptions.java
File metadata and controls
65 lines (53 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.mindee.parsing.v2;
import static com.mindee.parsing.SummaryHelper.formatForDisplay;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.StringJoiner;
/**
* Option response for V2 API inference.
*/
public final class InferenceActiveOptions {
@JsonProperty("rag")
private boolean rag;
@JsonProperty("raw_text")
private boolean rawText;
@JsonProperty("polygon")
private boolean polygon;
@JsonProperty("confidence")
private boolean confidence;
/**
* Whether the RAG feature was activated.
*/
public boolean getRag() {
return rag;
}
/**
* Whether the Raw Text feature was activated.
*/
public boolean getRawText() {
return rawText;
}
/**
* Whether the polygon feature was activated.
*/
public boolean getPolygon() {
return polygon;
}
/**
* Whether the confidence feature was activated.
*/
public boolean getConfidence() {
return confidence;
}
@Override
public String toString() {
StringJoiner joiner = new StringJoiner("\n");
return joiner
.add("Active Options")
.add("==============")
.add(":Raw Text: " + formatForDisplay(rawText, 5))
.add(":Polygon: " + formatForDisplay(polygon, 5))
.add(":Confidence: " + formatForDisplay(confidence, 5))
.add(":RAG: " + formatForDisplay(rag, 5))
.toString();
}
}