@alicloud/bailian20231229 2.14.0 → 2.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +38 -40
- package/dist/client.js +47 -41
- package/dist/client.js.map +1 -1
- package/dist/models/AddChunkRequest.d.ts +1 -1
- package/dist/models/AddChunkShrinkRequest.d.ts +1 -1
- package/dist/models/CreateIndexRequest.d.ts +163 -159
- package/dist/models/CreateIndexRequest.js.map +1 -1
- package/dist/models/CreateIndexResponseBody.d.ts +11 -13
- package/dist/models/CreateIndexResponseBody.js.map +1 -1
- package/dist/models/CreateIndexShrinkRequest.d.ts +137 -127
- package/dist/models/CreateIndexShrinkRequest.js.map +1 -1
- package/dist/models/DeleteConnectorResponseBody.d.ts +24 -0
- package/dist/models/DeleteConnectorResponseBody.js.map +1 -1
- package/dist/models/ListIndexFileDetailsRequest.d.ts +5 -5
- package/dist/models/ListIndexFileDetailsResponseBody.d.ts +11 -10
- package/dist/models/ListIndexFileDetailsResponseBody.js +2 -0
- package/dist/models/ListIndexFileDetailsResponseBody.js.map +1 -1
- package/dist/models/ListPublishedAgentRequest.d.ts +1 -0
- package/dist/models/ListPublishedAgentRequest.js +5 -0
- package/dist/models/ListPublishedAgentRequest.js.map +1 -1
- package/dist/models/ListPublishedAgentResponseBody.d.ts +3 -0
- package/dist/models/ListPublishedAgentResponseBody.js +6 -0
- package/dist/models/ListPublishedAgentResponseBody.js.map +1 -1
- package/dist/models/ListPublishedAgentShrinkRequest.d.ts +16 -0
- package/dist/models/ListPublishedAgentShrinkRequest.js +62 -0
- package/dist/models/ListPublishedAgentShrinkRequest.js.map +1 -0
- package/dist/models/model.d.ts +1 -0
- package/dist/models/model.js +4 -2
- package/dist/models/model.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +49 -41
- package/src/models/AddChunkRequest.ts +1 -1
- package/src/models/AddChunkShrinkRequest.ts +1 -1
- package/src/models/CreateIndexRequest.ts +163 -159
- package/src/models/CreateIndexResponseBody.ts +11 -13
- package/src/models/CreateIndexShrinkRequest.ts +137 -127
- package/src/models/DeleteConnectorResponseBody.ts +24 -0
- package/src/models/ListIndexFileDetailsRequest.ts +5 -5
- package/src/models/ListIndexFileDetailsResponseBody.ts +13 -10
- package/src/models/ListPublishedAgentRequest.ts +6 -0
- package/src/models/ListPublishedAgentResponseBody.ts +9 -0
- package/src/models/ListPublishedAgentShrinkRequest.ts +33 -0
- package/src/models/model.ts +1 -0
|
@@ -5,9 +5,9 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class CreateIndexResponseBodyData extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The
|
|
9
|
-
*
|
|
10
|
-
* >
|
|
8
|
+
* The knowledge base ID, also known as `IndexId`. This is the unique identifier of the created knowledge base.
|
|
9
|
+
* > Store this value properly. It is required for all subsequent API operations related to this knowledge base.
|
|
10
|
+
* >
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* jkurxhxxxx
|
|
@@ -37,22 +37,22 @@ export class CreateIndexResponseBodyData extends $dara.Model {
|
|
|
37
37
|
export class CreateIndexResponseBody extends $dara.Model {
|
|
38
38
|
/**
|
|
39
39
|
* @remarks
|
|
40
|
-
*
|
|
40
|
+
* The error status code.
|
|
41
41
|
*/
|
|
42
42
|
code?: string;
|
|
43
43
|
/**
|
|
44
44
|
* @remarks
|
|
45
|
-
* The business data returned when the request
|
|
45
|
+
* The business data returned when the request succeeds.
|
|
46
46
|
*/
|
|
47
47
|
data?: CreateIndexResponseBodyData;
|
|
48
48
|
/**
|
|
49
49
|
* @remarks
|
|
50
|
-
*
|
|
50
|
+
* The error message.
|
|
51
51
|
*/
|
|
52
52
|
message?: string;
|
|
53
53
|
/**
|
|
54
54
|
* @remarks
|
|
55
|
-
*
|
|
55
|
+
* The request ID.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
58
|
* 17204B98-xxxx-4F9A--2446A84821CA
|
|
@@ -60,7 +60,7 @@ export class CreateIndexResponseBody extends $dara.Model {
|
|
|
60
60
|
requestId?: string;
|
|
61
61
|
/**
|
|
62
62
|
* @remarks
|
|
63
|
-
* The status code returned by the
|
|
63
|
+
* The status code returned by the operation.
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
66
|
* "200"
|
|
@@ -68,11 +68,9 @@ export class CreateIndexResponseBody extends $dara.Model {
|
|
|
68
68
|
status?: string;
|
|
69
69
|
/**
|
|
70
70
|
* @remarks
|
|
71
|
-
* Indicates whether the request was successful.
|
|
72
|
-
*
|
|
73
|
-
* -
|
|
74
|
-
*
|
|
75
|
-
* - false: Failed
|
|
71
|
+
* Indicates whether the request was successful. Valid values:
|
|
72
|
+
* - true: Successful.
|
|
73
|
+
* - false: Failed.
|
|
76
74
|
*
|
|
77
75
|
* @example
|
|
78
76
|
* true
|
|
@@ -5,30 +5,28 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class CreateIndexShrinkRequest extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
*
|
|
8
|
+
* The list of category IDs to import when creating the knowledge base. All files under the specified categories are imported. We recommend importing no more than 500 files. For remaining files, call the **SubmitIndexAddDocumentsJob** operation to continue importing.
|
|
9
9
|
*/
|
|
10
10
|
categoryIdsShrink?: string;
|
|
11
11
|
/**
|
|
12
12
|
* @remarks
|
|
13
13
|
* <props="china">
|
|
14
14
|
*
|
|
15
|
-
* The chunk size, which
|
|
15
|
+
* The chunk size, which specifies the maximum number of characters per text chunk. When this length is exceeded:
|
|
16
16
|
*
|
|
17
|
-
* - **
|
|
18
|
-
*
|
|
19
|
-
* - **Custom chunking** (the \\`chunkMode\\` parameter is specified): The text is forcibly truncated.
|
|
17
|
+
* - **Intelligent chunking** (when `chunkMode` is not specified): The text is likely to be truncated.
|
|
18
|
+
* - **Custom chunking** (when `chunkMode` is specified): The text is forcibly truncated.
|
|
20
19
|
*
|
|
21
20
|
*
|
|
22
21
|
*
|
|
23
22
|
* <props="intl">
|
|
24
|
-
*
|
|
25
|
-
* The chunk size, which is the maximum number of characters for each text chunk. If this length is exceeded, the text is likely to be truncated.
|
|
23
|
+
* The chunk size, which specifies the maximum number of characters per text chunk. When this length is exceeded, the text is likely to be truncated.
|
|
26
24
|
*
|
|
27
25
|
*
|
|
28
26
|
*
|
|
29
|
-
*
|
|
27
|
+
* Value range: [1-6000]. If not specified, the default value is 500.
|
|
30
28
|
*
|
|
31
|
-
* > If
|
|
29
|
+
* > If `ChunkSize` is set to a value less than 100, you must also set `OverlapSize`. You can also leave both parameters unspecified, and the system uses default values.
|
|
32
30
|
*
|
|
33
31
|
* @example
|
|
34
32
|
* 128
|
|
@@ -37,19 +35,19 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
37
35
|
/**
|
|
38
36
|
* @remarks
|
|
39
37
|
* <props="china">
|
|
40
|
-
*
|
|
41
38
|
* The structure of the data table (column names, types, etc.).
|
|
42
39
|
*
|
|
43
40
|
*
|
|
44
|
-
*
|
|
45
41
|
* <props="intl">
|
|
46
42
|
*
|
|
47
|
-
* > This parameter is not
|
|
43
|
+
* > This parameter is not available. Do not pass this parameter.
|
|
44
|
+
* >
|
|
48
45
|
*/
|
|
49
46
|
columnsShrink?: string;
|
|
50
47
|
/**
|
|
51
48
|
* @remarks
|
|
52
|
-
* > This parameter is not
|
|
49
|
+
* > This parameter is not available. Do not pass this parameter.
|
|
50
|
+
* >
|
|
53
51
|
*
|
|
54
52
|
* @example
|
|
55
53
|
* standard
|
|
@@ -57,42 +55,40 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
57
55
|
createIndexType?: string;
|
|
58
56
|
/**
|
|
59
57
|
* @remarks
|
|
60
|
-
* The
|
|
61
|
-
*
|
|
58
|
+
* The knowledge base description. The description can be up to 1000 characters in length.
|
|
59
|
+
* Default value: empty.
|
|
62
60
|
*
|
|
63
61
|
* @example
|
|
64
|
-
*
|
|
62
|
+
* The enterprise help document library includes important materials such as company policies and product catalogs.
|
|
65
63
|
*/
|
|
66
64
|
description?: string;
|
|
67
65
|
/**
|
|
68
66
|
* @remarks
|
|
69
|
-
*
|
|
67
|
+
* The list of files to import when creating the knowledge base. Specify file IDs here. We recommend importing no more than 10,000 files. For remaining files, call the **SubmitIndexAddDocumentsJob** operation to continue importing.
|
|
70
68
|
*/
|
|
71
69
|
documentIdsShrink?: string;
|
|
72
70
|
/**
|
|
73
71
|
* @remarks
|
|
74
72
|
* <props="china">
|
|
75
73
|
*
|
|
76
|
-
* The
|
|
77
|
-
*
|
|
74
|
+
* The embedding model used by the knowledge base. The embedding model transforms the original input prompt and knowledge text into numerical vectors for similarity comparison. The text-embedding-v4 model is a comprehensive upgrade over text-embedding-v3 in terms of language support, code snippet quantization, and vector dimensions selection, and is suitable for most scenarios. For more information, see [Vectorization](https://help.aliyun.com/document_detail/2842587.html). Valid values:
|
|
78
75
|
* - text-embedding-v4
|
|
79
|
-
*
|
|
80
76
|
* - text-embedding-v3
|
|
81
77
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
78
|
+
* Default value: empty, which uses the text-embedding-v3 model.
|
|
85
79
|
*
|
|
86
|
-
* <props="intl">
|
|
87
|
-
*
|
|
88
|
-
* - The vector model used by the knowledge base. A vector model converts the original input prompt and knowledge text into numerical vectors to compare their similarity. The default text-embedding-v2 model (which cannot be changed for now) supports both Chinese and English, along with multiple other languages, and normalizes the vector results. For more information, see [Vectorization](https://help.aliyun.com/document_detail/2842587.html). Valid values:
|
|
89
80
|
*
|
|
90
81
|
*
|
|
91
82
|
*
|
|
83
|
+
* <props="intl">
|
|
92
84
|
*
|
|
85
|
+
* The embedding model used by the knowledge base. The embedding model transforms the original input prompt and knowledge text into numerical vectors for similarity comparison. The default text-embedding-v2 model (cannot be changed) supports Chinese, English, and multiple other languages, and performs normalization on vector results. For more information, see [Vectorization](https://help.aliyun.com/document_detail/2842587.html). Valid values:
|
|
93
86
|
* - text-embedding-v2
|
|
94
87
|
*
|
|
95
|
-
*
|
|
88
|
+
* Default value: empty, which uses the text-embedding-v2 model.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* text-embedding-v4
|
|
96
92
|
*/
|
|
97
93
|
embeddingModelName?: string;
|
|
98
94
|
/**
|
|
@@ -100,10 +96,9 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
100
96
|
* Specifies whether to enable multi-turn conversation rewriting. Valid values:
|
|
101
97
|
*
|
|
102
98
|
* - true: Enabled.
|
|
103
|
-
*
|
|
104
99
|
* - false: Disabled.
|
|
105
100
|
*
|
|
106
|
-
* If
|
|
101
|
+
* If not specified, this feature is enabled by default.
|
|
107
102
|
*
|
|
108
103
|
* @example
|
|
109
104
|
* true
|
|
@@ -111,21 +106,20 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
111
106
|
enableRewrite?: boolean;
|
|
112
107
|
/**
|
|
113
108
|
* @remarks
|
|
114
|
-
* The
|
|
109
|
+
* The knowledge base name. The name must be 1 to 20 characters in length and can contain Chinese characters, letters, digits, underscores (_), hyphens (-), periods (.), and colons (:).
|
|
115
110
|
*
|
|
116
111
|
* This parameter is required.
|
|
117
112
|
*
|
|
118
113
|
* @example
|
|
119
|
-
*
|
|
114
|
+
* EnterpriseHelpDocLibrary.
|
|
120
115
|
*/
|
|
121
116
|
name?: string;
|
|
122
117
|
/**
|
|
123
118
|
* @remarks
|
|
124
|
-
* The overlap size, which
|
|
119
|
+
* The chunk overlap size, which specifies the number of overlapping characters between the current text chunk and the previous text chunk. Value range: [0-1024].
|
|
125
120
|
*
|
|
126
|
-
* If
|
|
127
|
-
*
|
|
128
|
-
* > \\`OverlapSize\\` must be smaller than \\`ChunkSize\\`. Otherwise, chunking errors will occur.
|
|
121
|
+
* If not specified, the default value is 100.
|
|
122
|
+
* >`OverlapSize` must be less than `ChunkSize`. Otherwise, chunking exceptions occur.
|
|
129
123
|
*
|
|
130
124
|
* @example
|
|
131
125
|
* 16
|
|
@@ -133,16 +127,17 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
133
127
|
overlapSize?: number;
|
|
134
128
|
/**
|
|
135
129
|
* @remarks
|
|
136
|
-
*
|
|
130
|
+
* <props="intl">This parameter is not available. Do not pass this parameter.
|
|
137
131
|
*
|
|
138
|
-
*
|
|
132
|
+
* <props="china">A natural language instruction for fine-grained control of the reranking model\\"s behavior.
|
|
133
|
+
* <notice>This parameter takes effect only when rerank_mode is set to "custom".
|
|
139
134
|
*/
|
|
140
135
|
rerankInstruct?: string;
|
|
141
136
|
/**
|
|
142
137
|
* @remarks
|
|
143
|
-
* The similarity threshold. Only text chunks with
|
|
138
|
+
* The similarity threshold. Only text chunks with similarity scores exceeding this value are recalled. This parameter filters the text chunks returned by the reranking model. Value range: [0.01-1.00].
|
|
144
139
|
*
|
|
145
|
-
* If
|
|
140
|
+
* If not specified, the default value is 0.01.
|
|
146
141
|
*
|
|
147
142
|
* @example
|
|
148
143
|
* 0.20
|
|
@@ -150,9 +145,26 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
150
145
|
rerankMinScore?: number;
|
|
151
146
|
/**
|
|
152
147
|
* @remarks
|
|
153
|
-
*
|
|
148
|
+
* <props="china">
|
|
149
|
+
* Specifies the instruction intervention mode for the reranking model to determine its scoring preference.
|
|
154
150
|
*
|
|
155
|
-
*
|
|
151
|
+
* **Valid values:**
|
|
152
|
+
*
|
|
153
|
+
* - **qa**: (Default) Q&A mode. The model tends to assign higher scores to candidates that directly answer the query. Recommended for Q&A scenarios.
|
|
154
|
+
*
|
|
155
|
+
* - **similar**: Similarity mode. The model tends to assign higher scores to candidates with high content consistency with the query. Recommended for matching and retrieval scenarios.
|
|
156
|
+
*
|
|
157
|
+
* - **custom**: Custom mode. The model\\"s ranking behavior is determined by the instruction in the rerank_instruct parameter.
|
|
158
|
+
*
|
|
159
|
+
*
|
|
160
|
+
*
|
|
161
|
+
* <props="intl">This parameter is not available. Do not pass this parameter.
|
|
162
|
+
* [_single.params.RerankMode.enum.similar: 相似模式。]similar: Similarity mode.
|
|
163
|
+
* [_single.params.RerankMode.enum.custom: 自定义模式。]custom: Custom mode.
|
|
164
|
+
* [_single.params.RerankMode.enum.qa:(默认值) 问答模式。]qa: (Default) Q&A mode.
|
|
165
|
+
* [parameters.33.schema.enumValueTitles.similar: 相似模式。]similar: Similarity mode.
|
|
166
|
+
* [parameters.33.schema.enumValueTitles.custom: 自定义模式。]custom: Custom mode.
|
|
167
|
+
* [parameters.33.schema.enumValueTitles.qa:(默认值) 问答模式。]qa: (Default) Q&A mode.
|
|
156
168
|
*
|
|
157
169
|
* @example
|
|
158
170
|
* qa
|
|
@@ -160,47 +172,50 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
160
172
|
rerankMode?: string;
|
|
161
173
|
/**
|
|
162
174
|
* @remarks
|
|
163
|
-
* The reranking model used by the knowledge base. The reranking model is an external scoring system that calculates
|
|
175
|
+
* The reranking model used by the knowledge base. The reranking model is an external scoring system that calculates the similarity score between the user query and each text chunk in the knowledge base, sorts them in descending order, and returns the top K text chunks with the highest scores. Valid values:
|
|
164
176
|
*
|
|
165
|
-
* <props="china">
|
|
166
177
|
*
|
|
167
|
-
*
|
|
178
|
+
* <props="china">
|
|
168
179
|
*
|
|
180
|
+
* - qwen3-rerank-hybrid: qwen3-rerank(hybrid) reranking.
|
|
169
181
|
* - qwen3-rerank: qwen3-rerank reranking.
|
|
170
|
-
*
|
|
171
|
-
* - gte-rerank-hybrid: gte-rerank (hybrid) reranking.
|
|
172
|
-
*
|
|
182
|
+
* - gte-rerank-hybrid: gte-rerank(hybrid) reranking.
|
|
173
183
|
* - gte-rerank: gte-rerank reranking.
|
|
174
184
|
*
|
|
175
185
|
*
|
|
176
186
|
*
|
|
177
187
|
* <props="intl">
|
|
178
188
|
*
|
|
179
|
-
* - gte-rerank-hybrid:
|
|
180
|
-
*
|
|
189
|
+
* - gte-rerank-hybrid: official reranking.
|
|
181
190
|
* - gte-rerank: gte-rerank reranking.
|
|
182
191
|
*
|
|
183
192
|
*
|
|
184
193
|
*
|
|
194
|
+
*
|
|
195
|
+
*
|
|
185
196
|
* <props="china">
|
|
186
197
|
*
|
|
187
|
-
*
|
|
198
|
+
* Default value: empty, which uses qwen3-rerank.
|
|
199
|
+
* > If you only need semantic reranking, use `qwen3-rerank`. If you need both semantic reranking and text matching features to ensure relevance, use `qwen3-rerank-hybrid`.
|
|
200
|
+
* >
|
|
188
201
|
*
|
|
189
|
-
* > Use \\`qwen3-rerank\\` if you only need semantic sorting. Use \\`qwen3-rerank-hybrid\\` if you need both semantic sorting and text-matching features to ensure relevance.
|
|
190
202
|
*
|
|
191
203
|
*
|
|
192
204
|
*
|
|
193
205
|
* <props="intl">
|
|
194
206
|
*
|
|
195
|
-
*
|
|
207
|
+
* Default value: empty, which uses gte-rerank-hybrid.
|
|
208
|
+
* > If you only need semantic reranking, use `gte-rerank`. If you need both semantic reranking and text matching features to ensure relevance, use `gte-rerank-hybrid`.
|
|
209
|
+
* >
|
|
210
|
+
*
|
|
196
211
|
*
|
|
197
|
-
* > Use \\`gte-rerank\\` if you only need semantic sorting. Use \\`gte-rerank-hybrid\\` if you need both semantic sorting and text-matching features to ensure relevance.
|
|
198
212
|
*
|
|
199
213
|
*
|
|
200
214
|
*
|
|
201
215
|
* <props="china">
|
|
202
216
|
*
|
|
203
|
-
* >
|
|
217
|
+
* > `gte-rerank-hybrid` and `gte-rerank` will no longer be updated and are not recommended.
|
|
218
|
+
* >
|
|
204
219
|
*
|
|
205
220
|
* @example
|
|
206
221
|
* gte-rerank-hybrid
|
|
@@ -210,15 +225,16 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
210
225
|
* @remarks
|
|
211
226
|
* <props="china">
|
|
212
227
|
*
|
|
213
|
-
* The sentence separator
|
|
228
|
+
* The sentence separator, which takes effect only when `chunkMode`=**regex** (it does not take effect in other modes even if specified). You can pass a single regular expression (multiple expressions are not supported) to split files into small text chunks.
|
|
229
|
+
*
|
|
230
|
+
* When using intelligent chunking (when `chunkMode` is not specified), keep the default empty value.
|
|
214
231
|
*
|
|
215
|
-
* For smart chunking (the \\`chunkMode\\` parameter is not specified), you can leave this parameter empty.
|
|
216
232
|
*
|
|
217
233
|
*
|
|
218
234
|
*
|
|
219
235
|
* <props="intl">
|
|
220
236
|
*
|
|
221
|
-
* > This parameter is not
|
|
237
|
+
* > This parameter is not available. Do not pass this parameter.
|
|
222
238
|
*
|
|
223
239
|
* @example
|
|
224
240
|
* (?<=。)
|
|
@@ -226,7 +242,7 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
226
242
|
separator?: string;
|
|
227
243
|
/**
|
|
228
244
|
* @remarks
|
|
229
|
-
* The
|
|
245
|
+
* The AnalyticDB for PostgreSQL instance ID (required only when `SinkType` is set to ADB). Obtain this ID from the [AnalyticDB for PostgreSQL instance list](https://gpdbnext.console.aliyun.com/gpdb/list) page.
|
|
230
246
|
*
|
|
231
247
|
* @example
|
|
232
248
|
* gp-bp32109xxxx
|
|
@@ -234,7 +250,7 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
234
250
|
sinkInstanceId?: string;
|
|
235
251
|
/**
|
|
236
252
|
* @remarks
|
|
237
|
-
* The region
|
|
253
|
+
* The region of the AnalyticDB for PostgreSQL instance (required only when `SinkType` is set to ADB). Call <props="china">[DescribeRegions](https://www.alibabacloud.com/help/en/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions)<props="intl">[DescribeRegions](https://www.alibabacloud.com/help/zh/analyticdb/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions?spm=a2c63.p38356.0.i3) to obtain the list of regions.
|
|
238
254
|
*
|
|
239
255
|
* @example
|
|
240
256
|
* cn-hangzhou
|
|
@@ -242,13 +258,10 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
242
258
|
sinkRegion?: string;
|
|
243
259
|
/**
|
|
244
260
|
* @remarks
|
|
245
|
-
* The storage
|
|
246
|
-
*
|
|
247
|
-
* -
|
|
248
|
-
*
|
|
249
|
-
* - ADB: AnalyticDB for PostgreSQL. We recommend choosing ADB if you need advanced features such as database management, auditing, and monitoring.
|
|
250
|
-
*
|
|
251
|
-
* > If you have not used ADB storage on Alibaba Cloud Model Studio, go to the <props="intl">[Create Knowledge Base](https://bailian.console.alibabacloud.com/#/knowledge-base/create) page, set the vector storage class to ADB-PG, and follow the on-screen instructions to grant the required permissions. If you set this parameter to ADB, you must specify the \\`SinkInstanceId\\` and \\`SinkRegion\\` parameters.
|
|
261
|
+
* The vector storage type of the knowledge base. For more information, see [Knowledge base](https://help.aliyun.com/document_detail/2807740.html). Valid values:
|
|
262
|
+
* - BUILT_IN: Vector data is hosted on the Alibaba Cloud Model Studio platform.
|
|
263
|
+
* - ADB: AnalyticDB for PostgreSQL database. If you need advanced features such as database management, auditing, and monitoring, select ADB.
|
|
264
|
+
* > If you have not used ADB storage on Alibaba Cloud Model Studio before, go to the <props="china">[Create Knowledge Base](https://bailian.console.aliyun.com/#/knowledge-base/create)<props="intl">[Create Knowledge Base](https://bailian.console.alibabacloud.com/#/knowledge-base/create) page, select ADB-PG as the vector storage type, and complete authorization as prompted. If you pass ADB, you must specify the `SinkInstanceId` and `SinkRegion` parameters.
|
|
252
265
|
*
|
|
253
266
|
* This parameter is required.
|
|
254
267
|
*
|
|
@@ -258,21 +271,17 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
258
271
|
sinkType?: string;
|
|
259
272
|
/**
|
|
260
273
|
* @remarks
|
|
261
|
-
* >Notice:
|
|
262
|
-
*
|
|
263
|
-
* In the latest SDK version, this parameter is required. Otherwise, calling the SubmitIndexJob operation will result in the error: Required parameter(data_sources) missing or invalid.
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
* The source of the imported data. Valid values:
|
|
268
|
-
*
|
|
269
|
-
* - DATA_CENTER_CATEGORY: Category type. Imports all files under the specified categories in <props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center). You can import multiple categories at the same time.
|
|
274
|
+
* >Notice: This parameter is required in the latest SDK. Otherwise, calling the SubmitIndexJob operation returns an error: Required parameter(data_sources) missing or invalid.
|
|
270
275
|
*
|
|
271
|
-
*
|
|
276
|
+
* The data source type. Valid values:
|
|
277
|
+
* - DATA_CENTER_CATEGORY: Category type. Imports all files under specified categories in <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)<props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center). Multiple categories can be imported simultaneously.
|
|
278
|
+
* - DATA_CENTER_FILE: File type. Imports specified files from <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)<props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center). Multiple files can be imported simultaneously.
|
|
272
279
|
*
|
|
273
|
-
* > If
|
|
280
|
+
* > If this parameter is set to DATA_CENTER_CATEGORY, you must specify the `CategoryIds` parameter. If this parameter is set to DATA_CENTER_FILE, you must specify the `DocumentIds` parameter.
|
|
281
|
+
* >
|
|
274
282
|
*
|
|
275
|
-
* > To create an empty knowledge base, use an empty category that contains no files
|
|
283
|
+
* > To create an empty knowledge base, use an empty category that contains no files: set this parameter to DATA_CENTER_CATEGORY and pass the empty category ID in `CategoryIds`.
|
|
284
|
+
* >
|
|
276
285
|
*
|
|
277
286
|
* @example
|
|
278
287
|
* DATA_CENTER_FILE
|
|
@@ -283,20 +292,20 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
283
292
|
sourceType?: string;
|
|
284
293
|
/**
|
|
285
294
|
* @remarks
|
|
286
|
-
* The
|
|
295
|
+
* The knowledge base type.
|
|
287
296
|
*
|
|
288
|
-
* **Valid values
|
|
297
|
+
* **Valid values:**
|
|
289
298
|
*
|
|
290
|
-
* - unstructured: A
|
|
299
|
+
* - unstructured: A document search or audio/video knowledge base. The default scenario for document search type is basic document Q&A. <props="china">To create other scenarios, pass the knowledgeType and knowledgeScene parameters.
|
|
291
300
|
*
|
|
292
301
|
* <props="china">
|
|
293
302
|
*
|
|
294
|
-
* - structured: A
|
|
295
|
-
*
|
|
303
|
+
* - structured: A data query or image-based Q&A knowledge base.
|
|
296
304
|
*
|
|
297
305
|
*
|
|
298
306
|
*
|
|
299
|
-
* > The
|
|
307
|
+
* > The knowledge base type cannot be changed after creation.
|
|
308
|
+
* >
|
|
300
309
|
*
|
|
301
310
|
* This parameter is required.
|
|
302
311
|
*
|
|
@@ -308,13 +317,15 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
308
317
|
* @remarks
|
|
309
318
|
* <props="china">
|
|
310
319
|
*
|
|
311
|
-
*
|
|
320
|
+
* Obtained by clicking the ID icon next to the table name on the Tables tab of [Data Connections](https://bailian.console.aliyun.com/cn-beijing?tab=app#/connector/list) table connector. If the list contains multiple IDs, only the first one is used.
|
|
321
|
+
*
|
|
312
322
|
*
|
|
313
323
|
*
|
|
314
324
|
*
|
|
315
325
|
* <props="intl">
|
|
316
326
|
*
|
|
317
|
-
* > This parameter is not
|
|
327
|
+
* > This parameter is not available. Do not pass this parameter.
|
|
328
|
+
* >
|
|
318
329
|
*/
|
|
319
330
|
tableIdsShrink?: string;
|
|
320
331
|
/**
|
|
@@ -326,27 +337,24 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
326
337
|
* @remarks
|
|
327
338
|
* <props="china">
|
|
328
339
|
*
|
|
329
|
-
* Enables custom chunking and specifies the chunking
|
|
330
|
-
*
|
|
331
|
-
* Possible values (only one value can be specified at a time):
|
|
340
|
+
* Enables custom chunking and specifies the chunking strategy. For more information, see [Knowledge base](https://help.aliyun.com/document_detail/2807740.html).
|
|
332
341
|
*
|
|
333
|
-
*
|
|
342
|
+
* Valid values (only one value can be passed at a time):
|
|
334
343
|
*
|
|
335
|
-
* - **
|
|
344
|
+
* - **length**: Chunk by length. Strictly chunks according to the specified `ChunkSize` and `OverlapSize`. If these two parameters are not passed, the system uses default values (`ChunkSize` of 500 and `OverlapSize` of 100). Chunking by length does not support `Separator` (it does not take effect even if specified).
|
|
345
|
+
* - **page**: Chunk by page. If `ChunkSize` is specified, it is also considered during chunking (if not passed, the default value of 500 is used). Chunking by page does not support `OverlapSize` or `Separator` (they do not take effect even if specified).
|
|
346
|
+
* - **h1**: Chunk by first-level headings. If `ChunkSize` is specified, it is also considered during chunking (if not passed, the default value of 500 is used). Chunking by first-level headings does not support `OverlapSize` or `Separator` (they do not take effect even if specified).
|
|
347
|
+
* - **h2**: Chunk by second-level headings. If `ChunkSize` is specified, it is also considered during chunking (if not passed, the default value of 500 is used). Chunking by second-level headings does not support `OverlapSize` or `Separator` (they do not take effect even if specified).
|
|
348
|
+
* - **regex**: Chunk by regular expression. The `Separator` parameter must be specified. If `ChunkSize` is specified, it is also considered during chunking (if not passed, the default value of 500 is used). Chunking by regular expression does not support `OverlapSize` (it does not take effect even if specified).
|
|
336
349
|
*
|
|
337
|
-
*
|
|
350
|
+
* If not specified, intelligent chunking is used by default.
|
|
338
351
|
*
|
|
339
|
-
* - **h2**: Chunks by level-2 heading. If \\`ChunkSize\\` is specified, it is also considered during chunking (if not specified, the default value 500 is used). Chunking by level-2 heading does not support \\`OverlapSize\\` or \\`Separator\\` (they are ignored even if specified).
|
|
340
|
-
*
|
|
341
|
-
* - **regex**: Chunks by regular expression. You must specify the \\`Separator\\` parameter. If \\`ChunkSize\\` is specified, it is also considered during chunking (if not specified, the default value 500 is used). Chunking by regular expression does not support \\`OverlapSize\\` (it is ignored even if specified).
|
|
342
|
-
*
|
|
343
|
-
* If you do not specify this parameter, smart chunking is used by default.
|
|
344
352
|
*
|
|
345
353
|
*
|
|
346
354
|
*
|
|
347
355
|
* <props="intl">
|
|
348
356
|
*
|
|
349
|
-
* > This parameter is not
|
|
357
|
+
* > This parameter is not available. Do not pass this parameter.
|
|
350
358
|
*
|
|
351
359
|
* @example
|
|
352
360
|
* regex
|
|
@@ -361,17 +369,17 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
361
369
|
datasourceCode?: string;
|
|
362
370
|
/**
|
|
363
371
|
* @remarks
|
|
364
|
-
* Specifies whether to treat the first row of all
|
|
372
|
+
* Specifies whether to treat the first row of all xlsx and xls files as headers and concatenate them into each text chunk, preventing the large language model from treating headers as regular data rows.
|
|
365
373
|
*
|
|
366
|
-
* > We recommend enabling this feature only when all imported files are in .xlsx or .xls format and contain a header. Otherwise, do not enable it.
|
|
367
374
|
*
|
|
368
|
-
*
|
|
375
|
+
* > Enable this feature only when all imported files are in .xlsx or .xls format and contain headers. Otherwise, do not enable it.
|
|
376
|
+
* >
|
|
369
377
|
*
|
|
378
|
+
* Valid values:
|
|
370
379
|
* - true: Enabled.
|
|
371
|
-
*
|
|
372
380
|
* - false: Disabled.
|
|
373
381
|
*
|
|
374
|
-
* If
|
|
382
|
+
* If not specified, this feature is disabled by default.
|
|
375
383
|
*
|
|
376
384
|
* @example
|
|
377
385
|
* false
|
|
@@ -380,15 +388,22 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
380
388
|
knowledgeScene?: string;
|
|
381
389
|
/**
|
|
382
390
|
* @remarks
|
|
383
|
-
* The data source code. This parameter is required when creating a data query knowledge base and is used with \\`table\\` and \\`database\\`.
|
|
384
|
-
*
|
|
385
391
|
* <props="china">
|
|
392
|
+
* The specific knowledge type, which further specifies the type of data processed by the knowledge base.
|
|
393
|
+
* <notice>This parameter and knowledgeScene must be provided together or omitted together. They cannot be set independently. If both are omitted, the system uses default configurations based on structureType.
|
|
394
|
+
*
|
|
395
|
+
* **Settings constraint**: The value of this parameter must match the selected structureType and determines the active values for knowledgeScene.
|
|
396
|
+
*
|
|
397
|
+
* **Valid values**:
|
|
398
|
+
* - document: Document search. Must be used with structureType: unstructured.
|
|
399
|
+
* - table: Data query. Must be used with structureType: structured.
|
|
400
|
+
* - image: Image-based Q&A. Must be used with structureType: structured.
|
|
401
|
+
* - multimedia: Audio/video search. Must be used with structureType: unstructured.
|
|
386
402
|
*
|
|
387
|
-
* We recommend using the new \\`connectId\\` parameter, which you can obtain from the data connector card on the [Data Connections](https://modelstudio.console.alibabacloud.com/?tab=app#/connector/list) page. This parameter is still compatible but will no longer be maintained in the future.
|
|
388
403
|
*
|
|
389
404
|
*
|
|
390
405
|
*
|
|
391
|
-
* >
|
|
406
|
+
* <props="intl">This parameter is not available. Do not pass this parameter.
|
|
392
407
|
*
|
|
393
408
|
* @example
|
|
394
409
|
* document
|
|
@@ -396,20 +411,18 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
396
411
|
knowledgeType?: string;
|
|
397
412
|
/**
|
|
398
413
|
* @remarks
|
|
399
|
-
* The metadata extraction configuration. Metadata is a
|
|
414
|
+
* The metadata extraction configuration. Metadata is a set of additional attributes related to unstructured data content. These attributes are integrated into text chunks as key-value pairs. For more information, see [Knowledge base](https://help.aliyun.com/document_detail/2807740.html).
|
|
400
415
|
*/
|
|
401
416
|
metaExtractColumnsShrink?: string;
|
|
402
417
|
/**
|
|
403
418
|
* @remarks
|
|
404
|
-
* <props="china">
|
|
405
|
-
*
|
|
406
|
-
* The number of RCUs for the knowledge base. This parameter is required only when \\`pipelineCommercialType\\` is set to \\`enterprise\\`. The value must be between 1 and 200.
|
|
407
|
-
*
|
|
419
|
+
* <props="china">The number of RCUs for the knowledge base (required only when pipelineCommercialType is set to enterprise). Value range: [1-200].
|
|
408
420
|
*
|
|
409
421
|
*
|
|
410
422
|
* <props="intl">
|
|
411
423
|
*
|
|
412
|
-
* > This parameter is not
|
|
424
|
+
* > This parameter is not available. Do not pass this parameter.
|
|
425
|
+
* >
|
|
413
426
|
*
|
|
414
427
|
* @example
|
|
415
428
|
* 1
|
|
@@ -419,17 +432,16 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
419
432
|
* @remarks
|
|
420
433
|
* <props="china">
|
|
421
434
|
*
|
|
422
|
-
* The [
|
|
423
|
-
*
|
|
424
|
-
* -
|
|
425
|
-
*
|
|
426
|
-
* - enterprise: Ultimate Edition
|
|
435
|
+
* The [specification type](https://help.aliyun.com/document_detail/2997110.html) of the knowledge base. Valid values:
|
|
436
|
+
* - standard: Standard Edition.
|
|
437
|
+
* - enterprise: Ultimate Edition.
|
|
427
438
|
*
|
|
428
439
|
*
|
|
429
440
|
*
|
|
430
441
|
* <props="intl">
|
|
431
442
|
*
|
|
432
|
-
* > This parameter is not
|
|
443
|
+
* > This parameter is not available. Do not pass this parameter.
|
|
444
|
+
* >
|
|
433
445
|
*
|
|
434
446
|
* @example
|
|
435
447
|
* standard
|
|
@@ -437,18 +449,16 @@ export class CreateIndexShrinkRequest extends $dara.Model {
|
|
|
437
449
|
pipelineCommercialType?: string;
|
|
438
450
|
/**
|
|
439
451
|
* @remarks
|
|
440
|
-
* <props="china">
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
* downgrade: Degrades the service (switches to using a lightweight retrieval chain).
|
|
445
|
-
* If you do not specify this parameter, the default value \\`downgrade\\` is used.
|
|
446
|
-
*
|
|
452
|
+
* <props="china">The rate limiting strategy for knowledge base dependent links (required only when pipelineCommercialType is set to enterprise).
|
|
453
|
+
* Valid values:
|
|
454
|
+
* downgrade: Downgrade processing (switch to lightweight link retrieval).
|
|
455
|
+
* If not specified, the default value is downgrade.
|
|
447
456
|
*
|
|
448
457
|
*
|
|
449
458
|
* <props="intl">
|
|
450
459
|
*
|
|
451
|
-
* > This parameter is not
|
|
460
|
+
* > This parameter is not available. Do not pass this parameter.
|
|
461
|
+
* >
|
|
452
462
|
*
|
|
453
463
|
* @example
|
|
454
464
|
* downgrade
|