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 Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description TextClassificationInferenceOptionsbuild()Builds aTextClassificationInferenceOptions.TextClassificationInferenceOptions.BuilderclassificationLabels(java.lang.String value, java.lang.String... values)Classification labels to apply other than the stored labels.TextClassificationInferenceOptions.BuilderclassificationLabels(java.util.List<java.lang.String> list)Classification labels to apply other than the stored labels.TextClassificationInferenceOptions.BuildernumTopClasses(java.lang.Integer value)Specifies the number of top class predictions to return.TextClassificationInferenceOptions.BuilderresultsField(java.lang.String value)The field that is added to incoming documents to contain the inference prediction.protected TextClassificationInferenceOptions.Builderself()TextClassificationInferenceOptions.Buildertokenization(TokenizationConfig value)The tokenization optionsTextClassificationInferenceOptions.Buildertokenization(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)The tokenization optionsMethods 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
-
numTopClasses
public final TextClassificationInferenceOptions.Builder numTopClasses(@Nullable java.lang.Integer value)Specifies the number of top class predictions to return. Defaults to 0.API name:
num_top_classes -
tokenization
public final TextClassificationInferenceOptions.Builder tokenization(@Nullable TokenizationConfig value)The tokenization optionsAPI name:
tokenization -
tokenization
public final TextClassificationInferenceOptions.Builder tokenization(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)The tokenization optionsAPI name:
tokenization -
resultsField
public final TextClassificationInferenceOptions.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 -
classificationLabels
public final TextClassificationInferenceOptions.Builder classificationLabels(java.util.List<java.lang.String> list)Classification 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. -
classificationLabels
public final TextClassificationInferenceOptions.Builder classificationLabels(java.lang.String value, java.lang.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. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<TextClassificationInferenceOptions.Builder>
-
build
Builds aTextClassificationInferenceOptions.- Specified by:
buildin interfaceObjectBuilder<TextClassificationInferenceOptions>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-