Class QuestionAnsweringInferenceOptions.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<QuestionAnsweringInferenceOptions.Builder>
co.elastic.clients.elasticsearch.ml.QuestionAnsweringInferenceOptions.Builder
- All Implemented Interfaces:
WithJson<QuestionAnsweringInferenceOptions.Builder>,ObjectBuilder<QuestionAnsweringInferenceOptions>
- Enclosing class:
- QuestionAnsweringInferenceOptions
public static class QuestionAnsweringInferenceOptions.Builder extends WithJsonObjectBuilderBase<QuestionAnsweringInferenceOptions.Builder> implements ObjectBuilder<QuestionAnsweringInferenceOptions>
Builder for
QuestionAnsweringInferenceOptions.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description QuestionAnsweringInferenceOptionsbuild()Builds aQuestionAnsweringInferenceOptions.QuestionAnsweringInferenceOptions.BuildermaxAnswerLength(java.lang.Integer value)The maximum answer length to considerQuestionAnsweringInferenceOptions.BuildernumTopClasses(java.lang.Integer value)Specifies the number of top class predictions to return.QuestionAnsweringInferenceOptions.BuilderresultsField(java.lang.String value)The field that is added to incoming documents to contain the inference prediction.protected QuestionAnsweringInferenceOptions.Builderself()QuestionAnsweringInferenceOptions.Buildertokenization(TokenizationConfig value)The tokenization options to update when inferringQuestionAnsweringInferenceOptions.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
-
numTopClasses
public final QuestionAnsweringInferenceOptions.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 QuestionAnsweringInferenceOptions.Builder tokenization(@Nullable TokenizationConfig value)The tokenization options to update when inferringAPI name:
tokenization -
tokenization
public final QuestionAnsweringInferenceOptions.Builder tokenization(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)The tokenization options to update when inferringAPI name:
tokenization -
resultsField
public final QuestionAnsweringInferenceOptions.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 -
maxAnswerLength
public final QuestionAnsweringInferenceOptions.Builder maxAnswerLength(@Nullable java.lang.Integer value)The maximum answer length to considerAPI name:
max_answer_length -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<QuestionAnsweringInferenceOptions.Builder>
-
build
Builds aQuestionAnsweringInferenceOptions.- Specified by:
buildin interfaceObjectBuilder<QuestionAnsweringInferenceOptions>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-