Class InferenceChunkingSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.InferenceEndpoint
co.elastic.clients.elasticsearch.inference.InferenceChunkingSettings
- All Implemented Interfaces:
JsonpSerializable
Chunking configuration object
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch.inference.InferenceEndpoint
InferenceEndpoint.AbstractBuilder<BuilderT extends InferenceEndpoint.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<InferenceChunkingSettings>
Json deserializer forInferenceChunkingSettings
-
Method Summary
Modifier and TypeMethodDescriptionfinal Integer
Specifies the maximum size of a chunk in words This value cannot be higher than300
or lower than20
(forsentence
strategy) or10
(forword
strategy)static InferenceChunkingSettings
final Integer
overlap()
Specifies the number of overlapping words for chunks Only forword
chunking strategy This value cannot be higher than the half ofmax_chunk_size
final Integer
Specifies the number of overlapping sentences for chunks Only forsentence
chunking strategy It can be either1
or0
protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
setupInferenceChunkingSettingsDeserializer
(ObjectDeserializer<InferenceChunkingSettings.Builder> op) final String
strategy()
Specifies the chunking strategy It could be eithersentence
orword
Methods inherited from class co.elastic.clients.elasticsearch.inference.InferenceEndpoint
chunkingSettings, inferenceEndpointOf, serialize, service, serviceSettings, setupInferenceEndpointDeserializer, taskSettings, toString
-
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 than300
or lower than20
(forsentence
strategy) or10
(forword
strategy)API name:
max_chunk_size
-
overlap
Specifies the number of overlapping words for chunks Only forword
chunking strategy This value cannot be higher than the half ofmax_chunk_size
API name:
overlap
-
sentenceOverlap
Specifies the number of overlapping sentences for chunks Only forsentence
chunking strategy It can be either1
or0
API name:
sentence_overlap
-
strategy
Specifies the chunking strategy It could be eithersentence
orword
API name:
strategy
-
serializeInternal
- Overrides:
serializeInternal
in classInferenceEndpoint
-
setupInferenceChunkingSettingsDeserializer
protected static void setupInferenceChunkingSettingsDeserializer(ObjectDeserializer<InferenceChunkingSettings.Builder> op)
-