11package com .mindee ;
22
33import com .mindee .v2 .clientOptions .BaseParameters ;
4- import java .util .Objects ;
54import lombok .EqualsAndHashCode ;
65import lombok .Getter ;
76import org .apache .hc .client5 .http .entity .mime .MultipartEntityBuilder ;
@@ -96,21 +95,16 @@ public static Builder builder(String modelId) {
9695 /**
9796 * Fluent builder for {@link InferenceParameters}.
9897 */
99- public static final class Builder {
100-
101- private final String modelId ;
98+ public static final class Builder extends BaseParameters .BaseBuilder <Builder > {
10299 private Boolean rag = null ;
103100 private Boolean rawText = null ;
104101 private Boolean polygon = null ;
105102 private Boolean confidence = null ;
106- private String alias ;
107- private String [] webhookIds = new String [] {};
108103 private String textContext ;
109104 private String dataSchema ;
110- private AsyncPollingOptions pollingOptions = AsyncPollingOptions .builder ().build ();
111105
112- private Builder (String modelId ) {
113- this . modelId = Objects . requireNonNull (modelId , "modelId must not be null" );
106+ Builder (String modelId ) {
107+ super (modelId );
114108 }
115109
116110 /** Enhance extraction accuracy with Retrieval-Augmented Generation. */
@@ -140,18 +134,6 @@ public Builder confidence(Boolean confidence) {
140134 return this ;
141135 }
142136
143- /** Set an alias for the uploaded document. */
144- public Builder alias (String alias ) {
145- this .alias = alias ;
146- return this ;
147- }
148-
149- /** Provide IDs of webhooks to forward the API response to. */
150- public Builder webhookIds (String [] webhookIds ) {
151- this .webhookIds = webhookIds ;
152- return this ;
153- }
154-
155137 /** Provide additional text context used by the model during inference. */
156138 public Builder textContext (String textContext ) {
157139 this .textContext = textContext ;
@@ -164,12 +146,6 @@ public Builder dataSchema(String dataSchema) {
164146 return this ;
165147 }
166148
167- /** Set polling options. */
168- public Builder pollingOptions (AsyncPollingOptions pollingOptions ) {
169- this .pollingOptions = pollingOptions ;
170- return this ;
171- }
172-
173149 /** Build an immutable {@link InferenceParameters} instance. */
174150 public InferenceParameters build () {
175151 return new InferenceParameters (
0 commit comments