@alicloud/dianjin20240628 1.2.0 → 1.3.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 +236 -2
- package/dist/client.js +242 -6
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +386 -2
package/src/client.ts
CHANGED
|
@@ -315,6 +315,159 @@ export class CreateLibraryResponse extends $tea.Model {
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
+
export class CreatePdfTranslateTaskRequest extends $tea.Model {
|
|
319
|
+
/**
|
|
320
|
+
* @remarks
|
|
321
|
+
* This parameter is required.
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* 873648346573245
|
|
325
|
+
*/
|
|
326
|
+
docId?: string;
|
|
327
|
+
knowledge?: string;
|
|
328
|
+
/**
|
|
329
|
+
* @remarks
|
|
330
|
+
* This parameter is required.
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* cjshcxxxx
|
|
334
|
+
*/
|
|
335
|
+
libraryId?: string;
|
|
336
|
+
/**
|
|
337
|
+
* @remarks
|
|
338
|
+
* This parameter is required.
|
|
339
|
+
*
|
|
340
|
+
* @example
|
|
341
|
+
* qwen-plus
|
|
342
|
+
*/
|
|
343
|
+
modelId?: string;
|
|
344
|
+
/**
|
|
345
|
+
* @example
|
|
346
|
+
* 中文
|
|
347
|
+
*/
|
|
348
|
+
translateTo?: string;
|
|
349
|
+
static names(): { [key: string]: string } {
|
|
350
|
+
return {
|
|
351
|
+
docId: 'docId',
|
|
352
|
+
knowledge: 'knowledge',
|
|
353
|
+
libraryId: 'libraryId',
|
|
354
|
+
modelId: 'modelId',
|
|
355
|
+
translateTo: 'translateTo',
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
static types(): { [key: string]: any } {
|
|
360
|
+
return {
|
|
361
|
+
docId: 'string',
|
|
362
|
+
knowledge: 'string',
|
|
363
|
+
libraryId: 'string',
|
|
364
|
+
modelId: 'string',
|
|
365
|
+
translateTo: 'string',
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
constructor(map?: { [key: string]: any }) {
|
|
370
|
+
super(map);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export class CreatePdfTranslateTaskResponseBody extends $tea.Model {
|
|
375
|
+
/**
|
|
376
|
+
* @example
|
|
377
|
+
* null
|
|
378
|
+
*/
|
|
379
|
+
cost?: number;
|
|
380
|
+
/**
|
|
381
|
+
* @example
|
|
382
|
+
* 3284627354
|
|
383
|
+
*/
|
|
384
|
+
data?: string;
|
|
385
|
+
/**
|
|
386
|
+
* @example
|
|
387
|
+
* null
|
|
388
|
+
*/
|
|
389
|
+
dataType?: string;
|
|
390
|
+
/**
|
|
391
|
+
* @example
|
|
392
|
+
* 0
|
|
393
|
+
*/
|
|
394
|
+
errCode?: string;
|
|
395
|
+
/**
|
|
396
|
+
* @example
|
|
397
|
+
* ok
|
|
398
|
+
*/
|
|
399
|
+
message?: string;
|
|
400
|
+
/**
|
|
401
|
+
* @example
|
|
402
|
+
* 5E3FBAF1-17AF-53B7-AF0A-CDCEEB6DE658
|
|
403
|
+
*/
|
|
404
|
+
requestId?: string;
|
|
405
|
+
/**
|
|
406
|
+
* @example
|
|
407
|
+
* true
|
|
408
|
+
*/
|
|
409
|
+
success?: boolean;
|
|
410
|
+
/**
|
|
411
|
+
* @example
|
|
412
|
+
* 2024-04-24 11:54:34
|
|
413
|
+
*/
|
|
414
|
+
time?: string;
|
|
415
|
+
static names(): { [key: string]: string } {
|
|
416
|
+
return {
|
|
417
|
+
cost: 'cost',
|
|
418
|
+
data: 'data',
|
|
419
|
+
dataType: 'dataType',
|
|
420
|
+
errCode: 'errCode',
|
|
421
|
+
message: 'message',
|
|
422
|
+
requestId: 'requestId',
|
|
423
|
+
success: 'success',
|
|
424
|
+
time: 'time',
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
static types(): { [key: string]: any } {
|
|
429
|
+
return {
|
|
430
|
+
cost: 'number',
|
|
431
|
+
data: 'string',
|
|
432
|
+
dataType: 'string',
|
|
433
|
+
errCode: 'string',
|
|
434
|
+
message: 'string',
|
|
435
|
+
requestId: 'string',
|
|
436
|
+
success: 'boolean',
|
|
437
|
+
time: 'string',
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
constructor(map?: { [key: string]: any }) {
|
|
442
|
+
super(map);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export class CreatePdfTranslateTaskResponse extends $tea.Model {
|
|
447
|
+
headers?: { [key: string]: string };
|
|
448
|
+
statusCode?: number;
|
|
449
|
+
body?: CreatePdfTranslateTaskResponseBody;
|
|
450
|
+
static names(): { [key: string]: string } {
|
|
451
|
+
return {
|
|
452
|
+
headers: 'headers',
|
|
453
|
+
statusCode: 'statusCode',
|
|
454
|
+
body: 'body',
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
static types(): { [key: string]: any } {
|
|
459
|
+
return {
|
|
460
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
461
|
+
statusCode: 'number',
|
|
462
|
+
body: CreatePdfTranslateTaskResponseBody,
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
constructor(map?: { [key: string]: any }) {
|
|
467
|
+
super(map);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
318
471
|
export class CreatePredefinedDocumentRequest extends $tea.Model {
|
|
319
472
|
chunks?: CreatePredefinedDocumentRequestChunks[];
|
|
320
473
|
/**
|
|
@@ -2096,6 +2249,131 @@ export class GetSummaryTaskResultResponse extends $tea.Model {
|
|
|
2096
2249
|
}
|
|
2097
2250
|
}
|
|
2098
2251
|
|
|
2252
|
+
export class GetTaskResultRequest extends $tea.Model {
|
|
2253
|
+
/**
|
|
2254
|
+
* @remarks
|
|
2255
|
+
* This parameter is required.
|
|
2256
|
+
*
|
|
2257
|
+
* @example
|
|
2258
|
+
* 17071319
|
|
2259
|
+
*/
|
|
2260
|
+
taskId?: string;
|
|
2261
|
+
static names(): { [key: string]: string } {
|
|
2262
|
+
return {
|
|
2263
|
+
taskId: 'taskId',
|
|
2264
|
+
};
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
static types(): { [key: string]: any } {
|
|
2268
|
+
return {
|
|
2269
|
+
taskId: 'string',
|
|
2270
|
+
};
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
constructor(map?: { [key: string]: any }) {
|
|
2274
|
+
super(map);
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
export class GetTaskResultResponseBody extends $tea.Model {
|
|
2279
|
+
/**
|
|
2280
|
+
* @example
|
|
2281
|
+
* null
|
|
2282
|
+
*/
|
|
2283
|
+
cost?: number;
|
|
2284
|
+
/**
|
|
2285
|
+
* @example
|
|
2286
|
+
* {
|
|
2287
|
+
* "file_url": "https://finllmworks.oss-cn-zhangjiakou.aliyuncs.com/render_pdf/5336180997111160501.pdf"
|
|
2288
|
+
* }
|
|
2289
|
+
*/
|
|
2290
|
+
data?: { [key: string]: any };
|
|
2291
|
+
/**
|
|
2292
|
+
* @example
|
|
2293
|
+
* null
|
|
2294
|
+
*/
|
|
2295
|
+
dataType?: string;
|
|
2296
|
+
/**
|
|
2297
|
+
* @example
|
|
2298
|
+
* 0
|
|
2299
|
+
*/
|
|
2300
|
+
errCode?: string;
|
|
2301
|
+
/**
|
|
2302
|
+
* @example
|
|
2303
|
+
* ok
|
|
2304
|
+
*/
|
|
2305
|
+
message?: string;
|
|
2306
|
+
/**
|
|
2307
|
+
* @example
|
|
2308
|
+
* 9D5D6BB5-BEAE-53C8-A70A-7275CC1F856C
|
|
2309
|
+
*/
|
|
2310
|
+
requestId?: string;
|
|
2311
|
+
/**
|
|
2312
|
+
* @example
|
|
2313
|
+
* true
|
|
2314
|
+
*/
|
|
2315
|
+
success?: boolean;
|
|
2316
|
+
/**
|
|
2317
|
+
* @example
|
|
2318
|
+
* 2024-04-24 11:54:34
|
|
2319
|
+
*/
|
|
2320
|
+
time?: string;
|
|
2321
|
+
static names(): { [key: string]: string } {
|
|
2322
|
+
return {
|
|
2323
|
+
cost: 'cost',
|
|
2324
|
+
data: 'data',
|
|
2325
|
+
dataType: 'dataType',
|
|
2326
|
+
errCode: 'errCode',
|
|
2327
|
+
message: 'message',
|
|
2328
|
+
requestId: 'requestId',
|
|
2329
|
+
success: 'success',
|
|
2330
|
+
time: 'time',
|
|
2331
|
+
};
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
static types(): { [key: string]: any } {
|
|
2335
|
+
return {
|
|
2336
|
+
cost: 'number',
|
|
2337
|
+
data: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
|
|
2338
|
+
dataType: 'string',
|
|
2339
|
+
errCode: 'string',
|
|
2340
|
+
message: 'string',
|
|
2341
|
+
requestId: 'string',
|
|
2342
|
+
success: 'boolean',
|
|
2343
|
+
time: 'string',
|
|
2344
|
+
};
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
constructor(map?: { [key: string]: any }) {
|
|
2348
|
+
super(map);
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
export class GetTaskResultResponse extends $tea.Model {
|
|
2353
|
+
headers?: { [key: string]: string };
|
|
2354
|
+
statusCode?: number;
|
|
2355
|
+
body?: GetTaskResultResponseBody;
|
|
2356
|
+
static names(): { [key: string]: string } {
|
|
2357
|
+
return {
|
|
2358
|
+
headers: 'headers',
|
|
2359
|
+
statusCode: 'statusCode',
|
|
2360
|
+
body: 'body',
|
|
2361
|
+
};
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
static types(): { [key: string]: any } {
|
|
2365
|
+
return {
|
|
2366
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
2367
|
+
statusCode: 'number',
|
|
2368
|
+
body: GetTaskResultResponseBody,
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
constructor(map?: { [key: string]: any }) {
|
|
2373
|
+
super(map);
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2099
2377
|
export class GetTaskStatusRequest extends $tea.Model {
|
|
2100
2378
|
/**
|
|
2101
2379
|
* @remarks
|
|
@@ -7676,6 +7954,67 @@ export default class Client extends OpenApi {
|
|
|
7676
7954
|
return await this.createLibraryWithOptions(workspaceId, request, headers, runtime);
|
|
7677
7955
|
}
|
|
7678
7956
|
|
|
7957
|
+
/**
|
|
7958
|
+
* 创建PDF翻译任务
|
|
7959
|
+
*
|
|
7960
|
+
* @param request - CreatePdfTranslateTaskRequest
|
|
7961
|
+
* @param headers - map
|
|
7962
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
7963
|
+
* @returns CreatePdfTranslateTaskResponse
|
|
7964
|
+
*/
|
|
7965
|
+
async createPdfTranslateTaskWithOptions(workspaceId: string, request: CreatePdfTranslateTaskRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<CreatePdfTranslateTaskResponse> {
|
|
7966
|
+
Util.validateModel(request);
|
|
7967
|
+
let body : {[key: string ]: any} = { };
|
|
7968
|
+
if (!Util.isUnset(request.docId)) {
|
|
7969
|
+
body["docId"] = request.docId;
|
|
7970
|
+
}
|
|
7971
|
+
|
|
7972
|
+
if (!Util.isUnset(request.knowledge)) {
|
|
7973
|
+
body["knowledge"] = request.knowledge;
|
|
7974
|
+
}
|
|
7975
|
+
|
|
7976
|
+
if (!Util.isUnset(request.libraryId)) {
|
|
7977
|
+
body["libraryId"] = request.libraryId;
|
|
7978
|
+
}
|
|
7979
|
+
|
|
7980
|
+
if (!Util.isUnset(request.modelId)) {
|
|
7981
|
+
body["modelId"] = request.modelId;
|
|
7982
|
+
}
|
|
7983
|
+
|
|
7984
|
+
if (!Util.isUnset(request.translateTo)) {
|
|
7985
|
+
body["translateTo"] = request.translateTo;
|
|
7986
|
+
}
|
|
7987
|
+
|
|
7988
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
7989
|
+
headers: headers,
|
|
7990
|
+
body: OpenApiUtil.parseToMap(body),
|
|
7991
|
+
});
|
|
7992
|
+
let params = new $OpenApi.Params({
|
|
7993
|
+
action: "CreatePdfTranslateTask",
|
|
7994
|
+
version: "2024-06-28",
|
|
7995
|
+
protocol: "HTTPS",
|
|
7996
|
+
pathname: `/${OpenApiUtil.getEncodeParam(workspaceId)}/api/task/pdfTranslate`,
|
|
7997
|
+
method: "POST",
|
|
7998
|
+
authType: "AK",
|
|
7999
|
+
style: "ROA",
|
|
8000
|
+
reqBodyType: "json",
|
|
8001
|
+
bodyType: "json",
|
|
8002
|
+
});
|
|
8003
|
+
return $tea.cast<CreatePdfTranslateTaskResponse>(await this.callApi(params, req, runtime), new CreatePdfTranslateTaskResponse({}));
|
|
8004
|
+
}
|
|
8005
|
+
|
|
8006
|
+
/**
|
|
8007
|
+
* 创建PDF翻译任务
|
|
8008
|
+
*
|
|
8009
|
+
* @param request - CreatePdfTranslateTaskRequest
|
|
8010
|
+
* @returns CreatePdfTranslateTaskResponse
|
|
8011
|
+
*/
|
|
8012
|
+
async createPdfTranslateTask(workspaceId: string, request: CreatePdfTranslateTaskRequest): Promise<CreatePdfTranslateTaskResponse> {
|
|
8013
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
8014
|
+
let headers : {[key: string ]: string} = { };
|
|
8015
|
+
return await this.createPdfTranslateTaskWithOptions(workspaceId, request, headers, runtime);
|
|
8016
|
+
}
|
|
8017
|
+
|
|
7679
8018
|
/**
|
|
7680
8019
|
* 创建预定义文档
|
|
7681
8020
|
*
|
|
@@ -8400,6 +8739,51 @@ export default class Client extends OpenApi {
|
|
|
8400
8739
|
return await this.getSummaryTaskResultWithOptions(workspaceId, request, headers, runtime);
|
|
8401
8740
|
}
|
|
8402
8741
|
|
|
8742
|
+
/**
|
|
8743
|
+
* 获取异步任务结果
|
|
8744
|
+
*
|
|
8745
|
+
* @param request - GetTaskResultRequest
|
|
8746
|
+
* @param headers - map
|
|
8747
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
8748
|
+
* @returns GetTaskResultResponse
|
|
8749
|
+
*/
|
|
8750
|
+
async getTaskResultWithOptions(workspaceId: string, request: GetTaskResultRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<GetTaskResultResponse> {
|
|
8751
|
+
Util.validateModel(request);
|
|
8752
|
+
let query : {[key: string ]: any} = { };
|
|
8753
|
+
if (!Util.isUnset(request.taskId)) {
|
|
8754
|
+
query["taskId"] = request.taskId;
|
|
8755
|
+
}
|
|
8756
|
+
|
|
8757
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
8758
|
+
headers: headers,
|
|
8759
|
+
query: OpenApiUtil.query(query),
|
|
8760
|
+
});
|
|
8761
|
+
let params = new $OpenApi.Params({
|
|
8762
|
+
action: "GetTaskResult",
|
|
8763
|
+
version: "2024-06-28",
|
|
8764
|
+
protocol: "HTTPS",
|
|
8765
|
+
pathname: `/${OpenApiUtil.getEncodeParam(workspaceId)}/api/task/result`,
|
|
8766
|
+
method: "GET",
|
|
8767
|
+
authType: "AK",
|
|
8768
|
+
style: "ROA",
|
|
8769
|
+
reqBodyType: "json",
|
|
8770
|
+
bodyType: "json",
|
|
8771
|
+
});
|
|
8772
|
+
return $tea.cast<GetTaskResultResponse>(await this.callApi(params, req, runtime), new GetTaskResultResponse({}));
|
|
8773
|
+
}
|
|
8774
|
+
|
|
8775
|
+
/**
|
|
8776
|
+
* 获取异步任务结果
|
|
8777
|
+
*
|
|
8778
|
+
* @param request - GetTaskResultRequest
|
|
8779
|
+
* @returns GetTaskResultResponse
|
|
8780
|
+
*/
|
|
8781
|
+
async getTaskResult(workspaceId: string, request: GetTaskResultRequest): Promise<GetTaskResultResponse> {
|
|
8782
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
8783
|
+
let headers : {[key: string ]: string} = { };
|
|
8784
|
+
return await this.getTaskResultWithOptions(workspaceId, request, headers, runtime);
|
|
8785
|
+
}
|
|
8786
|
+
|
|
8403
8787
|
/**
|
|
8404
8788
|
* 获取财报总结任务结果
|
|
8405
8789
|
*
|
|
@@ -8585,7 +8969,7 @@ export default class Client extends OpenApi {
|
|
|
8585
8969
|
}
|
|
8586
8970
|
|
|
8587
8971
|
/**
|
|
8588
|
-
*
|
|
8972
|
+
* 文档召回。
|
|
8589
8973
|
*
|
|
8590
8974
|
* @param request - RecallDocumentRequest
|
|
8591
8975
|
* @param headers - map
|
|
@@ -8630,7 +9014,7 @@ export default class Client extends OpenApi {
|
|
|
8630
9014
|
}
|
|
8631
9015
|
|
|
8632
9016
|
/**
|
|
8633
|
-
*
|
|
9017
|
+
* 文档召回。
|
|
8634
9018
|
*
|
|
8635
9019
|
* @param request - RecallDocumentRequest
|
|
8636
9020
|
* @returns RecallDocumentResponse
|