@alicloud/bailian20231229 1.0.0 → 1.2.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
@@ -98,6 +98,93 @@ export declare class ApplyFileUploadLeaseResponse extends $tea.Model {
98
98
  [key: string]: any;
99
99
  });
100
100
  }
101
+ export declare class CreateIndexRequest extends $tea.Model {
102
+ categoryIds?: string[];
103
+ chunkSize?: number;
104
+ columns?: CreateIndexRequestColumns[];
105
+ description?: string;
106
+ documentIds?: string[];
107
+ embeddingModelName?: string;
108
+ name?: string;
109
+ overlapSize?: number;
110
+ rerankMinScore?: number;
111
+ rerankModelName?: string;
112
+ separator?: string;
113
+ sinkInstanceId?: string;
114
+ sinkRegion?: string;
115
+ sinkType?: string;
116
+ sourceType?: string;
117
+ structureType?: string;
118
+ static names(): {
119
+ [key: string]: string;
120
+ };
121
+ static types(): {
122
+ [key: string]: any;
123
+ };
124
+ constructor(map?: {
125
+ [key: string]: any;
126
+ });
127
+ }
128
+ export declare class CreateIndexShrinkRequest extends $tea.Model {
129
+ categoryIdsShrink?: string;
130
+ chunkSize?: number;
131
+ columnsShrink?: string;
132
+ description?: string;
133
+ documentIdsShrink?: string;
134
+ embeddingModelName?: string;
135
+ name?: string;
136
+ overlapSize?: number;
137
+ rerankMinScore?: number;
138
+ rerankModelName?: string;
139
+ separator?: string;
140
+ sinkInstanceId?: string;
141
+ sinkRegion?: string;
142
+ sinkType?: string;
143
+ sourceType?: string;
144
+ structureType?: string;
145
+ static names(): {
146
+ [key: string]: string;
147
+ };
148
+ static types(): {
149
+ [key: string]: any;
150
+ };
151
+ constructor(map?: {
152
+ [key: string]: any;
153
+ });
154
+ }
155
+ export declare class CreateIndexResponseBody extends $tea.Model {
156
+ code?: string;
157
+ data?: CreateIndexResponseBodyData;
158
+ message?: string;
159
+ requestId?: string;
160
+ status?: string;
161
+ success?: boolean;
162
+ static names(): {
163
+ [key: string]: string;
164
+ };
165
+ static types(): {
166
+ [key: string]: any;
167
+ };
168
+ constructor(map?: {
169
+ [key: string]: any;
170
+ });
171
+ }
172
+ export declare class CreateIndexResponse extends $tea.Model {
173
+ headers?: {
174
+ [key: string]: string;
175
+ };
176
+ statusCode?: number;
177
+ body?: CreateIndexResponseBody;
178
+ static names(): {
179
+ [key: string]: string;
180
+ };
181
+ static types(): {
182
+ [key: string]: any;
183
+ };
184
+ constructor(map?: {
185
+ [key: string]: any;
186
+ });
187
+ }
101
188
  export declare class DescribeFileResponseBody extends $tea.Model {
102
189
  code?: string;
103
190
  data?: DescribeFileResponseBodyData;
@@ -131,6 +218,237 @@ export declare class DescribeFileResponse extends $tea.Model {
131
218
  [key: string]: any;
132
219
  });
133
220
  }
