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 Constructor Description Builder()
-
Method Summary
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
question
Required - The question to answer given the inference contextAPI name:
question
-
numTopClasses
public final QuestionAnsweringInferenceUpdateOptions.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 QuestionAnsweringInferenceUpdateOptions.Builder tokenization(@Nullable NlpTokenizationUpdateOptions value)The tokenization options to update when inferringAPI name:
tokenization
-
tokenization
public final QuestionAnsweringInferenceUpdateOptions.Builder tokenization(java.util.function.Function<NlpTokenizationUpdateOptions.Builder,ObjectBuilder<NlpTokenizationUpdateOptions>> fn)The tokenization options to update when inferringAPI name:
tokenization
-
resultsField
public final QuestionAnsweringInferenceUpdateOptions.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 QuestionAnsweringInferenceUpdateOptions.Builder maxAnswerLength(@Nullable java.lang.Integer value)The maximum answer length to consider for extractionAPI name:
max_answer_length
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<QuestionAnsweringInferenceUpdateOptions.Builder>
-
build
Builds aQuestionAnsweringInferenceUpdateOptions
.- Specified by:
build
in interfaceObjectBuilder<QuestionAnsweringInferenceUpdateOptions>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-