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 SummaryConstructors
- 
Method SummaryModifier 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 inferringThe tokenization options to update when inferringMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBasewithJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
tokenizationpublic final ZeroShotClassificationInferenceOptions.Builder tokenization(@Nullable TokenizationConfig value) The tokenization options to update when inferringAPI name: tokenization
- 
tokenizationpublic final ZeroShotClassificationInferenceOptions.Builder tokenization(Function<TokenizationConfig.Builder, ObjectBuilder<TokenizationConfig>> fn) The tokenization options to update when inferringAPI name: tokenization
- 
tokenizationpublic final ZeroShotClassificationInferenceOptions.Builder tokenization(TokenizationConfigVariant value) The tokenization options to update when inferringAPI name: tokenization
- 
hypothesisTemplatepublic final ZeroShotClassificationInferenceOptions.Builder hypothesisTemplate(@Nullable String value) Hypothesis template used when tokenizing labels for predictionAPI name: hypothesis_template
- 
classificationLabelsRequired - 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.
- 
classificationLabelspublic 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_labelsAdds one or more values to classificationLabels.
- 
resultsFieldThe field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name: results_field
- 
multiLabelIndicates if more than one true label exists.API name: multi_label
- 
labelsThe labels to predict.API name: labelsAdds all elements of listtolabels.
- 
labelsThe labels to predict.API name: labelsAdds one or more values to labels.
- 
self- Specified by:
- selfin class- WithJsonObjectBuilderBase<ZeroShotClassificationInferenceOptions.Builder>
 
- 
buildBuilds aZeroShotClassificationInferenceOptions.- Specified by:
- buildin interface- ObjectBuilder<ZeroShotClassificationInferenceOptions>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-