221
+ export declare class GetIndexJobStatusRequest extends $tea.Model {
222
+ indexId?: string;
223
+ jobId?: string;
224
+ static names(): {
225
+ [key: string]: string;
226
+ };
227
+ static types(): {
228
+ [key: string]: any;
229
+ };
230
+ constructor(map?: {
231
+ [key: string]: any;
232
+ });
233
+ }
234
+ export declare class GetIndexJobStatusResponseBody extends $tea.Model {
235
+ code?: string;
236
+ data?: GetIndexJobStatusResponseBodyData;
237
+ message?: string;
238
+ requestId?: string;
239
+ status?: string;
240
+ success?: boolean;
241
+ static names(): {
242
+ [key: string]: string;
243
+ };
244
+ static types(): {
245
+ [key: string]: any;
246
+ };
247
+ constructor(map?: {
248
+ [key: string]: any;
249
+ });
250
+ }
251
+ export declare class GetIndexJobStatusResponse extends $tea.Model {
252
+ headers?: {
253
+ [key: string]: string;
254
+ };
255
+ statusCode?: number;
256
+ body?: GetIndexJobStatusResponseBody;
257
+ static names(): {
258
+ [key: string]: string;
259
+ };
260
+ static types(): {
261
+ [key: string]: any;
262
+ };
263
+ constructor(map?: {
264
+ [key: string]: any;
265
+ });
266
+ }
267
+ export declare class RetrieveRequest extends $tea.Model {
268
+ denseSimilarityTopK?: number;
269
+ enableReranking?: boolean;
270
+ enableRewrite?: boolean;
271
+ indexId?: string;
272
+ query?: string;
273
+ rerank?: RetrieveRequestRerank[];
274
+ rerankMinScore?: number;
275
+ rerankTopN?: number;
276
+ rewrite?: RetrieveRequestRewrite[];
277
+ saveRetrieverHistory?: boolean;
278
+ sparseSimilarityTopK?: number;
279
+ static names(): {
280
+ [key: string]: string;
281
+ };
282
+ static types(): {
283
+ [key: string]: any;
284
+ };
285
+ constructor(map?: {
286
+ [key: string]: any;
287
+ });
288
+ }
289
+ export declare class RetrieveShrinkRequest extends $tea.Model {
290
+ denseSimilarityTopK?: number;
291
+ enableReranking?: boolean;
292
+ enableRewrite?: boolean;
293
+ indexId?: string;
294
+ query?: string;
295
+ rerankShrink?: string;
296
+ rerankMinScore?: number;
297
+ rerankTopN?: number;
298
+ rewriteShrink?: string;
299
+ saveRetrieverHistory?: boolean;
300
+ sparseSimilarityTopK?: number;
301
+ static names(): {
302
+ [key: string]: string;
303
+ };
304
+ static types(): {
305
+ [key: string]: any;
306
+ };
307
+ constructor(map?: {
308
+ [key: string]: any;
309
+ });
310
+ }
311
+ export declare class RetrieveResponseBody extends $tea.Model {
312
+ code?: string;
313
+ data?: RetrieveResponseBodyData;
314
+ message?: string;
315
+ requestId?: string;
316
+ status?: string;
317
+ success?: boolean;
318
+ static names(): {
319
+ [key: string]: string;
320
+ };
321
+ static types(): {
322
+ [key: string]: any;
323
+ };
324
+ constructor(map?: {
325
+ [key: string]: any;
326
+ });
327
+ }
328
+ export declare class RetrieveResponse extends $tea.Model {
329
+ headers?: {
330
+ [key: string]: string;
331
+ };
332
+ statusCode?: number;
333
+ body?: RetrieveResponseBody;
334
+ static names(): {
335
+ [key: string]: string;
336
+ };
337
+ static types(): {
338
+ [key: string]: any;
339
+ };
340
+ constructor(map?: {
341
+ [key: string]: any;
342
+ });
343
+ }
344
+ export declare class SubmitIndexAddDocumentsJobRequest extends $tea.Model {
345
+ categoryIds?: string[];
346
+ documentIds?: string[];
347
+ indexId?: string;
348
+ sourceType?: string;
349
+ static names(): {
350
+ [key: string]: string;
351
+ };
352
+ static types(): {
353
+ [key: string]: any;
354
+ };
355
+ constructor(map?: {
356
+ [key: string]: any;
357
+ });
358
+ }
359
+ export declare class SubmitIndexAddDocumentsJobShrinkRequest extends $tea.Model {
360
+ categoryIdsShrink?: string;
361
+ documentIdsShrink?: string;
362
+ indexId?: string;
363
+ sourceType?: string;
364
+ static names(): {
365
+ [key: string]: string;
366
+ };
367
+ static types(): {
368
+ [key: string]: any;
369
+ };
370
+ constructor(map?: {
371
+ [key: string]: any;
372
+ });
373
+ }
374
+ export declare class SubmitIndexAddDocumentsJobResponseBody extends $tea.Model {
375
+ code?: string;
376
+ data?: SubmitIndexAddDocumentsJobResponseBodyData;
377
+ message?: string;
378
+ requestId?: string;
379
+ status?: string;
380
+ success?: boolean;
381
+ static names(): {
382
+ [key: string]: string;
383
+ };
384
+ static types(): {
385
+ [key: string]: any;
386
+ };
387
+ constructor(map?: {
388
+ [key: string]: any;
389
+ });
390
+ }
391
+ export declare class SubmitIndexAddDocumentsJobResponse extends $tea.Model {
392
+ headers?: {
393
+ [key: string]: string;
394
+ };
395
+ statusCode?: number;
396
+ body?: SubmitIndexAddDocumentsJobResponseBody;
397
+ static names(): {
398
+ [key: string]: string;
399
+ };
400
+ static types(): {
401
+ [key: string]: any;
402
+ };
403
+ constructor(map?: {
404
+ [key: string]: any;
405
+ });
406
+ }
407
+ export declare class SubmitIndexJobRequest extends $tea.Model {
408
+ indexId?: string;
409
+ static names(): {
410
+ [key: string]: string;
411
+ };
412
+ static types(): {
413
+ [key: string]: any;
414
+ };
415
+ constructor(map?: {
416
+ [key: string]: any;
417
+ });
418
+ }
419
+ export declare class SubmitIndexJobResponseBody extends $tea.Model {
420
+ code?: string;
421
+ data?: SubmitIndexJobResponseBodyData;
422
+ message?: string;
423
+ requestId?: string;
424
+ status?: string;
425
+ success?: boolean;
426
+ static names(): {
427
+ [key: string]: string;
428
+ };
429
+ static types(): {
430
+ [key: string]: any;
431
+ };
432
+ constructor(map?: {
433
+ [key: string]: any;
434
+ });
435
+ }
436
+ export declare class SubmitIndexJobResponse extends $tea.Model {
437
+ headers?: {
438
+ [key: string]: string;
439
+ };
440
+ statusCode?: number;
441
+ body?: SubmitIndexJobResponseBody;
442
+ static names(): {
443
+ [key: string]: string;
444
+ };
445
+ static types(): {
446
+ [key: string]: any;
447
+ };
448
+ constructor(map?: {
449
+ [key: string]: any;
450
+ });
451
+ }
134
452
  export declare class AddFileResponseBodyData extends $tea.Model {
135
453
  fileId?: string;
136
454
  parser?: string;
@@ -172,6 +490,34 @@ export declare class ApplyFileUploadLeaseResponseBodyData extends $tea.Model {
172
490
  [key: string]: any;
173
491
  });
