@alicloud/bailian20231229 2.4.1 → 2.6.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 +168 -14
- package/dist/client.js +320 -14
- package/dist/client.js.map +1 -1
- package/dist/models/ApplyTempStorageLeaseRequest.d.ts +29 -0
- package/dist/models/ApplyTempStorageLeaseRequest.js +60 -0
- package/dist/models/ApplyTempStorageLeaseRequest.js.map +1 -0
- package/dist/models/ApplyTempStorageLeaseResponse.d.ts +19 -0
- package/dist/models/ApplyTempStorageLeaseResponse.js +69 -0
- package/dist/models/ApplyTempStorageLeaseResponse.js.map +1 -0
- package/dist/models/ApplyTempStorageLeaseResponseBody.d.ts +80 -0
- package/dist/models/ApplyTempStorageLeaseResponseBody.js +118 -0
- package/dist/models/ApplyTempStorageLeaseResponseBody.js.map +1 -0
- package/dist/models/ChangeParseSettingRequest.d.ts +83 -0
- package/dist/models/ChangeParseSettingRequest.js +88 -0
- package/dist/models/ChangeParseSettingRequest.js.map +1 -0
- package/dist/models/ChangeParseSettingResponse.d.ts +19 -0
- package/dist/models/ChangeParseSettingResponse.js +69 -0
- package/dist/models/ChangeParseSettingResponse.js.map +1 -0
- package/dist/models/ChangeParseSettingResponseBody.d.ts +81 -0
- package/dist/models/ChangeParseSettingResponseBody.js +90 -0
- package/dist/models/ChangeParseSettingResponseBody.js.map +1 -0
- package/dist/models/ChangeParseSettingShrinkRequest.d.ts +53 -0
- package/dist/models/ChangeParseSettingShrinkRequest.js +64 -0
- package/dist/models/ChangeParseSettingShrinkRequest.js.map +1 -0
- package/dist/models/CreateIndexRequest.d.ts +147 -44
- package/dist/models/CreateIndexRequest.js.map +1 -1
- package/dist/models/CreateIndexResponseBody.d.ts +5 -5
- package/dist/models/CreateIndexShrinkRequest.d.ts +81 -44
- package/dist/models/CreateIndexShrinkRequest.js.map +1 -1
- package/dist/models/DeleteChunkRequest.d.ts +4 -0
- package/dist/models/DeleteChunkRequest.js.map +1 -1
- package/dist/models/DeleteChunkResponseBody.d.ts +19 -1
- package/dist/models/DeleteChunkResponseBody.js.map +1 -1
- package/dist/models/DeleteChunkShrinkRequest.d.ts +4 -0
- package/dist/models/DeleteChunkShrinkRequest.js.map +1 -1
- package/dist/models/GetAvailableParserTypesRequest.d.ts +23 -0
- package/dist/models/GetAvailableParserTypesRequest.js +58 -0
- package/dist/models/GetAvailableParserTypesRequest.js.map +1 -0
- package/dist/models/GetAvailableParserTypesResponse.d.ts +19 -0
- package/dist/models/GetAvailableParserTypesResponse.js +69 -0
- package/dist/models/GetAvailableParserTypesResponse.js.map +1 -0
- package/dist/models/GetAvailableParserTypesResponseBody.d.ts +116 -0
- package/dist/models/GetAvailableParserTypesResponseBody.js +116 -0
- package/dist/models/GetAvailableParserTypesResponseBody.js.map +1 -0
- package/dist/models/GetParseSettingsRequest.d.ts +21 -0
- package/dist/models/GetParseSettingsRequest.js +58 -0
- package/dist/models/GetParseSettingsRequest.js.map +1 -0
- package/dist/models/GetParseSettingsResponse.d.ts +19 -0
- package/dist/models/GetParseSettingsResponse.js +69 -0
- package/dist/models/GetParseSettingsResponse.js.map +1 -0
- package/dist/models/GetParseSettingsResponseBody.d.ts +140 -0
- package/dist/models/GetParseSettingsResponseBody.js +120 -0
- package/dist/models/GetParseSettingsResponseBody.js.map +1 -0
- package/dist/models/HighCodeDeployRequest.d.ts +43 -0
- package/dist/models/HighCodeDeployRequest.js +68 -0
- package/dist/models/HighCodeDeployRequest.js.map +1 -0
- package/dist/models/HighCodeDeployResponse.d.ts +19 -0
- package/dist/models/HighCodeDeployResponse.js +69 -0
- package/dist/models/HighCodeDeployResponse.js.map +1 -0
- package/dist/models/HighCodeDeployResponseBody.d.ts +29 -0
- package/dist/models/HighCodeDeployResponseBody.js +64 -0
- package/dist/models/HighCodeDeployResponseBody.js.map +1 -0
- package/dist/models/ListFileRequest.d.ts +2 -0
- package/dist/models/ListFileRequest.js.map +1 -1
- package/dist/models/ListFileResponseBody.d.ts +11 -0
- package/dist/models/ListFileResponseBody.js.map +1 -1
- package/dist/models/ListIndexFileDetailsResponseBody.d.ts +72 -0
- package/dist/models/ListIndexFileDetailsResponseBody.js.map +1 -1
- package/dist/models/UpdateChunkRequest.d.ts +19 -0
- package/dist/models/UpdateChunkRequest.js.map +1 -1
- package/dist/models/UpdateChunkResponseBody.d.ts +19 -1
- package/dist/models/UpdateChunkResponseBody.js.map +1 -1
- package/dist/models/model.d.ts +24 -0
- package/dist/models/model.js +53 -5
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +345 -14
- package/src/models/ApplyTempStorageLeaseRequest.ts +44 -0
- package/src/models/ApplyTempStorageLeaseResponse.ts +40 -0
- package/src/models/ApplyTempStorageLeaseResponseBody.ts +135 -0
- package/src/models/ChangeParseSettingRequest.ts +117 -0
- package/src/models/ChangeParseSettingResponse.ts +40 -0
- package/src/models/ChangeParseSettingResponseBody.ts +117 -0
- package/src/models/ChangeParseSettingShrinkRequest.ts +72 -0
- package/src/models/CreateIndexRequest.ts +147 -44
- package/src/models/CreateIndexResponseBody.ts +5 -5
- package/src/models/CreateIndexShrinkRequest.ts +81 -44
- package/src/models/DeleteChunkRequest.ts +4 -0
- package/src/models/DeleteChunkResponseBody.ts +19 -1
- package/src/models/DeleteChunkShrinkRequest.ts +4 -0
- package/src/models/GetAvailableParserTypesRequest.ts +36 -0
- package/src/models/GetAvailableParserTypesResponse.ts +40 -0
- package/src/models/GetAvailableParserTypesResponseBody.ts +169 -0
- package/src/models/GetParseSettingsRequest.ts +34 -0
- package/src/models/GetParseSettingsResponse.ts +40 -0
- package/src/models/GetParseSettingsResponseBody.ts +197 -0
- package/src/models/HighCodeDeployRequest.ts +66 -0
- package/src/models/HighCodeDeployResponse.ts +40 -0
- package/src/models/HighCodeDeployResponseBody.ts +48 -0
- package/src/models/ListFileRequest.ts +2 -0
- package/src/models/ListFileResponseBody.ts +11 -0
- package/src/models/ListIndexFileDetailsResponseBody.ts +72 -0
- package/src/models/UpdateChunkRequest.ts +19 -0
- package/src/models/UpdateChunkResponseBody.ts +19 -1
- package/src/models/model.ts +24 -0
package/dist/client.js
CHANGED
|
@@ -319,6 +319,107 @@ class Client extends openapi_core_1.default {
|
|
|
319
319
|
let headers = {};
|
|
320
320
|
return await this.applyFileUploadLeaseWithOptions(CategoryId, WorkspaceId, request, headers, runtime);
|
|
321
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* 申请临时文件存储上传许可
|
|
324
|
+
*
|
|
325
|
+
* @param request - ApplyTempStorageLeaseRequest
|
|
326
|
+
* @param headers - map
|
|
327
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
328
|
+
* @returns ApplyTempStorageLeaseResponse
|
|
329
|
+
*/
|
|
330
|
+
async applyTempStorageLeaseWithOptions(WorkspaceId, request, headers, runtime) {
|
|
331
|
+
request.validate();
|
|
332
|
+
let body = {};
|
|
333
|
+
if (!$dara.isNull(request.fileName)) {
|
|
334
|
+
body["FileName"] = request.fileName;
|
|
335
|
+
}
|
|
336
|
+
if (!$dara.isNull(request.sizeInBytes)) {
|
|
337
|
+
body["SizeInBytes"] = request.sizeInBytes;
|
|
338
|
+
}
|
|
339
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
340
|
+
headers: headers,
|
|
341
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
342
|
+
});
|
|
343
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
344
|
+
action: "ApplyTempStorageLease",
|
|
345
|
+
version: "2023-12-29",
|
|
346
|
+
protocol: "HTTPS",
|
|
347
|
+
pathname: `/${$dara.URL.percentEncode(WorkspaceId)}/datacenter`,
|
|
348
|
+
method: "POST",
|
|
349
|
+
authType: "AK",
|
|
350
|
+
style: "ROA",
|
|
351
|
+
reqBodyType: "formData",
|
|
352
|
+
bodyType: "json",
|
|
353
|
+
});
|
|
354
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ApplyTempStorageLeaseResponse({}));
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* 申请临时文件存储上传许可
|
|
358
|
+
*
|
|
359
|
+
* @param request - ApplyTempStorageLeaseRequest
|
|
360
|
+
* @returns ApplyTempStorageLeaseResponse
|
|
361
|
+
*/
|
|
362
|
+
async applyTempStorageLease(WorkspaceId, request) {
|
|
363
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
364
|
+
let headers = {};
|
|
365
|
+
return await this.applyTempStorageLeaseWithOptions(WorkspaceId, request, headers, runtime);
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Configure the parsing method for a specific file type. For example, use LLM parsing for .pdf files, or use Qwen VL parsing for .jpg files.
|
|
369
|
+
*
|
|
370
|
+
* @param tmpReq - ChangeParseSettingRequest
|
|
371
|
+
* @param headers - map
|
|
372
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
373
|
+
* @returns ChangeParseSettingResponse
|
|
374
|
+
*/
|
|
375
|
+
async changeParseSettingWithOptions(WorkspaceId, tmpReq, headers, runtime) {
|
|
376
|
+
tmpReq.validate();
|
|
377
|
+
let request = new $_model.ChangeParseSettingShrinkRequest({});
|
|
378
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
379
|
+
if (!$dara.isNull(tmpReq.parserConfig)) {
|
|
380
|
+
request.parserConfigShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parserConfig, "ParserConfig", "json");
|
|
381
|
+
}
|
|
382
|
+
let body = {};
|
|
383
|
+
if (!$dara.isNull(request.categoryId)) {
|
|
384
|
+
body["CategoryId"] = request.categoryId;
|
|
385
|
+
}
|
|
386
|
+
if (!$dara.isNull(request.fileType)) {
|
|
387
|
+
body["FileType"] = request.fileType;
|
|
388
|
+
}
|
|
389
|
+
if (!$dara.isNull(request.parser)) {
|
|
390
|
+
body["Parser"] = request.parser;
|
|
391
|
+
}
|
|
392
|
+
if (!$dara.isNull(request.parserConfigShrink)) {
|
|
393
|
+
body["ParserConfig"] = request.parserConfigShrink;
|
|
394
|
+
}
|
|
395
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
396
|
+
headers: headers,
|
|
397
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
398
|
+
});
|
|
399
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
400
|
+
action: "ChangeParseSetting",
|
|
401
|
+
version: "2023-12-29",
|
|
402
|
+
protocol: "HTTPS",
|
|
403
|
+
pathname: `/${$dara.URL.percentEncode(WorkspaceId)}/datacenter/parser/settings`,
|
|
404
|
+
method: "PUT",
|
|
405
|
+
authType: "AK",
|
|
406
|
+
style: "ROA",
|
|
407
|
+
reqBodyType: "formData",
|
|
408
|
+
bodyType: "json",
|
|
409
|
+
});
|
|
410
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ChangeParseSettingResponse({}));
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Configure the parsing method for a specific file type. For example, use LLM parsing for .pdf files, or use Qwen VL parsing for .jpg files.
|
|
414
|
+
*
|
|
415
|
+
* @param request - ChangeParseSettingRequest
|
|
416
|
+
* @returns ChangeParseSettingResponse
|
|
417
|
+
*/
|
|
418
|
+
async changeParseSetting(WorkspaceId, request) {
|
|
419
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
420
|
+
let headers = {};
|
|
421
|
+
return await this.changeParseSettingWithOptions(WorkspaceId, request, headers, runtime);
|
|
422
|
+
}
|
|
322
423
|
/**
|
|
323
424
|
* 创建并发布智能体应用
|
|
324
425
|
*
|
|
@@ -382,12 +483,17 @@ class Client extends openapi_core_1.default {
|
|
|
382
483
|
return await this.createAndPulishAgentWithOptions(workspaceId, request, headers, runtime);
|
|
383
484
|
}
|
|
384
485
|
/**
|
|
385
|
-
*
|
|
486
|
+
* Create a knowledge base of the document search type.
|
|
386
487
|
*
|
|
387
488
|
* @remarks
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
489
|
+
* **Limits**: This operation can create only knowledge base of the document search type. Data query and image Q\\&A types are not supported. Use the console instead.
|
|
490
|
+
* * **Required permissions**
|
|
491
|
+
* * **RAM users**: Must first obtain the [API permissions](https://help.aliyun.com/document_detail/2848578.html) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:CreateIndex permission required), and [become member of a workspace](https://help.aliyun.com/document_detail/2851098.html).
|
|
492
|
+
* * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.
|
|
493
|
+
* * **Call method**: We recommend using the latest version of the [GenAI Service Platform SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29). The SDK encapsulates complex signature computational logic to simplify the call process.
|
|
494
|
+
* * **What to do next**: This operation only initializes knowledge base creation job. After that, call **SubmitIndexJob** to complete the creation. Otherwise, you will get an empty knowledge base. For more information about the sample code, see [Knowledge base API guide](https://help.aliyun.com/document_detail/2852772.html).
|
|
495
|
+
* * **Idempotence**: This operation is not idempotent. If you call the operation for multiple times, you may create several knowledge bases with the same name. We recommend following a "query first, then create" logic.
|
|
496
|
+
* **Rate limit:** Rate limiting will be triggered if you call this operation frequently. Do not exceed 10 times per second. If limiting is triggered, try again later.
|
|
391
497
|
*
|
|
392
498
|
* @param tmpReq - CreateIndexRequest
|
|
393
499
|
* @param headers - map
|
|
@@ -504,12 +610,17 @@ class Client extends openapi_core_1.default {
|
|
|
504
610
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.CreateIndexResponse({}));
|
|
505
611
|
}
|
|
506
612
|
/**
|
|
507
|
-
*
|
|
613
|
+
* Create a knowledge base of the document search type.
|
|
508
614
|
*
|
|
509
615
|
* @remarks
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
616
|
+
* **Limits**: This operation can create only knowledge base of the document search type. Data query and image Q\\&A types are not supported. Use the console instead.
|
|
617
|
+
* * **Required permissions**
|
|
618
|
+
* * **RAM users**: Must first obtain the [API permissions](https://help.aliyun.com/document_detail/2848578.html) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:CreateIndex permission required), and [become member of a workspace](https://help.aliyun.com/document_detail/2851098.html).
|
|
619
|
+
* * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.
|
|
620
|
+
* * **Call method**: We recommend using the latest version of the [GenAI Service Platform SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29). The SDK encapsulates complex signature computational logic to simplify the call process.
|
|
621
|
+
* * **What to do next**: This operation only initializes knowledge base creation job. After that, call **SubmitIndexJob** to complete the creation. Otherwise, you will get an empty knowledge base. For more information about the sample code, see [Knowledge base API guide](https://help.aliyun.com/document_detail/2852772.html).
|
|
622
|
+
* * **Idempotence**: This operation is not idempotent. If you call the operation for multiple times, you may create several knowledge bases with the same name. We recommend following a "query first, then create" logic.
|
|
623
|
+
* **Rate limit:** Rate limiting will be triggered if you call this operation frequently. Do not exceed 10 times per second. If limiting is triggered, try again later.
|
|
513
624
|
*
|
|
514
625
|
* @param request - CreateIndexRequest
|
|
515
626
|
* @returns CreateIndexResponse
|
|
@@ -715,7 +826,18 @@ class Client extends openapi_core_1.default {
|
|
|
715
826
|
return await this.deleteCategoryWithOptions(CategoryId, WorkspaceId, headers, runtime);
|
|
716
827
|
}
|
|
717
828
|
/**
|
|
718
|
-
*
|
|
829
|
+
* Deletes a specified text chunk from a knowledge base. The deleted chunk cannot be retrieved or recalled.
|
|
830
|
+
*
|
|
831
|
+
* @remarks
|
|
832
|
+
* *
|
|
833
|
+
* **Warning** After a text chunk is deleted, it cannot be restored. Proceed with caution.
|
|
834
|
+
* * **Required permissions**:
|
|
835
|
+
* * **RAM users**: Must first obtain the [API permissions](https://help.aliyun.com/document_detail/2848578.html) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:DeleteChunk permission required), and [become member of a workspace](https://help.aliyun.com/document_detail/2851098.html).
|
|
836
|
+
* * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.
|
|
837
|
+
* * **Call method**: We recommend using the latest version of the [GenAI Service Platform SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29). The SDK encapsulates complex signature computational logic to simplify the call process.
|
|
838
|
+
* * **Delay**: The update takes effect immediately. During peak hours, the update may take place in seconds.
|
|
839
|
+
* * **Idempotence**: This operation is idempotent. If you perform a repeated operation on a chunk that has already been deleted, the interface returns a success.
|
|
840
|
+
* **Rate limit:** Rate limiting will be triggered if you call this operation frequently. Do not exceed 10 times per second. If limiting is triggered, try again later.
|
|
719
841
|
*
|
|
720
842
|
* @param tmpReq - DeleteChunkRequest
|
|
721
843
|
* @param headers - map
|
|
@@ -754,7 +876,18 @@ class Client extends openapi_core_1.default {
|
|
|
754
876
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.DeleteChunkResponse({}));
|
|
755
877
|
}
|
|
756
878
|
/**
|
|
757
|
-
*
|
|
879
|
+
* Deletes a specified text chunk from a knowledge base. The deleted chunk cannot be retrieved or recalled.
|
|
880
|
+
*
|
|
881
|
+
* @remarks
|
|
882
|
+
* *
|
|
883
|
+
* **Warning** After a text chunk is deleted, it cannot be restored. Proceed with caution.
|
|
884
|
+
* * **Required permissions**:
|
|
885
|
+
* * **RAM users**: Must first obtain the [API permissions](https://help.aliyun.com/document_detail/2848578.html) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:DeleteChunk permission required), and [become member of a workspace](https://help.aliyun.com/document_detail/2851098.html).
|
|
886
|
+
* * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.
|
|
887
|
+
* * **Call method**: We recommend using the latest version of the [GenAI Service Platform SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29). The SDK encapsulates complex signature computational logic to simplify the call process.
|
|
888
|
+
* * **Delay**: The update takes effect immediately. During peak hours, the update may take place in seconds.
|
|
889
|
+
* * **Idempotence**: This operation is idempotent. If you perform a repeated operation on a chunk that has already been deleted, the interface returns a success.
|
|
890
|
+
* **Rate limit:** Rate limiting will be triggered if you call this operation frequently. Do not exceed 10 times per second. If limiting is triggered, try again later.
|
|
758
891
|
*
|
|
759
892
|
* @param request - DeleteChunkRequest
|
|
760
893
|
* @returns DeleteChunkResponse
|
|
@@ -1151,6 +1284,48 @@ class Client extends openapi_core_1.default {
|
|
|
1151
1284
|
let headers = {};
|
|
1152
1285
|
return await this.getAlipayUrlWithOptions(request, headers, runtime);
|
|
1153
1286
|
}
|
|
1287
|
+
/**
|
|
1288
|
+
* Lists all supported parser types based on the input file type (file extension).
|
|
1289
|
+
*
|
|
1290
|
+
* @param request - GetAvailableParserTypesRequest
|
|
1291
|
+
* @param headers - map
|
|
1292
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1293
|
+
* @returns GetAvailableParserTypesResponse
|
|
1294
|
+
*/
|
|
1295
|
+
async getAvailableParserTypesWithOptions(WorkspaceId, request, headers, runtime) {
|
|
1296
|
+
request.validate();
|
|
1297
|
+
let query = {};
|
|
1298
|
+
if (!$dara.isNull(request.fileType)) {
|
|
1299
|
+
query["FileType"] = request.fileType;
|
|
1300
|
+
}
|
|
1301
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
1302
|
+
headers: headers,
|
|
1303
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
1304
|
+
});
|
|
1305
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
1306
|
+
action: "GetAvailableParserTypes",
|
|
1307
|
+
version: "2023-12-29",
|
|
1308
|
+
protocol: "HTTPS",
|
|
1309
|
+
pathname: `/${$dara.URL.percentEncode(WorkspaceId)}/datacenter/parser/parsertype`,
|
|
1310
|
+
method: "GET",
|
|
1311
|
+
authType: "AK",
|
|
1312
|
+
style: "ROA",
|
|
1313
|
+
reqBodyType: "json",
|
|
1314
|
+
bodyType: "json",
|
|
1315
|
+
});
|
|
1316
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.GetAvailableParserTypesResponse({}));
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* Lists all supported parser types based on the input file type (file extension).
|
|
1320
|
+
*
|
|
1321
|
+
* @param request - GetAvailableParserTypesRequest
|
|
1322
|
+
* @returns GetAvailableParserTypesResponse
|
|
1323
|
+
*/
|
|
1324
|
+
async getAvailableParserTypes(WorkspaceId, request) {
|
|
1325
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
1326
|
+
let headers = {};
|
|
1327
|
+
return await this.getAvailableParserTypesWithOptions(WorkspaceId, request, headers, runtime);
|
|
1328
|
+
}
|
|
1154
1329
|
/**
|
|
1155
1330
|
* Queries the current status of a specified knowledge base creation or add document job.
|
|
1156
1331
|
*
|
|
@@ -1278,6 +1453,48 @@ class Client extends openapi_core_1.default {
|
|
|
1278
1453
|
let headers = {};
|
|
1279
1454
|
return await this.getMemoryNodeWithOptions(workspaceId, memoryId, memoryNodeId, headers, runtime);
|
|
1280
1455
|
}
|
|
1456
|
+
/**
|
|
1457
|
+
* Queries the data parsing settings in a specified category.
|
|
1458
|
+
*
|
|
1459
|
+
* @param request - GetParseSettingsRequest
|
|
1460
|
+
* @param headers - map
|
|
1461
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1462
|
+
* @returns GetParseSettingsResponse
|
|
1463
|
+
*/
|
|
1464
|
+
async getParseSettingsWithOptions(WorkspaceId, request, headers, runtime) {
|
|
1465
|
+
request.validate();
|
|
1466
|
+
let query = {};
|
|
1467
|
+
if (!$dara.isNull(request.categoryId)) {
|
|
1468
|
+
query["CategoryId"] = request.categoryId;
|
|
1469
|
+
}
|
|
1470
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
1471
|
+
headers: headers,
|
|
1472
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
1473
|
+
});
|
|
1474
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
1475
|
+
action: "GetParseSettings",
|
|
1476
|
+
version: "2023-12-29",
|
|
1477
|
+
protocol: "HTTPS",
|
|
1478
|
+
pathname: `/${$dara.URL.percentEncode(WorkspaceId)}/datacenter/parser/settings`,
|
|
1479
|
+
method: "GET",
|
|
1480
|
+
authType: "AK",
|
|
1481
|
+
style: "ROA",
|
|
1482
|
+
reqBodyType: "json",
|
|
1483
|
+
bodyType: "json",
|
|
1484
|
+
});
|
|
1485
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.GetParseSettingsResponse({}));
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Queries the data parsing settings in a specified category.
|
|
1489
|
+
*
|
|
1490
|
+
* @param request - GetParseSettingsRequest
|
|
1491
|
+
* @returns GetParseSettingsResponse
|
|
1492
|
+
*/
|
|
1493
|
+
async getParseSettings(WorkspaceId, request) {
|
|
1494
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
1495
|
+
let headers = {};
|
|
1496
|
+
return await this.getParseSettingsWithOptions(WorkspaceId, request, headers, runtime);
|
|
1497
|
+
}
|
|
1281
1498
|
/**
|
|
1282
1499
|
* Obtains a prompt template based on the template ID.
|
|
1283
1500
|
*
|
|
@@ -1344,6 +1561,63 @@ class Client extends openapi_core_1.default {
|
|
|
1344
1561
|
let headers = {};
|
|
1345
1562
|
return await this.getPublishedAgentWithOptions(workspaceId, appCode, headers, runtime);
|
|
1346
1563
|
}
|
|
1564
|
+
/**
|
|
1565
|
+
* 高代码部署服务
|
|
1566
|
+
*
|
|
1567
|
+
* @param request - HighCodeDeployRequest
|
|
1568
|
+
* @param headers - map
|
|
1569
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
1570
|
+
* @returns HighCodeDeployResponse
|
|
1571
|
+
*/
|
|
1572
|
+
async highCodeDeployWithOptions(workspaceId, request, headers, runtime) {
|
|
1573
|
+
request.validate();
|
|
1574
|
+
let body = {};
|
|
1575
|
+
if (!$dara.isNull(request.agentDesc)) {
|
|
1576
|
+
body["agentDesc"] = request.agentDesc;
|
|
1577
|
+
}
|
|
1578
|
+
if (!$dara.isNull(request.agentId)) {
|
|
1579
|
+
body["agentId"] = request.agentId;
|
|
1580
|
+
}
|
|
1581
|
+
if (!$dara.isNull(request.agentName)) {
|
|
1582
|
+
body["agentName"] = request.agentName;
|
|
1583
|
+
}
|
|
1584
|
+
if (!$dara.isNull(request.sourceCodeName)) {
|
|
1585
|
+
body["sourceCodeName"] = request.sourceCodeName;
|
|
1586
|
+
}
|
|
1587
|
+
if (!$dara.isNull(request.sourceCodeOssUrl)) {
|
|
1588
|
+
body["sourceCodeOssUrl"] = request.sourceCodeOssUrl;
|
|
1589
|
+
}
|
|
1590
|
+
if (!$dara.isNull(request.telemetryEnabled)) {
|
|
1591
|
+
body["telemetryEnabled"] = request.telemetryEnabled;
|
|
1592
|
+
}
|
|
1593
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
1594
|
+
headers: headers,
|
|
1595
|
+
body: openapi_core_2.OpenApiUtil.parseToMap(body),
|
|
1596
|
+
});
|
|
1597
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
1598
|
+
action: "HighCodeDeploy",
|
|
1599
|
+
version: "2023-12-29",
|
|
1600
|
+
protocol: "HTTPS",
|
|
1601
|
+
pathname: `/openapi/${$dara.URL.percentEncode(workspaceId)}/highCode/publish`,
|
|
1602
|
+
method: "POST",
|
|
1603
|
+
authType: "AK",
|
|
1604
|
+
style: "ROA",
|
|
1605
|
+
reqBodyType: "json",
|
|
1606
|
+
bodyType: "json",
|
|
1607
|
+
});
|
|
1608
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.HighCodeDeployResponse({}));
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* 高代码部署服务
|
|
1612
|
+
*
|
|
1613
|
+
* @param request - HighCodeDeployRequest
|
|
1614
|
+
* @returns HighCodeDeployResponse
|
|
1615
|
+
*/
|
|
1616
|
+
async highCodeDeploy(workspaceId, request) {
|
|
1617
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
1618
|
+
let headers = {};
|
|
1619
|
+
return await this.highCodeDeployWithOptions(workspaceId, request, headers, runtime);
|
|
1620
|
+
}
|
|
1347
1621
|
/**
|
|
1348
1622
|
* ListCategory
|
|
1349
1623
|
*
|
|
@@ -1464,7 +1738,13 @@ class Client extends openapi_core_1.default {
|
|
|
1464
1738
|
return await this.listChunksWithOptions(WorkspaceId, request, headers, runtime);
|
|
1465
1739
|
}
|
|
1466
1740
|
/**
|
|
1467
|
-
*
|
|
1741
|
+
* Queries the details of one or more documents in a specified category.
|
|
1742
|
+
*
|
|
1743
|
+
* @remarks
|
|
1744
|
+
* If you are using a RAM user, you must first obtain the OpenAPI management permissions (namely sfm:ListFile) of Model Studio. For more information, see [Grant OpenAPI permissions to a RAM user](https://help.aliyun.com/document_detail/2848578.html). If you are using the Alibaba Cloud account, you do not need permissions. We recommend that you use [the latest version of the SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to call this operation.
|
|
1745
|
+
* * During a paged query, set `MaxResults` to specify the maximum number of entries to return. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you query subsequent pages, set the `NextToken` parameter to the `NextToken` obtained in the last returned result. You can also set the `MaxResults` parameter to limit the number of entries to be returned. If no `NextToken` is returned, the result is completely returned and no more requests are required.
|
|
1746
|
+
* * This operation is idempotent.
|
|
1747
|
+
* **Throttling:** Throttling will be triggered if you call this operation frequently. Do not exceed 5 times per second. If throttling is triggered, try again later.
|
|
1468
1748
|
*
|
|
1469
1749
|
* @param request - ListFileRequest
|
|
1470
1750
|
* @param headers - map
|
|
@@ -1504,7 +1784,13 @@ class Client extends openapi_core_1.default {
|
|
|
1504
1784
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ListFileResponse({}));
|
|
1505
1785
|
}
|
|
1506
1786
|
/**
|
|
1507
|
-
*
|
|
1787
|
+
* Queries the details of one or more documents in a specified category.
|
|
1788
|
+
*
|
|
1789
|
+
* @remarks
|
|
1790
|
+
* If you are using a RAM user, you must first obtain the OpenAPI management permissions (namely sfm:ListFile) of Model Studio. For more information, see [Grant OpenAPI permissions to a RAM user](https://help.aliyun.com/document_detail/2848578.html). If you are using the Alibaba Cloud account, you do not need permissions. We recommend that you use [the latest version of the SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to call this operation.
|
|
1791
|
+
* * During a paged query, set `MaxResults` to specify the maximum number of entries to return. The return value of `NextToken` is a pagination token that can be used in the next call to retrieve a new page of results. When you query subsequent pages, set the `NextToken` parameter to the `NextToken` obtained in the last returned result. You can also set the `MaxResults` parameter to limit the number of entries to be returned. If no `NextToken` is returned, the result is completely returned and no more requests are required.
|
|
1792
|
+
* * This operation is idempotent.
|
|
1793
|
+
* **Throttling:** Throttling will be triggered if you call this operation frequently. Do not exceed 5 times per second. If throttling is triggered, try again later.
|
|
1508
1794
|
*
|
|
1509
1795
|
* @param request - ListFileRequest
|
|
1510
1796
|
* @returns ListFileResponse
|
|
@@ -2249,7 +2535,17 @@ class Client extends openapi_core_1.default {
|
|
|
2249
2535
|
return await this.updateAndPublishAgentSelectiveWithOptions(workspaceId, appCode, request, headers, runtime);
|
|
2250
2536
|
}
|
|
2251
2537
|
/**
|
|
2252
|
-
*
|
|
2538
|
+
* Modifies the content and title of a specified text chunk in the knowledge base, and sets whether the chunk participates in knowledge base retrieval.
|
|
2539
|
+
*
|
|
2540
|
+
* @remarks
|
|
2541
|
+
* **Limits**: This operation supports only knowledge base of the document search type. Data query and image Q\\&A types are not supported.
|
|
2542
|
+
* * **Required permissions**:
|
|
2543
|
+
* * **RAM users**: Must first obtain the [API permissions](https://help.aliyun.com/document_detail/2848578.html) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:UpdateChunk permission required), and [become member of a workspace](https://help.aliyun.com/document_detail/2851098.html).
|
|
2544
|
+
* * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.
|
|
2545
|
+
* * **Call method**: We recommend using the latest version of the [GenAI Service Platform SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29). The SDK encapsulates complex signature computational logic to simplify the call process.
|
|
2546
|
+
* * **Delay**: The update takes effect immediately. During peak hours, the update may take place in seconds.
|
|
2547
|
+
* * **Idempotence**: This operation is idempotent. If you perform a repeated operation on a chunk that has already been updated, the interface returns a success.
|
|
2548
|
+
* **Rate limit:** Rate limiting will be triggered if you call this operation frequently. Do not exceed 10 times per second. If limiting is triggered, try again later.
|
|
2253
2549
|
*
|
|
2254
2550
|
* @param request - UpdateChunkRequest
|
|
2255
2551
|
* @param headers - map
|
|
@@ -2295,7 +2591,17 @@ class Client extends openapi_core_1.default {
|
|
|
2295
2591
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.UpdateChunkResponse({}));
|
|
2296
2592
|
}
|
|
2297
2593
|
/**
|
|
2298
|
-
*
|
|
2594
|
+
* Modifies the content and title of a specified text chunk in the knowledge base, and sets whether the chunk participates in knowledge base retrieval.
|
|
2595
|
+
*
|
|
2596
|
+
* @remarks
|
|
2597
|
+
* **Limits**: This operation supports only knowledge base of the document search type. Data query and image Q\\&A types are not supported.
|
|
2598
|
+
* * **Required permissions**:
|
|
2599
|
+
* * **RAM users**: Must first obtain the [API permissions](https://help.aliyun.com/document_detail/2848578.html) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:UpdateChunk permission required), and [become member of a workspace](https://help.aliyun.com/document_detail/2851098.html).
|
|
2600
|
+
* * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.
|
|
2601
|
+
* * **Call method**: We recommend using the latest version of the [GenAI Service Platform SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29). The SDK encapsulates complex signature computational logic to simplify the call process.
|
|
2602
|
+
* * **Delay**: The update takes effect immediately. During peak hours, the update may take place in seconds.
|
|
2603
|
+
* * **Idempotence**: This operation is idempotent. If you perform a repeated operation on a chunk that has already been updated, the interface returns a success.
|
|
2604
|
+
* **Rate limit:** Rate limiting will be triggered if you call this operation frequently. Do not exceed 10 times per second. If limiting is triggered, try again later.
|
|
2299
2605
|
*
|
|
2300
2606
|
* @param request - UpdateChunkRequest
|
|
2301
2607
|
* @returns UpdateChunkResponse
|