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 QuestionAnsweringInferenceOptions
build()
Builds aQuestionAnsweringInferenceOptions
.QuestionAnsweringInferenceOptions.Builder
maxAnswerLength(java.lang.Integer value)
The maximum answer length to considerQuestionAnsweringInferenceOptions.Builder
numTopClasses(java.lang.Integer value)
Specifies the number of top class predictions to return.QuestionAnsweringInferenceOptions.Builder
resultsField(java.lang.String value)
The field that is added to incoming documents to contain the inference prediction.protected QuestionAnsweringInferenceOptions.Builder
self()
QuestionAnsweringInferenceOptions.Builder
tokenization(TokenizationConfig value)
The tokenization options to update when inferringQuestionAnsweringInferenceOptions.Builder
tokenization(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)
The tokenization options to update when inferringMethods 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
-
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:
self
in classWithJsonObjectBuilderBase<QuestionAnsweringInferenceOptions.Builder>
-
build
Builds aQuestionAnsweringInferenceOptions
.- Specified by:
build
in interfaceObjectBuilder<QuestionAnsweringInferenceOptions>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-