174
492
  }
493
+ export declare class CreateIndexRequestColumns extends $tea.Model {
494
+ column?: string;
495
+ isRecall?: boolean;
496
+ isSearch?: boolean;
497
+ name?: string;
498
+ type?: string;
499
+ static names(): {
500
+ [key: string]: string;
501
+ };
502
+ static types(): {
503
+ [key: string]: any;
504
+ };
505
+ constructor(map?: {
506
+ [key: string]: any;
507
+ });
508
+ }
509
+ export declare class CreateIndexResponseBodyData extends $tea.Model {
510
+ id?: string;
511
+ static names(): {
512
+ [key: string]: string;
513
+ };
514
+ static types(): {
515
+ [key: string]: any;
516
+ };
517
+ constructor(map?: {
518
+ [key: string]: any;
519
+ });
520
+ }
175
521
  export declare class DescribeFileResponseBodyData extends $tea.Model {
176
522
  categoryId?: string;
177
523
  createTime?: string;
@@ -191,6 +537,111 @@ export declare class DescribeFileResponseBodyData extends $tea.Model {
191
537
  [key: string]: any;
192
538
  });
193
539
  }
540
+ export declare class GetIndexJobStatusResponseBodyDataDocuments extends $tea.Model {
541
+ code?: string;
542
+ docId?: string;
543
+ docName?: string;
544
+ message?: string;
545
+ status?: string;
546
+ static names(): {
547
+ [key: string]: string;
548
+ };
549
+ static types(): {
550
+ [key: string]: any;
551
+ };
552
+ constructor(map?: {
553
+ [key: string]: any;
554
+ });
555
+ }
556
+ export declare class GetIndexJobStatusResponseBodyData extends $tea.Model {
557
+ documents?: GetIndexJobStatusResponseBodyDataDocuments[];
558
+ jobId?: string;
559
+ status?: string;
560
+ static names(): {
561
+ [key: string]: string;
562
+ };
563
+ static types(): {
564
+ [key: string]: any;
565
+ };
566
+ constructor(map?: {
567
+ [key: string]: any;
568
+ });
569
+ }
570
+ export declare class RetrieveRequestRerank extends $tea.Model {
571
+ modelName?: string;
572
+ static names(): {
573
+ [key: string]: string;
574
+ };
575
+ static types(): {
576
+ [key: string]: any;
577
+ };
578
+ constructor(map?: {
579
+ [key: string]: any;
580
+ });
581
+ }
582
+ export declare class RetrieveRequestRewrite extends $tea.Model {
583
+ modelName?: string;
584
+ static names(): {
585
+ [key: string]: string;
586
+ };
587
+ static types(): {
588
+ [key: string]: any;
589
+ };
590
+ constructor(map?: {
591
+ [key: string]: any;
592
+ });
593
+ }
594
+ export declare class RetrieveResponseBodyDataNodes extends $tea.Model {
595
+ metadata?: any;
596
+ score?: number;
597
+ text?: string;
598
+ static names(): {
599
+ [key: string]: string;
600
+ };
601
+ static types(): {
602
+ [key: string]: any;
603
+ };
604
+ constructor(map?: {
605
+ [key: string]: any;
606
+ });
607
+ }
608
+ export declare class RetrieveResponseBodyData extends $tea.Model {
609
+ nodes?: RetrieveResponseBodyDataNodes[];
610
+ static names(): {
611
+ [key: string]: string;
612
+ };
613
+ static types(): {
614
+ [key: string]: any;
615
+ };
616
+ constructor(map?: {
617
+ [key: string]: any;
618
+ });
619
+ }
620
+ export declare class SubmitIndexAddDocumentsJobResponseBodyData extends $tea.Model {
621
+ id?: string;
622
+ static names(): {
623
+ [key: string]: string;
624
+ };
625
+ static types(): {
626
+ [key: string]: any;
627
+ };
628
+ constructor(map?: {
629
+ [key: string]: any;
630
+ });
631
+ }
632
+ export declare class SubmitIndexJobResponseBodyData extends $tea.Model {
633
+ id?: string;
634
+ indexId?: string;
635
+ static names(): {
636
+ [key: string]: string;
637
+ };
638
+ static types(): {
639
+ [key: string]: any;
640
+ };
641
+ constructor(map?: {
642
+ [key: string]: any;
643
+ });
644
+ }
194
645
  export default class Client extends OpenApi {
195
646
  constructor(config: $OpenApi.Config);
196
647
  getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {
@@ -232,6 +683,24 @@ export default class Client extends OpenApi {
232
683
  * @return ApplyFileUploadLeaseResponse
233
684
  */
234
685
  applyFileUploadLease(CategoryId: string, WorkspaceId: string, request: ApplyFileUploadLeaseRequest): Promise<ApplyFileUploadLeaseResponse>;
686
+ /**
687
+ * @summary 创建并运行pipeline
688
+ *
689
+ * @param tmpReq CreateIndexRequest
690
+ * @param headers map
691
+ * @param runtime runtime options for this request RuntimeOptions
692
+ * @return CreateIndexResponse
693
+ */
694
+ createIndexWithOptions(WorkspaceId: string, tmpReq: CreateIndexRequest, headers: {
695
+ [key: string]: string;
696
+ }, runtime: $Util.RuntimeOptions): Promise<CreateIndexResponse>;
697
+ /**
698
+ * @summary 创建并运行pipeline
699
+ *
700
+ * @param request CreateIndexRequest
701
+ * @return CreateIndexResponse
702
+ */
703
+ createIndex(WorkspaceId: string, request: CreateIndexRequest): Promise<CreateIndexResponse>;
235
704
  /**
236
705
  * @summary 获取文档基本信息,包括文档名称、类型、状态等。
237
706
  *
@@ -248,4 +717,76 @@ export default class Client extends OpenApi {
248
717
  * @return DescribeFileResponse
249
718
  */
250
719
  describeFile(WorkspaceId: string, FileId: string): Promise<DescribeFileResponse>;
720
+ /**
721
+ * @summary 获取Index运行状态
722
+ *
723
+ * @param request GetIndexJobStatusRequest
724
+ * @param headers map
725
+ * @param runtime runtime options for this request RuntimeOptions
726
+ * @return GetIndexJobStatusResponse
727
+ */
728
+ getIndexJobStatusWithOptions(WorkspaceId: string, request: GetIndexJobStatusRequest, headers: {
729
+ [key: string]: string;
730
+ }, runtime: $Util.RuntimeOptions): Promise<GetIndexJobStatusResponse>;
731
+ /**
732
+ * @summary 获取Index运行状态
733
+ *
734
+ * @param request GetIndexJobStatusRequest
735
+ * @return GetIndexJobStatusResponse
736
+ */
737
+ getIndexJobStatus(WorkspaceId: string, request: GetIndexJobStatusRequest): Promise<GetIndexJobStatusResponse>;
738
+ /**
739
+ * @summary 召回测试
740
+ *
741
+ * @param tmpReq RetrieveRequest
742
+ * @param headers map
743
+ * @param runtime runtime options for this request RuntimeOptions
744
+ * @return RetrieveResponse
745
+ */
746
+ retrieveWithOptions(WorkspaceId: string, tmpReq: RetrieveRequest, headers: {
747
+ [key: string]: string;
748
+ }, runtime: $Util.RuntimeOptions): Promise<RetrieveResponse>;
749
+ /**
750
+ * @summary 召回测试
751
+ *
752
+ * @param request RetrieveRequest
753
+ * @return RetrieveResponse
754
+ */
755
+ retrieve(WorkspaceId: string, request: RetrieveRequest): Promise<RetrieveResponse>;
756
+ /**
757
+ * @summary 知识索引
758
+ *
759
+ * @param tmpReq SubmitIndexAddDocumentsJobRequest
760
+ * @param headers map
761
+ * @param runtime runtime options for this request RuntimeOptions
762
+ * @return SubmitIndexAddDocumentsJobResponse
763
+ */
764
+ submitIndexAddDocumentsJobWithOptions(WorkspaceId: string, tmpReq: SubmitIndexAddDocumentsJobRequest, headers: {
765
+ [key: string]: string;
766
+ }, runtime: $Util.RuntimeOptions): Promise<SubmitIndexAddDocumentsJobResponse>;
767
+ /**
768
+ * @summary 知识索引
769
+ *
770
+ * @param request SubmitIndexAddDocumentsJobRequest
771
+ * @return SubmitIndexAddDocumentsJobResponse
772
+ */
773
+ submitIndexAddDocumentsJob(WorkspaceId: string, request: SubmitIndexAddDocumentsJobRequest): Promise<SubmitIndexAddDocumentsJobResponse>;
774
+ /**
775
+ * @summary 提交索引任务
776
+ *
777
+ * @param request SubmitIndexJobRequest
778
+ * @param headers map
779
+ * @param runtime runtime options for this request RuntimeOptions
780
+ * @return SubmitIndexJobResponse
781
+ */
782
+ submitIndexJobWithOptions(WorkspaceId: string, request: SubmitIndexJobRequest, headers: {
783
+ [key: string]: string;
784
+ }, runtime: $Util.RuntimeOptions): Promise<SubmitIndexJobResponse>;
785
+ /**
786
+ * @summary 提交索引任务
787
+ *
788
+ * @param request SubmitIndexJobRequest
789
+ * @return SubmitIndexJobResponse
790
+ */
791
+ submitIndexJob(WorkspaceId: string, request: SubmitIndexJobRequest): Promise<SubmitIndexJobResponse>;
251
792
  }