Class ZeroShotClassificationInferenceOptions.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ZeroShotClassificationInferenceOptions.Builder>
co.elastic.clients.elasticsearch.ml.ZeroShotClassificationInferenceOptions.Builder
- All Implemented Interfaces:
WithJson<ZeroShotClassificationInferenceOptions.Builder>
,ObjectBuilder<ZeroShotClassificationInferenceOptions>
- Enclosing class:
- ZeroShotClassificationInferenceOptions
public static class ZeroShotClassificationInferenceOptions.Builder
extends WithJsonObjectBuilderBase<ZeroShotClassificationInferenceOptions.Builder>
implements ObjectBuilder<ZeroShotClassificationInferenceOptions>
Builder for
ZeroShotClassificationInferenceOptions
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aZeroShotClassificationInferenceOptions
.classificationLabels
(String value, String... values) Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionclassificationLabels
(List<String> list) Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionhypothesisTemplate
(String value) Hypothesis template used when tokenizing labels for predictionThe labels to predict.The labels to predict.multiLabel
(Boolean value) Indicates if more than one true label exists.resultsField
(String value) The field that is added to incoming documents to contain the inference prediction.self()
tokenization
(TokenizationConfig value) The tokenization options to update when inferringThe tokenization options to update when inferringMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
tokenization
public final ZeroShotClassificationInferenceOptions.Builder tokenization(@Nullable TokenizationConfig value) The tokenization options to update when inferringAPI name:
tokenization
-
tokenization
public final ZeroShotClassificationInferenceOptions.Builder tokenization(Function<TokenizationConfig.Builder, ObjectBuilder<TokenizationConfig>> fn) The tokenization options to update when inferringAPI name:
tokenization
-
hypothesisTemplate
public final ZeroShotClassificationInferenceOptions.Builder hypothesisTemplate(@Nullable String value) Hypothesis template used when tokenizing labels for predictionAPI name:
hypothesis_template
-
classificationLabels
Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionAPI name:
classification_labels
Adds all elements of
list
toclassificationLabels
. -
classificationLabels
public final ZeroShotClassificationInferenceOptions.Builder classificationLabels(String value, String... values) Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionAPI name:
classification_labels
Adds one or more values to
classificationLabels
. -
resultsField
The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name:
results_field
-
multiLabel
Indicates if more than one true label exists.API name:
multi_label
-
labels
The labels to predict.API name:
labels
Adds all elements of
list
tolabels
. -
labels
The labels to predict.API name:
labels
Adds one or more values to
labels
. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<ZeroShotClassificationInferenceOptions.Builder>
-
build
Builds aZeroShotClassificationInferenceOptions
.- Specified by:
build
in interfaceObjectBuilder<ZeroShotClassificationInferenceOptions>
- Throws:
NullPointerException
- if some of the required fields are null.
-