Class InferenceRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<InferenceRequest.Builder>
co.elastic.clients.elasticsearch.inference.InferenceRequest.Builder
- All Implemented Interfaces:
WithJson<InferenceRequest.Builder>
,ObjectBuilder<InferenceRequest>
- Enclosing class:
- InferenceRequest
public static class InferenceRequest.Builder
extends RequestBase.AbstractBuilder<InferenceRequest.Builder>
implements ObjectBuilder<InferenceRequest>
Builder for
InferenceRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aInferenceRequest
.final InferenceRequest.Builder
inferenceId
(String value) Required - The inference Idfinal InferenceRequest.Builder
Required - Text input to the model.final InferenceRequest.Builder
Required - Text input to the model.final InferenceRequest.Builder
Query input, required for rerank task.protected InferenceRequest.Builder
self()
final InferenceRequest.Builder
taskSettings
(JsonData value) Optional task settingsfinal InferenceRequest.Builder
The task typefinal InferenceRequest.Builder
Specifies the amount of time to wait for the inference request to complete.final InferenceRequest.Builder
Specifies the amount of time to wait for the inference request to complete.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
inferenceId
Required - The inference IdAPI name:
inference_id
-
input
Required - Text input to the model. Either a string or an array of strings.API name:
input
Adds all elements of
list
toinput
. -
input
Required - Text input to the model. Either a string or an array of strings.API name:
input
Adds one or more values to
input
. -
query
Query input, required for rerank task. Not required for other tasks.API name:
query
-
taskSettings
Optional task settingsAPI name:
task_settings
-
taskType
The task typeAPI name:
task_type
-
timeout
Specifies the amount of time to wait for the inference request to complete.API name:
timeout
-
timeout
Specifies the amount of time to wait for the inference request to complete.API name:
timeout
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<InferenceRequest.Builder>
-
build
Builds aInferenceRequest
.- Specified by:
build
in interfaceObjectBuilder<InferenceRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-