Class TextEmbeddingRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<TextEmbeddingRequest.Builder>
co.elastic.clients.elasticsearch.inference.TextEmbeddingRequest.Builder
- All Implemented Interfaces:
WithJson<TextEmbeddingRequest.Builder>,ObjectBuilder<TextEmbeddingRequest>
- Enclosing class:
- TextEmbeddingRequest
public static class TextEmbeddingRequest.Builder
extends RequestBase.AbstractBuilder<TextEmbeddingRequest.Builder>
implements ObjectBuilder<TextEmbeddingRequest>
Builder for
TextEmbeddingRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTextEmbeddingRequest.inferenceId(String value) Required - The inference IdRequired - Inference input.Required - Inference input.The input data type for the text embedding model.protected TextEmbeddingRequest.Builderself()taskSettings(JsonData value) Optional task settingsSpecifies the amount of time to wait for the inference request to complete.Specifies the 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 inference IdAPI name:
inference_id -
input
Required - Inference input. Either a string or an array of strings.API name:
inputAdds all elements of
listtoinput. -
input
Required - Inference input. Either a string or an array of strings.API name:
inputAdds one or more values to
input. -
inputType
The input data type for the text embedding model. 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 -
taskSettings
Optional task settingsAPI name:
task_settings -
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:
selfin classRequestBase.AbstractBuilder<TextEmbeddingRequest.Builder>
-
build
Builds aTextEmbeddingRequest.- Specified by:
buildin interfaceObjectBuilder<TextEmbeddingRequest>- Throws:
NullPointerException- if some of the required fields are null.
-