Skip to content

Commit a9b1330

Browse files
Sets 'separators' and 'separators_group' parameters to optional and updates descriptions (#5216) (#5217)
* Sets separators and separators_group parameters to optional and updates descriptions * Fixes code style error (cherry picked from commit ac89683) Co-authored-by: kosabogi <[email protected]>
1 parent 4bd2d84 commit a9b1330

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

specification/_types/mapping/ChunkingSettings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import { OverloadOf } from '@spec_utils/behaviors'
2424
export class ChunkingSettings implements OverloadOf<InferenceChunkingSettings> {
2525
strategy: string
2626

27-
separator_group: string
27+
separator_group?: string
2828

29-
separators: string[]
29+
separators?: string[]
3030

3131
max_chunk_size: integer
3232

specification/inference/_types/Services.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,24 +310,26 @@ export class InferenceChunkingSettings {
310310
*/
311311
sentence_overlap?: integer
312312
/**
313-
* This parameter is only applicable when using the `recursive` chunking strategy.
313+
* Only applicable to the `recursive` strategy and required when using it.
314314
*
315315
* Sets a predefined list of separators in the saved chunking settings based on the selected text type.
316316
* Values can be `markdown` or `plaintext`.
317317
*
318318
* Using this parameter is an alternative to manually specifying a custom `separators` list.
319319
*/
320-
separator_group: string
320+
separator_group?: string
321321
/**
322-
* A list of strings used as possible split points when chunking text with the `recursive` strategy.
322+
* Only applicable to the `recursive` strategy and required when using it.
323+
*
324+
* A list of strings used as possible split points when chunking text.
323325
*
324326
* Each string can be a plain string or a regular expression (regex) pattern.
325327
* The system tries each separator in order to split the text, starting from the first item in the list.
326328
*
327329
* After splitting, it attempts to recombine smaller pieces into larger chunks that stay within
328330
* the `max_chunk_size` limit, to reduce the total number of chunks generated.
329331
*/
330-
separators: string[]
332+
separators?: string[]
331333
/**
332334
* The chunking strategy: `sentence`, `word`, `none` or `recursive`.
333335
*

0 commit comments

Comments
 (0)