From f4a1ee2a9de6b72cbf6a02ae66874700927a6220 Mon Sep 17 00:00:00 2001 From: kosabogi <105062005+kosabogi@users.noreply.github.com> Date: Wed, 27 Aug 2025 15:00:19 +0200 Subject: [PATCH] Sets 'separators' and 'separators_group' parameters to optional and updates descriptions (#5216) * Sets separators and separators_group parameters to optional and updates descriptions * Fixes code style error (cherry picked from commit ac89683f5d6a90d5a40e12537fd61a8d1130fbe2) --- specification/_types/mapping/ChunkingSettings.ts | 4 ++-- specification/inference/_types/Services.ts | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/specification/_types/mapping/ChunkingSettings.ts b/specification/_types/mapping/ChunkingSettings.ts index 8e942c898e..75454d0956 100644 --- a/specification/_types/mapping/ChunkingSettings.ts +++ b/specification/_types/mapping/ChunkingSettings.ts @@ -24,9 +24,9 @@ import { OverloadOf } from '@spec_utils/behaviors' export class ChunkingSettings implements OverloadOf { strategy: string - separator_group: string + separator_group?: string - separators: string[] + separators?: string[] max_chunk_size: integer diff --git a/specification/inference/_types/Services.ts b/specification/inference/_types/Services.ts index 69b084d63d..706c6a92ef 100644 --- a/specification/inference/_types/Services.ts +++ b/specification/inference/_types/Services.ts @@ -310,16 +310,18 @@ export class InferenceChunkingSettings { */ sentence_overlap?: integer /** - * This parameter is only applicable when using the `recursive` chunking strategy. + * Only applicable to the `recursive` strategy and required when using it. * * Sets a predefined list of separators in the saved chunking settings based on the selected text type. * Values can be `markdown` or `plaintext`. * * Using this parameter is an alternative to manually specifying a custom `separators` list. */ - separator_group: string + separator_group?: string /** - * A list of strings used as possible split points when chunking text with the `recursive` strategy. + * Only applicable to the `recursive` strategy and required when using it. + * + * A list of strings used as possible split points when chunking text. * * Each string can be a plain string or a regular expression (regex) pattern. * The system tries each separator in order to split the text, starting from the first item in the list. @@ -327,7 +329,7 @@ export class InferenceChunkingSettings { * After splitting, it attempts to recombine smaller pieces into larger chunks that stay within * the `max_chunk_size` limit, to reduce the total number of chunks generated. */ - separators: string[] + separators?: string[] /** * The chunking strategy: `sentence`, `word`, `none` or `recursive`. *