@alicloud/bailian20231229 2.14.0 → 2.14.2
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 +38 -40
- package/dist/client.js +47 -41
- package/dist/client.js.map +1 -1
- package/dist/models/AddChunkRequest.d.ts +1 -1
- package/dist/models/AddChunkShrinkRequest.d.ts +1 -1
- package/dist/models/CreateIndexRequest.d.ts +163 -159
- package/dist/models/CreateIndexRequest.js.map +1 -1
- package/dist/models/CreateIndexResponseBody.d.ts +11 -13
- package/dist/models/CreateIndexResponseBody.js.map +1 -1
- package/dist/models/CreateIndexShrinkRequest.d.ts +137 -127
- package/dist/models/CreateIndexShrinkRequest.js.map +1 -1
- package/dist/models/DeleteConnectorResponseBody.d.ts +24 -0
- package/dist/models/DeleteConnectorResponseBody.js.map +1 -1
- package/dist/models/ListIndexFileDetailsRequest.d.ts +5 -5
- package/dist/models/ListIndexFileDetailsResponseBody.d.ts +11 -10
- package/dist/models/ListIndexFileDetailsResponseBody.js +2 -0
- package/dist/models/ListIndexFileDetailsResponseBody.js.map +1 -1
- package/dist/models/ListPublishedAgentRequest.d.ts +1 -0
- package/dist/models/ListPublishedAgentRequest.js +5 -0
- package/dist/models/ListPublishedAgentRequest.js.map +1 -1
- package/dist/models/ListPublishedAgentResponseBody.d.ts +3 -0
- package/dist/models/ListPublishedAgentResponseBody.js +6 -0
- package/dist/models/ListPublishedAgentResponseBody.js.map +1 -1
- package/dist/models/ListPublishedAgentShrinkRequest.d.ts +16 -0
- package/dist/models/ListPublishedAgentShrinkRequest.js +62 -0
- package/dist/models/ListPublishedAgentShrinkRequest.js.map +1 -0
- package/dist/models/model.d.ts +1 -0
- package/dist/models/model.js +4 -2
- package/dist/models/model.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +49 -41
- package/src/models/AddChunkRequest.ts +1 -1
- package/src/models/AddChunkShrinkRequest.ts +1 -1
- package/src/models/CreateIndexRequest.ts +163 -159
- package/src/models/CreateIndexResponseBody.ts +11 -13
- package/src/models/CreateIndexShrinkRequest.ts +137 -127
- package/src/models/DeleteConnectorResponseBody.ts +24 -0
- package/src/models/ListIndexFileDetailsRequest.ts +5 -5
- package/src/models/ListIndexFileDetailsResponseBody.ts +13 -10
- package/src/models/ListPublishedAgentRequest.ts +6 -0
- package/src/models/ListPublishedAgentResponseBody.ts +9 -0
- package/src/models/ListPublishedAgentShrinkRequest.ts +33 -0
- package/src/models/model.ts +1 -0
package/src/client.ts
CHANGED
|
@@ -106,11 +106,10 @@ export default class Client extends OpenApi {
|
|
|
106
106
|
* Adds chunks to a document search (document), data query (table), or image Q&A (image) knowledge base.
|
|
107
107
|
*
|
|
108
108
|
* @remarks
|
|
109
|
-
* - This operation adds chunk content to a specified knowledge base of the document search (document), data query (table), or image Q&A (image) type.
|
|
109
|
+
* - This operation adds chunk content to a specified knowledge base of the document search (document), data query (table), or image Q&A (image) type. Related operations on multimedia search (multimedia) knowledge bases are not supported. For data query and image Q&A knowledge bases, this operation takes effect only when the data source is a spreadsheet connector (excel).
|
|
110
110
|
* - Resource Access Management (RAM) users must first obtain [API permissions](https://help.aliyun.com/document_detail/2848578.html) for Model Studio (requiring `AliyunBailianDataFullAccess`, which includes the sfm:ChunkList permission) and [join a workspace](https://help.aliyun.com/document_detail/2851098.html) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Use the latest [Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to invoke this operation.
|
|
111
111
|
* - Before invoking this operation, make sure that your knowledge base has been created and has not been deleted (that is, the knowledge base ID `IndexId` is valid).
|
|
112
112
|
* - This operation has idempotence.
|
|
113
|
-
* **Related operations:**
|
|
114
113
|
* **Throttling:**
|
|
115
114
|
* This operation is throttled if called too frequently. Do not exceed 10 calls per second. If throttled, retry later.
|
|
116
115
|
*
|
|
@@ -162,11 +161,10 @@ export default class Client extends OpenApi {
|
|
|
162
161
|
* Adds chunks to a document search (document), data query (table), or image Q&A (image) knowledge base.
|
|
163
162
|
*
|
|
164
163
|
* @remarks
|
|
165
|
-
* - This operation adds chunk content to a specified knowledge base of the document search (document), data query (table), or image Q&A (image) type.
|
|
164
|
+
* - This operation adds chunk content to a specified knowledge base of the document search (document), data query (table), or image Q&A (image) type. Related operations on multimedia search (multimedia) knowledge bases are not supported. For data query and image Q&A knowledge bases, this operation takes effect only when the data source is a spreadsheet connector (excel).
|
|
166
165
|
* - Resource Access Management (RAM) users must first obtain [API permissions](https://help.aliyun.com/document_detail/2848578.html) for Model Studio (requiring `AliyunBailianDataFullAccess`, which includes the sfm:ChunkList permission) and [join a workspace](https://help.aliyun.com/document_detail/2851098.html) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Use the latest [Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to invoke this operation.
|
|
167
166
|
* - Before invoking this operation, make sure that your knowledge base has been created and has not been deleted (that is, the knowledge base ID `IndexId` is valid).
|
|
168
167
|
* - This operation has idempotence.
|
|
169
|
-
* **Related operations:**
|
|
170
168
|
* **Throttling:**
|
|
171
169
|
* This operation is throttled if called too frequently. Do not exceed 10 calls per second. If throttled, retry later.
|
|
172
170
|
*
|
|
@@ -849,17 +847,17 @@ export default class Client extends OpenApi {
|
|
|
849
847
|
}
|
|
850
848
|
|
|
851
849
|
/**
|
|
852
|
-
*
|
|
850
|
+
* Creates a knowledge base, either an unstructured knowledge base based on documents or audio/video, or a structured knowledge base for data queries or image-based Q&A.
|
|
853
851
|
*
|
|
854
852
|
* @remarks
|
|
855
|
-
* - **
|
|
856
|
-
* - **
|
|
857
|
-
* - **Alibaba Cloud account**:
|
|
858
|
-
* - **
|
|
859
|
-
* - **What to do next**: This operation only
|
|
860
|
-
* - **Idempotence**: This operation
|
|
861
|
-
* **Rate
|
|
862
|
-
*
|
|
853
|
+
* - **Permission requirements**:
|
|
854
|
+
* - **Resource Access Management (RAM) user**: Obtain [API permissions](https://help.aliyun.com/document_detail/2848578.html) for Alibaba Cloud Model Studio first (you can use the `AliyunBailianDataFullAccess` policy, which includes the sfm:CreateIndex permission required by this operation), and [join a workspace](https://help.aliyun.com/document_detail/2851098.html) before invoking this operation.
|
|
855
|
+
* - **Alibaba Cloud account**: Has permissions by default and can invoke this operation directly.
|
|
856
|
+
* - **Calling method**: Use the latest <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)<props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29). The SDK has encapsulated the complex signature calculation logic and simplifies the invocation procedure.
|
|
857
|
+
* - **What to do next**: This operation only performs initialization of the knowledge base creation job. After invoking this operation, you must invoke the **SubmitIndexJob** operation to complete the creation (otherwise, you will get an empty knowledge base). For code examples, refer to [Knowledge Base API Guide](https://help.aliyun.com/document_detail/2852772.html).
|
|
858
|
+
* - **Idempotence**: This operation does not have idempotence. Repeated invocations may create multiple knowledge bases with the same name. Implement idempotent invocations by querying first and then creating.
|
|
859
|
+
* **Rate limit:**
|
|
860
|
+
* This operation is subject to rate limiting. Do not exceed 10 calls per second. If you are throttled, retry later.
|
|
863
861
|
*
|
|
864
862
|
* @param tmpReq - CreateIndexRequest
|
|
865
863
|
* @param headers - map
|
|
@@ -1046,17 +1044,17 @@ export default class Client extends OpenApi {
|
|
|
1046
1044
|
}
|
|
1047
1045
|
|
|
1048
1046
|
/**
|
|
1049
|
-
*
|
|
1047
|
+
* Creates a knowledge base, either an unstructured knowledge base based on documents or audio/video, or a structured knowledge base for data queries or image-based Q&A.
|
|
1050
1048
|
*
|
|
1051
1049
|
* @remarks
|
|
1052
|
-
* - **
|
|
1053
|
-
* - **
|
|
1054
|
-
* - **Alibaba Cloud account**:
|
|
1055
|
-
* - **
|
|
1056
|
-
* - **What to do next**: This operation only
|
|
1057
|
-
* - **Idempotence**: This operation
|
|
1058
|
-
* **Rate
|
|
1059
|
-
*
|
|
1050
|
+
* - **Permission requirements**:
|
|
1051
|
+
* - **Resource Access Management (RAM) user**: Obtain [API permissions](https://help.aliyun.com/document_detail/2848578.html) for Alibaba Cloud Model Studio first (you can use the `AliyunBailianDataFullAccess` policy, which includes the sfm:CreateIndex permission required by this operation), and [join a workspace](https://help.aliyun.com/document_detail/2851098.html) before invoking this operation.
|
|
1052
|
+
* - **Alibaba Cloud account**: Has permissions by default and can invoke this operation directly.
|
|
1053
|
+
* - **Calling method**: Use the latest <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)<props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29). The SDK has encapsulated the complex signature calculation logic and simplifies the invocation procedure.
|
|
1054
|
+
* - **What to do next**: This operation only performs initialization of the knowledge base creation job. After invoking this operation, you must invoke the **SubmitIndexJob** operation to complete the creation (otherwise, you will get an empty knowledge base). For code examples, refer to [Knowledge Base API Guide](https://help.aliyun.com/document_detail/2852772.html).
|
|
1055
|
+
* - **Idempotence**: This operation does not have idempotence. Repeated invocations may create multiple knowledge bases with the same name. Implement idempotent invocations by querying first and then creating.
|
|
1056
|
+
* **Rate limit:**
|
|
1057
|
+
* This operation is subject to rate limiting. Do not exceed 10 calls per second. If you are throttled, retry later.
|
|
1060
1058
|
*
|
|
1061
1059
|
* @param request - CreateIndexRequest
|
|
1062
1060
|
* @returns CreateIndexResponse
|
|
@@ -1394,13 +1392,13 @@ export default class Client extends OpenApi {
|
|
|
1394
1392
|
}
|
|
1395
1393
|
|
|
1396
1394
|
/**
|
|
1397
|
-
*
|
|
1395
|
+
* Deletes a connector.
|
|
1398
1396
|
*
|
|
1399
1397
|
* @remarks
|
|
1400
|
-
* - RAM
|
|
1401
|
-
* -
|
|
1402
|
-
*
|
|
1403
|
-
*
|
|
1398
|
+
* - Resource Access Management (RAM) users must first obtain [API permissions](https://help.aliyun.com/document_detail/2848578.html) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:DeleteConnector permission), and [join a workspace](https://help.aliyun.com/document_detail/2851098.html) before calling this operation. Alibaba Cloud accounts can call this operation directly without authorization. Use the latest [Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to call this operation.
|
|
1399
|
+
* - This operation is not idempotent.
|
|
1400
|
+
* **Throttling:**
|
|
1401
|
+
* This operation is throttled if called too frequently. Do not exceed 5 calls per second. If throttled, retry later.
|
|
1404
1402
|
*
|
|
1405
1403
|
* @param request - DeleteConnectorRequest
|
|
1406
1404
|
* @param headers - map
|
|
@@ -1427,13 +1425,13 @@ export default class Client extends OpenApi {
|
|
|
1427
1425
|
}
|
|
1428
1426
|
|
|
1429
1427
|
/**
|
|
1430
|
-
*
|
|
1428
|
+
* Deletes a connector.
|
|
1431
1429
|
*
|
|
1432
1430
|
* @remarks
|
|
1433
|
-
* - RAM
|
|
1434
|
-
* -
|
|
1435
|
-
*
|
|
1436
|
-
*
|
|
1431
|
+
* - Resource Access Management (RAM) users must first obtain [API permissions](https://help.aliyun.com/document_detail/2848578.html) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:DeleteConnector permission), and [join a workspace](https://help.aliyun.com/document_detail/2851098.html) before calling this operation. Alibaba Cloud accounts can call this operation directly without authorization. Use the latest [Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to call this operation.
|
|
1432
|
+
* - This operation is not idempotent.
|
|
1433
|
+
* **Throttling:**
|
|
1434
|
+
* This operation is throttled if called too frequently. Do not exceed 5 calls per second. If throttled, retry later.
|
|
1437
1435
|
*
|
|
1438
1436
|
* @param request - DeleteConnectorRequest
|
|
1439
1437
|
* @returns DeleteConnectorResponse
|
|
@@ -2852,9 +2850,9 @@ export default class Client extends OpenApi {
|
|
|
2852
2850
|
* Retrieves the files in a specified knowledge base along with their details.
|
|
2853
2851
|
*
|
|
2854
2852
|
* @remarks
|
|
2855
|
-
* -
|
|
2856
|
-
* - Before
|
|
2857
|
-
* - This operation
|
|
2853
|
+
* - RAM users must first obtain [API permissions](https://help.aliyun.com/document_detail/2848578.html) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:ListIndexFiles permission), before calling this operation. Alibaba Cloud accounts can call this operation directly without authorization. Use the latest <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)<props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to call this operation.
|
|
2854
|
+
* - Before calling this operation, make sure that your knowledge base has been created and has not been deleted (that is, the knowledge base ID `IndexId` is valid).
|
|
2855
|
+
* - This operation is idempotent.
|
|
2858
2856
|
*
|
|
2859
2857
|
* @param request - ListIndexFileDetailsRequest
|
|
2860
2858
|
* @param headers - map
|
|
@@ -2910,9 +2908,9 @@ export default class Client extends OpenApi {
|
|
|
2910
2908
|
* Retrieves the files in a specified knowledge base along with their details.
|
|
2911
2909
|
*
|
|
2912
2910
|
* @remarks
|
|
2913
|
-
* -
|
|
2914
|
-
* - Before
|
|
2915
|
-
* - This operation
|
|
2911
|
+
* - RAM users must first obtain [API permissions](https://help.aliyun.com/document_detail/2848578.html) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:ListIndexFiles permission), before calling this operation. Alibaba Cloud accounts can call this operation directly without authorization. Use the latest <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)<props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to call this operation.
|
|
2912
|
+
* - Before calling this operation, make sure that your knowledge base has been created and has not been deleted (that is, the knowledge base ID `IndexId` is valid).
|
|
2913
|
+
* - This operation is idempotent.
|
|
2916
2914
|
*
|
|
2917
2915
|
* @param request - ListIndexFileDetailsRequest
|
|
2918
2916
|
* @returns ListIndexFileDetailsResponse
|
|
@@ -3156,13 +3154,19 @@ export default class Client extends OpenApi {
|
|
|
3156
3154
|
/**
|
|
3157
3155
|
* 查询已发布的智能体应用列表
|
|
3158
3156
|
*
|
|
3159
|
-
* @param
|
|
3157
|
+
* @param tmpReq - ListPublishedAgentRequest
|
|
3160
3158
|
* @param headers - map
|
|
3161
3159
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
3162
3160
|
* @returns ListPublishedAgentResponse
|
|
3163
3161
|
*/
|
|
3164
|
-
async listPublishedAgentWithOptions(workspaceId: string,
|
|
3165
|
-
|
|
3162
|
+
async listPublishedAgentWithOptions(workspaceId: string, tmpReq: $_model.ListPublishedAgentRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<$_model.ListPublishedAgentResponse> {
|
|
3163
|
+
tmpReq.validate();
|
|
3164
|
+
let request = new $_model.ListPublishedAgentShrinkRequest({ });
|
|
3165
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
3166
|
+
if (!$dara.isNull(tmpReq.subTypes)) {
|
|
3167
|
+
request.subTypesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.subTypes, "subTypes", "json");
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3166
3170
|
let query : {[key: string ]: any} = { };
|
|
3167
3171
|
if (!$dara.isNull(request.pageNo)) {
|
|
3168
3172
|
query["pageNo"] = request.pageNo;
|
|
@@ -3172,6 +3176,10 @@ export default class Client extends OpenApi {
|
|
|
3172
3176
|
query["pageSize"] = request.pageSize;
|
|
3173
3177
|
}
|
|
3174
3178
|
|
|
3179
|
+
if (!$dara.isNull(request.subTypesShrink)) {
|
|
3180
|
+
query["subTypes"] = request.subTypesShrink;
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3175
3183
|
let req = new $OpenApiUtil.OpenApiRequest({
|
|
3176
3184
|
headers: headers,
|
|
3177
3185
|
query: OpenApiUtil.query(query),
|
|
@@ -26,7 +26,7 @@ export class AddChunkRequest extends $dara.Model {
|
|
|
26
26
|
* The chunk content to insert, passed as key-value pairs. For document search knowledge bases, use the following fixed key list:
|
|
27
27
|
* - content (**String**): **Required**. The body content of the chunk.
|
|
28
28
|
* - title (**String**): **Optional**. The title of the chunk.
|
|
29
|
-
* - image_urls (**Array**): **Optional**. Image URLs
|
|
29
|
+
* - image_urls (**Array**): **Optional**. Image URLs included in the chunk. A maximum of 10 images are supported.
|
|
30
30
|
*
|
|
31
31
|
* For data query and image Q&A knowledge bases, the keys are not fixed and are determined by the data source spreadsheet of the knowledge base. The key is the Excel column header, and the value is the corresponding column value.
|
|
32
32
|
*
|
|
@@ -26,7 +26,7 @@ export class AddChunkShrinkRequest extends $dara.Model {
|
|
|
26
26
|
* The chunk content to insert, passed as key-value pairs. For document search knowledge bases, use the following fixed key list:
|
|
27
27
|
* - content (**String**): **Required**. The body content of the chunk.
|
|
28
28
|
* - title (**String**): **Optional**. The title of the chunk.
|
|
29
|
-
* - image_urls (**Array**): **Optional**. Image URLs
|
|
29
|
+
* - image_urls (**Array**): **Optional**. Image URLs included in the chunk. A maximum of 10 images are supported.
|
|
30
30
|
*
|
|
31
31
|
* For data query and image Q&A knowledge bases, the keys are not fixed and are determined by the data source spreadsheet of the knowledge base. The key is the Excel column header, and the value is the corresponding column value.
|
|
32
32
|
*
|