@alicloud/bailian20231229 1.0.0 → 1.1.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 +448 -0
- package/dist/client.js +818 -1
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +1094 -73
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,174 @@ 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 SubmitIndexJobRequest extends $tea.Model {
|
|
345
|
+
indexId?: string;
|
|
346
|
+
static names(): {
|
|
347
|
+
[key: string]: string;
|
|
348
|
+
};
|
|
349
|
+
static types(): {
|
|
350
|
+
[key: string]: any;
|
|
351
|
+
};
|
|
352
|
+
constructor(map?: {
|
|
353
|
+
[key: string]: any;
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
export declare class SubmitIndexJobResponseBody extends $tea.Model {
|
|
357
|
+
code?: string;
|
|
358
|
+
data?: SubmitIndexJobResponseBodyData;
|
|
359
|
+
message?: string;
|
|
360
|
+
requestId?: string;
|
|
361
|
+
status?: string;
|
|
362
|
+
success?: boolean;
|
|
363
|
+
static names(): {
|
|
364
|
+
[key: string]: string;
|
|
365
|
+
};
|
|
366
|
+
static types(): {
|
|
367
|
+
[key: string]: any;
|
|
368
|
+
};
|
|
369
|
+
constructor(map?: {
|
|
370
|
+
[key: string]: any;
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
export declare class SubmitIndexJobResponse extends $tea.Model {
|
|
374
|
+
headers?: {
|
|
375
|
+
[key: string]: string;
|
|
376
|
+
};
|
|
377
|
+
statusCode?: number;
|
|
378
|
+
body?: SubmitIndexJobResponseBody;
|
|
379
|
+
static names(): {
|
|
380
|
+
[key: string]: string;
|
|
381
|
+
};
|
|
382
|
+
static types(): {
|
|
383
|
+
[key: string]: any;
|
|
384
|
+
};
|
|
385
|
+
constructor(map?: {
|
|
386
|
+
[key: string]: any;
|
|
387
|
+
});
|
|
388
|
+
}
|
|
134
389
|
export declare class AddFileResponseBodyData extends $tea.Model {
|
|
135
390
|
fileId?: string;
|
|
136
391
|
parser?: string;
|
|
@@ -172,6 +427,34 @@ export declare class ApplyFileUploadLeaseResponseBodyData extends $tea.Model {
|
|
|
172
427
|
[key: string]: any;
|
|
173
428
|
});
|
|
174
429
|
}
|
|
430
|
+
export declare class CreateIndexRequestColumns extends $tea.Model {
|
|
431
|
+
column?: string;
|
|
432
|
+
isRecall?: boolean;
|
|
433
|
+
isSearch?: boolean;
|
|
434
|
+
name?: string;
|
|
435
|
+
type?: string;
|
|
436
|
+
static names(): {
|
|
437
|
+
[key: string]: string;
|
|
438
|
+
};
|
|
439
|
+
static types(): {
|
|
440
|
+
[key: string]: any;
|
|
441
|
+
};
|
|
442
|
+
constructor(map?: {
|
|
443
|
+
[key: string]: any;
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
export declare class CreateIndexResponseBodyData extends $tea.Model {
|
|
447
|
+
id?: string;
|
|
448
|
+
static names(): {
|
|
449
|
+
[key: string]: string;
|
|
450
|
+
};
|
|
451
|
+
static types(): {
|
|
452
|
+
[key: string]: any;
|
|
453
|
+
};
|
|
454
|
+
constructor(map?: {
|
|
455
|
+
[key: string]: any;
|
|
456
|
+
});
|
|
457
|
+
}
|
|
175
458
|
export declare class DescribeFileResponseBodyData extends $tea.Model {
|
|
176
459
|
categoryId?: string;
|
|
177
460
|
createTime?: string;
|
|
@@ -191,6 +474,99 @@ export declare class DescribeFileResponseBodyData extends $tea.Model {
|
|
|
191
474
|
[key: string]: any;
|
|
192
475
|
});
|
|
193
476
|
}
|
|
477
|
+
export declare class GetIndexJobStatusResponseBodyDataDocuments extends $tea.Model {
|
|
478
|
+
code?: string;
|
|
479
|
+
docId?: string;
|
|
480
|
+
docName?: string;
|
|
481
|
+
message?: string;
|
|
482
|
+
status?: string;
|
|
483
|
+
static names(): {
|
|
484
|
+
[key: string]: string;
|
|
485
|
+
};
|
|
486
|
+
static types(): {
|
|
487
|
+
[key: string]: any;
|
|
488
|
+
};
|
|
489
|
+
constructor(map?: {
|
|
490
|
+
[key: string]: any;
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
export declare class GetIndexJobStatusResponseBodyData extends $tea.Model {
|
|
494
|
+
documents?: GetIndexJobStatusResponseBodyDataDocuments[];
|
|
495
|
+
jobId?: string;
|
|
496
|
+
status?: string;
|
|
497
|
+
static names(): {
|
|
498
|
+
[key: string]: string;
|
|
499
|
+
};
|
|
500
|
+
static types(): {
|
|
501
|
+
[key: string]: any;
|
|
502
|
+
};
|
|
503
|
+
constructor(map?: {
|
|
504
|
+
[key: string]: any;
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
export declare class RetrieveRequestRerank extends $tea.Model {
|
|
508
|
+
modelName?: string;
|
|
509
|
+
static names(): {
|
|
510
|
+
[key: string]: string;
|
|
511
|
+
};
|
|
512
|
+
static types(): {
|
|
513
|
+
[key: string]: any;
|
|
514
|
+
};
|
|
515
|
+
constructor(map?: {
|
|
516
|
+
[key: string]: any;
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
export declare class RetrieveRequestRewrite extends $tea.Model {
|
|
520
|
+
modelName?: string;
|
|
521
|
+
static names(): {
|
|
522
|
+
[key: string]: string;
|
|
523
|
+
};
|
|
524
|
+
static types(): {
|
|
525
|
+
[key: string]: any;
|
|
526
|
+
};
|
|
527
|
+
constructor(map?: {
|
|
528
|
+
[key: string]: any;
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
export declare class RetrieveResponseBodyDataNodes extends $tea.Model {
|
|
532
|
+
metadata?: any;
|
|
533
|
+
score?: number;
|
|
534
|
+
text?: string;
|
|
535
|
+
static names(): {
|
|
536
|
+
[key: string]: string;
|
|
537
|
+
};
|
|
538
|
+
static types(): {
|
|
539
|
+
[key: string]: any;
|
|
540
|
+
};
|
|
541
|
+
constructor(map?: {
|
|
542
|
+
[key: string]: any;
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
export declare class RetrieveResponseBodyData extends $tea.Model {
|
|
546
|
+
nodes?: RetrieveResponseBodyDataNodes[];
|
|
547
|
+
static names(): {
|
|
548
|
+
[key: string]: string;
|
|
549
|
+
};
|
|
550
|
+
static types(): {
|
|
551
|
+
[key: string]: any;
|
|
552
|
+
};
|
|
553
|
+
constructor(map?: {
|
|
554
|
+
[key: string]: any;
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
export declare class SubmitIndexJobResponseBodyData extends $tea.Model {
|
|
558
|
+
id?: string;
|
|
559
|
+
indexId?: 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
|
+
}
|
|
194
570
|
export default class Client extends OpenApi {
|
|
195
571
|
constructor(config: $OpenApi.Config);
|
|
196
572
|
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {
|
|
@@ -232,6 +608,24 @@ export default class Client extends OpenApi {
|
|
|
232
608
|
* @return ApplyFileUploadLeaseResponse
|
|
233
609
|
*/
|
|
234
610
|
applyFileUploadLease(CategoryId: string, WorkspaceId: string, request: ApplyFileUploadLeaseRequest): Promise<ApplyFileUploadLeaseResponse>;
|
|
611
|
+
/**
|
|
612
|
+
* @summary 创建并运行pipeline
|
|
613
|
+
*
|
|
614
|
+
* @param tmpReq CreateIndexRequest
|
|
615
|
+
* @param headers map
|
|
616
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
617
|
+
* @return CreateIndexResponse
|
|
618
|
+
*/
|
|
619
|
+
createIndexWithOptions(WorkspaceId: string, tmpReq: CreateIndexRequest, headers: {
|
|
620
|
+
[key: string]: string;
|
|
621
|
+
}, runtime: $Util.RuntimeOptions): Promise<CreateIndexResponse>;
|
|
622
|
+
/**
|
|
623
|
+
* @summary 创建并运行pipeline
|
|
624
|
+
*
|
|
625
|
+
* @param request CreateIndexRequest
|
|
626
|
+
* @return CreateIndexResponse
|
|
627
|
+
*/
|
|
628
|
+
createIndex(WorkspaceId: string, request: CreateIndexRequest): Promise<CreateIndexResponse>;
|
|
235
629
|
/**
|
|
236
630
|
* @summary 获取文档基本信息,包括文档名称、类型、状态等。
|
|
237
631
|
*
|
|
@@ -248,4 +642,58 @@ export default class Client extends OpenApi {
|
|
|
248
642
|
* @return DescribeFileResponse
|
|
249
643
|
*/
|
|
250
644
|
describeFile(WorkspaceId: string, FileId: string): Promise<DescribeFileResponse>;
|
|
645
|
+
/**
|
|
646
|
+
* @summary 获取Index运行状态
|
|
647
|
+
*
|
|
648
|
+
* @param request GetIndexJobStatusRequest
|
|
649
|
+
* @param headers map
|
|
650
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
651
|
+
* @return GetIndexJobStatusResponse
|
|
652
|
+
*/
|
|
653
|
+
getIndexJobStatusWithOptions(WorkspaceId: string, request: GetIndexJobStatusRequest, headers: {
|
|
654
|
+
[key: string]: string;
|
|
655
|
+
}, runtime: $Util.RuntimeOptions): Promise<GetIndexJobStatusResponse>;
|
|
656
|
+
/**
|
|
657
|
+
* @summary 获取Index运行状态
|
|
658
|
+
*
|
|
659
|
+
* @param request GetIndexJobStatusRequest
|
|
660
|
+
* @return GetIndexJobStatusResponse
|
|
661
|
+
*/
|
|
662
|
+
getIndexJobStatus(WorkspaceId: string, request: GetIndexJobStatusRequest): Promise<GetIndexJobStatusResponse>;
|
|
663
|
+
/**
|
|
664
|
+
* @summary 召回测试
|
|
665
|
+
*
|
|
666
|
+
* @param tmpReq RetrieveRequest
|
|
667
|
+
* @param headers map
|
|
668
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
669
|
+
* @return RetrieveResponse
|
|
670
|
+
*/
|
|
671
|
+
retrieveWithOptions(WorkspaceId: string, tmpReq: RetrieveRequest, headers: {
|
|
672
|
+
[key: string]: string;
|
|
673
|
+
}, runtime: $Util.RuntimeOptions): Promise<RetrieveResponse>;
|
|
674
|
+
/**
|
|
675
|
+
* @summary 召回测试
|
|
676
|
+
*
|
|
677
|
+
* @param request RetrieveRequest
|
|
678
|
+
* @return RetrieveResponse
|
|
679
|
+
*/
|
|
680
|
+
retrieve(WorkspaceId: string, request: RetrieveRequest): Promise<RetrieveResponse>;
|
|
681
|
+
/**
|
|
682
|
+
* @summary 提交索引任务
|
|
683
|
+
*
|
|
684
|
+
* @param request SubmitIndexJobRequest
|
|
685
|
+
* @param headers map
|
|
686
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
687
|
+
* @return SubmitIndexJobResponse
|
|
688
|
+
*/
|
|
689
|
+
submitIndexJobWithOptions(WorkspaceId: string, request: SubmitIndexJobRequest, headers: {
|
|
690
|
+
[key: string]: string;
|
|
691
|
+
}, runtime: $Util.RuntimeOptions): Promise<SubmitIndexJobResponse>;
|
|
692
|
+
/**
|
|
693
|
+
* @summary 提交索引任务
|
|
694
|
+
*
|
|
695
|
+
* @param request SubmitIndexJobRequest
|
|
696
|
+
* @return SubmitIndexJobResponse
|
|
697
|
+
*/
|
|
698
|
+
submitIndexJob(WorkspaceId: string, request: SubmitIndexJobRequest): Promise<SubmitIndexJobResponse>;
|
|
251
699
|
}
|