Class TextClassificationInferenceOptions.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<TextClassificationInferenceOptions.Builder>
co.elastic.clients.elasticsearch.ml.TextClassificationInferenceOptions.Builder
- All Implemented Interfaces:
- WithJson<TextClassificationInferenceOptions.Builder>,- ObjectBuilder<TextClassificationInferenceOptions>
- Enclosing class:
- TextClassificationInferenceOptions
public static class TextClassificationInferenceOptions.Builder
extends WithJsonObjectBuilderBase<TextClassificationInferenceOptions.Builder>
implements ObjectBuilder<TextClassificationInferenceOptions>
Builder for 
TextClassificationInferenceOptions.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds aTextClassificationInferenceOptions.classificationLabels(String value, String... values) Classification labels to apply other than the stored labels.classificationLabels(List<String> list) Classification labels to apply other than the stored labels.numTopClasses(Integer value) Specifies the number of top class predictions to return.resultsField(String value) The field that is added to incoming documents to contain the inference prediction.self()tokenization(TokenizationConfig value) The tokenization optionsThe tokenization optionsThe tokenization optionsvocabulary(Vocabulary value) API name:vocabularyAPI name:vocabularyMethods 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- 
numTopClassesSpecifies the number of top class predictions to return. Defaults to 0.API name: num_top_classes
- 
tokenizationpublic final TextClassificationInferenceOptions.Builder tokenization(@Nullable TokenizationConfig value) The tokenization optionsAPI name: tokenization
- 
tokenizationpublic final TextClassificationInferenceOptions.Builder tokenization(Function<TokenizationConfig.Builder, ObjectBuilder<TokenizationConfig>> fn) The tokenization optionsAPI name: tokenization
- 
tokenizationpublic final TextClassificationInferenceOptions.Builder tokenization(TokenizationConfigVariant value) The tokenization optionsAPI name: tokenization
- 
resultsFieldThe field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name: results_field
- 
classificationLabelsClassification labels to apply other than the stored labels. Must have the same deminsions as the default configured labelsAPI name: classification_labelsAdds all elements of listtoclassificationLabels.
- 
classificationLabelspublic final TextClassificationInferenceOptions.Builder classificationLabels(String value, String... values) Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labelsAPI name: classification_labelsAdds one or more values to classificationLabels.
- 
vocabularyAPI name:vocabulary
- 
vocabularypublic final TextClassificationInferenceOptions.Builder vocabulary(Function<Vocabulary.Builder, ObjectBuilder<Vocabulary>> fn) API name:vocabulary
- 
self- Specified by:
- selfin class- WithJsonObjectBuilderBase<TextClassificationInferenceOptions.Builder>
 
- 
buildBuilds aTextClassificationInferenceOptions.- Specified by:
- buildin interface- ObjectBuilder<TextClassificationInferenceOptions>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-