@alicloud/bailian20231229 2.5.0 → 2.6.1

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.
Files changed (74) hide show
  1. package/dist/client.d.ts +102 -20
  2. package/dist/client.js +129 -20
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/ApplyTempStorageLeaseRequest.d.ts +29 -0
  5. package/dist/models/ApplyTempStorageLeaseRequest.js +60 -0
  6. package/dist/models/ApplyTempStorageLeaseRequest.js.map +1 -0
  7. package/dist/models/ApplyTempStorageLeaseResponse.d.ts +19 -0
  8. package/dist/models/ApplyTempStorageLeaseResponse.js +69 -0
  9. package/dist/models/ApplyTempStorageLeaseResponse.js.map +1 -0
  10. package/dist/models/ApplyTempStorageLeaseResponseBody.d.ts +80 -0
  11. package/dist/models/ApplyTempStorageLeaseResponseBody.js +118 -0
  12. package/dist/models/ApplyTempStorageLeaseResponseBody.js.map +1 -0
  13. package/dist/models/ChangeParseSettingRequest.d.ts +27 -0
  14. package/dist/models/ChangeParseSettingRequest.js.map +1 -1
  15. package/dist/models/ChangeParseSettingResponseBody.d.ts +25 -0
  16. package/dist/models/ChangeParseSettingResponseBody.js.map +1 -1
  17. package/dist/models/ChangeParseSettingShrinkRequest.d.ts +15 -0
  18. package/dist/models/ChangeParseSettingShrinkRequest.js.map +1 -1
  19. package/dist/models/CreateIndexRequest.d.ts +147 -44
  20. package/dist/models/CreateIndexRequest.js.map +1 -1
  21. package/dist/models/CreateIndexResponseBody.d.ts +5 -5
  22. package/dist/models/CreateIndexShrinkRequest.d.ts +81 -44
  23. package/dist/models/CreateIndexShrinkRequest.js.map +1 -1
  24. package/dist/models/DeleteChunkRequest.d.ts +4 -0
  25. package/dist/models/DeleteChunkRequest.js.map +1 -1
  26. package/dist/models/DeleteChunkResponseBody.d.ts +19 -1
  27. package/dist/models/DeleteChunkResponseBody.js.map +1 -1
  28. package/dist/models/DeleteChunkShrinkRequest.d.ts +4 -0
  29. package/dist/models/DeleteChunkShrinkRequest.js.map +1 -1
  30. package/dist/models/GetAvailableParserTypesRequest.d.ts +2 -0
  31. package/dist/models/GetAvailableParserTypesRequest.js.map +1 -1
  32. package/dist/models/GetAvailableParserTypesResponseBody.d.ts +41 -0
  33. package/dist/models/GetAvailableParserTypesResponseBody.js.map +1 -1
  34. package/dist/models/GetParseSettingsRequest.d.ts +3 -0
  35. package/dist/models/GetParseSettingsRequest.js.map +1 -1
  36. package/dist/models/GetParseSettingsResponseBody.d.ts +58 -0
  37. package/dist/models/GetParseSettingsResponseBody.js.map +1 -1
  38. package/dist/models/ListFileRequest.d.ts +2 -0
  39. package/dist/models/ListFileRequest.js.map +1 -1
  40. package/dist/models/ListFileResponseBody.d.ts +11 -0
  41. package/dist/models/ListFileResponseBody.js.map +1 -1
  42. package/dist/models/ListIndexFileDetailsResponseBody.d.ts +72 -0
  43. package/dist/models/ListIndexFileDetailsResponseBody.js.map +1 -1
  44. package/dist/models/UpdateChunkRequest.d.ts +19 -0
  45. package/dist/models/UpdateChunkRequest.js.map +1 -1
  46. package/dist/models/UpdateChunkResponseBody.d.ts +19 -1
  47. package/dist/models/UpdateChunkResponseBody.js.map +1 -1
  48. package/dist/models/model.d.ts +5 -0
  49. package/dist/models/model.js +15 -5
  50. package/dist/models/model.js.map +1 -1
  51. package/package.json +1 -1
  52. package/src/client.ts +133 -20
  53. package/src/models/ApplyTempStorageLeaseRequest.ts +44 -0
  54. package/src/models/ApplyTempStorageLeaseResponse.ts +40 -0
  55. package/src/models/ApplyTempStorageLeaseResponseBody.ts +135 -0
  56. package/src/models/ChangeParseSettingRequest.ts +27 -0
  57. package/src/models/ChangeParseSettingResponseBody.ts +25 -0
  58. package/src/models/ChangeParseSettingShrinkRequest.ts +15 -0
  59. package/src/models/CreateIndexRequest.ts +147 -44
  60. package/src/models/CreateIndexResponseBody.ts +5 -5
  61. package/src/models/CreateIndexShrinkRequest.ts +81 -44
  62. package/src/models/DeleteChunkRequest.ts +4 -0
  63. package/src/models/DeleteChunkResponseBody.ts +19 -1
  64. package/src/models/DeleteChunkShrinkRequest.ts +4 -0
  65. package/src/models/GetAvailableParserTypesRequest.ts +2 -0
  66. package/src/models/GetAvailableParserTypesResponseBody.ts +41 -0
  67. package/src/models/GetParseSettingsRequest.ts +3 -0
  68. package/src/models/GetParseSettingsResponseBody.ts +58 -0
  69. package/src/models/ListFileRequest.ts +2 -0
  70. package/src/models/ListFileResponseBody.ts +11 -0
  71. package/src/models/ListIndexFileDetailsResponseBody.ts +72 -0
  72. package/src/models/UpdateChunkRequest.ts +19 -0
  73. package/src/models/UpdateChunkResponseBody.ts +19 -1
  74. package/src/models/model.ts +5 -0
