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) The maximum size of a chunk in words.The number of overlapping words for chunks.protected InferenceChunkingSettings.Builderself()sentenceOverlap(Integer value) The number of overlapping sentences for chunks.The chunking strategy:sentenceorword.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
-
maxChunkSize
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
The number of overlapping words for chunks. It is applicable only to awordchunking strategy. This value cannot be higher than half themax_chunk_sizevalue.API name:
overlap -
sentenceOverlap
The number of overlapping sentences for chunks. It is applicable only for asentencechunking strategy. It can be either1or0.API name:
sentence_overlap -
strategy
The chunking strategy:sentenceorword.API 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.
-