Class PutHuggingFaceRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutHuggingFaceRequest.Builder>
co.elastic.clients.elasticsearch.inference.PutHuggingFaceRequest.Builder
- All Implemented Interfaces:
WithJson<PutHuggingFaceRequest.Builder>,ObjectBuilder<PutHuggingFaceRequest>
- Enclosing class:
- PutHuggingFaceRequest
public static class PutHuggingFaceRequest.Builder
extends RequestBase.AbstractBuilder<PutHuggingFaceRequest.Builder>
implements ObjectBuilder<PutHuggingFaceRequest>
Builder for
PutHuggingFaceRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aPutHuggingFaceRequest.The chunking configuration object.chunkingSettings(Function<InferenceChunkingSettings.Builder, ObjectBuilder<InferenceChunkingSettings>> fn) The chunking configuration object.huggingfaceInferenceId(String value) Required - The unique identifier of the inference endpoint.protected PutHuggingFaceRequest.Builderself()service(HuggingFaceServiceType value) Required - The type of service supported for the specified task type.Required - Settings used to install the inference model.serviceSettings(Function<HuggingFaceServiceSettings.Builder, ObjectBuilder<HuggingFaceServiceSettings>> fn) Required - Settings used to install the inference model.taskType(HuggingFaceTaskType value) Required - The type of the inference task that the model will perform.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
-
chunkingSettings
public final PutHuggingFaceRequest.Builder chunkingSettings(@Nullable InferenceChunkingSettings value) The chunking configuration object.API name:
chunking_settings -
chunkingSettings
public final PutHuggingFaceRequest.Builder chunkingSettings(Function<InferenceChunkingSettings.Builder, ObjectBuilder<InferenceChunkingSettings>> fn) The chunking configuration object.API name:
chunking_settings -
huggingfaceInferenceId
Required - The unique identifier of the inference endpoint.API name:
huggingface_inference_id -
service
Required - The type of service supported for the specified task type. In this case,hugging_face.API name:
service -
serviceSettings
Required - Settings used to install the inference model. These settings are specific to thehugging_faceservice.API name:
service_settings -
serviceSettings
public final PutHuggingFaceRequest.Builder serviceSettings(Function<HuggingFaceServiceSettings.Builder, ObjectBuilder<HuggingFaceServiceSettings>> fn) Required - Settings used to install the inference model. These settings are specific to thehugging_faceservice.API name:
service_settings -
taskType
Required - The type of the inference task that the model will perform.API name:
task_type -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<PutHuggingFaceRequest.Builder>
-
build
Builds aPutHuggingFaceRequest.- Specified by:
buildin interfaceObjectBuilder<PutHuggingFaceRequest>- Throws:
NullPointerException- if some of the required fields are null.
-