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()
      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()
      The number of overlapping words for chunks. It is applicable only to a word chunking strategy. This value cannot be higher than half the max_chunk_size value.

      API name: overlap

    • sentenceOverlap

      @Nullable public final Integer sentenceOverlap()
      The number of overlapping sentences for chunks. It is applicable only for a sentence chunking strategy. It can be either 1 or 0.

      API name: sentence_overlap

    • strategy

      @Nullable public final String strategy()
      The chunking strategy: 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)