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 IntegerSpecifies the maximum size of a chunk in words This value cannot be higher than300or lower than20(forsentencestrategy) or10(forwordstrategy)static InferenceChunkingSettingsfinal Integeroverlap()Specifies the number of overlapping words for chunks Only forwordchunking strategy This value cannot be higher than the half ofmax_chunk_sizefinal IntegerSpecifies the number of overlapping sentences for chunks Only forsentencechunking strategy It can be either1or0voidserialize(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()Specifies the chunking strategy It could be eithersentenceorwordtoString()
-
Field Details
-
_DESERIALIZER
Json deserializer forInferenceChunkingSettings
-
-
Method Details
-
of
public static InferenceChunkingSettings of(Function<InferenceChunkingSettings.Builder, ObjectBuilder<InferenceChunkingSettings>> fn) -
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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupInferenceChunkingSettingsDeserializer
protected static void setupInferenceChunkingSettingsDeserializer(ObjectDeserializer<InferenceChunkingSettings.Builder> op)
-