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.Builder
self()
sentenceOverlap
(Integer value) The number of overlapping sentences for chunks.The chunking strategy:sentence
orword
.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods 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 than300
or lower than20
(forsentence
strategy) or10
(forword
strategy).API name:
max_chunk_size
-
overlap
The number of overlapping words for chunks. It is applicable only to aword
chunking strategy. This value cannot be higher than half themax_chunk_size
value.API name:
overlap
-
sentenceOverlap
The number of overlapping sentences for chunks. It is applicable only for asentence
chunking strategy. It can be either1
or0
.API name:
sentence_overlap
-
strategy
The chunking strategy:sentence
orword
.API name:
strategy
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<InferenceChunkingSettings.Builder>
-
build
Builds aInferenceChunkingSettings
.- Specified by:
build
in interfaceObjectBuilder<InferenceChunkingSettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-