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:
  • Field Details

  • Method Details

    • of

    • maxChunkSize

      @Nullable public final Integer maxChunkSize()
      Specifies the maximum size of a chunk in words This value cannot be higher than 300 or lower than 20 (for sentence strategy) or 10 (for word strategy)

      API name: max_chunk_size

    • overlap

      @Nullable public final Integer overlap()
      Specifies the number of overlapping words for chunks Only for word chunking strategy This value cannot be higher than the half of max_chunk_size

      API name: overlap

    • sentenceOverlap

      @Nullable public final Integer sentenceOverlap()
      Specifies the number of overlapping sentences for chunks Only for sentence chunking strategy It can be either 1 or 0

      API name: sentence_overlap

    • strategy

      @Nullable public final String strategy()
      Specifies the chunking strategy It could be either sentence or word

      API name: strategy

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupInferenceChunkingSettingsDeserializer

      protected static void setupInferenceChunkingSettingsDeserializer(ObjectDeserializer<InferenceChunkingSettings.Builder> op)