Skip to content

Commit 732d600

Browse files
committed
Resolves merge conflict
1 parent 4f6cbf5 commit 732d600

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

specification/_types/mapping/ChunkingSettings.ts

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

27+
separator_group: string
28+
29+
separators: string[]
30+
2731
max_chunk_size: integer
2832

2933
overlap?: integer

specification/inference/_types/Services.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,33 @@ export class InferenceChunkingSettings {
288288
*/
289289
sentence_overlap?: integer
290290
/**
291-
* The chunking strategy: `sentence`, `word`, `none` or `recursive`. Learn more about chunking strategies in the External documentation.
291+
* This parameter is only applicable when using the `recursive` chunking strategy.
292+
*
293+
* Sets a predefined list of separators in the saved chunking settings based on the selected text type.
294+
* Values can be `markdown` or `plaintext`.
295+
*
296+
* Using this parameter is an alternative to manually specifying a custom `separators` list.
297+
*/
298+
separator_group: string
299+
/**
300+
* A list of strings used as possible split points when chunking text with the `recursive` strategy.
301+
*
302+
* Each string can be a plain string or a regular expression (regex) pattern.
303+
* The system tries each separator in order to split the text, starting from the first item in the list.
304+
*
305+
* After splitting, it attempts to recombine smaller pieces into larger chunks that stay within
306+
* the `max_chunk_size` limit, to reduce the total number of chunks generated.
307+
*/
308+
separators: string[]
309+
/**
310+
* The chunking strategy: `sentence`, `word`, `none` or `recursive`.
311+
*
312+
* * If `strategy` is set to `recursive`, you must also specify:
313+
*
314+
* - `max_chunk_size`
315+
* - either `separators` or`separator_group`
316+
*
317+
* Learn more about different chunking strategies in the External documentation.
292318
* @server_default sentence
293319
* @ext_doc_id chunking-strategies
294320
*/

specification/inference/put/examples/request/InferencePutExample1.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ value: |-
77
"model_id": "rerank-english-v3.0",
88
"api_key": "{{COHERE_API_KEY}}"
99
}
10+
"chunking_settings": {
11+
"strategy": "recursive",
12+
"max_chunk_size": 200,
13+
"separator_group": "markdown"
1014
}

0 commit comments

Comments
 (0)