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.BuilderinferenceId(String value) Required - The unique identifier for the inference endpoint.final InferenceRequest.BuilderRequired - The text on which you want to perform the inference task.final InferenceRequest.BuilderRequired - The text on which you want to perform the inference task.final InferenceRequest.BuilderSpecifies the input data type for the text embedding model.final InferenceRequest.BuilderThe query input, which is required only for thereranktask.protected InferenceRequest.Builderself()final InferenceRequest.BuildertaskSettings(JsonData value) Task settings for the individual inference request.final InferenceRequest.BuilderThe type of inference task that the model performs.final InferenceRequest.BuilderThe amount of time to wait for the inference request to complete.final InferenceRequest.BuilderThe amount of time to wait for the inference request to complete.Methods 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
-
inferenceId
Required - The unique identifier for the inference endpoint.API name:
inference_id -
input
Required - The text on which you want to perform the inference task. It can be a single string or an array.info Inference endpoints for the
completiontask type currently only support a single string as input.API name:
inputAdds all elements of
listtoinput. -
input
Required - The text on which you want to perform the inference task. It can be a single string or an array.info Inference endpoints for the
completiontask type currently only support a single string as input.API name:
inputAdds one or more values to
input. -
inputType
Specifies the input data type for the text embedding model. Theinput_typeparameter only applies to Inference Endpoints with thetext_embeddingtask type. Possible values include:SEARCHINGESTCLASSIFICATIONCLUSTERINGNot all services support all values. Unsupported values will trigger a validation exception. Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.
info The
input_typeparameter specified on the root level of the request body will take precedence over theinput_typeparameter specified intask_settings.API name:
input_type -
query
The query input, which is required only for thereranktask. It is not required for other tasks.API name:
query -
taskSettings
Task settings for the individual inference request. These settings are specific to the task type you specified and override the task settings specified when initializing the service.API name:
task_settings -
taskType
The type of inference task that the model performs.API name:
task_type -
timeout
The amount of time to wait for the inference request to complete.API name:
timeout -
timeout
The amount of time to wait for the inference request to complete.API name:
timeout -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<InferenceRequest.Builder>
-
build
Builds aInferenceRequest.- Specified by:
buildin interfaceObjectBuilder<InferenceRequest>- Throws:
NullPointerException- if some of the required fields are null.
-