Class InferenceChunkingSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<InferenceChunkingSettings.Builder>
co.elastic.clients.elasticsearch.inference.InferenceChunkingSettings.Builder
- All Implemented Interfaces:
WithJson<InferenceChunkingSettings.Builder>,ObjectBuilder<InferenceChunkingSettings>
- Enclosing class:
- InferenceChunkingSettings
public static class InferenceChunkingSettings.Builder
extends WithJsonObjectBuilderBase<InferenceChunkingSettings.Builder>
implements ObjectBuilder<InferenceChunkingSettings>
Builder for
InferenceChunkingSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aInferenceChunkingSettings.maxChunkSize(Integer value) Specifies the maximum size of a chunk in words This value cannot be higher than300or lower than20(forsentencestrategy) or10(forwordstrategy)Specifies the number of overlapping words for chunks Only forwordchunking strategy This value cannot be higher than the half ofmax_chunk_sizeprotected InferenceChunkingSettings.Builderself()sentenceOverlap(Integer value) Specifies the number of overlapping sentences for chunks Only forsentencechunking strategy It can be either1or0Specifies the chunking strategy It could be eithersentenceorwordMethods 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
-
maxChunkSize
Specifies the maximum size of a chunk in words This value cannot be higher than300or lower than20(forsentencestrategy) or10(forwordstrategy)API name:
max_chunk_size -
overlap
Specifies the number of overlapping words for chunks Only forwordchunking strategy This value cannot be higher than the half ofmax_chunk_sizeAPI name:
overlap -
sentenceOverlap
Specifies the number of overlapping sentences for chunks Only forsentencechunking strategy It can be either1or0API name:
sentence_overlap -
strategy
Specifies the chunking strategy It could be eithersentenceorwordAPI name:
strategy -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<InferenceChunkingSettings.Builder>
-
build
Builds aInferenceChunkingSettings.- Specified by:
buildin interfaceObjectBuilder<InferenceChunkingSettings>- Throws:
NullPointerException- if some of the required fields are null.
-