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 IntegerThe maximum size of a chunk in words.static InferenceChunkingSettingsfinal Integeroverlap()The number of overlapping words for chunks.final IntegerThe number of overlapping sentences for chunks.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidsetupInferenceChunkingSettingsDeserializer(ObjectDeserializer<InferenceChunkingSettings.Builder> op) final Stringstrategy()The chunking strategy:sentenceorword.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 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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupInferenceChunkingSettingsDeserializer
protected static void setupInferenceChunkingSettingsDeserializer(ObjectDeserializer<InferenceChunkingSettings.Builder> op)
-