File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
specification/inference/_types Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1919
2020import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2121import { TaskType } from '../_types/TaskType'
22+ import { integer } from '@_types/Numeric'
2223
2324/**
2425 * Configuration options when storing the inference endpoint
@@ -52,6 +53,37 @@ export class InferenceEndpointInfo extends InferenceEndpoint {
5253 task_type : TaskType
5354}
5455
56+ /**
57+ * Chunking configuration object
58+ */
59+ export class InferenceChunkingSettings extends InferenceEndpoint {
60+ /**
61+ * Specifies the maximum size of a chunk in words
62+ * This value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy)
63+ * @server_default 250
64+ */
65+ max_chunk_size ?: integer
66+ /**
67+ * Specifies the number of overlapping words for chunks
68+ * Only for `word` chunking strategy
69+ * This value cannot be higher than the half of `max_chunk_size`
70+ * @server_default 100
71+ */
72+ overlap ?: integer
73+ /**
74+ * Specifies the number of overlapping sentences for chunks
75+ * Only for `sentence` chunking strategy
76+ * It can be either `1` or `0`
77+ * @server_default 1
78+ */
79+ sentence_overlap ?: integer
80+ /**
81+ * Specifies the chunking strategy
82+ * It could be either `sentence` or `word`
83+ */
84+ strategy ?: string
85+ }
86+
5587export type ServiceSettings = UserDefinedValue
5688
5789export type TaskSettings = UserDefinedValue
You can’t perform that action at this time.
0 commit comments