Class InferTrainedModelRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<InferTrainedModelRequest.Builder>
co.elastic.clients.elasticsearch.ml.InferTrainedModelRequest.Builder
- All Implemented Interfaces:
WithJson<InferTrainedModelRequest.Builder>
,ObjectBuilder<InferTrainedModelRequest>
- Enclosing class:
- InferTrainedModelRequest
public static class InferTrainedModelRequest.Builder extends RequestBase.AbstractBuilder<InferTrainedModelRequest.Builder> implements ObjectBuilder<InferTrainedModelRequest>
Builder for
InferTrainedModelRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description InferTrainedModelRequest
build()
Builds aInferTrainedModelRequest
.InferTrainedModelRequest.Builder
docs(java.util.List<java.util.Map<java.lang.String,JsonData>> list)
Required - An array of objects to pass to the model for inference.InferTrainedModelRequest.Builder
docs(java.util.Map<java.lang.String,JsonData> value, java.util.Map<java.lang.String,JsonData>... values)
Required - An array of objects to pass to the model for inference.InferTrainedModelRequest.Builder
inferenceConfig(InferenceConfigUpdate value)
The inference configuration updates to apply on the API callInferTrainedModelRequest.Builder
inferenceConfig(java.util.function.Function<InferenceConfigUpdate.Builder,ObjectBuilder<InferenceConfigUpdate>> fn)
The inference configuration updates to apply on the API callInferTrainedModelRequest.Builder
modelId(java.lang.String value)
Required - The unique identifier of the trained model.protected InferTrainedModelRequest.Builder
self()
InferTrainedModelRequest.Builder
timeout(Time value)
Controls the amount of time to wait for inference results.InferTrainedModelRequest.Builder
timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Controls the amount of time to wait for inference results.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
-
docs
public final InferTrainedModelRequest.Builder docs(java.util.List<java.util.Map<java.lang.String,JsonData>> list)Required - An array of objects to pass to the model for inference. The objects should contain a fields matching your configured trained model input. Typically, for NLP models, the field name istext_field
. Currently, for NLP models, only a single value is allowed.API name:
docs
Adds all elements of
list
todocs
. -
docs
public final InferTrainedModelRequest.Builder docs(java.util.Map<java.lang.String,JsonData> value, java.util.Map<java.lang.String,JsonData>... values)Required - An array of objects to pass to the model for inference. The objects should contain a fields matching your configured trained model input. Typically, for NLP models, the field name istext_field
. Currently, for NLP models, only a single value is allowed.API name:
docs
Adds one or more values to
docs
. -
inferenceConfig
public final InferTrainedModelRequest.Builder inferenceConfig(@Nullable InferenceConfigUpdate value)The inference configuration updates to apply on the API callAPI name:
inference_config
-
inferenceConfig
public final InferTrainedModelRequest.Builder inferenceConfig(java.util.function.Function<InferenceConfigUpdate.Builder,ObjectBuilder<InferenceConfigUpdate>> fn)The inference configuration updates to apply on the API callAPI name:
inference_config
-
modelId
Required - The unique identifier of the trained model.API name:
model_id
-
timeout
Controls the amount of time to wait for inference results.API name:
timeout
-
timeout
public final InferTrainedModelRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Controls the amount of time to wait for inference results.API name:
timeout
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<InferTrainedModelRequest.Builder>
-
build
Builds aInferTrainedModelRequest
.- Specified by:
build
in interfaceObjectBuilder<InferTrainedModelRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-