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
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description ZeroShotClassificationInferenceOptionsbuild()Builds aZeroShotClassificationInferenceOptions.ZeroShotClassificationInferenceOptions.BuilderclassificationLabels(java.lang.String value, java.lang.String... values)Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionZeroShotClassificationInferenceOptions.BuilderclassificationLabels(java.util.List<java.lang.String> list)Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionZeroShotClassificationInferenceOptions.BuilderhypothesisTemplate(java.lang.String value)Hypothesis template used when tokenizing labels for predictionZeroShotClassificationInferenceOptions.Builderlabels(java.lang.String value, java.lang.String... values)The labels to predict.ZeroShotClassificationInferenceOptions.Builderlabels(java.util.List<java.lang.String> list)The labels to predict.ZeroShotClassificationInferenceOptions.BuildermultiLabel(java.lang.Boolean value)Indicates if more than one true label exists.ZeroShotClassificationInferenceOptions.BuilderresultsField(java.lang.String value)The field that is added to incoming documents to contain the inference prediction.protected ZeroShotClassificationInferenceOptions.Builderself()ZeroShotClassificationInferenceOptions.Buildertokenization(TokenizationConfig value)The tokenization options to update when inferringZeroShotClassificationInferenceOptions.Buildertokenization(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)The tokenization options to update when inferringMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)The tokenization options to update when inferringAPI name:
tokenization -
hypothesisTemplate
public final ZeroShotClassificationInferenceOptions.Builder hypothesisTemplate(@Nullable java.lang.String value)Hypothesis template used when tokenizing labels for predictionAPI name:
hypothesis_template -
classificationLabels
public final ZeroShotClassificationInferenceOptions.Builder classificationLabels(java.util.List<java.lang.String> list)Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionAPI name:
classification_labelsAdds all elements of
listtoclassificationLabels. -
classificationLabels
public final ZeroShotClassificationInferenceOptions.Builder classificationLabels(java.lang.String value, java.lang.String... values)Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionAPI name:
classification_labelsAdds one or more values to
classificationLabels. -
resultsField
public final ZeroShotClassificationInferenceOptions.Builder resultsField(@Nullable java.lang.String value)The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name:
results_field -
multiLabel
public final ZeroShotClassificationInferenceOptions.Builder multiLabel(@Nullable java.lang.Boolean value)Indicates if more than one true label exists.API name:
multi_label -
labels
public final ZeroShotClassificationInferenceOptions.Builder labels(java.util.List<java.lang.String> list)The labels to predict.API name:
labelsAdds all elements of
listtolabels. -
labels
public final ZeroShotClassificationInferenceOptions.Builder labels(java.lang.String value, java.lang.String... values)The labels to predict.API name:
labelsAdds one or more values to
labels. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<ZeroShotClassificationInferenceOptions.Builder>
-
build
Builds aZeroShotClassificationInferenceOptions.- Specified by:
buildin interfaceObjectBuilder<ZeroShotClassificationInferenceOptions>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-