@@ -128,11 +128,77 @@ export class CreateIndexRequestDataSource extends $dara.Model {
128
128
  }
129
129
 
130
130
  export class CreateIndexRequestMetaExtractColumns extends $dara.Model {
131
+ /**
132
+ * @remarks
133
+ * The description of the metadata field. The description must be 0 to 1,000 characters in length, and can contain Chinese characters, letters, digits, underscores (_), hyphens (-), periods (.), and colons (:). This parameter is left empty by default.
134
+ *
135
+ * @example
136
+ * AuthorName
137
+ */
131
138
  desc?: string;
139
+ /**
140
+ * @remarks
141
+ * When set to true, the key and value of this metadata filed will participate in the generation process of the model, together with the chunk. Valid values:
142
+ *
143
+ * * true
144
+ * * false
145
+ *
146
+ * Default value: false.
147
+ *
148
+ * @example
149
+ * false
150
+ */
132
151
  enableLlm?: boolean;
152
+ /**
153
+ * @remarks
154
+ * When set to true, the key and value of this metadata filed will participate in the knowledge base retrieval, together with the chunk. Valid values:
155
+ *
156
+ * * true
157
+ * * false
158
+ *
159
+ * Default value: false.
160
+ *
161
+ * @example
162
+ * false
163
+ */
133
164
  enableSearch?: boolean;
165
+ /**
166
+ * @remarks
167
+ * The metadata key. It must be 1 to 50 characters in length and must be English letters or underscores. If you specify this parameter, the `Value` and `Type` parameters are required.
168
+ *
169
+ * @example
170
+ * author
171
+ */
134
172
  key?: string;
173
+ /**
174
+ * @remarks
175
+ * The type of the metadata field. Valid values:
176
+ *
177
+ * * constant
178
+ * * variable
179
+ * * custom_prompt
180
+ * * regular
181
+ * * keywords
182
+ *
183
+ * Enumerated value:
184
+ *
185
+ * * constant: constant extraction.
186
+ * * keywords: keyword extraction.
187
+ * * custom_prompt: LLM.
188
+ * * variable: variable extraction.
189
+ * * regular: regular expression.
190
+ *
191
+ * @example
192
+ * constant
193
+ */
135
194
  type?: string;
195
+ /**
196
+ * @remarks
197
+ * The metadata value.
198
+ *
199
+ * @example
200
+ * Tim
201
+ */
136
202
  value?: string;
137
203
  static names(): { [key: string]: string } {
138
204
  return {
@@ -168,22 +234,26 @@ export class CreateIndexRequestMetaExtractColumns extends $dara.Model {
168
234
  export class CreateIndexRequest extends $dara.Model {
169
235
  /**
170
236
  * @remarks
171
- * The list of primary key IDs of the categories to be imported into the knowledge base.
237
+ * The files to imported to the knowledge base. Specify the category IDs. All files under the categories will be imported (up to 10,000 files). To add more files later, call **SubmitIndexAddDocumentsJob**.
172
238
  */
173
239
  categoryIds?: string[];
174
240
  /**
175
241
  * @remarks
176
- * The estimated length of chunks. The maximum number of characters for a chunk. Texts exceeding this limit are splited. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values: [1-2048].
242
+ * The chunk size, which is the maximum number of characters in each chunk. Text exceeding this length may be truncated.
177
243
  *
178
- * The default value is empty, which means using the intelligent splitting method.
244
+ * Valid values: 1 to 6000. Default value: 500.
179
245
  *
180
- * > If you specify the `ChunkSize` parameter, you must also specify the `OverlapSize` and `Separator` parameters. If you do not specify these three parameters, the system uses the intelligent splitting method by default.
246
+ * > If `ChunkSize` is set to a value less than 100, `OverlapSize` is required. Or, if you do not pass these two parameters, the system uses the default values of the two.
181
247
  *
182
248
  * @example
183
249
  * 128
184
250
  */
185
251
  chunkSize?: number;
186
252
  columns?: CreateIndexRequestColumns[];
253
+ /**
254
+ * @remarks
255
+ * > This parameter is not available. Do not specify this parameter.
256
+ */
187
257
  createIndexType?: string;
188
258
  /**
189
259
  * @remarks
@@ -197,34 +267,48 @@ export class CreateIndexRequest extends $dara.Model {
197
267
  description?: string;
198
268
  /**
199
269
  * @remarks
200
- * The list of primary key IDs of the documents to be imported into the knowledge base.
270
+ * The files to imported to the knowledge base. Specify the file IDs to import (up to 10,000 files). To add more files later, call **SubmitIndexAddDocumentsJob**.
201
271
  */
202
272
  documentIds?: string[];
203
273
  /**
204
274
  * @remarks
205
- * The name of the embedding model. The embedding model converts the original input prompt and knowledge text into numerical vectors for similarity comparison. The default and only model available is DashScope text-embedding-v2. It supports multiple languages including Chinese and English and normalizes the vector results. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid value:
275
+ * The embedding model used in the knowledge base. The embedding model converts the original input prompt and knowledge text into numerical embeddings for similarity comparison. The default and only model available is text-embedding-v2. It supports multiple languages including Chinese and English and normalizes the embedding results. For more information, see [Embedding](https://help.aliyun.com/document_detail/2842587.html). Valid values:
206
276
  *
207
277
  * * text-embedding-v2
208
278
  *
209
- * The default value is null, which means using the text-embedding-v2 model.
279
+ * The default value is null, which means using text-embedding-v2.
210
280
  *
211
281
  * @example
212
282
  * text-embedding-v2
213
283
  */
214
284
  embeddingModelName?: string;
285
+ /**
286
+ * @remarks
287
+ * Whether to enable rewriting for multi-turn conversations. Valid values:
288
+ *
289
+ * * true
290
+ * * false
291
+ *
292
+ * Default value: true.
293
+ *
294
+ * @example
295
+ * true
296
+ */
215
297
  enableRewrite?: boolean;
216
298
  /**
217
299
  * @remarks
218
- * The name of the knowledge base. The name must be 1 to 20 characters in length and can contain characters classified as letter in Unicode, including English letters, Chinese characters, digits, among others. The name can also contain colons (:), underscores (_), periods (.), and hyphens (-).
300
+ * The name of the knowledge base. The name must be 1 to 20 characters in length, and can contain Chinese characters, letters, digits, underscores (_), hyphens (-), periods (.), and colons (:).
219
301
  *
220
302
  * This parameter is required.
221
303
  */
222
304
  name?: string;
223
305
  /**
224
306
  * @remarks
225
- * The overlap length. The number of overlapping characters between two consecutive chunks. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values: 0 to 1024.
307
+ * The overlap size, which is the number of overlapping characters between two consecutive chunks. Valid values: 0 to 1024.
308
+ *
309
+ * Default value: 100.
226
310
  *
227
- * The default value is empty, which means using the intelligent splitting method.
311
+ * > `OverlapSize` must be less than `ChunkSize`. Otherwise, chunking errors may occur.
228
312
  *
229
313
  * @example
230
314
  * 16
@@ -232,9 +316,9 @@ export class CreateIndexRequest extends $dara.Model {
232
316
  overlapSize?: number;
233
317
  /**
234
318
  * @remarks
235
- * Similarity Threshold. The lowest similarity score of chunks that can be returned. This parameter is used to filter text chunks returned by the rank model. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values: [0.01-1.00].
319
+ * The similarity threshold. Only chunks with a similarity score higher than this value can be recalled. This parameter is used to filter chunks returned by the re-rank model. Valid values: 0.01 to 1.00.
236
320
  *
237
- * Default value: 0.20.
321
+ * Default value: 0.01.
238
322
  *
239
323
  * @example
240
324
  * 0.20
@@ -242,14 +326,14 @@ export class CreateIndexRequest extends $dara.Model {
242
326
  rerankMinScore?: number;
243
327
  /**
244
328
  * @remarks
245
- * The name of the rank model. The rank model is a scoring system outside the knowledge base. It calculates the similarity score of each text chunk in the input question and knowledge base and ranks them in descending order. Then, the model returns the top K chunks with the highest scores. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:
329
+ * The re-ranking model used in the knowledge base. The re-rank model is a scoring system outside the knowledge base. It calculates the similarity score of the query and text chunks in the knowledge base and ranks them in descending order. Then, the model returns the top K chunks with the highest scores. Valid values:
246
330
  *
247
331
  * * gte-rerank-hybrid
248
332
  * * gte-rerank
249
333
  *
250
- * The default value is empty, which means using the official gte-rerank-hybrid model.
334
+ * The default value is empty, which means using gte-rerank-hybrid.
251
335
  *
252
- * > If you need only semantic ranking, we recommend that you use gte-rerank. If you need both semantic ranking and text matching features to ensure relevance, we recommend that you use gte-rerank-hybrid.
336
+ * > If you need only semantic ranking, we recommend gte-rerank. If you need both semantic ranking and text matching features to ensure relevance, we recommend gte-rerank-hybrid.
253
337
  *
254
338
  * @example
255
339
  * gte-rerank-hybrid
@@ -257,21 +341,7 @@ export class CreateIndexRequest extends $dara.Model {
257
341
  rerankModelName?: string;
258
342
  /**
259
343
  * @remarks
260
- * The clause identifier. The document is split into chunks based on this identifier. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). You can specify multiple identifiers and do not need to add any other characters to separate them. For example: !,\\\\\\n. Valid values:
261
- *
262
- * * \\n: line break
263
- * * ,: Chinese comma
264
- * * ,: English comma
265
- * * 。 : Chinese full stop
266
- * * .: English full stop
267
- * * ! : Chinese exclamation point
268
- * * ! : English exclamation point
269
- * * ;: Chinese semicolon
270
- * * ;: English semicolon
271
- * * ?: Chinese question mark
272
- * * ?: English question mark
273
- *
274
- * The default value is empty, which means using the intelligent splitting method.
344
+ * > This parameter is not available. Do not specify this parameter.
275
345
  *
276
346
  * @example
277
347
  * ,
@@ -279,7 +349,7 @@ export class CreateIndexRequest extends $dara.Model {
279
349
  separator?: string;
280
350
  /**
281
351
  * @remarks
282
- * The ID of the vector storage instance. This parameter is available only when SinkType is set to ADB. You can view the ID on the [Instances](https://gpdbnext.console.aliyun.com/gpdb/list) page of AnalyticDB for PostgreSQL.
352
+ * The ID of the AnalyticDB for PostgreSQL instance. Required only when `SinkType` is set to ADB. Get the ID on the [Instances](https://gpdbnext.console.aliyun.com/gpdb/list) page of AnalyticDB for PostgreSQL.
283
353
  *
284
354
  * @example
285
355
  * gp-bp321093j84
@@ -287,7 +357,7 @@ export class CreateIndexRequest extends $dara.Model {
287
357
  sinkInstanceId?: string;
288
358
  /**
289
359
  * @remarks
290
- * The region of the vector storage instance. This parameter is available only when SinkType is set to ADB. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/analyticdb/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions) operation to query the most recent region list.
360
+ * The region of the AnalyticDB for PostgreSQL instance. Required only when `SinkType` is set to ADB. Call [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 region list.
291
361
  *
292
362
  * @example
293
363
  * cn-hangzhou
@@ -295,12 +365,12 @@ export class CreateIndexRequest extends $dara.Model {
295
365
  sinkRegion?: string;
296
366
  /**
297
367
  * @remarks
298
- * The vector storage type of the knowledge base. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:
368
+ * The vector storage type of the knowledge base. For more information, see [Knowledge base](https://help.aliyun.com/document_detail/2807740.html). Valid values:
299
369
  *
300
- * * DEFAULT: The built-in vector database.
301
- * * ADB: AnalyticDB for PostgreSQL database. If you need advanced features, such as managing, auditing, and monitoring, we recommend that you specify ADB.
370
+ * * BUILT_IN: The vector data is hosted by Alibaba Cloud Model Studio.
371
+ * * ADB: AnalyticDB for PostgreSQL database. If you need advanced features, such as managing, auditing, and monitoring, we recommend ADB.
302
372
  *
303
- * > If you have not used AnalyticDB for AnalyticDB in Model Studio before, go to the [Create Knowledge Base](https://bailian.console.aliyun.com/#/knowledge-base/create) page, select ADB-PG as Vector Storage Type, and follow the instructions to grant permissions. If you specify ADB, you must also specify the `SinkInstanceId` and `SinkRegion` parameters.
373
+ * > If you have not used AnalyticDB for AnalyticDB in Model Studio before, go to the [Create Knowledge Base](https://bailian.console.alibabacloud.com/#/knowledge-base/create) page, select ADB-PG as Vector Storage Type, and follow the instructions to grant permissions. If you specify ADB, the `SinkInstanceId` and `SinkRegion` parameters are required.
304
374
  *
305
375
  * This parameter is required.
306
376
  *
@@ -310,14 +380,16 @@ export class CreateIndexRequest extends $dara.Model {
310
380
  sinkType?: string;
311
381
  /**
312
382
  * @remarks
313
- * The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:
383
+ * > This parameter is required in the latest version of the SDK. Otherwise, when you call SubmitIndexJob, an error will occur: Required parameter(data_sources) missing or invalid.
314
384
  *
315
- * * DATA_CENTER_CATEGORY: The category type. Import all documents from one or more categories in Data Center.
316
- * * DATA_CENTER_FILE: The document type. Import one or more documents from Data Center.
385
+ * The source of the imported data. Valid values:
317
386
  *
318
- * > 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.
387
+ * * DATA_CENTER_CATEGORY: The category type, that is to import all files in one or more specified categories in [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center).
388
+ * * DATA_CENTER_FILE: The file type, that is to import one or more specified files in [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center).
319
389
  *
320
- * > If you want to create an empty knowledge base, you can use an empty category. Set this parameter to DATA_CENTER_CATEGORY. And specify the ID of an empty category for the `CategoryIds` parameter.
390
+ * > If set to DATA_CENTER_CATEGORY, `CategoryIds` is required. If set to DATA_CENTER_FILE, `DocumentIds` is required.
391
+ *
392
+ * > To create an empty knowledge base, you can use an empty category with no files: Set this parameter to DATA_CENTER_CATEGORY, and `CategoryIds` to the ID of an empty category.
321
393
  *
322
394
  * @example
323
395
  * DATA_CENTER_FILE
@@ -328,11 +400,11 @@ export class CreateIndexRequest extends $dara.Model {
328
400
  sourceType?: string;
329
401
  /**
330
402
  * @remarks
331
- * The data type of the knowledge base. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid value:
403
+ * The type of the knowledge base. Valid values:
332
404
  *
333
- * * unstructured
405
+ * * unstructured: The document search type.
334
406
  *
335
- * > After a knowledge base is created, its data type cannot be changed. You cannot create a structured knowledge base by calling an API operation. Use the console instead.
407
+ * > After you create a knowledge base, its type cannot be changed. This operation does not support data query and image Q\\&A types. Use the console instead.
336
408
  *
337
409
  * This parameter is required.
338
410
  *
@@ -340,9 +412,40 @@ export class CreateIndexRequest extends $dara.Model {
340
412
  * structured
341
413
  */
342
414
  structureType?: string;
415
+ /**
416
+ * @remarks
417
+ * > This parameter is not available. Do not specify this parameter.
418
+ */
343
419
  tableIds?: string[];
420
+ /**
421
+ * @remarks
422
+ * > This parameter is not available. Do not specify this parameter.
423
+ *
424
+ * @example
425
+ * regex
426
+ */
344
427
  chunkMode?: string;
428
+ /**
429
+ * @remarks
430
+ * Whether to treat the first row of all .xlsx and .xls files as headers and concatenate them into each text chunk. This prevents the models from mistakenly interpreting headers as regular data rows.
431
+ *
432
+ * > Enable this feature only when all imported files are in .xlsx or .xls format and contain headers. Otherwise, leave it disabled.
433
+ *
434
+ * Valid values:
435
+ *
436
+ * * true
437
+ * * false
438
+ *
439
+ * Default value: false.
440
+ *
441
+ * @example
442
+ * false
443
+ */
345
444
  enableHeaders?: boolean;
445
+ /**
446
+ * @remarks
447
+ * The metadata extraction configurations. Metadata refers to a set of additional attributes associated with unstructured data, which are integrated into text chunks in key-value pairs. For more information, see [Knowledge base](https://help.aliyun.com/document_detail/2807740.html).
448
+ */
346
449
  metaExtractColumns?: CreateIndexRequestMetaExtractColumns[];
347
450
  static names(): { [key: string]: string } {
348
451
  return {
@@ -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 primary key ID of the knowledge base, `IndexId`.
8
+ * The knowledge base ID, or `IndexId`, is a unique identifier for the knowledge base created.
9
9
  *
10
- * > We recommend that you store this ID. It is required for all subsequent API operations related to this knowledge base.
10
+ * > Keep this ID. It is required for all subsequent API operations related to this knowledge base.
11
11
  *
12
12
  * @example
13
13
  * jkurxhju6b
@@ -37,7 +37,7 @@ export class CreateIndexResponseBodyData extends $dara.Model {
37
37
  export class CreateIndexResponseBody extends $dara.Model {
38
38
  /**
39
39
  * @remarks
40
- * HTTP status code
40
+ * The error code.
41
41
  *
42
42
  * @example
43
43
  * Forbidden
@@ -45,7 +45,7 @@ export class CreateIndexResponseBody extends $dara.Model {
45
45
  code?: string;
46
46
  /**
47
47
  * @remarks
48
- * The returned data.
48
+ * The data returned if the request is successful.
49
49
  */
50
50
  data?: CreateIndexResponseBodyData;
51
51
  /**
@@ -74,7 +74,7 @@ export class CreateIndexResponseBody extends $dara.Model {
74
74
  status?: string;
75
75
  /**
76
76
  * @remarks
77
- * Indications whether the API call is successful. Valid values:
77
+ * Indications whether the request is successful. Valid values:
78
78
  *
79
79
  * * true
80
80
  * * false
@@ -5,22 +5,26 @@ import * as $dara from '@darabonba/typescript';
5
5
  export class CreateIndexShrinkRequest extends $dara.Model {
6
6
  /**
7
7
  * @remarks
8
- * The list of primary key IDs of the categories to be imported into the knowledge base.
8
+ * The files to imported to the knowledge base. Specify the category IDs. All files under the categories will be imported (up to 10,000 files). To add more files later, call **SubmitIndexAddDocumentsJob**.
9
9
  */
10
10
  categoryIdsShrink?: string;
11
11
  /**
12
12
  * @remarks
13
- * The estimated length of chunks. The maximum number of characters for a chunk. Texts exceeding this limit are splited. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values: [1-2048].
13
+ * The chunk size, which is the maximum number of characters in each chunk. Text exceeding this length may be truncated.
14
14
  *
15
- * The default value is empty, which means using the intelligent splitting method.
15
+ * Valid values: 1 to 6000. Default value: 500.
16
16
  *
17
- * > If you specify the `ChunkSize` parameter, you must also specify the `OverlapSize` and `Separator` parameters. If you do not specify these three parameters, the system uses the intelligent splitting method by default.
17
+ * > If `ChunkSize` is set to a value less than 100, `OverlapSize` is required. Or, if you do not pass these two parameters, the system uses the default values of the two.
18
18
  *
19
19
  * @example
20
20
  * 128
21
21
  */
22
22
  chunkSize?: number;
23
23
  columnsShrink?: string;
24
+ /**
25
+ * @remarks
26
+ * > This parameter is not available. Do not specify this parameter.
27
+ */
24
28
  createIndexType?: string;
25
29
  /**
26
30
  * @remarks
@@ -34,34 +38,48 @@ export class CreateIndexShrinkRequest extends $dara.Model {
34
38
  description?: string;
35
39
  /**
36
40
  * @remarks
37
- * The list of primary key IDs of the documents to be imported into the knowledge base.
41
+ * The files to imported to the knowledge base. Specify the file IDs to import (up to 10,000 files). To add more files later, call **SubmitIndexAddDocumentsJob**.
38
42
  */
39
43
  documentIdsShrink?: string;
40
44
  /**
41
45
  * @remarks
42
- * The name of the embedding model. The embedding model converts the original input prompt and knowledge text into numerical vectors for similarity comparison. The default and only model available is DashScope text-embedding-v2. It supports multiple languages including Chinese and English and normalizes the vector results. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid value:
46
+ * The embedding model used in the knowledge base. The embedding model converts the original input prompt and knowledge text into numerical embeddings for similarity comparison. The default and only model available is text-embedding-v2. It supports multiple languages including Chinese and English and normalizes the embedding results. For more information, see [Embedding](https://help.aliyun.com/document_detail/2842587.html). Valid values:
43
47
  *
44
48
  * * text-embedding-v2
45
49
  *
46
- * The default value is null, which means using the text-embedding-v2 model.
50
+ * The default value is null, which means using text-embedding-v2.
47
51
  *
48
52
  * @example
49
53
  * text-embedding-v2
50
54
  */
51
55
  embeddingModelName?: string;
56
+ /**
57
+ * @remarks
58
+ * Whether to enable rewriting for multi-turn conversations. Valid values:
59
+ *
60
+ * * true
61
+ * * false
62
+ *
63
+ * Default value: true.
64
+ *
65
+ * @example
66
+ * true
67
+ */
52
68
  enableRewrite?: boolean;
53
69
  /**
54
70
  * @remarks
55
- * The name of the knowledge base. The name must be 1 to 20 characters in length and can contain characters classified as letter in Unicode, including English letters, Chinese characters, digits, among others. The name can also contain colons (:), underscores (_), periods (.), and hyphens (-).
71
+ * The name of the knowledge base. The name must be 1 to 20 characters in length, and can contain Chinese characters, letters, digits, underscores (_), hyphens (-), periods (.), and colons (:).
56
72
  *
57
73
  * This parameter is required.
58
74
  */
59
75
  name?: string;
60
76
  /**
61
77
  * @remarks
62
- * The overlap length. The number of overlapping characters between two consecutive chunks. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values: 0 to 1024.
78
+ * The overlap size, which is the number of overlapping characters between two consecutive chunks. Valid values: 0 to 1024.
79
+ *
80
+ * Default value: 100.
63
81
  *
64
- * The default value is empty, which means using the intelligent splitting method.
82
+ * > `OverlapSize` must be less than `ChunkSize`. Otherwise, chunking errors may occur.
65
83
  *
66
84
  * @example
67
85
  * 16
@@ -69,9 +87,9 @@ export class CreateIndexShrinkRequest extends $dara.Model {
69
87
  overlapSize?: number;
70
88
  /**
71
89
  * @remarks
72
- * Similarity Threshold. The lowest similarity score of chunks that can be returned. This parameter is used to filter text chunks returned by the rank model. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values: [0.01-1.00].
90
+ * The similarity threshold. Only chunks with a similarity score higher than this value can be recalled. This parameter is used to filter chunks returned by the re-rank model. Valid values: 0.01 to 1.00.
73
91
  *
74
- * Default value: 0.20.
92
+ * Default value: 0.01.
75
93
  *
76
94
  * @example
77
95
  * 0.20
@@ -79,14 +97,14 @@ export class CreateIndexShrinkRequest extends $dara.Model {
79
97
  rerankMinScore?: number;
80
98
  /**
81
99
  * @remarks
82
- * The name of the rank model. The rank model is a scoring system outside the knowledge base. It calculates the similarity score of each text chunk in the input question and knowledge base and ranks them in descending order. Then, the model returns the top K chunks with the highest scores. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:
100
+ * The re-ranking model used in the knowledge base. The re-rank model is a scoring system outside the knowledge base. It calculates the similarity score of the query and text chunks in the knowledge base and ranks them in descending order. Then, the model returns the top K chunks with the highest scores. Valid values:
83
101
  *
84
102
  * * gte-rerank-hybrid
85
103
  * * gte-rerank
86
104
  *
87
- * The default value is empty, which means using the official gte-rerank-hybrid model.
105
+ * The default value is empty, which means using gte-rerank-hybrid.
88
106
  *
89
- * > If you need only semantic ranking, we recommend that you use gte-rerank. If you need both semantic ranking and text matching features to ensure relevance, we recommend that you use gte-rerank-hybrid.
107
+ * > If you need only semantic ranking, we recommend gte-rerank. If you need both semantic ranking and text matching features to ensure relevance, we recommend gte-rerank-hybrid.
90
108
  *
91
109
  * @example
92
110
  * gte-rerank-hybrid
@@ -94,21 +112,7 @@ export class CreateIndexShrinkRequest extends $dara.Model {
94
112
  rerankModelName?: string;
95
113
  /**
96
114
  * @remarks
97
- * The clause identifier. The document is split into chunks based on this identifier. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). You can specify multiple identifiers and do not need to add any other characters to separate them. For example: !,\\\\\\n. Valid values:
98
- *
99
- * * \\n: line break
100
- * * ,: Chinese comma
101
- * * ,: English comma
102
- * * 。 : Chinese full stop
103
- * * .: English full stop
104
- * * ! : Chinese exclamation point
105
- * * ! : English exclamation point
106
- * * ;: Chinese semicolon
107
- * * ;: English semicolon
108
- * * ?: Chinese question mark
109
- * * ?: English question mark
110
- *
111
- * The default value is empty, which means using the intelligent splitting method.
115
+ * > This parameter is not available. Do not specify this parameter.
112
116
  *
113
117
  * @example
114
118
  * ,
@@ -116,7 +120,7 @@ export class CreateIndexShrinkRequest extends $dara.Model {
116
120
  separator?: string;
117
121
  /**
118
122
  * @remarks
119
- * The ID of the vector storage instance. This parameter is available only when SinkType is set to ADB. You can view the ID on the [Instances](https://gpdbnext.console.aliyun.com/gpdb/list) page of AnalyticDB for PostgreSQL.
123
+ * The ID of the AnalyticDB for PostgreSQL instance. Required only when `SinkType` is set to ADB. Get the ID on the [Instances](https://gpdbnext.console.aliyun.com/gpdb/list) page of AnalyticDB for PostgreSQL.
120
124
  *
121
125
  * @example
122
126
  * gp-bp321093j84
@@ -124,7 +128,7 @@ export class CreateIndexShrinkRequest extends $dara.Model {
124
128
  sinkInstanceId?: string;
125
129
  /**
126
130
  * @remarks
127
- * The region of the vector storage instance. This parameter is available only when SinkType is set to ADB. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/analyticdb/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions) operation to query the most recent region list.
131
+ * The region of the AnalyticDB for PostgreSQL instance. Required only when `SinkType` is set to ADB. Call [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 region list.
128
132
  *
129
133
  * @example
130
134
  * cn-hangzhou
@@ -132,12 +136,12 @@ export class CreateIndexShrinkRequest extends $dara.Model {
132
136
  sinkRegion?: string;
133
137
  /**
134
138
  * @remarks
135
- * The vector storage type of the knowledge base. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:
139
+ * The vector storage type of the knowledge base. For more information, see [Knowledge base](https://help.aliyun.com/document_detail/2807740.html). Valid values:
136
140
  *
137
- * * DEFAULT: The built-in vector database.
138
- * * ADB: AnalyticDB for PostgreSQL database. If you need advanced features, such as managing, auditing, and monitoring, we recommend that you specify ADB.
141
+ * * BUILT_IN: The vector data is hosted by Alibaba Cloud Model Studio.
142
+ * * ADB: AnalyticDB for PostgreSQL database. If you need advanced features, such as managing, auditing, and monitoring, we recommend ADB.
139
143
  *
140
- * > If you have not used AnalyticDB for AnalyticDB in Model Studio before, go to the [Create Knowledge Base](https://bailian.console.aliyun.com/#/knowledge-base/create) page, select ADB-PG as Vector Storage Type, and follow the instructions to grant permissions. If you specify ADB, you must also specify the `SinkInstanceId` and `SinkRegion` parameters.
144
+ * > If you have not used AnalyticDB for AnalyticDB in Model Studio before, go to the [Create Knowledge Base](https://bailian.console.alibabacloud.com/#/knowledge-base/create) page, select ADB-PG as Vector Storage Type, and follow the instructions to grant permissions. If you specify ADB, the `SinkInstanceId` and `SinkRegion` parameters are required.
141
145
  *
142
146
  * This parameter is required.
143
147
  *
@@ -147,14 +151,16 @@ export class CreateIndexShrinkRequest extends $dara.Model {
147
151
  sinkType?: string;
148
152
  /**
149
153
  * @remarks
150
- * The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:
154
+ * > This parameter is required in the latest version of the SDK. Otherwise, when you call SubmitIndexJob, an error will occur: Required parameter(data_sources) missing or invalid.
155
+ *
156
+ * The source of the imported data. Valid values:
151
157
  *
152
- * * DATA_CENTER_CATEGORY: The category type. Import all documents from one or more categories in Data Center.
153
- * * DATA_CENTER_FILE: The document type. Import one or more documents from Data Center.
158
+ * * DATA_CENTER_CATEGORY: The category type, that is to import all files in one or more specified categories in [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center).
159
+ * * DATA_CENTER_FILE: The file type, that is to import one or more specified files in [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center).
154
160
  *
155
- * > 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.
161
+ * > If set to DATA_CENTER_CATEGORY, `CategoryIds` is required. If set to DATA_CENTER_FILE, `DocumentIds` is required.
156
162
  *
157
- * > If you want to create an empty knowledge base, you can use an empty category. Set this parameter to DATA_CENTER_CATEGORY. And specify the ID of an empty category for the `CategoryIds` parameter.
163
+ * > To create an empty knowledge base, you can use an empty category with no files: Set this parameter to DATA_CENTER_CATEGORY, and `CategoryIds` to the ID of an empty category.
158
164
  *
159
165
  * @example
160
166
  * DATA_CENTER_FILE
@@ -165,11 +171,11 @@ export class CreateIndexShrinkRequest extends $dara.Model {
165
171
  sourceType?: string;
166
172
  /**
167
173
  * @remarks
168
- * The data type of the knowledge base. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid value:
174
+ * The type of the knowledge base. Valid values:
169
175
  *
170
- * * unstructured
176
+ * * unstructured: The document search type.
171
177
  *
172
- * > After a knowledge base is created, its data type cannot be changed. You cannot create a structured knowledge base by calling an API operation. Use the console instead.
178
+ * > After you create a knowledge base, its type cannot be changed. This operation does not support data query and image Q\\&A types. Use the console instead.
173
179
  *
174
180
  * This parameter is required.
175
181
  *
@@ -177,9 +183,40 @@ export class CreateIndexShrinkRequest extends $dara.Model {
177
183
  * structured
178
184
  */
179
185
  structureType?: string;
186
+ /**
187
+ * @remarks
188
+ * > This parameter is not available. Do not specify this parameter.
189
+ */
180
190
  tableIdsShrink?: string;
191
+ /**
192
+ * @remarks
193
+ * > This parameter is not available. Do not specify this parameter.
194
+ *
195
+ * @example
196
+ * regex
197
+ */
181
198
  chunkMode?: string;
199
+ /**
200
+ * @remarks
201
+ * Whether to treat the first row of all .xlsx and .xls files as headers and concatenate them into each text chunk. This prevents the models from mistakenly interpreting headers as regular data rows.
202
+ *
203
+ * > Enable this feature only when all imported files are in .xlsx or .xls format and contain headers. Otherwise, leave it disabled.
204
+ *
205
+ * Valid values:
206
+ *
207
+ * * true
208
+ * * false
209
+ *
210
+ * Default value: false.
211
+ *
212
+ * @example
213
+ * false
214
+ */
182
215
  enableHeaders?: boolean;
216
+ /**
217
+ * @remarks
218
+ * The metadata extraction configurations. Metadata refers to a set of additional attributes associated with unstructured data, which are integrated into text chunks in key-value pairs. For more information, see [Knowledge base](https://help.aliyun.com/document_detail/2807740.html).
219
+ */
183
220
  metaExtractColumnsShrink?: string;
184
221
  static names(): { [key: string]: string } {
185
222
  return {
@@ -5,11 +5,15 @@ import * as $dara from '@darabonba/typescript';
5
5
  export class DeleteChunkRequest extends $dara.Model {
6
6
  /**
7
7
  * @remarks
8
+ * The list of text chunks to be deleted. You can specify up to 10 chunk IDs at a time.
9
+ *
8
10
  * This parameter is required.
9
11
  */
10
12
  chunkIds?: string[];
11
13
  /**
12
14
  * @remarks
15
+ * The knowledge base ID, which is the `Data.Id` parameter returned by **CreateIndex**.
16
+ *
13
17
  * This parameter is required.
14
18
  *
15
19
  * @example