Class InferenceChunkingSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.InferenceChunkingSettings
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class InferenceChunkingSettings
extends Object
implements JsonpSerializable
Chunking configuration object
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<InferenceChunkingSettings>
Json deserializer forInferenceChunkingSettings
-
Method Summary
Modifier and TypeMethodDescriptionfinal Integer
The maximum size of a chunk in words.static InferenceChunkingSettings
final Integer
overlap()
The number of overlapping words for chunks.final Integer
The number of overlapping sentences for chunks.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
setupInferenceChunkingSettingsDeserializer
(ObjectDeserializer<InferenceChunkingSettings.Builder> op) final String
strategy()
The chunking strategy:sentence
orword
.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forInferenceChunkingSettings
-
-
Method Details
-
of
public static InferenceChunkingSettings of(Function<InferenceChunkingSettings.Builder, ObjectBuilder<InferenceChunkingSettings>> fn) -
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
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupInferenceChunkingSettingsDeserializer
protected static void setupInferenceChunkingSettingsDeserializer(ObjectDeserializer<InferenceChunkingSettings.Builder> op)
-