@alicloud/bailian20231229 1.8.3 → 1.9.0

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 CHANGED
@@ -91,6 +91,8 @@ export declare class AddCategoryResponse extends $tea.Model {
91
91
  export declare class AddFileRequest extends $tea.Model {
92
92
  /**
93
93
  * @remarks
94
+ * The primary key ID of the category to which the document is uploaded. This parameter corresponds to the `CategoryId` returned by the [AddCategory](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addcategory) operation. You can also click the ID icon next to the category name on the Unstructured Data tab of the [Data Management](https://bailian.console.aliyun.com/#/data-center) page to view the ID. You can set the parameter to default, which specifies the Default Category created by the system.
95
+ *
94
96
  * This parameter is required.
95
97
  *
96
98
  * @example
@@ -99,6 +101,8 @@ export declare class AddFileRequest extends $tea.Model {
99
101
  categoryId?: string;
100
102
  /**
101
103
  * @remarks
104
+ * The lease ID, which corresponds to the `FileUploadLeaseId` parameter returned by the [ApplyFileUploadLease](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation.
105
+ *
102
106
  * This parameter is required.
103
107
  *
104
108
  * @example
@@ -107,12 +111,69 @@ export declare class AddFileRequest extends $tea.Model {
107
111
  leaseId?: string;
108
112
  /**
109
113
  * @remarks
114
+ * The parser. Valid value:
115
+ *
116
+ * * DASHSCOPE_DOCMIND: Intelligent document parsing by Alibaba Cloud.
117
+ *
110
118
  * This parameter is required.
111
119
  *
112
120
  * @example
113
121
  * DASHSCOPE_DOCMIND
114
122
  */
115
123
  parser?: string;
124
+ /**
125
+ * @remarks
126
+ * A list of tags associated with the document. The default value is null, which means no tags. You can specify up to 10 tags.
127
+ */
128
+ tags?: string[];
129
+ static names(): {
130
+ [key: string]: string;
131
+ };
132
+ static types(): {
133
+ [key: string]: any;
134
+ };
135
+ constructor(map?: {
136
+ [key: string]: any;
137
+ });
138
+ }
139
+ export declare class AddFileShrinkRequest extends $tea.Model {
140
+ /**
141
+ * @remarks
142
+ * The primary key ID of the category to which the document is uploaded. This parameter corresponds to the `CategoryId` returned by the [AddCategory](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addcategory) operation. You can also click the ID icon next to the category name on the Unstructured Data tab of the [Data Management](https://bailian.console.aliyun.com/#/data-center) page to view the ID. You can set the parameter to default, which specifies the Default Category created by the system.
143
+ *
144
+ * This parameter is required.
145
+ *
146
+ * @example
147
+ * cate_cdd11b1b79a74e8bbd675c356a91ee3510024405
148
+ */
149
+ categoryId?: string;
150
+ /**
151
+ * @remarks
152
+ * The lease ID, which corresponds to the `FileUploadLeaseId` parameter returned by the [ApplyFileUploadLease](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation.
153
+ *
154
+ * This parameter is required.
155
+ *
156
+ * @example
157
+ * 68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847
158
+ */
159
+ leaseId?: string;
160
+ /**
161
+ * @remarks
162
+ * The parser. Valid value:
163
+ *
164
+ * * DASHSCOPE_DOCMIND: Intelligent document parsing by Alibaba Cloud.
165
+ *
166
+ * This parameter is required.
167
+ *
168
+ * @example
169
+ * DASHSCOPE_DOCMIND
170
+ */
171
+ parser?: string;
172
+ /**
173
+ * @remarks
174
+ * A list of tags associated with the document. The default value is null, which means no tags. You can specify up to 10 tags.
175
+ */
176
+ tagsShrink?: string;
116
177
  static names(): {
117
178
  [key: string]: string;
118
179
  };
@@ -125,27 +186,49 @@ export declare class AddFileRequest extends $tea.Model {
125
186
  }
126
187
  export declare class AddFileResponseBody extends $tea.Model {
127
188
  /**
189
+ * @remarks
190
+ * The status code.
191
+ *
128
192
  * @example
129
193
  * DataCenter.FileTooLarge
130
194
  */
131
195
  code?: string;
196
+ /**
197
+ * @remarks
198
+ * The returned data fields.
199
+ */
132
200
  data?: AddFileResponseBodyData;
133
201
  /**
202
+ * @remarks
203
+ * The error message.
204
+ *
134
205
  * @example
135
206
  * User not authorized to operate on the specified resource.
136
207
  */
137
208
  message?: string;
138
209
  /**
210
+ * @remarks
211
+ * The request ID.
212
+ *
139
213
  * @example
140
214
  * 778C0B3B-xxxx-5FC1-A947-36EDD13606AB
141
215
  */
142
216
  requestId?: string;
143
217
  /**
218
+ * @remarks
219
+ * The HTTP status code.
220
+ *
144
221
  * @example
145
222
  * 200
146
223
  */
147
224
  status?: string;
148
225
  /**
226
+ * @remarks
227
+ * Indications whether the call is successful. Valid values:
228
+ *
229
+ * * true
230
+ * * false
231
+ *
149
232
  * @example
150
233
  * true
151
234
  */
@@ -179,11 +262,15 @@ export declare class AddFileResponse extends $tea.Model {
179
262
  export declare class ApplyFileUploadLeaseRequest extends $tea.Model {
180
263
  /**
181
264
  * @remarks
265
+ * The name of the uploaded document, including the extension. Supported formats: pdf, doc, docx, md, txt, ppt, and pptx. The document name must be 4 to 128 characters in length.
266
+ *
182
267
  * This parameter is required.
183
268
  */
184
269
  fileName?: string;
185
270
  /**
186
271
  * @remarks
272
+ * The MD5 value of the uploaded document. This parameter is verified by the server (not in the current version).
273
+ *
187
274
  * This parameter is required.
188
275
  *
189
276
  * @example
@@ -192,6 +279,8 @@ export declare class ApplyFileUploadLeaseRequest extends $tea.Model {
192
279
  md5?: string;
193
280
  /**
194
281
  * @remarks
282
+ * The size of the uploaded document, in bytes. This parameter is verified by the server (not in the current version). Valid values: 1 to 100000000.
283
+ *
195
284
  * This parameter is required.
196
285
  *
197
286
  * @example
@@ -210,27 +299,49 @@ export declare class ApplyFileUploadLeaseRequest extends $tea.Model {
210
299
  }
211
300
  export declare class ApplyFileUploadLeaseResponseBody extends $tea.Model {
212
301
  /**
302
+ * @remarks
303
+ * The status code.
304
+ *
213
305
  * @example
214
306
  * DataCenter.FileTooLarge
215
307
  */
216
308
  code?: string;
309
+ /**
310
+ * @remarks
311
+ * The returned data fields.
312
+ */
217
313
  data?: ApplyFileUploadLeaseResponseBodyData;
218
314
  /**
315
+ * @remarks
316
+ * The error message.
317
+ *
219
318
  * @example
220
319
  * User not authorized to operate on the specified resource
221
320
  */
222
321
  message?: string;
223
322
  /**
323
+ * @remarks
324
+ * The request ID.
325
+ *
224
326
  * @example
225
327
  * 778C0B3B-xxxx-5FC1-A947-36EDD13606AB
226
328
  */
227
329
  requestId?: string;
228
330
  /**
331
+ * @remarks
332
+ * The HTTP status code.
333
+ *
229
334
  * @example
230
335
  * 200
231
336
  */
232
337
  status?: string;
233
338
  /**
339
+ * @remarks
340
+ * Indications whether the call is successful. Valid values:
341
+ *
342
+ * * true
343
+ * * false
344
+ *
234
345
  * @example
235
346
  * true
236
347
  */
@@ -325,58 +436,140 @@ export declare class CreateAndPulishAgentResponse extends $tea.Model {
325
436
  });
326
437
  }
327
438
  export declare class CreateIndexRequest extends $tea.Model {
439
+ /**
440
+ * @remarks
441
+ * The list of primary key IDs of the categories to be imported into the knowledge base.
442
+ */
328
443
  categoryIds?: string[];
329
444
  /**
445
+ * @remarks
446
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values: [1-2048].
447
+ *
448
+ * The default value is empty, which means using the intelligent splitting method.
449
+ *
450
+ * > 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.
451
+ *
330
452
  * @example
331
453
  * 128
332
454
  */
333
455
  chunkSize?: number;
334
456
  columns?: CreateIndexRequestColumns[];
457
+ /**
458
+ * @remarks
459
+ * > This parameter is not available. Do not specify this parameter.
460
+ */
335
461
  dataSource?: CreateIndexRequestDataSource;
462
+ /**
463
+ * @remarks
464
+ * The description of the knowledge base. The description must be 0 to 1,000 characters in length. This parameter is empty by default.
465
+ */
336
466
  description?: string;
467
+ /**
468
+ * @remarks
469
+ * The list of primary key IDs of the documents to be imported into the knowledge base.
470
+ */
337
471
  documentIds?: string[];
338
472
  /**
473
+ * @remarks
474
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid value:
475
+ *
476
+ * * text-embedding-v2
477
+ *
478
+ * The default value is null, which means using the text-embedding-v2 model.
479
+ *
339
480
  * @example
340
481
  * text-embedding-v2
341
482
  */
342
483
  embeddingModelName?: string;
343
484
  /**
344
485
  * @remarks
486
+ * 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 (-).
487
+ *
345
488
  * This parameter is required.
346
489
  */
347
490
  name?: string;
348
491
  /**
492
+ * @remarks
493
+ * The overlap length. The number of overlapping characters between two consecutive chunks. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values: 0 to 1024.
494
+ *
495
+ * The default value is empty, which means using the intelligent splitting method.
496
+ *
349
497
  * @example
350
498
  * 16
351
499
  */
352
500
  overlapSize?: number;
353
501
  /**
502
+ * @remarks
503
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values: [0.01-1.00].
504
+ *
505
+ * Default value: 0.20.
506
+ *
354
507
  * @example
355
508
  * 0.20
356
509
  */
357
510
  rerankMinScore?: number;
358
511
  /**
512
+ * @remarks
513
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
514
+ *
515
+ * * gte-rerank-hybrid
516
+ * * gte-rerank
517
+ *
518
+ * The default value is empty, which means using the official gte-rerank-hybrid model.
519
+ *
520
+ * > 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.
521
+ *
359
522
  * @example
360
523
  * gte-rerank-hybrid
361
524
  */
362
525
  rerankModelName?: string;
363
526
  /**
527
+ * @remarks
528
+ * The clause identifier. The document is split into chunks based on this identifier. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/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:
529
+ *
530
+ * * \\n: line break
531
+ * * ,: Chinese comma
532
+ * * ,: English comma
533
+ * * 。 : Chinese full stop
534
+ * * .: English full stop
535
+ * * ! : Chinese exclamation point
536
+ * * ! : English exclamation point
537
+ * * ;: Chinese semicolon
538
+ * * ;: English semicolon
539
+ * * ? : Chinese question mark
540
+ * * ?: English question mark
541
+ *
542
+ * The default value is empty, which means using the intelligent splitting method.
543
+ *
364
544
  * @example
365
545
  * ,
366
546
  */
367
547
  separator?: string;
368
548
  /**
549
+ * @remarks
550
+ * 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.
551
+ *
369
552
  * @example
370
553
  * gp-bp321093j84
371
554
  */
372
555
  sinkInstanceId?: string;
373
556
  /**
557
+ * @remarks
558
+ * The region of the vector storage instance. This parameter is available only when SinkType is set to ADB. You can call the [DescribeRegions](https://help.aliyun.com/zh/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions) operation to query the most recent region list.
559
+ *
374
560
  * @example
375
561
  * cn-hangzhou
376
562
  */
377
563
  sinkRegion?: string;
378
564
  /**
379
565
  * @remarks
566
+ * The vector storage type of the knowledge base. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
567
+ *
568
+ * * DEFAULT: The built-in vector database.
569
+ * * ADB: AnalyticDB for PostgreSQL database. If you need advanced features, such as managing, auditing, and monitoring, we recommend that you specify ADB.
570
+ *
571
+ * > 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.
572
+ *
380
573
  * This parameter is required.
381
574
  *
382
575
  * @example
@@ -385,6 +578,15 @@ export declare class CreateIndexRequest extends $tea.Model {
385
578
  sinkType?: string;
386
579
  /**
387
580
  * @remarks
581
+ * The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
582
+ *
583
+ * * DATA_CENTER_CATEGORY: The category type. Import all documents from one or more categories in Data Center.
584
+ * * DATA_CENTER_FILE: The document type. Import one or more documents from Data Center.
585
+ *
586
+ * > 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.
587
+ *
588
+ * > 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.
589
+ *
388
590
  * This parameter is required.
389
591
  *
390
592
  * @example
@@ -396,6 +598,12 @@ export declare class CreateIndexRequest extends $tea.Model {
396
598
  sourceType?: string;
397
599
  /**
398
600
  * @remarks
601
+ * The data type of the knowledge base. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid value:
602
+ *
603
+ * * unstructured
604
+ *
605
+ * > 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.
606
+ *
399
607
  * This parameter is required.
400
608
  *
401
609
  * @example
@@ -413,58 +621,140 @@ export declare class CreateIndexRequest extends $tea.Model {
413
621
  });
414
622
  }
415
623
  export declare class CreateIndexShrinkRequest extends $tea.Model {
624
+ /**
625
+ * @remarks
626
+ * The list of primary key IDs of the categories to be imported into the knowledge base.
627
+ */
416
628
  categoryIdsShrink?: string;
417
629
  /**
630
+ * @remarks
631
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values: [1-2048].
632
+ *
633
+ * The default value is empty, which means using the intelligent splitting method.
634
+ *
635
+ * > 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.
636
+ *
418
637
  * @example
419
638
  * 128
420
639
  */
421
640
  chunkSize?: number;
422
641
  columnsShrink?: string;
642
+ /**
643
+ * @remarks
644
+ * > This parameter is not available. Do not specify this parameter.
645
+ */
423
646
  dataSourceShrink?: string;
647
+ /**
648
+ * @remarks
649
+ * The description of the knowledge base. The description must be 0 to 1,000 characters in length. This parameter is empty by default.
650
+ */
424
651
  description?: string;
652
+ /**
653
+ * @remarks
654
+ * The list of primary key IDs of the documents to be imported into the knowledge base.
655
+ */
425
656
  documentIdsShrink?: string;
426
657
  /**
658
+ * @remarks
659
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid value:
660
+ *
661
+ * * text-embedding-v2
662
+ *
663
+ * The default value is null, which means using the text-embedding-v2 model.
664
+ *
427
665
  * @example
428
666
  * text-embedding-v2
429
667
  */
430
668
  embeddingModelName?: string;
431
669
  /**
432
670
  * @remarks
671
+ * 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 (-).
672
+ *
433
673
  * This parameter is required.
434
674
  */
435
675
  name?: string;
436
676
  /**
677
+ * @remarks
678
+ * The overlap length. The number of overlapping characters between two consecutive chunks. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values: 0 to 1024.
679
+ *
680
+ * The default value is empty, which means using the intelligent splitting method.
681
+ *
437
682
  * @example
438
683
  * 16
439
684
  */
440
685
  overlapSize?: number;
441
686
  /**
687
+ * @remarks
688
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values: [0.01-1.00].
689
+ *
690
+ * Default value: 0.20.
691
+ *
442
692
  * @example
443
693
  * 0.20
444
694
  */
445
695
  rerankMinScore?: number;
446
696
  /**
697
+ * @remarks
698
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
699
+ *
700
+ * * gte-rerank-hybrid
701
+ * * gte-rerank
702
+ *
703
+ * The default value is empty, which means using the official gte-rerank-hybrid model.
704
+ *
705
+ * > 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.
706
+ *
447
707
  * @example
448
708
  * gte-rerank-hybrid
449
709
  */
450
710
  rerankModelName?: string;
451
711
  /**
712
+ * @remarks
713
+ * The clause identifier. The document is split into chunks based on this identifier. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/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:
714
+ *
715
+ * * \\n: line break
716
+ * * ,: Chinese comma
717
+ * * ,: English comma
718
+ * * 。 : Chinese full stop
719
+ * * .: English full stop
720
+ * * ! : Chinese exclamation point
721
+ * * ! : English exclamation point
722
+ * * ;: Chinese semicolon
723
+ * * ;: English semicolon
724
+ * * ? : Chinese question mark
725
+ * * ?: English question mark
726
+ *
727
+ * The default value is empty, which means using the intelligent splitting method.
728
+ *
452
729
  * @example
453
730
  * ,
454
731
  */
455
732
  separator?: string;
456
733
  /**
734
+ * @remarks
735
+ * 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.
736
+ *
457
737
  * @example
458
738
  * gp-bp321093j84
459
739
  */
460
740
  sinkInstanceId?: string;
461
741
  /**
742
+ * @remarks
743
+ * The region of the vector storage instance. This parameter is available only when SinkType is set to ADB. You can call the [DescribeRegions](https://help.aliyun.com/zh/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions) operation to query the most recent region list.
744
+ *
462
745
  * @example
463
746
  * cn-hangzhou
464
747
  */
465
748
  sinkRegion?: string;
466
749
  /**
467
750
  * @remarks
751
+ * The vector storage type of the knowledge base. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
752
+ *
753
+ * * DEFAULT: The built-in vector database.
754
+ * * ADB: AnalyticDB for PostgreSQL database. If you need advanced features, such as managing, auditing, and monitoring, we recommend that you specify ADB.
755
+ *
756
+ * > 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.
757
+ *
468
758
  * This parameter is required.
469
759
  *
470
760
  * @example
@@ -473,6 +763,15 @@ export declare class CreateIndexShrinkRequest extends $tea.Model {
473
763
  sinkType?: string;
474
764
  /**
475
765
  * @remarks
766
+ * The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
767
+ *
768
+ * * DATA_CENTER_CATEGORY: The category type. Import all documents from one or more categories in Data Center.
769
+ * * DATA_CENTER_FILE: The document type. Import one or more documents from Data Center.
770
+ *
771
+ * > 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.
772
+ *
773
+ * > 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.
774
+ *
476
775
  * This parameter is required.
477
776
  *
478
777
  * @example
@@ -484,6 +783,12 @@ export declare class CreateIndexShrinkRequest extends $tea.Model {
484
783
  sourceType?: string;
485
784
  /**
486
785
  * @remarks
786
+ * The data type of the knowledge base. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid value:
787
+ *
788
+ * * unstructured
789
+ *
790
+ * > 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.
791
+ *
487
792
  * This parameter is required.
488
793
  *
489
794
  * @example
@@ -502,30 +807,49 @@ export declare class CreateIndexShrinkRequest extends $tea.Model {
502
807
  }
503
808
  export declare class CreateIndexResponseBody extends $tea.Model {
504
809
  /**
810
+ * @remarks
811
+ * HTTP status code
812
+ *
505
813
  * @example
506
814
  * Forbidden
507
815
  */
508
816
  code?: string;
817
+ /**
818
+ * @remarks
819
+ * The returned data.
820
+ */
509
821
  data?: CreateIndexResponseBodyData;
510
822
  /**
823
+ * @remarks
824
+ * The error message.
825
+ *
511
826
  * @example
512
827
  * Invalid input, variable name is missing
513
828
  */
514
829
  message?: string;
515
830
  /**
516
831
  * @remarks
517
- * Id of the request
832
+ * The request ID.
518
833
  *
519
834
  * @example
520
835
  * 17204B98-7734-4F9A-8464-2446A84821CA
521
836
  */
522
837
  requestId?: string;
523
838
  /**
839
+ * @remarks
840
+ * The status code.
841
+ *
524
842
  * @example
525
843
  * 200
526
844
  */
527
845
  status?: string;
528
846
  /**
847
+ * @remarks
848
+ * Indications whether the API call is successful. Valid values:
849
+ *
850
+ * * true
851
+ * * false
852
+ *
529
853
  * @example
530
854
  * true
531
855
  */
@@ -658,6 +982,64 @@ export declare class CreateMemoryNodeResponse extends $tea.Model {
658
982
  [key: string]: any;
659
983
  });
660
984
  }
985
+ export declare class CreatePromptTemplateRequest extends $tea.Model {
986
+ /**
987
+ * @remarks
988
+ * This parameter is required.
989
+ */
990
+ content?: string;
991
+ /**
992
+ * @remarks
993
+ * This parameter is required.
994
+ */
995
+ name?: string;
996
+ static names(): {
997
+ [key: string]: string;
998
+ };
999
+ static types(): {
1000
+ [key: string]: any;
1001
+ };
1002
+ constructor(map?: {
1003
+ [key: string]: any;
1004
+ });
1005
+ }
1006
+ export declare class CreatePromptTemplateResponseBody extends $tea.Model {
1007
+ /**
1008
+ * @example
1009
+ * 6e49109bfeb94a39bb268f4e483ccxxx
1010
+ */
1011
+ promptTemplateId?: string;
1012
+ /**
1013
+ * @example
1014
+ * FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx
1015
+ */
1016
+ requestId?: string;
1017
+ static names(): {
1018
+ [key: string]: string;
1019
+ };
1020
+ static types(): {
1021
+ [key: string]: any;
1022
+ };
1023
+ constructor(map?: {
1024
+ [key: string]: any;
1025
+ });
1026
+ }
1027
+ export declare class CreatePromptTemplateResponse extends $tea.Model {
1028
+ headers?: {
1029
+ [key: string]: string;
1030
+ };
1031
+ statusCode?: number;
1032
+ body?: CreatePromptTemplateResponseBody;
1033
+ static names(): {
1034
+ [key: string]: string;
1035
+ };
1036
+ static types(): {
1037
+ [key: string]: any;
1038
+ };
1039
+ constructor(map?: {
1040
+ [key: string]: any;
1041
+ });
1042
+ }
661
1043
  export declare class DeleteAgentResponseBody extends $tea.Model {
662
1044
  code?: string;
663
1045
  data?: string;
@@ -810,6 +1192,8 @@ export declare class DeleteFileResponse extends $tea.Model {
810
1192
  export declare class DeleteIndexRequest extends $tea.Model {
811
1193
  /**
812
1194
  * @remarks
1195
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
1196
+ *
813
1197
  * This parameter is required.
814
1198
  *
815
1199
  * @example
@@ -828,29 +1212,44 @@ export declare class DeleteIndexRequest extends $tea.Model {
828
1212
  }
829
1213
  export declare class DeleteIndexResponseBody extends $tea.Model {
830
1214
  /**
1215
+ * @remarks
1216
+ * HTTP status code
1217
+ *
831
1218
  * @example
832
1219
  * Index.InvalidParameter
833
1220
  */
834
1221
  code?: string;
835
1222
  /**
1223
+ * @remarks
1224
+ * The error message.
1225
+ *
836
1226
  * @example
837
1227
  * Required parameter(%s) missing or invalid, please check the request parameters.
838
1228
  */
839
1229
  message?: string;
840
1230
  /**
841
1231
  * @remarks
842
- * Id of the request
1232
+ * The request ID.
843
1233
  *
844
1234
  * @example
845
1235
  * 17204B98-xxxx-4F9A-8464-2446A84821CA
846
1236
  */
847
1237
  requestId?: string;
848
1238
  /**
1239
+ * @remarks
1240
+ * The status code.
1241
+ *
849
1242
  * @example
850
1243
  * 200
851
1244
  */
852
1245
  status?: string;
853
1246
  /**
1247
+ * @remarks
1248
+ * Indications whether the API call is successful. Valid values:
1249
+ *
1250
+ * * true
1251
+ * * false
1252
+ *
854
1253
  * @example
855
1254
  * true
856
1255
  */
@@ -884,11 +1283,15 @@ export declare class DeleteIndexResponse extends $tea.Model {
884
1283
  export declare class DeleteIndexDocumentRequest extends $tea.Model {
885
1284
  /**
886
1285
  * @remarks
1286
+ * The list of the primary key IDs of the documents.
1287
+ *
887
1288
  * This parameter is required.
888
1289
  */
889
1290
  documentIds?: string[];
890
1291
  /**
891
1292
  * @remarks
1293
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
1294
+ *
892
1295
  * This parameter is required.
893
1296
  *
894
1297
  * @example
@@ -908,11 +1311,15 @@ export declare class DeleteIndexDocumentRequest extends $tea.Model {
908
1311
  export declare class DeleteIndexDocumentShrinkRequest extends $tea.Model {
909
1312
  /**
910
1313
  * @remarks
1314
+ * The list of the primary key IDs of the documents.
1315
+ *
911
1316
  * This parameter is required.
912
1317
  */
913
1318
  documentIdsShrink?: string;
914
1319
  /**
915
1320
  * @remarks
1321
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
1322
+ *
916
1323
  * This parameter is required.
917
1324
  *
918
1325
  * @example
@@ -931,30 +1338,49 @@ export declare class DeleteIndexDocumentShrinkRequest extends $tea.Model {
931
1338
  }
932
1339
  export declare class DeleteIndexDocumentResponseBody extends $tea.Model {
933
1340
  /**
1341
+ * @remarks
1342
+ * HTTP status code
1343
+ *
934
1344
  * @example
935
1345
  * Index.InvalidParameter
936
1346
  */
937
1347
  code?: string;
1348
+ /**
1349
+ * @remarks
1350
+ * The parameters returned by the operation.
1351
+ */
938
1352
  data?: DeleteIndexDocumentResponseBodyData;
939
1353
  /**
1354
+ * @remarks
1355
+ * The error message.
1356
+ *
940
1357
  * @example
941
1358
  * Required parameter(%s) missing or invalid, please check the request parameters.
942
1359
  */
943
1360
  message?: string;
944
1361
  /**
945
1362
  * @remarks
946
- * Id of the request
1363
+ * The request ID.
947
1364
  *
948
1365
  * @example
949
1366
  * 17204B98-xxxx-4F9A-8464-2446A84821CA
950
1367
  */
951
1368
  requestId?: string;
952
1369
  /**
1370
+ * @remarks
1371
+ * The status code.
1372
+ *
953
1373
  * @example
954
1374
  * 200
955
1375
  */
956
1376
  status?: string;
957
1377
  /**
1378
+ * @remarks
1379
+ * Indications whether the API call is successful. Valid values:
1380
+ *
1381
+ * * true
1382
+ * * false
1383
+ *
958
1384
  * @example
959
1385
  * true
960
1386
  */
@@ -1049,29 +1475,83 @@ export declare class DeleteMemoryNodeResponse extends $tea.Model {
1049
1475
  [key: string]: any;
1050
1476
  });
1051
1477
  }
1478
+ export declare class DeletePromptTemplateResponseBody extends $tea.Model {
1479
+ /**
1480
+ * @example
1481
+ * FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx
1482
+ */
1483
+ requestId?: string;
1484
+ static names(): {
1485
+ [key: string]: string;
1486
+ };
1487
+ static types(): {
1488
+ [key: string]: any;
1489
+ };
1490
+ constructor(map?: {
1491
+ [key: string]: any;
1492
+ });
1493
+ }
1494
+ export declare class DeletePromptTemplateResponse extends $tea.Model {
1495
+ headers?: {
1496
+ [key: string]: string;
1497
+ };
1498
+ statusCode?: number;
1499
+ body?: DeletePromptTemplateResponseBody;
1500
+ static names(): {
1501
+ [key: string]: string;
1502
+ };
1503
+ static types(): {
1504
+ [key: string]: any;
1505
+ };
1506
+ constructor(map?: {
1507
+ [key: string]: any;
1508
+ });
1509
+ }
1052
1510
  export declare class DescribeFileResponseBody extends $tea.Model {
1053
1511
  /**
1512
+ * @remarks
1513
+ * The status code.
1514
+ *
1054
1515
  * @example
1055
1516
  * Success
1056
1517
  */
1057
1518
  code?: string;
1519
+ /**
1520
+ * @remarks
1521
+ * The returned data fields.
1522
+ */
1058
1523
  data?: DescribeFileResponseBodyData;
1059
1524
  /**
1525
+ * @remarks
1526
+ * The error message.
1527
+ *
1060
1528
  * @example
1061
1529
  * Requests throttling triggered.
1062
1530
  */
1063
1531
  message?: string;
1064
1532
  /**
1533
+ * @remarks
1534
+ * The request ID.
1535
+ *
1065
1536
  * @example
1066
1537
  * 17204B98-xxxx-4F9A-8464-2446A84821CA
1067
1538
  */
1068
1539
  requestId?: string;
1069
1540
  /**
1541
+ * @remarks
1542
+ * The HTTP status code.
1543
+ *
1070
1544
  * @example
1071
1545
  * 200
1072
1546
  */
1073
1547
  status?: string;
1074
1548
  /**
1549
+ * @remarks
1550
+ * Indications whether the API call is successful. Valid values:
1551
+ *
1552
+ * * true
1553
+ * * false
1554
+ *
1075
1555
  * @example
1076
1556
  * true
1077
1557
  */
@@ -1105,6 +1585,8 @@ export declare class DescribeFileResponse extends $tea.Model {
1105
1585
  export declare class GetIndexJobStatusRequest extends $tea.Model {
1106
1586
  /**
1107
1587
  * @remarks
1588
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
1589
+ *
1108
1590
  * This parameter is required.
1109
1591
  *
1110
1592
  * @example
@@ -1113,13 +1595,29 @@ export declare class GetIndexJobStatusRequest extends $tea.Model {
1113
1595
  indexId?: string;
1114
1596
  /**
1115
1597
  * @remarks
1598
+ * The knowledge base job ID, which is the `Data.Id` parameter returned by the [SubmitIndexJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) or [SubmitIndexAddDocumentsJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexadddocumentsjob) operations.
1599
+ *
1116
1600
  * This parameter is required.
1117
1601
  *
1118
1602
  * @example
1119
1603
  * 20230718xxxx-146c93bf
1120
1604
  */
1121
1605
  jobId?: string;
1606
+ /**
1607
+ * @remarks
1608
+ * Both the [SubmitIndexJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) and [SubmitIndexAddDocumentsJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexadddocumentsjob) operations support batch import of documents. This operation returns both the overall `Status` of the job and the `Document.Status` of each document. If there are a large number of documents, you can use the `PageNumber` parameter to perform a paged query. Pages start from page 1. Default value: 1.
1609
+ *
1610
+ * @example
1611
+ * 1
1612
+ */
1122
1613
  pageNumber?: number;
1614
+ /**
1615
+ * @remarks
1616
+ * The number of document import jobs that are displayed on each page. No maximum value. Default value: 10.
1617
+ *
1618
+ * @example
1619
+ * 10
1620
+ */
1123
1621
  pageSize?: number;
1124
1622
  static names(): {
1125
1623
  [key: string]: string;
@@ -1133,27 +1631,49 @@ export declare class GetIndexJobStatusRequest extends $tea.Model {
1133
1631
  }
1134
1632
  export declare class GetIndexJobStatusResponseBody extends $tea.Model {
1135
1633
  /**
1634
+ * @remarks
1635
+ * HTTP status code
1636
+ *
1136
1637
  * @example
1137
1638
  * Index.Forbidden
1138
1639
  */
1139
1640
  code?: string;
1641
+ /**
1642
+ * @remarks
1643
+ * The returned data.
1644
+ */
1140
1645
  data?: GetIndexJobStatusResponseBodyData;
1141
1646
  /**
1647
+ * @remarks
1648
+ * The error message.
1649
+ *
1142
1650
  * @example
1143
1651
  * User not authorized to operate on the specified resource.
1144
1652
  */
1145
1653
  message?: string;
1146
1654
  /**
1655
+ * @remarks
1656
+ * The request ID.
1657
+ *
1147
1658
  * @example
1148
1659
  * 17204B98-xxxx-4F9A-8464-2446A84821CA
1149
1660
  */
1150
1661
  requestId?: string;
1151
1662
  /**
1663
+ * @remarks
1664
+ * The HTTP status code returned.
1665
+ *
1152
1666
  * @example
1153
1667
  * 200
1154
1668
  */
1155
1669
  status?: string;
1156
1670
  /**
1671
+ * @remarks
1672
+ * Indications whether the API call is successful. Valid values:
1673
+ *
1674
+ * * true
1675
+ * * false
1676
+ *
1157
1677
  * @example
1158
1678
  * true
1159
1679
  */
@@ -1275,6 +1795,55 @@ export declare class GetMemoryNodeResponse extends $tea.Model {
1275
1795
  [key: string]: any;
1276
1796
  });
1277
1797
  }
1798
+ export declare class GetPromptTemplateResponseBody extends $tea.Model {
1799
+ content?: string;
1800
+ name?: string;
1801
+ /**
1802
+ * @example
1803
+ * 6e49109bfeb94a39bb268f4e483ccxxx
1804
+ */
1805
+ promptTemplateId?: string;
1806
+ /**
1807
+ * @example
1808
+ * 8C56C7AF-6573-19CE-B018-E05E1EDCF4C5
1809
+ */
1810
+ requestId?: string;
1811
+ /**
1812
+ * @example
1813
+ * ["theme"]
1814
+ */
1815
+ variables?: string[];
1816
+ /**
1817
+ * @example
1818
+ * llm-us9hjmt32nysdxxx
1819
+ */
1820
+ workspaceId?: string;
1821
+ static names(): {
1822
+ [key: string]: string;
1823
+ };
1824
+ static types(): {
1825
+ [key: string]: any;
1826
+ };
1827
+ constructor(map?: {
1828
+ [key: string]: any;
1829
+ });
1830
+ }
1831
+ export declare class GetPromptTemplateResponse extends $tea.Model {
1832
+ headers?: {
1833
+ [key: string]: string;
1834
+ };
1835
+ statusCode?: number;
1836
+ body?: GetPromptTemplateResponseBody;
1837
+ static names(): {
1838
+ [key: string]: string;
1839
+ };
1840
+ static types(): {
1841
+ [key: string]: any;
1842
+ };
1843
+ constructor(map?: {
1844
+ [key: string]: any;
1845
+ });
1846
+ }
1278
1847
  export declare class GetPublishedAgentResponseBody extends $tea.Model {
1279
1848
  code?: string;
1280
1849
  data?: GetPublishedAgentResponseBodyData;
@@ -1399,14 +1968,23 @@ export declare class ListCategoryResponse extends $tea.Model {
1399
1968
  });
1400
1969
  }
1401
1970
  export declare class ListChunksRequest extends $tea.Model {
1971
+ /**
1972
+ * @remarks
1973
+ * An array of field names. This parameter is used to filter non-private fields (prefixed with_underscores) in the Metadata parameter returned by this operation. By default, this parameter is left empty, which means all non-private fields in the Metadata parameter are returned. If you only want specified non-private fields, such as title, set this parameter to title.
1974
+ */
1402
1975
  fields?: string[];
1403
1976
  /**
1977
+ * @remarks
1978
+ * The primary key ID of the document, which is the `FieldID` parameter returned by the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) operation. This parameter is not required for structured knowledge base, but is required for unstructured knowledge base. To view the ID, you can click the ID icon next to the file name on the [Data Management](https://bailian.console.aliyun.com/#/data-center) page. You can filter returned chunks by the document ID. This parameter is left empty by default.
1979
+ *
1404
1980
  * @example
1405
1981
  * file_5f03dfea56da4050ab68d61871fc4cb3_10151493
1406
1982
  */
1407
1983
  filed?: string;
1408
1984
  /**
1409
1985
  * @remarks
1986
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
1987
+ *
1410
1988
  * This parameter is required.
1411
1989
  *
1412
1990
  * @example
@@ -1414,11 +1992,17 @@ export declare class ListChunksRequest extends $tea.Model {
1414
1992
  */
1415
1993
  indexId?: string;
1416
1994
  /**
1995
+ * @remarks
1996
+ * The number of the pages to return. Pages start from page 1. Default value: 1.
1997
+ *
1417
1998
  * @example
1418
1999
  * 1
1419
2000
  */
1420
2001
  pageNum?: number;
1421
2002
  /**
2003
+ * @remarks
2004
+ * The number of chunks to display on each page. Maximum value: 100. Default value: 10.
2005
+ *
1422
2006
  * @example
1423
2007
  * 10
1424
2008
  */
@@ -1435,30 +2019,49 @@ export declare class ListChunksRequest extends $tea.Model {
1435
2019
  }
1436
2020
  export declare class ListChunksResponseBody extends $tea.Model {
1437
2021
  /**
2022
+ * @remarks
2023
+ * The error code.
2024
+ *
1438
2025
  * @example
1439
2026
  * Index.InvalidParameter
1440
2027
  */
1441
2028
  code?: string;
2029
+ /**
2030
+ * @remarks
2031
+ * The data returned.
2032
+ */
1442
2033
  data?: ListChunksResponseBodyData;
1443
2034
  /**
2035
+ * @remarks
2036
+ * The error message.
2037
+ *
1444
2038
  * @example
1445
2039
  * Required parameter(%s) missing or invalid, please check the request parameters.
1446
2040
  */
1447
2041
  message?: string;
1448
2042
  /**
1449
2043
  * @remarks
1450
- * Id of the request
2044
+ * The request ID.
1451
2045
  *
1452
2046
  * @example
1453
2047
  * 8F97A63B-55F1-527F-9D6E-467B6A7E8CF1
1454
2048
  */
1455
2049
  requestId?: string;
1456
2050
  /**
2051
+ * @remarks
2052
+ * The HTTP status code returned.
2053
+ *
1457
2054
  * @example
1458
2055
  * 200
1459
2056
  */
1460
2057
  status?: string;
1461
2058
  /**
2059
+ * @remarks
2060
+ * Indications whether the API call is successful. Valid values:
2061
+ *
2062
+ * * true
2063
+ * * false
2064
+ *
1462
2065
  * @example
1463
2066
  * true
1464
2067
  */
@@ -1498,6 +2101,7 @@ export declare class ListFileRequest extends $tea.Model {
1498
2101
  * cate_cdd11b1b79a74e8bbd675c356a91ee3510024405
1499
2102
  */
1500
2103
  categoryId?: string;
2104
+ fileName?: string;
1501
2105
  /**
1502
2106
  * @example
1503
2107
  * 20
@@ -1575,14 +2179,30 @@ export declare class ListFileResponse extends $tea.Model {
1575
2179
  });
1576
2180
  }
1577
2181
  export declare class ListIndexDocumentsRequest extends $tea.Model {
2182
+ /**
2183
+ * @remarks
2184
+ * The names of the queried documents. The default value is null, which means the names are not used to filter the results.
2185
+ */
1578
2186
  documentName?: string;
1579
2187
  /**
2188
+ * @remarks
2189
+ * The import status of the documents to be queried. Valid values:
2190
+ *
2191
+ * * INSERT_ERROR
2192
+ * * RUNNING
2193
+ * * DELETED
2194
+ * * FINISH
2195
+ *
2196
+ * The default value is null, which means the import status is not used to filter the results.
2197
+ *
1580
2198
  * @example
1581
2199
  * FINISH
1582
2200
  */
1583
2201
  documentStatus?: string;
1584
2202
  /**
1585
2203
  * @remarks
2204
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
2205
+ *
1586
2206
  * This parameter is required.
1587
2207
  *
1588
2208
  * @example
@@ -1590,11 +2210,17 @@ export declare class ListIndexDocumentsRequest extends $tea.Model {
1590
2210
  */
1591
2211
  indexId?: string;
1592
2212
  /**
2213
+ * @remarks
2214
+ * The page numbers of the pages to return. Pages start from page 1. Default value: 1.
2215
+ *
1593
2216
  * @example
1594
2217
  * 1
1595
2218
  */
1596
2219
  pageNumber?: number;
1597
2220
  /**
2221
+ * @remarks
2222
+ * The number of documents displayed on each page. No maximum value. Default value: 10.
2223
+ *
1598
2224
  * @example
1599
2225
  * 10
1600
2226
  */
@@ -1611,30 +2237,49 @@ export declare class ListIndexDocumentsRequest extends $tea.Model {
1611
2237
  }
1612
2238
  export declare class ListIndexDocumentsResponseBody extends $tea.Model {
1613
2239
  /**
2240
+ * @remarks
2241
+ * HTTP status code
2242
+ *
1614
2243
  * @example
1615
2244
  * InvalidParameter
1616
2245
  */
1617
2246
  code?: string;
2247
+ /**
2248
+ * @remarks
2249
+ * The returned data.
2250
+ */
1618
2251
  data?: ListIndexDocumentsResponseBodyData;
1619
2252
  /**
2253
+ * @remarks
2254
+ * The error message.
2255
+ *
1620
2256
  * @example
1621
2257
  * Required parameter(%s) missing or invalid, please check the request parameters.
1622
2258
  */
1623
2259
  message?: string;
1624
2260
  /**
1625
2261
  * @remarks
1626
- * Id of the request
2262
+ * The request ID.
1627
2263
  *
1628
2264
  * @example
1629
2265
  * 35A267BF-xxxx-54DB-8394-AA3B0742D833
1630
2266
  */
1631
2267
  requestId?: string;
1632
2268
  /**
2269
+ * @remarks
2270
+ * The status code.
2271
+ *
1633
2272
  * @example
1634
2273
  * 200
1635
2274
  */
1636
2275
  status?: string;
1637
2276
  /**
2277
+ * @remarks
2278
+ * Indications whether the API call is successful. Valid values:
2279
+ *
2280
+ * * true
2281
+ * * false
2282
+ *
1638
2283
  * @example
1639
2284
  * true
1640
2285
  */
@@ -1667,16 +2312,27 @@ export declare class ListIndexDocumentsResponse extends $tea.Model {
1667
2312
  }
1668
2313
  export declare class ListIndicesRequest extends $tea.Model {
1669
2314
  /**
2315
+ * @remarks
2316
+ * The name of the knowledge base. You can query knowledge base by name. 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 (-).
2317
+ *
2318
+ * This parameter is left empty by default, which means that all knowledge bases in the specified workspace are queried.
2319
+ *
1670
2320
  * @example
1671
2321
  * idx_status_score
1672
2322
  */
1673
2323
  indexName?: string;
1674
2324
  /**
2325
+ * @remarks
2326
+ * The number of the pages to return. Pages start from page 1. Default value: 1.
2327
+ *
1675
2328
  * @example
1676
2329
  * 1
1677
2330
  */
1678
2331
  pageNumber?: string;
1679
2332
  /**
2333
+ * @remarks
2334
+ * The number of knowledge bases to display on each page. No maximum value. Default value: 10.
2335
+ *
1680
2336
  * @example
1681
2337
  * 10
1682
2338
  */
@@ -1693,30 +2349,49 @@ export declare class ListIndicesRequest extends $tea.Model {
1693
2349
  }
1694
2350
  export declare class ListIndicesResponseBody extends $tea.Model {
1695
2351
  /**
2352
+ * @remarks
2353
+ * HTTP status code
2354
+ *
1696
2355
  * @example
1697
2356
  * Index.InvalidParameter
1698
2357
  */
1699
2358
  code?: string;
2359
+ /**
2360
+ * @remarks
2361
+ * The returned data.
2362
+ */
1700
2363
  data?: ListIndicesResponseBodyData;
1701
2364
  /**
2365
+ * @remarks
2366
+ * The error message.
2367
+ *
1702
2368
  * @example
1703
2369
  * Required parameter(%s) missing or invalid, please check the request parameters.
1704
2370
  */
1705
2371
  message?: string;
1706
2372
  /**
1707
2373
  * @remarks
1708
- * Id of the request
2374
+ * The request ID.
1709
2375
  *
1710
2376
  * @example
1711
2377
  * 17204B98-xxxx-4F9A-8464-2446A84821CA
1712
2378
  */
1713
2379
  requestId?: string;
1714
2380
  /**
2381
+ * @remarks
2382
+ * The HTTP status code returned.
2383
+ *
1715
2384
  * @example
1716
2385
  * 200
1717
2386
  */
1718
2387
  status?: string;
1719
2388
  /**
2389
+ * @remarks
2390
+ * Indications whether the API call is successful. Valid values:
2391
+ *
2392
+ * * true
2393
+ * * false
2394
+ *
1720
2395
  * @example
1721
2396
  * true
1722
2397
  */
@@ -1861,9 +2536,89 @@ export declare class ListMemoryNodesResponseBody extends $tea.Model {
1861
2536
  requestId?: string;
1862
2537
  /**
1863
2538
  * @example
1864
- * 100
2539
+ * 100
2540
+ */
2541
+ totalCount?: number;
2542
+ static names(): {
2543
+ [key: string]: string;
2544
+ };
2545
+ static types(): {
2546
+ [key: string]: any;
2547
+ };
2548
+ constructor(map?: {
2549
+ [key: string]: any;
2550
+ });
2551
+ }
2552
+ export declare class ListMemoryNodesResponse extends $tea.Model {
2553
+ headers?: {
2554
+ [key: string]: string;
2555
+ };
2556
+ statusCode?: number;
2557
+ body?: ListMemoryNodesResponseBody;
2558
+ static names(): {
2559
+ [key: string]: string;
2560
+ };
2561
+ static types(): {
2562
+ [key: string]: any;
2563
+ };
2564
+ constructor(map?: {
2565
+ [key: string]: any;
2566
+ });
2567
+ }
2568
+ export declare class ListPromptTemplatesRequest extends $tea.Model {
2569
+ /**
2570
+ * @example
2571
+ * 10
2572
+ */
2573
+ maxResults?: number;
2574
+ name?: string;
2575
+ /**
2576
+ * @example
2577
+ * dc270401186b433f975d7e1faaa34e0e
2578
+ */
2579
+ nextToken?: string;
2580
+ /**
2581
+ * @example
2582
+ * System
2583
+ */
2584
+ type?: string;
2585
+ static names(): {
2586
+ [key: string]: string;
2587
+ };
2588
+ static types(): {
2589
+ [key: string]: any;
2590
+ };
2591
+ constructor(map?: {
2592
+ [key: string]: any;
2593
+ });
2594
+ }
2595
+ export declare class ListPromptTemplatesResponseBody extends $tea.Model {
2596
+ /**
2597
+ * @example
2598
+ * 10
2599
+ */
2600
+ maxResults?: number;
2601
+ /**
2602
+ * @example
2603
+ * dc270401186b433f975d7e1faaa34e0e
2604
+ */
2605
+ nextToken?: string;
2606
+ promptTemplates?: ListPromptTemplatesResponseBodyPromptTemplates[];
2607
+ /**
2608
+ * @example
2609
+ * FE9B6CBF-47E6-5D76-9C5D-B814DD5AB071
2610
+ */
2611
+ requestId?: string;
2612
+ /**
2613
+ * @example
2614
+ * 15
1865
2615
  */
1866
2616
  totalCount?: number;
2617
+ /**
2618
+ * @example
2619
+ * llm-us9hjmt32nysdxxx
2620
+ */
2621
+ workspaceId?: string;
1867
2622
  static names(): {
1868
2623
  [key: string]: string;
1869
2624
  };
@@ -1874,12 +2629,12 @@ export declare class ListMemoryNodesResponseBody extends $tea.Model {
1874
2629
  [key: string]: any;
1875
2630
  });
1876
2631
  }
1877
- export declare class ListMemoryNodesResponse extends $tea.Model {
2632
+ export declare class ListPromptTemplatesResponse extends $tea.Model {
1878
2633
  headers?: {
1879
2634
  [key: string]: string;
1880
2635
  };
1881
2636
  statusCode?: number;
1882
- body?: ListMemoryNodesResponseBody;
2637
+ body?: ListPromptTemplatesResponseBody;
1883
2638
  static names(): {
1884
2639
  [key: string]: string;
1885
2640
  };
@@ -1938,16 +2693,37 @@ export declare class ListPublishedAgentResponse extends $tea.Model {
1938
2693
  }
1939
2694
  export declare class RetrieveRequest extends $tea.Model {
1940
2695
  /**
2696
+ * @remarks
2697
+ * Vector retrieval top K. After generating vectors based on input text, the top K chunks in the knowledge base that are most similar to the vector representation of the input text are retrieved. Valid values: 0 to 100. The sum of the `DenseSimilarityTopK` and `SparseSimilarityTopK` parameters must be less than or equal to 200.
2698
+ *
2699
+ * Default value: 100.
2700
+ *
1941
2701
  * @example
1942
2702
  * 100
1943
2703
  */
1944
2704
  denseSimilarityTopK?: number;
1945
2705
  /**
2706
+ * @remarks
2707
+ * Specifies whether to enable reranking. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
2708
+ *
2709
+ * * true
2710
+ * * false
2711
+ *
2712
+ * Default value: true.
2713
+ *
1946
2714
  * @example
1947
2715
  * true
1948
2716
  */
1949
2717
  enableReranking?: boolean;
1950
2718
  /**
2719
+ * @remarks
2720
+ * Specifies whether to enable multi-round conversation rewriting. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
2721
+ *
2722
+ * * true
2723
+ * * false
2724
+ *
2725
+ * Default value: false.
2726
+ *
1951
2727
  * @example
1952
2728
  * false
1953
2729
  */
@@ -1955,34 +2731,73 @@ export declare class RetrieveRequest extends $tea.Model {
1955
2731
  images?: string[];
1956
2732
  /**
1957
2733
  * @remarks
2734
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
2735
+ *
1958
2736
  * This parameter is required.
1959
2737
  *
1960
2738
  * @example
1961
2739
  * 5pwe0m2g6t
1962
2740
  */
1963
2741
  indexId?: string;
2742
+ /**
2743
+ * @remarks
2744
+ * The input query prompt. The length and characters of the query are not limited.
2745
+ */
1964
2746
  query?: string;
2747
+ /**
2748
+ * @remarks
2749
+ * Ranking configurations.
2750
+ */
1965
2751
  rerank?: RetrieveRequestRerank[];
1966
2752
  /**
2753
+ * @remarks
2754
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values: [0.01-1.00]. The priority of this parameter is greater than the similarity threshold configured for the knowledge base.
2755
+ *
2756
+ * By default, this parameter is left empty. In this case, the similarity threshold of the knowledge base is used.
2757
+ *
1967
2758
  * @example
1968
2759
  * 0.20
1969
2760
  */
1970
2761
  rerankMinScore?: number;
1971
2762
  /**
2763
+ * @remarks
2764
+ * The top N return data after reranking. Valid values: 1 to 20. Default value: 5.
2765
+ *
1972
2766
  * @example
1973
2767
  * 5
1974
2768
  */
1975
2769
  rerankTopN?: number;
2770
+ /**
2771
+ * @remarks
2772
+ * Conversation rewriting configurations.
2773
+ */
1976
2774
  rewrite?: RetrieveRequestRewrite[];
1977
2775
  /**
2776
+ * @remarks
2777
+ * Specifies whether to save the retrieve test history. Valid values:
2778
+ *
2779
+ * * true
2780
+ * * false
2781
+ *
2782
+ * Default value: false.
2783
+ *
1978
2784
  * @example
1979
2785
  * false
1980
2786
  */
1981
2787
  saveRetrieverHistory?: boolean;
2788
+ /**
2789
+ * @remarks
2790
+ * Specifies complex filter conditions. For more information about the syntax of SearchFilters, see the SearchFilter syntax section of this topic.
2791
+ */
1982
2792
  searchFilters?: {
1983
2793
  [key: string]: string;
1984
2794
  }[];
1985
2795
  /**
2796
+ * @remarks
2797
+ * The top K of keyword retrieval. Chunks that exactly match the keywords of the input text are retrieved from the knowledge base. This filters out irrelevant chunks and boosts accuracy. Valid values: 0 to 100. The sum of the `DenseSimilarityTopK` and `SparseSimilarityTopK` parameters must be less than or equal to 200.
2798
+ *
2799
+ * Default value: 100.
2800
+ *
1986
2801
  * @example
1987
2802
  * 100
1988
2803
  */
@@ -1999,16 +2814,37 @@ export declare class RetrieveRequest extends $tea.Model {
1999
2814
  }
2000
2815
  export declare class RetrieveShrinkRequest extends $tea.Model {
2001
2816
  /**
2817
+ * @remarks
2818
+ * Vector retrieval top K. After generating vectors based on input text, the top K chunks in the knowledge base that are most similar to the vector representation of the input text are retrieved. Valid values: 0 to 100. The sum of the `DenseSimilarityTopK` and `SparseSimilarityTopK` parameters must be less than or equal to 200.
2819
+ *
2820
+ * Default value: 100.
2821
+ *
2002
2822
  * @example
2003
2823
  * 100
2004
2824
  */
2005
2825
  denseSimilarityTopK?: number;
2006
2826
  /**
2827
+ * @remarks
2828
+ * Specifies whether to enable reranking. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
2829
+ *
2830
+ * * true
2831
+ * * false
2832
+ *
2833
+ * Default value: true.
2834
+ *
2007
2835
  * @example
2008
2836
  * true
2009
2837
  */
2010
2838
  enableReranking?: boolean;
2011
2839
  /**
2840
+ * @remarks
2841
+ * Specifies whether to enable multi-round conversation rewriting. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
2842
+ *
2843
+ * * true
2844
+ * * false
2845
+ *
2846
+ * Default value: false.
2847
+ *
2012
2848
  * @example
2013
2849
  * false
2014
2850
  */
@@ -2016,32 +2852,71 @@ export declare class RetrieveShrinkRequest extends $tea.Model {
2016
2852
  imagesShrink?: string;
2017
2853
  /**
2018
2854
  * @remarks
2855
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
2856
+ *
2019
2857
  * This parameter is required.
2020
2858
  *
2021
2859
  * @example
2022
2860
  * 5pwe0m2g6t
2023
2861
  */
2024
2862
  indexId?: string;
2863
+ /**
2864
+ * @remarks
2865
+ * The input query prompt. The length and characters of the query are not limited.
2866
+ */
2025
2867
  query?: string;
2868
+ /**
2869
+ * @remarks
2870
+ * Ranking configurations.
2871
+ */
2026
2872
  rerankShrink?: string;
2027
2873
  /**
2874
+ * @remarks
2875
+ * 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://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values: [0.01-1.00]. The priority of this parameter is greater than the similarity threshold configured for the knowledge base.
2876
+ *
2877
+ * By default, this parameter is left empty. In this case, the similarity threshold of the knowledge base is used.
2878
+ *
2028
2879
  * @example
2029
2880
  * 0.20
2030
2881
  */
2031
2882
  rerankMinScore?: number;
2032
2883
  /**
2884
+ * @remarks
2885
+ * The top N return data after reranking. Valid values: 1 to 20. Default value: 5.
2886
+ *
2033
2887
  * @example
2034
2888
  * 5
2035
2889
  */
2036
2890
  rerankTopN?: number;
2891
+ /**
2892
+ * @remarks
2893
+ * Conversation rewriting configurations.
2894
+ */
2037
2895
  rewriteShrink?: string;
2038
2896
  /**
2897
+ * @remarks
2898
+ * Specifies whether to save the retrieve test history. Valid values:
2899
+ *
2900
+ * * true
2901
+ * * false
2902
+ *
2903
+ * Default value: false.
2904
+ *
2039
2905
  * @example
2040
2906
  * false
2041
2907
  */
2042
2908
  saveRetrieverHistory?: boolean;
2909
+ /**
2910
+ * @remarks
2911
+ * Specifies complex filter conditions. For more information about the syntax of SearchFilters, see the SearchFilter syntax section of this topic.
2912
+ */
2043
2913
  searchFiltersShrink?: string;
2044
2914
  /**
2915
+ * @remarks
2916
+ * The top K of keyword retrieval. Chunks that exactly match the keywords of the input text are retrieved from the knowledge base. This filters out irrelevant chunks and boosts accuracy. Valid values: 0 to 100. The sum of the `DenseSimilarityTopK` and `SparseSimilarityTopK` parameters must be less than or equal to 200.
2917
+ *
2918
+ * Default value: 100.
2919
+ *
2045
2920
  * @example
2046
2921
  * 100
2047
2922
  */
@@ -2058,30 +2933,49 @@ export declare class RetrieveShrinkRequest extends $tea.Model {
2058
2933
  }
2059
2934
  export declare class RetrieveResponseBody extends $tea.Model {
2060
2935
  /**
2936
+ * @remarks
2937
+ * HTTP status code
2938
+ *
2061
2939
  * @example
2062
2940
  * Index.InvalidParameter
2063
2941
  */
2064
2942
  code?: string;
2943
+ /**
2944
+ * @remarks
2945
+ * The returned data.
2946
+ */
2065
2947
  data?: RetrieveResponseBodyData;
2066
2948
  /**
2949
+ * @remarks
2950
+ * The error message.
2951
+ *
2067
2952
  * @example
2068
2953
  * Required parameter(%s) missing or invalid, please check the request parameters.
2069
2954
  */
2070
2955
  message?: string;
2071
2956
  /**
2072
2957
  * @remarks
2073
- * Id of the request
2958
+ * The request ID.
2074
2959
  *
2075
2960
  * @example
2076
2961
  * 17204B98-7734-4F9A-8464-2446A84821CA
2077
2962
  */
2078
2963
  requestId?: string;
2079
2964
  /**
2965
+ * @remarks
2966
+ * The HTTP status code returned.
2967
+ *
2080
2968
  * @example
2081
2969
  * 200
2082
2970
  */
2083
2971
  status?: string;
2084
2972
  /**
2973
+ * @remarks
2974
+ * Indications whether the API call is successful. Valid values:
2975
+ *
2976
+ * * true
2977
+ * * false
2978
+ *
2085
2979
  * @example
2086
2980
  * true
2087
2981
  */
@@ -2113,10 +3007,20 @@ export declare class RetrieveResponse extends $tea.Model {
2113
3007
  });
2114
3008
  }
2115
3009
  export declare class SubmitIndexAddDocumentsJobRequest extends $tea.Model {
3010
+ /**
3011
+ * @remarks
3012
+ * The list of primary key IDs of the category.
3013
+ */
2116
3014
  categoryIds?: string[];
3015
+ /**
3016
+ * @remarks
3017
+ * The list of the primary key IDs of the documents.
3018
+ */
2117
3019
  documentIds?: string[];
2118
3020
  /**
2119
3021
  * @remarks
3022
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
3023
+ *
2120
3024
  * This parameter is required.
2121
3025
  *
2122
3026
  * @example
@@ -2125,6 +3029,13 @@ export declare class SubmitIndexAddDocumentsJobRequest extends $tea.Model {
2125
3029
  indexId?: string;
2126
3030
  /**
2127
3031
  * @remarks
3032
+ * The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
3033
+ *
3034
+ * * DATA_CENTER_CATEGORY: The category type. Import all documents from one or more categories in Data Center.
3035
+ * * DATA_CENTER_FILE: The document type. Import one or more documents from Data Center.
3036
+ *
3037
+ * > 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.
3038
+ *
2128
3039
  * This parameter is required.
2129
3040
  *
2130
3041
  * @example
@@ -2142,10 +3053,20 @@ export declare class SubmitIndexAddDocumentsJobRequest extends $tea.Model {
2142
3053
  });
2143
3054
  }
2144
3055
  export declare class SubmitIndexAddDocumentsJobShrinkRequest extends $tea.Model {
3056
+ /**
3057
+ * @remarks
3058
+ * The list of primary key IDs of the category.
3059
+ */
2145
3060
  categoryIdsShrink?: string;
3061
+ /**
3062
+ * @remarks
3063
+ * The list of the primary key IDs of the documents.
3064
+ */
2146
3065
  documentIdsShrink?: string;
2147
3066
  /**
2148
3067
  * @remarks
3068
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
3069
+ *
2149
3070
  * This parameter is required.
2150
3071
  *
2151
3072
  * @example
@@ -2154,6 +3075,13 @@ export declare class SubmitIndexAddDocumentsJobShrinkRequest extends $tea.Model
2154
3075
  indexId?: string;
2155
3076
  /**
2156
3077
  * @remarks
3078
+ * The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
3079
+ *
3080
+ * * DATA_CENTER_CATEGORY: The category type. Import all documents from one or more categories in Data Center.
3081
+ * * DATA_CENTER_FILE: The document type. Import one or more documents from Data Center.
3082
+ *
3083
+ * > 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.
3084
+ *
2157
3085
  * This parameter is required.
2158
3086
  *
2159
3087
  * @example
@@ -2172,30 +3100,49 @@ export declare class SubmitIndexAddDocumentsJobShrinkRequest extends $tea.Model
2172
3100
  }
2173
3101
  export declare class SubmitIndexAddDocumentsJobResponseBody extends $tea.Model {
2174
3102
  /**
3103
+ * @remarks
3104
+ * HTTP status code
3105
+ *
2175
3106
  * @example
2176
3107
  * Index.InvalidParameter
2177
3108
  */
2178
3109
  code?: string;
3110
+ /**
3111
+ * @remarks
3112
+ * The data returned.
3113
+ */
2179
3114
  data?: SubmitIndexAddDocumentsJobResponseBodyData;
2180
3115
  /**
3116
+ * @remarks
3117
+ * The error message.
3118
+ *
2181
3119
  * @example
2182
3120
  * Required parameter(%s) missing or invalid, please check the request parameters.
2183
3121
  */
2184
3122
  message?: string;
2185
3123
  /**
2186
3124
  * @remarks
2187
- * Id of the request
3125
+ * The request ID.
2188
3126
  *
2189
3127
  * @example
2190
3128
  * 778C0B3B-03C1-5FC1-A947-36EDD13606AB
2191
3129
  */
2192
3130
  requestId?: string;
2193
3131
  /**
3132
+ * @remarks
3133
+ * The HTTP status code returned.
3134
+ *
2194
3135
  * @example
2195
3136
  * 200
2196
3137
  */
2197
3138
  status?: string;
2198
3139
  /**
3140
+ * @remarks
3141
+ * Indications whether the API call is successful. Valid values:
3142
+ *
3143
+ * * true
3144
+ * * false
3145
+ *
2199
3146
  * @example
2200
3147
  * true
2201
3148
  */
@@ -2229,6 +3176,8 @@ export declare class SubmitIndexAddDocumentsJobResponse extends $tea.Model {
2229
3176
  export declare class SubmitIndexJobRequest extends $tea.Model {
2230
3177
  /**
2231
3178
  * @remarks
3179
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
3180
+ *
2232
3181
  * This parameter is required.
2233
3182
  *
2234
3183
  * @example
@@ -2247,30 +3196,49 @@ export declare class SubmitIndexJobRequest extends $tea.Model {
2247
3196
  }
2248
3197
  export declare class SubmitIndexJobResponseBody extends $tea.Model {
2249
3198
  /**
3199
+ * @remarks
3200
+ * HTTP status code
3201
+ *
2250
3202
  * @example
2251
3203
  * InvalidParameter
2252
3204
  */
2253
3205
  code?: string;
3206
+ /**
3207
+ * @remarks
3208
+ * The data returned.
3209
+ */
2254
3210
  data?: SubmitIndexJobResponseBodyData;
2255
3211
  /**
3212
+ * @remarks
3213
+ * The error message.
3214
+ *
2256
3215
  * @example
2257
3216
  * Required parameter(%s) missing or invalid, please check the request parameters.
2258
3217
  */
2259
3218
  message?: string;
2260
3219
  /**
2261
3220
  * @remarks
2262
- * Id of the request
3221
+ * The request ID.
2263
3222
  *
2264
3223
  * @example
2265
3224
  * 17204B98-xxxx-4F9A-8464-2446A84821CA
2266
3225
  */
2267
3226
  requestId?: string;
2268
3227
  /**
3228
+ * @remarks
3229
+ * The status code.
3230
+ *
2269
3231
  * @example
2270
3232
  * Success
2271
3233
  */
2272
3234
  status?: string;
2273
3235
  /**
3236
+ * @remarks
3237
+ * Indications whether the API call is successful. Valid values:
3238
+ *
3239
+ * * true
3240
+ * * false
3241
+ *
2274
3242
  * @example
2275
3243
  * True
2276
3244
  */
@@ -2456,6 +3424,51 @@ export declare class UpdateMemoryNodeResponse extends $tea.Model {
2456
3424
  [key: string]: any;
2457
3425
  });
2458
3426
  }
3427
+ export declare class UpdatePromptTemplateRequest extends $tea.Model {
3428
+ content?: string;
3429
+ name?: string;
3430
+ static names(): {
3431
+ [key: string]: string;
3432
+ };
3433
+ static types(): {
3434
+ [key: string]: any;
3435
+ };
3436
+ constructor(map?: {
3437
+ [key: string]: any;
3438
+ });
3439
+ }
3440
+ export declare class UpdatePromptTemplateResponseBody extends $tea.Model {
3441
+ /**
3442
+ * @example
3443
+ * FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx
3444
+ */
3445
+ requestId?: string;
3446
+ static names(): {
3447
+ [key: string]: string;
3448
+ };
3449
+ static types(): {
3450
+ [key: string]: any;
3451
+ };
3452
+ constructor(map?: {
3453
+ [key: string]: any;
3454
+ });
3455
+ }
3456
+ export declare class UpdatePromptTemplateResponse extends $tea.Model {
3457
+ headers?: {
3458
+ [key: string]: string;
3459
+ };
3460
+ statusCode?: number;
3461
+ body?: UpdatePromptTemplateResponseBody;
3462
+ static names(): {
3463
+ [key: string]: string;
3464
+ };
3465
+ static types(): {
3466
+ [key: string]: any;
3467
+ };
3468
+ constructor(map?: {
3469
+ [key: string]: any;
3470
+ });
3471
+ }
2459
3472
  export declare class AddCategoryResponseBodyData extends $tea.Model {
2460
3473
  /**
2461
3474
  * @example
@@ -2475,11 +3488,19 @@ export declare class AddCategoryResponseBodyData extends $tea.Model {
2475
3488
  }
2476
3489
  export declare class AddFileResponseBodyData extends $tea.Model {
2477
3490
  /**
3491
+ * @remarks
3492
+ * The primary key ID of the document. We recommend that you store the ID because it is required for all subsequent API operations related to this document.
3493
+ *
2478
3494
  * @example
2479
3495
  * file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX
2480
3496
  */
2481
3497
  fileId?: string;
2482
3498
  /**
3499
+ * @remarks
3500
+ * The parser that is used to parse the document. Valid value:
3501
+ *
3502
+ * * DASHSCOPE_DOCMIND: Intelligent document parsing by Alibaba Cloud.
3503
+ *
2483
3504
  * @example
2484
3505
  * DASHSCOPE_DOCMIND
2485
3506
  */
@@ -2496,17 +3517,29 @@ export declare class AddFileResponseBodyData extends $tea.Model {
2496
3517
  }
2497
3518
  export declare class ApplyFileUploadLeaseResponseBodyDataParam extends $tea.Model {
2498
3519
  /**
3520
+ * @remarks
3521
+ * The key-value pair to be placed in the Header. Both the key and the value are strings.
3522
+ *
2499
3523
  * @example
2500
3524
  * "X-bailian-extra": "MTAwNTQyNjQ5NTE2OTE3OA==",
2501
3525
  * "Content-Type": "application/pdf"
2502
3526
  */
2503
3527
  headers?: any;
2504
3528
  /**
3529
+ * @remarks
3530
+ * The HTTP call method. Valid values:
3531
+ *
3532
+ * * PUT
3533
+ * * POST
3534
+ *
2505
3535
  * @example
2506
3536
  * PUT
2507
3537
  */
2508
3538
  method?: string;
2509
3539
  /**
3540
+ * @remarks
3541
+ * The upload URL of the document.
3542
+ *
2510
3543
  * @example
2511
3544
  * https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D
2512
3545
  */
@@ -2523,12 +3556,25 @@ export declare class ApplyFileUploadLeaseResponseBodyDataParam extends $tea.Mode
2523
3556
  }
2524
3557
  export declare class ApplyFileUploadLeaseResponseBodyData extends $tea.Model {
2525
3558
  /**
3559
+ * @remarks
3560
+ * The unique ID of the lease. You need to specify this parameter when you call the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) operation.
3561
+ *
2526
3562
  * @example
2527
3563
  * 1e6a159107384782be5e45ac4759b247.1719325231035
2528
3564
  */
2529
3565
  fileUploadLeaseId?: string;
3566
+ /**
3567
+ * @remarks
3568
+ * The HTTP request parameters used to upload the document.
3569
+ */
2530
3570
  param?: ApplyFileUploadLeaseResponseBodyDataParam;
2531
3571
  /**
3572
+ * @remarks
3573
+ * The upload method of the document. Valid values:
3574
+ *
3575
+ * * OSS.PreSignedURL
3576
+ * * HTTP
3577
+ *
2532
3578
  * @example
2533
3579
  * HTTP
2534
3580
  */
@@ -2671,15 +3717,55 @@ export declare class CreateIndexRequestColumns extends $tea.Model {
2671
3717
  });
2672
3718
  }
2673
3719
  export declare class CreateIndexRequestDataSource extends $tea.Model {
3720
+ /**
3721
+ * @remarks
3722
+ * > This parameter is not available. Do not specify this parameter.
3723
+ */
2674
3724
  credentialId?: string;
3725
+ /**
3726
+ * @remarks
3727
+ * > This parameter is not available. Do not specify this parameter.
3728
+ */
2675
3729
  credentialKey?: string;
3730
+ /**
3731
+ * @remarks
3732
+ * > This parameter is not available. Do not specify this parameter.
3733
+ */
2676
3734
  database?: string;
3735
+ /**
3736
+ * @remarks
3737
+ * > This parameter is not available. Do not specify this parameter.
3738
+ */
2677
3739
  endpoint?: string;
3740
+ /**
3741
+ * @remarks
3742
+ * > This parameter is not available. Do not specify this parameter.
3743
+ */
2678
3744
  isPrivateLink?: boolean;
3745
+ /**
3746
+ * @remarks
3747
+ * > This parameter is not available. Do not specify this parameter.
3748
+ */
2679
3749
  region?: string;
3750
+ /**
3751
+ * @remarks
3752
+ * > This parameter is not available. Do not specify this parameter.
3753
+ */
2680
3754
  subPath?: string;
3755
+ /**
3756
+ * @remarks
3757
+ * > This parameter is not available. Do not specify this parameter.
3758
+ */
2681
3759
  subType?: string;
3760
+ /**
3761
+ * @remarks
3762
+ * > This parameter is not available. Do not specify this parameter.
3763
+ */
2682
3764
  table?: string;
3765
+ /**
3766
+ * @remarks
3767
+ * > This parameter is not available. Do not specify this parameter.
3768
+ */
2683
3769
  type?: string;
2684
3770
  static names(): {
2685
3771
  [key: string]: string;
@@ -2693,6 +3779,11 @@ export declare class CreateIndexRequestDataSource extends $tea.Model {
2693
3779
  }
2694
3780
  export declare class CreateIndexResponseBodyData extends $tea.Model {
2695
3781
  /**
3782
+ * @remarks
3783
+ * The primary key ID of the knowledge base, `IndexId`.
3784
+ *
3785
+ * > We recommend that you store this ID. It is required for all subsequent API operations related to this knowledge base.
3786
+ *
2696
3787
  * @example
2697
3788
  * jkurxhju6b
2698
3789
  */
@@ -2740,6 +3831,10 @@ export declare class DeleteFileResponseBodyData extends $tea.Model {
2740
3831
  });
2741
3832
  }
2742
3833
  export declare class DeleteIndexDocumentResponseBodyData extends $tea.Model {
3834
+ /**
3835
+ * @remarks
3836
+ * The list of primary key IDs of documents that are deleted.
3837
+ */
2743
3838
  deletedDocument?: string[];
2744
3839
  static names(): {
2745
3840
  [key: string]: string;
@@ -2753,45 +3848,81 @@ export declare class DeleteIndexDocumentResponseBodyData extends $tea.Model {
2753
3848
  }
2754
3849
  export declare class DescribeFileResponseBodyData extends $tea.Model {
2755
3850
  /**
3851
+ * @remarks
3852
+ * The ID of the category to which the document belongs.
3853
+ *
2756
3854
  * @example
2757
3855
  * cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX
2758
3856
  */
2759
3857
  categoryId?: string;
2760
3858
  /**
3859
+ * @remarks
3860
+ * The timestamp when the document was uploaded to Model Studio. Format: yyyy-MM-dd HH:mm:ss. Time zone: UTC + 8.
3861
+ *
2761
3862
  * @example
2762
3863
  * 2024-05-26 12:45:43
2763
3864
  */
2764
3865
  createTime?: string;
2765
3866
  /**
3867
+ * @remarks
3868
+ * The primary key ID of the document.
3869
+ *
2766
3870
  * @example
2767
3871
  * file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX
2768
3872
  */
2769
3873
  fileId?: string;
2770
3874
  /**
3875
+ * @remarks
3876
+ * The name of the document.
3877
+ *
2771
3878
  * @example
2772
3879
  * test.pdf
2773
3880
  */
2774
3881
  fileName?: string;
2775
3882
  /**
3883
+ * @remarks
3884
+ * The file type of the document. The value is an extension. Valid values: pdf, docx, doc, txt, md, pptx, and ppt.
3885
+ *
2776
3886
  * @example
2777
3887
  * pdf
2778
3888
  */
2779
3889
  fileType?: string;
2780
3890
  /**
3891
+ * @remarks
3892
+ * The parser that is used to parse the document. Valid value:
3893
+ *
3894
+ * * DASHSCOPE_DOCMIND: The default document parser.
3895
+ *
2781
3896
  * @example
2782
3897
  * DASHSCOPE_DOCMIND
2783
3898
  */
2784
3899
  parser?: string;
2785
3900
  /**
3901
+ * @remarks
3902
+ * The size of the document. Unit: bytes.
3903
+ *
2786
3904
  * @example
2787
3905
  * 1234
2788
3906
  */
2789
3907
  sizeInBytes?: number;
2790
3908
  /**
3909
+ * @remarks
3910
+ * The status of the document. Valid values:
3911
+ *
3912
+ * * INIT: pending parsing.
3913
+ * * PARSING
3914
+ * * PARSE_SUCCESS
3915
+ * * PARSE_FAILED
3916
+ *
2791
3917
  * @example
2792
3918
  * PARSE_SUCCESS
2793
3919
  */
2794
- status?: string;
3920
+ status?: string;
3921
+ /**
3922
+ * @remarks
3923
+ * The tags that are associated with the document. A document can be associated with multiple tags.
3924
+ */
3925
+ tags?: string[];
2795
3926
  static names(): {
2796
3927
  [key: string]: string;
2797
3928
  };
@@ -2804,22 +3935,43 @@ export declare class DescribeFileResponseBodyData extends $tea.Model {
2804
3935
  }
2805
3936
  export declare class GetIndexJobStatusResponseBodyDataDocuments extends $tea.Model {
2806
3937
  /**
3938
+ * @remarks
3939
+ * HTTP status code
3940
+ *
2807
3941
  * @example
2808
3942
  * Index.Document.ChunkError
2809
3943
  */
2810
3944
  code?: string;
2811
3945
  /**
3946
+ * @remarks
3947
+ * The primary key ID of the document.
3948
+ *
2812
3949
  * @example
2813
3950
  * file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX
2814
3951
  */
2815
3952
  docId?: string;
3953
+ /**
3954
+ * @remarks
3955
+ * The name of the document.
3956
+ */
2816
3957
  docName?: string;
2817
3958
  /**
3959
+ * @remarks
3960
+ * The error message.
3961
+ *
2818
3962
  * @example
2819
3963
  * document parse error
2820
3964
  */
2821
3965
  message?: string;
2822
3966
  /**
3967
+ * @remarks
3968
+ * The import status of the document. Valid values:
3969
+ *
3970
+ * * INSERT_ERROR
3971
+ * * RUNNING
3972
+ * * DELETED
3973
+ * * FINISH
3974
+ *
2823
3975
  * @example
2824
3976
  * RUNNING
2825
3977
  */
@@ -2835,13 +3987,28 @@ export declare class GetIndexJobStatusResponseBodyDataDocuments extends $tea.Mod
2835
3987
  });
2836
3988
  }
2837
3989
  export declare class GetIndexJobStatusResponseBodyData extends $tea.Model {
3990
+ /**
3991
+ * @remarks
3992
+ * The list of imported documents.
3993
+ */
2838
3994
  documents?: GetIndexJobStatusResponseBodyDataDocuments[];
2839
3995
  /**
3996
+ * @remarks
3997
+ * The ID of the job.
3998
+ *
2840
3999
  * @example
2841
4000
  * 66122af12a4e45ddae6bd6c845556647
2842
4001
  */
2843
4002
  jobId?: string;
2844
4003
  /**
4004
+ * @remarks
4005
+ * The status of the knowledge base job. Valid values:
4006
+ *
4007
+ * * COMPLETED
4008
+ * * FAILED
4009
+ * * RUNNING
4010
+ * * PENDING
4011
+ *
2845
4012
  * @example
2846
4013
  * PENDING
2847
4014
  */
@@ -3048,12 +4215,23 @@ export declare class ListCategoryResponseBodyData extends $tea.Model {
3048
4215
  });
3049
4216
  }
3050
4217
  export declare class ListChunksResponseBodyDataNodes extends $tea.Model {
4218
+ /**
4219
+ * @remarks
4220
+ * The metadata map of the chunk.
4221
+ */
3051
4222
  metadata?: any;
3052
4223
  /**
4224
+ * @remarks
4225
+ * The similarity score of the chunk.
4226
+ *
3053
4227
  * @example
3054
4228
  * 0.3
3055
4229
  */
3056
4230
  score?: number;
4231
+ /**
4232
+ * @remarks
4233
+ * The text of the chunk.
4234
+ */
3057
4235
  text?: string;
3058
4236
  static names(): {
3059
4237
  [key: string]: string;
@@ -3066,8 +4244,15 @@ export declare class ListChunksResponseBodyDataNodes extends $tea.Model {
3066
4244
  });
3067
4245
  }
3068
4246
  export declare class ListChunksResponseBodyData extends $tea.Model {
4247
+ /**
4248
+ * @remarks
4249
+ * The list of chunks.
4250
+ */
3069
4251
  nodes?: ListChunksResponseBodyDataNodes[];
3070
4252
  /**
4253
+ * @remarks
4254
+ * The total number of chunks returned.
4255
+ *
3071
4256
  * @example
3072
4257
  * 16
3073
4258
  */
@@ -3123,6 +4308,7 @@ export declare class ListFileResponseBodyDataFileList extends $tea.Model {
3123
4308
  * 200
3124
4309
  */
3125
4310
  status?: string;
4311
+ tags?: string[];
3126
4312
  static names(): {
3127
4313
  [key: string]: string;
3128
4314
  };
@@ -3167,37 +4353,69 @@ export declare class ListFileResponseBodyData extends $tea.Model {
3167
4353
  }
3168
4354
  export declare class ListIndexDocumentsResponseBodyDataDocuments extends $tea.Model {
3169
4355
  /**
4356
+ * @remarks
4357
+ * The error status code of document import.
4358
+ *
3170
4359
  * @example
3171
4360
  * 110002
3172
4361
  */
3173
4362
  code?: string;
3174
4363
  /**
4364
+ * @remarks
4365
+ * The format of the document. Valid values: pdf, docx, doc, txt, md, pptx, ppt, and EXCEL.
4366
+ *
3175
4367
  * @example
3176
4368
  * pdf
3177
4369
  */
3178
4370
  documentType?: string;
3179
4371
  /**
4372
+ * @remarks
4373
+ * The primary key ID of the document.
4374
+ *
3180
4375
  * @example
3181
4376
  * doc_c134aa2073204a5d936d870bf960f56a10024701
3182
4377
  */
3183
4378
  id?: string;
3184
4379
  /**
4380
+ * @remarks
4381
+ * The error message of document import.
4382
+ *
3185
4383
  * @example
3186
4384
  * check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid
3187
4385
  */
3188
4386
  message?: string;
4387
+ /**
4388
+ * @remarks
4389
+ * The name of the document.
4390
+ */
3189
4391
  name?: string;
3190
4392
  /**
4393
+ * @remarks
4394
+ * The size of the document. Unit: bytes.
4395
+ *
3191
4396
  * @example
3192
4397
  * 996764
3193
4398
  */
3194
4399
  size?: number;
3195
4400
  /**
4401
+ * @remarks
4402
+ * For unstructured knowledge base, this parameter is the category ID, which is the `CategoryId` returned by the [AddCategory](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addcategory) interface. To view the category ID, you can click the ID icon next to the category name on the Unstructured Data tab of the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.
4403
+ *
4404
+ * For structured knowledge base, this parameter is the data table ID. To view the table ID, you can click the ID icon next to the table name on the Structured Data tab of the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.
4405
+ *
3196
4406
  * @example
3197
4407
  * cate_21a407a3372c4ba7aedc649709143f0c10021401
3198
4408
  */
3199
4409
  sourceId?: string;
3200
4410
  /**
4411
+ * @remarks
4412
+ * The import status of the document. Valid values:
4413
+ *
4414
+ * * INSERT_ERROR
4415
+ * * RUNNING
4416
+ * * DELETED
4417
+ * * FINISH
4418
+ *
3201
4419
  * @example
3202
4420
  * RUNNING
3203
4421
  */
@@ -3213,23 +4431,39 @@ export declare class ListIndexDocumentsResponseBodyDataDocuments extends $tea.Mo
3213
4431
  });
3214
4432
  }
3215
4433
  export declare class ListIndexDocumentsResponseBodyData extends $tea.Model {
4434
+ /**
4435
+ * @remarks
4436
+ * The list of documents in the knowledge base.
4437
+ */
3216
4438
  documents?: ListIndexDocumentsResponseBodyDataDocuments[];
3217
4439
  /**
4440
+ * @remarks
4441
+ * The primary key ID of the knowledge base.
4442
+ *
3218
4443
  * @example
3219
4444
  * pno97tn8iu
3220
4445
  */
3221
4446
  indexId?: string;
3222
4447
  /**
4448
+ * @remarks
4449
+ * The specified page number.
4450
+ *
3223
4451
  * @example
3224
4452
  * 1
3225
4453
  */
3226
4454
  pageNumber?: number;
3227
4455
  /**
4456
+ * @remarks
4457
+ * The specified number of documents on each page.
4458
+ *
3228
4459
  * @example
3229
4460
  * 10
3230
4461
  */
3231
4462
  pageSize?: number;
3232
4463
  /**
4464
+ * @remarks
4465
+ * The total number of documents returned.
4466
+ *
3233
4467
  * @example
3234
4468
  * 2437
3235
4469
  */
@@ -3246,72 +4480,148 @@ export declare class ListIndexDocumentsResponseBodyData extends $tea.Model {
3246
4480
  }
3247
4481
  export declare class ListIndicesResponseBodyDataIndices extends $tea.Model {
3248
4482
  /**
4483
+ * @remarks
4484
+ * The estimated length of chunks. Valid values: [1-2048].
4485
+ *
3249
4486
  * @example
3250
4487
  * 5
3251
4488
  */
3252
4489
  chunkSize?: number;
3253
4490
  /**
4491
+ * @remarks
4492
+ * The description of the knowledge base.
4493
+ *
3254
4494
  * @example
3255
4495
  * If each RAM user belongs to a RAM group, the configuration is considered compliant.
3256
4496
  */
3257
4497
  description?: string;
4498
+ /**
4499
+ * @remarks
4500
+ * The list of the primary key IDs of the documents.
4501
+ */
3258
4502
  documentIds?: string[];
3259
4503
  /**
4504
+ * @remarks
4505
+ * The name of the embedding model. Valid values:
4506
+ *
4507
+ * * text-embedding-v2
4508
+ *
3260
4509
  * @example
3261
4510
  * conv-rewrite-qwen-1.8b
3262
4511
  */
3263
4512
  embeddingModelName?: string;
3264
4513
  /**
4514
+ * @remarks
4515
+ * The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.
4516
+ *
3265
4517
  * @example
3266
4518
  * 259899
3267
4519
  */
3268
4520
  id?: string;
3269
4521
  /**
4522
+ * @remarks
4523
+ * The name of the knowledge base.
4524
+ *
3270
4525
  * @example
3271
4526
  * temp_mUB4j
3272
4527
  */
3273
4528
  name?: string;
3274
4529
  /**
4530
+ * @remarks
4531
+ * The overlap length. Valid values: [0-1024].
4532
+ *
3275
4533
  * @example
3276
4534
  * 10
3277
4535
  */
3278
4536
  overlapSize?: number;
3279
4537
  /**
4538
+ * @remarks
4539
+ * Similarity Threshold Valid values: [0.01-1.00].
4540
+ *
3280
4541
  * @example
3281
4542
  * 0.01
3282
4543
  */
3283
4544
  rerankMinScore?: string;
3284
4545
  /**
4546
+ * @remarks
4547
+ * The name of the rank model. Valid values:
4548
+ *
4549
+ * * gte-rerank-hybrid
4550
+ * * gte-rerank
4551
+ *
3285
4552
  * @example
3286
4553
  * gte-rerank-hybrid
3287
4554
  */
3288
4555
  rerankModelName?: string;
3289
4556
  /**
4557
+ * @remarks
4558
+ * The clause identifier. Separate multiple clause identifiers with |. Valid values:
4559
+ *
4560
+ * * \\n: line break
4561
+ * * ,: Chinese comma
4562
+ * * ,: English comma
4563
+ * * 。 : Chinese full stop
4564
+ * * .: English full stop
4565
+ * * ! : Chinese exclamation point
4566
+ * * ! : English exclamation point
4567
+ * * ;: Chinese semicolon
4568
+ * * ;: English semicolon
4569
+ * * ? : Chinese question mark
4570
+ * * ?: English question mark
4571
+ *
3290
4572
  * @example
3291
4573
  * \\n
3292
4574
  */
3293
4575
  separator?: string;
3294
4576
  /**
4577
+ * @remarks
4578
+ * The ID of the vector storage instance.
4579
+ *
3295
4580
  * @example
3296
4581
  * gp-bp1gq62t1788yw2ol
3297
4582
  */
3298
4583
  sinkInstanceId?: string;
3299
4584
  /**
4585
+ * @remarks
4586
+ * The region of the vector storage instance.
4587
+ *
3300
4588
  * @example
3301
4589
  * cn-hangzhou
3302
4590
  */
3303
4591
  sinkRegion?: string;
3304
4592
  /**
4593
+ * @remarks
4594
+ * The vector storage type of the knowledge base. Valid values:
4595
+ *
4596
+ * * ES: Built-in vector database.
4597
+ * * BUILT_IN: Built-in vector database.
4598
+ * * ADB: AnalyticDB for PostgreSQL database.
4599
+ *
3305
4600
  * @example
3306
4601
  * es
3307
4602
  */
3308
4603
  sinkType?: string;
3309
4604
  /**
4605
+ * @remarks
4606
+ * The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For unstructured knowledge base, possible values:
4607
+ *
4608
+ * * DATA_CENTER_CATEGORY: The category type.
4609
+ * * DATA_CENTER_FILE: The document type.
4610
+ *
4611
+ * For structured knowledge base, possible values:
4612
+ *
4613
+ * * DATA_CENTER_STRUCTURED_TABLE: The data table type.
4614
+ *
3310
4615
  * @example
3311
4616
  * DATA_CENTER_FILE
3312
4617
  */
3313
4618
  sourceType?: string;
3314
4619
  /**
4620
+ * @remarks
4621
+ * The vector storage type of the knowledge base. Valid values:
4622
+ *
4623
+ * * UNSTRUCTURED
4624
+ *
3315
4625
  * @example
3316
4626
  * structured
3317
4627
  */
@@ -3327,18 +4637,31 @@ export declare class ListIndicesResponseBodyDataIndices extends $tea.Model {
3327
4637
  });
3328
4638
  }
3329
4639
  export declare class ListIndicesResponseBodyData extends $tea.Model {
4640
+ /**
4641
+ * @remarks
4642
+ * The list of knowledge bases.
4643
+ */
3330
4644
  indices?: ListIndicesResponseBodyDataIndices[];
3331
4645
  /**
4646
+ * @remarks
4647
+ * The specified page number.
4648
+ *
3332
4649
  * @example
3333
4650
  * 1
3334
4651
  */
3335
4652
  pageNumber?: number;
3336
4653
  /**
4654
+ * @remarks
4655
+ * The specified number of documents on each page.
4656
+ *
3337
4657
  * @example
3338
4658
  * 10
3339
4659
  */
3340
4660
  pageSize?: number;
3341
4661
  /**
4662
+ * @remarks
4663
+ * The total number of knowledge bases returned.
4664
+ *
3342
4665
  * @example
3343
4666
  * 48
3344
4667
  */
@@ -3387,6 +4710,30 @@ export declare class ListMemoryNodesResponseBodyMemoryNodes extends $tea.Model {
3387
4710
  [key: string]: any;
3388
4711
  });
3389
4712
  }
4713
+ export declare class ListPromptTemplatesResponseBodyPromptTemplates extends $tea.Model {
4714
+ content?: string;
4715
+ name?: string;
4716
+ /**
4717
+ * @example
4718
+ * d6935b7efbe34d11b13df9307151cf8c
4719
+ */
4720
+ promptTemplateId?: string;
4721
+ /**
4722
+ * @example
4723
+ * "System"
4724
+ */
4725
+ type?: string;
4726
+ variables?: string[];
4727
+ static names(): {
4728
+ [key: string]: string;
4729
+ };
4730
+ static types(): {
4731
+ [key: string]: any;
4732
+ };
4733
+ constructor(map?: {
4734
+ [key: string]: any;
4735
+ });
4736
+ }
3390
4737
  export declare class ListPublishedAgentResponseBodyDataListApplicationConfigHistoryConfig extends $tea.Model {
3391
4738
  enableAdbRecord?: boolean;
3392
4739
  enableRecord?: boolean;
@@ -3531,6 +4878,12 @@ export declare class ListPublishedAgentResponseBodyData extends $tea.Model {
3531
4878
  }
3532
4879
  export declare class RetrieveRequestRerank extends $tea.Model {
3533
4880
  /**
4881
+ * @remarks
4882
+ * The name of the rank model. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base). Valid values:
4883
+ *
4884
+ * * gte-rerank-hybrid: Recommended official model.
4885
+ * * gte-rerank
4886
+ *
3534
4887
  * @example
3535
4888
  * gte-rerank-hybrid
3536
4889
  */
@@ -3546,6 +4899,17 @@ export declare class RetrieveRequestRerank extends $tea.Model {
3546
4899
  });
3547
4900
  }
3548
4901
  export declare class RetrieveRequestRewrite extends $tea.Model {
4902
+ /**
4903
+ * @remarks
4904
+ * Conversation rewriting model name. The query rewriting model automatically adjusts the original prompt based on the context to improve retrieval performance. Valid value:
4905
+ *
4906
+ * * conv-rewrite-qwen-1.8b
4907
+ *
4908
+ * By default, this parameter is left empty, which means conv-rewrite-qwen-1.8b is used.
4909
+ *
4910
+ * @example
4911
+ * conv-rewrite-qwen-1.8b
4912
+ */
3549
4913
  modelName?: string;
3550
4914
  static names(): {
3551
4915
  [key: string]: string;
@@ -3558,12 +4922,23 @@ export declare class RetrieveRequestRewrite extends $tea.Model {
3558
4922
  });
3559
4923
  }
3560
4924
  export declare class RetrieveResponseBodyDataNodes extends $tea.Model {
4925
+ /**
4926
+ * @remarks
4927
+ * The metadata map of the chunk.
4928
+ */
3561
4929
  metadata?: any;
3562
4930
  /**
4931
+ * @remarks
4932
+ * The similarity score of the chunk. Valid values:[0-1].
4933
+ *
3563
4934
  * @example
3564
4935
  * 0.3
3565
4936
  */
3566
4937
  score?: number;
4938
+ /**
4939
+ * @remarks
4940
+ * The text of the chunk.
4941
+ */
3567
4942
  text?: string;
3568
4943
  static names(): {
3569
4944
  [key: string]: string;
@@ -3576,6 +4951,10 @@ export declare class RetrieveResponseBodyDataNodes extends $tea.Model {
3576
4951
  });
3577
4952
  }
3578
4953
  export declare class RetrieveResponseBodyData extends $tea.Model {
4954
+ /**
4955
+ * @remarks
4956
+ * The list of queried chunks.
4957
+ */
3579
4958
  nodes?: RetrieveResponseBodyDataNodes[];
3580
4959
  static names(): {
3581
4960
  [key: string]: string;
@@ -3589,6 +4968,9 @@ export declare class RetrieveResponseBodyData extends $tea.Model {
3589
4968
  }
3590
4969
  export declare class SubmitIndexAddDocumentsJobResponseBodyData extends $tea.Model {
3591
4970
  /**
4971
+ * @remarks
4972
+ * The primary key ID of the task, `JobId`.
4973
+ *
3592
4974
  * @example
3593
4975
  * 42687eb254a34802bed398357f5498ae
3594
4976
  */
@@ -3605,11 +4987,17 @@ export declare class SubmitIndexAddDocumentsJobResponseBodyData extends $tea.Mod
3605
4987
  }
3606
4988
  export declare class SubmitIndexJobResponseBodyData extends $tea.Model {
3607
4989
  /**
4990
+ * @remarks
4991
+ * The primary key ID of the job, which is the `JobId` parameter of the [GetIndexJobStatus](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-getindexjobstatus) operation.
4992
+ *
3608
4993
  * @example
3609
4994
  * eFDr2fGRzP9gdDZWAdo3YQ==
3610
4995
  */
3611
4996
  id?: string;
3612
4997
  /**
4998
+ * @remarks
4999
+ * The primary key ID of the knowledge base.
5000
+ *
3613
5001
  * @example
3614
5002
  * khdyak1uuj
3615
5003
  */
@@ -3755,25 +5143,45 @@ export default class Client extends OpenApi {
3755
5143
  */
3756
5144
  addCategory(WorkspaceId: string, request: AddCategoryRequest): Promise<AddCategoryResponse>;
3757
5145
  /**
3758
- * 将临时上传的文档导入百炼数据中心,导入成功之后会自动触发文档解析。
5146
+ * Imports an unstructured document stored in the temporary storage space to Data Management.
3759
5147
  *
3760
- * @param request - AddFileRequest
5148
+ * @remarks
5149
+ * Before you call this operation, make sure that you have obtained the lease and uploaded the document to the temporary storage space by using the [ApplyFileUploadLease](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation. For more information, see [Upload files by calling API](https://help.aliyun.com/zh/model-studio/developer-reference/upload-files-by-calling-api).
5150
+ * > After you call this operation, the used lease ID expires immediately. Do not use the same lease ID to submit new requests.
5151
+ * * You must call this operation within 12 hours after you call the [ApplyFileUploadLease](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation. Otherwise, the lease expires and the request fails.
5152
+ * * After you call this operation, the system parses and imports your document. The process takes some time.
5153
+ * * This interface is not idempotent.
5154
+ *
5155
+ * @param tmpReq - AddFileRequest
3761
5156
  * @param headers - map
3762
5157
  * @param runtime - runtime options for this request RuntimeOptions
3763
5158
  * @returns AddFileResponse
3764
5159
  */
3765
- addFileWithOptions(WorkspaceId: string, request: AddFileRequest, headers: {
5160
+ addFileWithOptions(WorkspaceId: string, tmpReq: AddFileRequest, headers: {
3766
5161
  [key: string]: string;
3767
5162
  }, runtime: $Util.RuntimeOptions): Promise<AddFileResponse>;
3768
5163
  /**
3769
- * 将临时上传的文档导入百炼数据中心,导入成功之后会自动触发文档解析。
5164
+ * Imports an unstructured document stored in the temporary storage space to Data Management.
5165
+ *
5166
+ * @remarks
5167
+ * Before you call this operation, make sure that you have obtained the lease and uploaded the document to the temporary storage space by using the [ApplyFileUploadLease](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation. For more information, see [Upload files by calling API](https://help.aliyun.com/zh/model-studio/developer-reference/upload-files-by-calling-api).
5168
+ * > After you call this operation, the used lease ID expires immediately. Do not use the same lease ID to submit new requests.
5169
+ * * You must call this operation within 12 hours after you call the [ApplyFileUploadLease](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation. Otherwise, the lease expires and the request fails.
5170
+ * * After you call this operation, the system parses and imports your document. The process takes some time.
5171
+ * * This interface is not idempotent.
3770
5172
  *
3771
5173
  * @param request - AddFileRequest
3772
5174
  * @returns AddFileResponse
3773
5175
  */
3774
5176
  addFile(WorkspaceId: string, request: AddFileRequest): Promise<AddFileResponse>;
3775
5177
  /**
3776
- * 请求文档上传租约,进行文档上传。
5178
+ * Applies for a document upload lease to upload a document.
5179
+ *
5180
+ * @remarks
5181
+ * This operation returns an HTTP URL that can be used to upload an unstructured document (the lease) and parameters required for the upload. Structured documents are not supported.
5182
+ * * The HTTP URL returned by this operation is valid only for minutes. Upload the document before the URL expires.
5183
+ * * After you apply for a lease and upload a document, the document is stored in a temporary storage space for 12 hours. Call the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) interface in time to import the document to the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.
5184
+ * * This interface is not idempotent.
3777
5185
  *
3778
5186
  * @param request - ApplyFileUploadLeaseRequest
3779
5187
  * @param headers - map
@@ -3784,7 +5192,13 @@ export default class Client extends OpenApi {
3784
5192
  [key: string]: string;
3785
5193
  }, runtime: $Util.RuntimeOptions): Promise<ApplyFileUploadLeaseResponse>;
3786
5194
  /**
3787
- * 请求文档上传租约,进行文档上传。
5195
+ * Applies for a document upload lease to upload a document.
5196
+ *
5197
+ * @remarks
5198
+ * This operation returns an HTTP URL that can be used to upload an unstructured document (the lease) and parameters required for the upload. Structured documents are not supported.
5199
+ * * The HTTP URL returned by this operation is valid only for minutes. Upload the document before the URL expires.
5200
+ * * After you apply for a lease and upload a document, the document is stored in a temporary storage space for 12 hours. Call the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) interface in time to import the document to the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.
5201
+ * * This interface is not idempotent.
3788
5202
  *
3789
5203
  * @param request - ApplyFileUploadLeaseRequest
3790
5204
  * @returns ApplyFileUploadLeaseResponse
@@ -3809,7 +5223,12 @@ export default class Client extends OpenApi {
3809
5223
  */
3810
5224
  createAndPulishAgent(workspaceId: string, request: CreateAndPulishAgentRequest): Promise<CreateAndPulishAgentResponse>;
3811
5225
  /**
3812
- * 创建并运行pipeline
5226
+ * Creates an unstructured knowledge base and imports one or more parsed documents into the knowledge base. You cannot create a structured knowledge base by calling an API operation. Use the console instead.
5227
+ *
5228
+ * @remarks
5229
+ * 1. You must first upload documents to [Data Management](https://bailian.console.aliyun.com/#/data-center) and obtain the `FileId`. The documents are the knowledge source of the knowledge base. To upload documents, call the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) operation.
5230
+ * 2. This operation only initializes a knowledge base creation job. You must also call the [SubmitIndexJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) operation to complete the job.
5231
+ * 3. This interface is not idempotent.
3813
5232
  *
3814
5233
  * @param tmpReq - CreateIndexRequest
3815
5234
  * @param headers - map
@@ -3820,7 +5239,12 @@ export default class Client extends OpenApi {
3820
5239
  [key: string]: string;
3821
5240
  }, runtime: $Util.RuntimeOptions): Promise<CreateIndexResponse>;
3822
5241
  /**
3823
- * 创建并运行pipeline
5242
+ * Creates an unstructured knowledge base and imports one or more parsed documents into the knowledge base. You cannot create a structured knowledge base by calling an API operation. Use the console instead.
5243
+ *
5244
+ * @remarks
5245
+ * 1. You must first upload documents to [Data Management](https://bailian.console.aliyun.com/#/data-center) and obtain the `FileId`. The documents are the knowledge source of the knowledge base. To upload documents, call the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) operation.
5246
+ * 2. This operation only initializes a knowledge base creation job. You must also call the [SubmitIndexJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) operation to complete the job.
5247
+ * 3. This interface is not idempotent.
3824
5248
  *
3825
5249
  * @param request - CreateIndexRequest
3826
5250
  * @returns CreateIndexResponse
@@ -3862,6 +5286,24 @@ export default class Client extends OpenApi {
3862
5286
  * @returns CreateMemoryNodeResponse
3863
5287
  */
3864
5288
  createMemoryNode(workspaceId: string, memoryId: string, request: CreateMemoryNodeRequest): Promise<CreateMemoryNodeResponse>;
5289
+ /**
5290
+ * 创建Prompt模板
5291
+ *
5292
+ * @param request - CreatePromptTemplateRequest
5293
+ * @param headers - map
5294
+ * @param runtime - runtime options for this request RuntimeOptions
5295
+ * @returns CreatePromptTemplateResponse
5296
+ */
5297
+ createPromptTemplateWithOptions(workspaceId: string, request: CreatePromptTemplateRequest, headers: {
5298
+ [key: string]: string;
5299
+ }, runtime: $Util.RuntimeOptions): Promise<CreatePromptTemplateResponse>;
5300
+ /**
5301
+ * 创建Prompt模板
5302
+ *
5303
+ * @param request - CreatePromptTemplateRequest
5304
+ * @returns CreatePromptTemplateResponse
5305
+ */
5306
+ createPromptTemplate(workspaceId: string, request: CreatePromptTemplateRequest): Promise<CreatePromptTemplateResponse>;
3865
5307
  /**
3866
5308
  * 删除智能体
3867
5309
  *
@@ -3905,7 +5347,14 @@ export default class Client extends OpenApi {
3905
5347
  */
3906
5348
  deleteFile(FileId: string, WorkspaceId: string): Promise<DeleteFileResponse>;
3907
5349
  /**
3908
- * 删除Index
5350
+ * Deletes a specified knowledge base permanently.
5351
+ *
5352
+ * @remarks
5353
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5354
+ * * If a knowledge base is being called by an application, disassociate the knowledge base before you can delete it. To disassociate the knowledge base, you must use the console. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base).
5355
+ * * After you delete a knowledge base, it cannot be recovered. We recommend that you proceed with caution.
5356
+ * * Imported documents are not deleted from the [Data Management](https://bailian.console.aliyun.com/#/data-center) if you call this operation.
5357
+ * * This interface is idempotent.
3909
5358
  *
3910
5359
  * @param request - DeleteIndexRequest
3911
5360
  * @param headers - map
@@ -3916,14 +5365,28 @@ export default class Client extends OpenApi {
3916
5365
  [key: string]: string;
3917
5366
  }, runtime: $Util.RuntimeOptions): Promise<DeleteIndexResponse>;
3918
5367
  /**
3919
- * 删除Index
5368
+ * Deletes a specified knowledge base permanently.
5369
+ *
5370
+ * @remarks
5371
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5372
+ * * If a knowledge base is being called by an application, disassociate the knowledge base before you can delete it. To disassociate the knowledge base, you must use the console. For more information, see [Create a knowledge base](https://help.aliyun.com/zh/model-studio/user-guide/rag-knowledge-base).
5373
+ * * After you delete a knowledge base, it cannot be recovered. We recommend that you proceed with caution.
5374
+ * * Imported documents are not deleted from the [Data Management](https://bailian.console.aliyun.com/#/data-center) if you call this operation.
5375
+ * * This interface is idempotent.
3920
5376
  *
3921
5377
  * @param request - DeleteIndexRequest
3922
5378
  * @returns DeleteIndexResponse
3923
5379
  */
3924
5380
  deleteIndex(WorkspaceId: string, request: DeleteIndexRequest): Promise<DeleteIndexResponse>;
3925
5381
  /**
3926
- * 删除index doc
5382
+ * Deletes one or more documents from a specified unstructured knowledge base permanently.
5383
+ *
5384
+ * @remarks
5385
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5386
+ * * Only documents with the INSERT_ERROR and FINISH states can be deleted. To query the status of documents in a specified knowledge base, call the [ListIndexDocuments](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-listindexdocuments) operation.
5387
+ * * After you delete a document, it cannot be recovered and the [Retrieve](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-retrieve) operation cannot query information about the document. We recommend that you proceed with caution.
5388
+ * * Imported documents are not deleted from the [Data Management](https://bailian.console.aliyun.com/#/data-center) if you call this operation.
5389
+ * * This interface is idempotent.
3927
5390
  *
3928
5391
  * @param tmpReq - DeleteIndexDocumentRequest
3929
5392
  * @param headers - map
@@ -3934,7 +5397,14 @@ export default class Client extends OpenApi {
3934
5397
  [key: string]: string;
3935
5398
  }, runtime: $Util.RuntimeOptions): Promise<DeleteIndexDocumentResponse>;
3936
5399
  /**
3937
- * 删除index doc
5400
+ * Deletes one or more documents from a specified unstructured knowledge base permanently.
5401
+ *
5402
+ * @remarks
5403
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5404
+ * * Only documents with the INSERT_ERROR and FINISH states can be deleted. To query the status of documents in a specified knowledge base, call the [ListIndexDocuments](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-listindexdocuments) operation.
5405
+ * * After you delete a document, it cannot be recovered and the [Retrieve](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-retrieve) operation cannot query information about the document. We recommend that you proceed with caution.
5406
+ * * Imported documents are not deleted from the [Data Management](https://bailian.console.aliyun.com/#/data-center) if you call this operation.
5407
+ * * This interface is idempotent.
3938
5408
  *
3939
5409
  * @param request - DeleteIndexDocumentRequest
3940
5410
  * @returns DeleteIndexDocumentResponse
@@ -3971,7 +5441,29 @@ export default class Client extends OpenApi {
3971
5441
  */
3972
5442
  deleteMemoryNode(workspaceId: string, memoryId: string, memoryNodeId: string): Promise<DeleteMemoryNodeResponse>;
3973
5443
  /**
3974
- * 获取文档基本信息,包括文档名称、类型、状态等。
5444
+ * 基于模板Id删除Prompt模板。
5445
+ *
5446
+ * @param headers - map
5447
+ * @param runtime - runtime options for this request RuntimeOptions
5448
+ * @returns DeletePromptTemplateResponse
5449
+ */
5450
+ deletePromptTemplateWithOptions(workspaceId: string, promptTemplateId: string, headers: {
5451
+ [key: string]: string;
5452
+ }, runtime: $Util.RuntimeOptions): Promise<DeletePromptTemplateResponse>;
5453
+ /**
5454
+ * 基于模板Id删除Prompt模板。
5455
+ * @returns DeletePromptTemplateResponse
5456
+ */
5457
+ deletePromptTemplate(workspaceId: string, promptTemplateId: string): Promise<DeletePromptTemplateResponse>;
5458
+ /**
5459
+ * Queries the details of an unstructured document.
5460
+ *
5461
+ * @remarks
5462
+ * Before you call this API, make sure that your document is uploaded to the [Data Management](https://bailian.console.aliyun.com/knowledge-base#/data-center) page of Alibaba Cloud Model Studio.
5463
+ * * If you upload the document by calling an API, make sure that you have called the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) operation to obtain `FileId`.
5464
+ * * You can also call this operation to query unstructured documents that you upload on the [Data Management](https://bailian.console.aliyun.com/knowledge-base#/data-center) page.
5465
+ * * This operation is idempotent.
5466
+ * **Throttling:** Make sure that the interval between the two queries is at least 15 seconds. Otherwise, you may trigger system throttling. If throttling is triggered, try again later.
3975
5467
  *
3976
5468
  * @param headers - map
3977
5469
  * @param runtime - runtime options for this request RuntimeOptions
@@ -3981,12 +5473,24 @@ export default class Client extends OpenApi {
3981
5473
  [key: string]: string;
3982
5474
  }, runtime: $Util.RuntimeOptions): Promise<DescribeFileResponse>;
3983
5475
  /**
3984
- * 获取文档基本信息,包括文档名称、类型、状态等。
5476
+ * Queries the details of an unstructured document.
5477
+ *
5478
+ * @remarks
5479
+ * Before you call this API, make sure that your document is uploaded to the [Data Management](https://bailian.console.aliyun.com/knowledge-base#/data-center) page of Alibaba Cloud Model Studio.
5480
+ * * If you upload the document by calling an API, make sure that you have called the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) operation to obtain `FileId`.
5481
+ * * You can also call this operation to query unstructured documents that you upload on the [Data Management](https://bailian.console.aliyun.com/knowledge-base#/data-center) page.
5482
+ * * This operation is idempotent.
5483
+ * **Throttling:** Make sure that the interval between the two queries is at least 15 seconds. Otherwise, you may trigger system throttling. If throttling is triggered, try again later.
3985
5484
  * @returns DescribeFileResponse
3986
5485
  */
3987
5486
  describeFile(WorkspaceId: string, FileId: string): Promise<DescribeFileResponse>;
3988
5487
  /**
3989
- * 获取Index运行状态
5488
+ * Queries the current status of a specified knowledge base creation or add document job.
5489
+ *
5490
+ * @remarks
5491
+ * 1. A knowledge base job is running. You can call the [SubmitIndexJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) operation to create a creation job or the [SubmitIndexAddDocumentsJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexadddocumentsjob) operation to create a add document job. Then, obtain the `JobId` returned by the operations.
5492
+ * 2. We recommend that you call this operation at intervals of more than 5 seconds.
5493
+ * 3. This interface is idempotent.
3990
5494
  *
3991
5495
  * @param request - GetIndexJobStatusRequest
3992
5496
  * @param headers - map
@@ -3997,7 +5501,12 @@ export default class Client extends OpenApi {
3997
5501
  [key: string]: string;
3998
5502
  }, runtime: $Util.RuntimeOptions): Promise<GetIndexJobStatusResponse>;
3999
5503
  /**
4000
- * 获取Index运行状态
5504
+ * Queries the current status of a specified knowledge base creation or add document job.
5505
+ *
5506
+ * @remarks
5507
+ * 1. A knowledge base job is running. You can call the [SubmitIndexJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) operation to create a creation job or the [SubmitIndexAddDocumentsJob](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-submitindexadddocumentsjob) operation to create a add document job. Then, obtain the `JobId` returned by the operations.
5508
+ * 2. We recommend that you call this operation at intervals of more than 5 seconds.
5509
+ * 3. This interface is idempotent.
4001
5510
  *
4002
5511
  * @param request - GetIndexJobStatusRequest
4003
5512
  * @returns GetIndexJobStatusResponse
@@ -4033,6 +5542,21 @@ export default class Client extends OpenApi {
4033
5542
  * @returns GetMemoryNodeResponse
4034
5543
  */
4035
5544
  getMemoryNode(workspaceId: string, memoryId: string, memoryNodeId: string): Promise<GetMemoryNodeResponse>;
5545
+ /**
5546
+ * 基于模板Id获取Prompt模板。
5547
+ *
5548
+ * @param headers - map
5549
+ * @param runtime - runtime options for this request RuntimeOptions
5550
+ * @returns GetPromptTemplateResponse
5551
+ */
5552
+ getPromptTemplateWithOptions(workspaceId: string, promptTemplateId: string, headers: {
5553
+ [key: string]: string;
5554
+ }, runtime: $Util.RuntimeOptions): Promise<GetPromptTemplateResponse>;
5555
+ /**
5556
+ * 基于模板Id获取Prompt模板。
5557
+ * @returns GetPromptTemplateResponse
5558
+ */
5559
+ getPromptTemplate(workspaceId: string, promptTemplateId: string): Promise<GetPromptTemplateResponse>;
4036
5560
  /**
4037
5561
  * 获取发布态智能体应用
4038
5562
  *
@@ -4067,7 +5591,11 @@ export default class Client extends OpenApi {
4067
5591
  */
4068
5592
  listCategory(WorkspaceId: string, request: ListCategoryRequest): Promise<ListCategoryResponse>;
4069
5593
  /**
4070
- * Chunk
5594
+ * For unstructured knowledge base, obtains the details of all chunks of a specified document; for structured knowledge base, obtains the details of all chunks.
5595
+ *
5596
+ * @remarks
5597
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5598
+ * * This interface is idempotent.
4071
5599
  *
4072
5600
  * @param request - ListChunksRequest
4073
5601
  * @param headers - map
@@ -4078,7 +5606,11 @@ export default class Client extends OpenApi {
4078
5606
  [key: string]: string;
4079
5607
  }, runtime: $Util.RuntimeOptions): Promise<ListChunksResponse>;
4080
5608
  /**
4081
- * Chunk
5609
+ * For unstructured knowledge base, obtains the details of all chunks of a specified document; for structured knowledge base, obtains the details of all chunks.
5610
+ *
5611
+ * @remarks
5612
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5613
+ * * This interface is idempotent.
4082
5614
  *
4083
5615
  * @param request - ListChunksRequest
4084
5616
  * @returns ListChunksResponse
@@ -4103,7 +5635,11 @@ export default class Client extends OpenApi {
4103
5635
  */
4104
5636
  listFile(WorkspaceId: string, request: ListFileRequest): Promise<ListFileResponse>;
4105
5637
  /**
4106
- * 查询Index文件
5638
+ * Queries the details of one or more documents in a specified knowledge base.
5639
+ *
5640
+ * @remarks
5641
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5642
+ * * This interface is idempotent.
4107
5643
  *
4108
5644
  * @param request - ListIndexDocumentsRequest
4109
5645
  * @param headers - map
@@ -4114,14 +5650,21 @@ export default class Client extends OpenApi {
4114
5650
  [key: string]: string;
4115
5651
  }, runtime: $Util.RuntimeOptions): Promise<ListIndexDocumentsResponse>;
4116
5652
  /**
4117
- * 查询Index文件
5653
+ * Queries the details of one or more documents in a specified knowledge base.
5654
+ *
5655
+ * @remarks
5656
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5657
+ * * This interface is idempotent.
4118
5658
  *
4119
5659
  * @param request - ListIndexDocumentsRequest
4120
5660
  * @returns ListIndexDocumentsResponse
4121
5661
  */
4122
5662
  listIndexDocuments(WorkspaceId: string, request: ListIndexDocumentsRequest): Promise<ListIndexDocumentsResponse>;
4123
5663
  /**
4124
- * 查询pipeline
5664
+ * Lists knowledge bases in a specified workspace.
5665
+ *
5666
+ * @remarks
5667
+ * This interface is idempotent.
4125
5668
  *
4126
5669
  * @param request - ListIndicesRequest
4127
5670
  * @param headers - map
@@ -4132,7 +5675,10 @@ export default class Client extends OpenApi {
4132
5675
  [key: string]: string;
4133
5676
  }, runtime: $Util.RuntimeOptions): Promise<ListIndicesResponse>;
4134
5677
  /**
4135
- * 查询pipeline
5678
+ * Lists knowledge bases in a specified workspace.
5679
+ *
5680
+ * @remarks
5681
+ * This interface is idempotent.
4136
5682
  *
4137
5683
  * @param request - ListIndicesRequest
4138
5684
  * @returns ListIndicesResponse
@@ -4174,6 +5720,24 @@ export default class Client extends OpenApi {
4174
5720
  * @returns ListMemoryNodesResponse
4175
5721
  */
4176
5722
  listMemoryNodes(workspaceId: string, memoryId: string, request: ListMemoryNodesRequest): Promise<ListMemoryNodesResponse>;
5723
+ /**
5724
+ * 获取Prompt模板列表。
5725
+ *
5726
+ * @param request - ListPromptTemplatesRequest
5727
+ * @param headers - map
5728
+ * @param runtime - runtime options for this request RuntimeOptions
5729
+ * @returns ListPromptTemplatesResponse
5730
+ */
5731
+ listPromptTemplatesWithOptions(workspaceId: string, request: ListPromptTemplatesRequest, headers: {
5732
+ [key: string]: string;
5733
+ }, runtime: $Util.RuntimeOptions): Promise<ListPromptTemplatesResponse>;
5734
+ /**
5735
+ * 获取Prompt模板列表。
5736
+ *
5737
+ * @param request - ListPromptTemplatesRequest
5738
+ * @returns ListPromptTemplatesResponse
5739
+ */
5740
+ listPromptTemplates(workspaceId: string, request: ListPromptTemplatesRequest): Promise<ListPromptTemplatesResponse>;
4177
5741
  /**
4178
5742
  * 查询已发布的智能体应用列表
4179
5743
  *
@@ -4193,7 +5757,12 @@ export default class Client extends OpenApi {
4193
5757
  */
4194
5758
  listPublishedAgent(workspaceId: string, request: ListPublishedAgentRequest): Promise<ListPublishedAgentResponse>;
4195
5759
  /**
4196
- * 召回测试
5760
+ * Queries information from a specified knowledge base.
5761
+ *
5762
+ * @remarks
5763
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5764
+ * * The response time may be long because this operation involves complex retrieval and matching. We recommend that you set appropriate timeout and retry policy for requests.
5765
+ * * This interface is idempotent.
4197
5766
  *
4198
5767
  * @param tmpReq - RetrieveRequest
4199
5768
  * @param headers - map
@@ -4204,14 +5773,25 @@ export default class Client extends OpenApi {
4204
5773
  [key: string]: string;
4205
5774
  }, runtime: $Util.RuntimeOptions): Promise<RetrieveResponse>;
4206
5775
  /**
4207
- * 召回测试
5776
+ * Queries information from a specified knowledge base.
5777
+ *
5778
+ * @remarks
5779
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5780
+ * * The response time may be long because this operation involves complex retrieval and matching. We recommend that you set appropriate timeout and retry policy for requests.
5781
+ * * This interface is idempotent.
4208
5782
  *
4209
5783
  * @param request - RetrieveRequest
4210
5784
  * @returns RetrieveResponse
4211
5785
  */
4212
5786
  retrieve(WorkspaceId: string, request: RetrieveRequest): Promise<RetrieveResponse>;
4213
5787
  /**
4214
- * 知识索引
5788
+ * Adds parsed documents to an unstructured knowledge base.
5789
+ *
5790
+ * @remarks
5791
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5792
+ * * Before you call this operation, call the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) operation to upload the documents to Model Studio.
5793
+ * * After you call this operation, you can call the [GetIndexJobStatus](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-getindexjobstatus) operation to query the status of the job. More than 20 calls to the GetIndexJobStatus operation per minute may trigger throttling.
5794
+ * * Execution takes a period of time after this operation is called. Do not make new request before the request is returned. This interface is not idempotent.
4215
5795
  *
4216
5796
  * @param tmpReq - SubmitIndexAddDocumentsJobRequest
4217
5797
  * @param headers - map
@@ -4222,14 +5802,26 @@ export default class Client extends OpenApi {
4222
5802
  [key: string]: string;
4223
5803
  }, runtime: $Util.RuntimeOptions): Promise<SubmitIndexAddDocumentsJobResponse>;
4224
5804
  /**
4225
- * 知识索引
5805
+ * Adds parsed documents to an unstructured knowledge base.
5806
+ *
5807
+ * @remarks
5808
+ * Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.
5809
+ * * Before you call this operation, call the [AddFile](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-addfile) operation to upload the documents to Model Studio.
5810
+ * * After you call this operation, you can call the [GetIndexJobStatus](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-getindexjobstatus) operation to query the status of the job. More than 20 calls to the GetIndexJobStatus operation per minute may trigger throttling.
5811
+ * * Execution takes a period of time after this operation is called. Do not make new request before the request is returned. This interface is not idempotent.
4226
5812
  *
4227
5813
  * @param request - SubmitIndexAddDocumentsJobRequest
4228
5814
  * @returns SubmitIndexAddDocumentsJobResponse
4229
5815
  */
4230
5816
  submitIndexAddDocumentsJob(WorkspaceId: string, request: SubmitIndexAddDocumentsJobRequest): Promise<SubmitIndexAddDocumentsJobResponse>;
4231
5817
  /**
4232
- * 提交索引任务
5818
+ * Submits a specified CreateIndex job to complete knowledge base creation.
5819
+ *
5820
+ * @remarks
5821
+ * 1. Before you call this operation, you must call the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation and obtain the `IndexId`.
5822
+ * 2. Execution takes a period of time after this operation is called. Do not make new request before the request is returned.
5823
+ * 3. If you want to query the execution status of the job after you call this operation, call the [GetIndexJobStatus](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-getindexjobstatus) operation.
5824
+ * 4. This interface is not idempotent.
4233
5825
  *
4234
5826
  * @param request - SubmitIndexJobRequest
4235
5827
  * @param headers - map
@@ -4240,7 +5832,13 @@ export default class Client extends OpenApi {
4240
5832
  [key: string]: string;
4241
5833
  }, runtime: $Util.RuntimeOptions): Promise<SubmitIndexJobResponse>;
4242
5834
  /**
4243
- * 提交索引任务
5835
+ * Submits a specified CreateIndex job to complete knowledge base creation.
5836
+ *
5837
+ * @remarks
5838
+ * 1. Before you call this operation, you must call the [CreateIndex](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation and obtain the `IndexId`.
5839
+ * 2. Execution takes a period of time after this operation is called. Do not make new request before the request is returned.
5840
+ * 3. If you want to query the execution status of the job after you call this operation, call the [GetIndexJobStatus](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-getindexjobstatus) operation.
5841
+ * 4. This interface is not idempotent.
4244
5842
  *
4245
5843
  * @param request - SubmitIndexJobRequest
4246
5844
  * @returns SubmitIndexJobResponse
@@ -4300,4 +5898,22 @@ export default class Client extends OpenApi {
4300
5898
  * @returns UpdateMemoryNodeResponse
4301
5899
  */
4302
5900
  updateMemoryNode(workspaceId: string, memoryId: string, memoryNodeId: string, request: UpdateMemoryNodeRequest): Promise<UpdateMemoryNodeResponse>;
5901
+ /**
5902
+ * 基于模板Id增量更新Prompt模板。
5903
+ *
5904
+ * @param request - UpdatePromptTemplateRequest
5905
+ * @param headers - map
5906
+ * @param runtime - runtime options for this request RuntimeOptions
5907
+ * @returns UpdatePromptTemplateResponse
5908
+ */
5909
+ updatePromptTemplateWithOptions(workspaceId: string, promptTemplateId: string, request: UpdatePromptTemplateRequest, headers: {
5910
+ [key: string]: string;
5911
+ }, runtime: $Util.RuntimeOptions): Promise<UpdatePromptTemplateResponse>;
5912
+ /**
5913
+ * 基于模板Id增量更新Prompt模板。
5914
+ *
5915
+ * @param request - UpdatePromptTemplateRequest
5916
+ * @returns UpdatePromptTemplateResponse
5917
+ */
5918
+ updatePromptTemplate(workspaceId: string, promptTemplateId: string, request: UpdatePromptTemplateRequest): Promise<UpdatePromptTemplateResponse>;
4303
5919
  }