Skip to content

Commit ac89683

Browse files
authored
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
1 parent c5c8b19 commit ac89683

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
@@ -335,24 +335,26 @@ export class InferenceChunkingSettings {
335335
*/
336336
sentence_overlap?: integer
337337
/**
338-
* This parameter is only applicable when using the `recursive` chunking strategy.
338+
* Only applicable to the `recursive` strategy and required when using it.
339339
*
340340
* Sets a predefined list of separators in the saved chunking settings based on the selected text type.
341341
* Values can be `markdown` or `plaintext`.
342342
*
343343
* Using this parameter is an alternative to manually specifying a custom `separators` list.
344344
*/
345-
separator_group: string
345+
separator_group?: string
346346
/**
347-
* A list of strings used as possible split points when chunking text with the `recursive` strategy.
347+
* Only applicable to the `recursive` strategy and required when using it.
348+
*
349+
* A list of strings used as possible split points when chunking text.
348350
*
349351
* Each string can be a plain string or a regular expression (regex) pattern.
350352
* The system tries each separator in order to split the text, starting from the first item in the list.
351353
*
352354
* After splitting, it attempts to recombine smaller pieces into larger chunks that stay within
353355
* the `max_chunk_size` limit, to reduce the total number of chunks generated.
354356
*/
355-
separators: string[]
357+
separators?: string[]
356358
/**
357359
* The chunking strategy: `sentence`, `word`, `none` or `recursive`.
358360
*

0 commit comments

Comments
 (0)