Class QuestionAnsweringInferenceUpdateOptions.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<QuestionAnsweringInferenceUpdateOptions.Builder>
co.elastic.clients.elasticsearch.ml.QuestionAnsweringInferenceUpdateOptions.Builder
- All Implemented Interfaces:
WithJson<QuestionAnsweringInferenceUpdateOptions.Builder>,ObjectBuilder<QuestionAnsweringInferenceUpdateOptions>
- Enclosing class:
- QuestionAnsweringInferenceUpdateOptions
public static class QuestionAnsweringInferenceUpdateOptions.Builder
extends WithJsonObjectBuilderBase<QuestionAnsweringInferenceUpdateOptions.Builder>
implements ObjectBuilder<QuestionAnsweringInferenceUpdateOptions>
Builder for
QuestionAnsweringInferenceUpdateOptions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aQuestionAnsweringInferenceUpdateOptions.maxAnswerLength(Integer value) The maximum answer length to consider for extractionnumTopClasses(Integer value) Specifies the number of top class predictions to return.Required - The question to answer given the inference contextresultsField(String value) The field that is added to incoming documents to contain the inference prediction.self()The tokenization options to update when inferringtokenization(Function<NlpTokenizationUpdateOptions.Builder, ObjectBuilder<NlpTokenizationUpdateOptions>> 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, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
question
Required - The question to answer given the inference contextAPI name:
question -
numTopClasses
Specifies the number of top class predictions to return. Defaults to 0.API name:
num_top_classes -
tokenization
public final QuestionAnsweringInferenceUpdateOptions.Builder tokenization(@Nullable NlpTokenizationUpdateOptions value) The tokenization options to update when inferringAPI name:
tokenization -
tokenization
public final QuestionAnsweringInferenceUpdateOptions.Builder tokenization(Function<NlpTokenizationUpdateOptions.Builder, ObjectBuilder<NlpTokenizationUpdateOptions>> fn) The tokenization options to update when inferringAPI name:
tokenization -
resultsField
The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name:
results_field -
maxAnswerLength
public final QuestionAnsweringInferenceUpdateOptions.Builder maxAnswerLength(@Nullable Integer value) The maximum answer length to consider for extractionAPI name:
max_answer_length -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<QuestionAnsweringInferenceUpdateOptions.Builder>
-
build
Builds aQuestionAnsweringInferenceUpdateOptions.- Specified by:
buildin interfaceObjectBuilder<QuestionAnsweringInferenceUpdateOptions>- Throws:
NullPointerException- if some of the required fields are null.
-