diff options
| author | Zhineng Li <im@zhineng.li> | 2026-07-12 17:11:17 +0800 |
|---|---|---|
| committer | Zhineng Li <im@zhineng.li> | 2026-07-12 17:11:17 +0800 |
| commit | 1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 (patch) | |
| tree | 5f0857666365b7e40cdaa3733ebe1f3ba9e13c67 /data/en_us/bailian/2023-12-29/api-docs.php | |
| parent | 7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff) | |
| download | afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip | |
update APIs 20260712
Diffstat (limited to 'data/en_us/bailian/2023-12-29/api-docs.php')
| -rw-r--r-- | data/en_us/bailian/2023-12-29/api-docs.php | 12075 |
1 files changed, 6265 insertions, 5810 deletions
diff --git a/data/en_us/bailian/2023-12-29/api-docs.php b/data/en_us/bailian/2023-12-29/api-docs.php index 8f66272..2a71676 100644 --- a/data/en_us/bailian/2023-12-29/api-docs.php +++ b/data/en_us/bailian/2023-12-29/api-docs.php @@ -1,1059 +1,622 @@ <?php return [ 'version' => '1.0', - 'info' => [ - 'style' => 'ROA', - 'product' => 'bailian', - 'version' => '2023-12-29', - ], + 'info' => ['style' => 'ROA', 'product' => 'bailian', 'version' => '2023-12-29'], 'directories' => [ [ - 'id' => 260944, - 'title' => 'Application data', + 'children' => ['AddCategory', 'ListCategory', 'DeleteCategory', 'ApplyFileUploadLease', 'AddFile', 'AddFilesFromAuthorizedOss', 'ListFile', 'DescribeFile', 'UpdateFileTag', 'BatchUpdateFileTag', 'DeleteFile', 'DeleteFiles', 'GetParseSettings', 'GetAvailableParserTypes', 'ChangeParseSetting', 'AddTable', 'UpdateTableFromAuthorizedOss', 'AddConnector', 'GetConnector', 'UpdateConnector'], 'type' => 'directory', - 'children' => [ - 'ListFile', - 'DeleteCategory', - 'ListCategory', - 'AddCategory', - 'AddFile', - 'AddFilesFromAuthorizedOss', - 'ApplyFileUploadLease', - 'DeleteFile', - 'DescribeFile', - 'UpdateFileTag', - 'GetParseSettings', - 'GetAvailableParserTypes', - 'ChangeParseSetting', - ], + 'title' => 'Data connection (formerly application data)', ], [ - 'id' => 260955, - 'title' => 'Knowledge base', + 'children' => ['CreateIndex', 'GetIndexJobStatus', 'SubmitIndexJob', 'SubmitIndexAddDocumentsJob', 'Retrieve', 'ListIndexDocuments', 'ListIndexFileDetails', 'UpdateIndex', 'DeleteIndexDocument', 'ListIndices', 'DeleteIndex', 'ListChunks', 'UpdateChunk', 'DeleteChunk', 'GetIndexMonitor'], 'type' => 'directory', - 'children' => [ - 'CreateIndex', - 'GetIndexJobStatus', - 'SubmitIndexJob', - 'SubmitIndexAddDocumentsJob', - 'Retrieve', - 'ListIndexDocuments', - 'ListIndexFileDetails', - 'UpdateIndex', - 'DeleteIndexDocument', - 'ListIndices', - 'DeleteIndex', - 'ListChunks', - 'UpdateChunk', - 'DeleteChunk', - 'GetIndexMonitor', - ], + 'title' => 'Knowledge base', ], [ - 'id' => 260969, - 'title' => 'Prompt engineering', + 'children' => ['CreatePromptTemplate', 'DeletePromptTemplate'], 'type' => 'directory', - 'children' => [ - 'CreatePromptTemplate', - 'GetPromptTemplate', - 'UpdatePromptTemplate', - 'DeletePromptTemplate', - 'ListPromptTemplates', - 'ListPromptTemplates', - ], + 'title' => 'Prompt engineering', ], [ - 'id' => 260986, - 'title' => 'Others', - 'type' => 'directory', 'children' => [ [ - 'id' => 260975, - 'title' => 'Long term memory', + 'children' => ['CreateMemory', 'GetMemory', 'UpdateMemory', 'DeleteMemory', 'ListMemories', 'CreateMemoryNode', 'GetMemoryNode', 'UpdateMemoryNode', 'DeleteMemoryNode', 'ListMemoryNodes'], 'type' => 'directory', - 'children' => [ - 'CreateMemory', - 'GetMemory', - 'UpdateMemory', - 'DeleteMemory', - 'ListMemories', - 'CreateMemoryNode', - 'GetMemoryNode', - 'UpdateMemoryNode', - 'DeleteMemoryNode', - 'ListMemoryNodes', - ], + 'title' => 'Long-term memory (legacy)', ], 'GetAlipayTransferStatus', 'GetAlipayUrl', 'ApplyTempStorageLease', + 'DeleteConnector', + 'GetPromptTemplate', + 'ListPromptTemplates', + 'UpdatePromptTemplate', ], + 'type' => 'directory', + 'title' => 'Others', ], ], 'components' => [ 'schemas' => [], ], 'apis' => [ - 'ListFile' => [ - 'summary' => 'Queries the details of one or more documents in a specified category.', - 'path' => '/{WorkspaceId}/datacenter/files', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], + 'AddCategory' => [ + 'summary' => 'Creates a category in a specified workspace to classify and manage files. Each workspace supports a maximum of 500 categories.', + 'path' => '/{WorkspaceId}/datacenter/category/', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the category belongs. To view the workspace ID, click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.alibabacloud.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], + 'schema' => ['description' => 'The ID of the workspace where you want to create the category. For more information about how to obtain a workspace ID, see [Work with workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', 'title' => ''], ], [ - 'name' => 'CategoryId', - 'in' => 'query', - 'schema' => [ - 'description' => 'The category ID, which is the `CategoryId` returned by the [AddCategory](~~AddCategory~~) operation. To view the category ID, click the ID icon next to the category name on the Unstructured Data tab of the [Data Management](https://bailian.console.alibabacloud.com/#/data-center) page.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3510024405', - ], + 'name' => 'CategoryName', + 'in' => 'formData', + 'schema' => ['description' => 'The name of the category. The name must be 1 to 20 characters long. It can contain Unicode letters, such as English letters and Chinese characters, along with digits, colons (:), underscores (\\_), periods (.), and hyphens (-).', 'type' => 'string', 'required' => true, 'example' => '产品清单', 'title' => ''], ], [ - 'name' => 'NextToken', - 'in' => 'query', + 'name' => 'CategoryType', + 'in' => 'formData', 'schema' => [ - 'description' => '', + 'description' => 'The type of the category. Valid value:'."\n" + ."\n" + .'- UNSTRUCTURED: A category.', 'type' => 'string', - 'required' => false, - 'example' => 'AAAAAdH70eOCSCKtacdomNzak4U=', + 'required' => true, + 'example' => 'UNSTRUCTURED', + 'enum' => ['UNSTRUCTURED'], + 'title' => '', ], ], [ - 'name' => 'MaxResults', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', - ], + 'name' => 'ParentCategoryId', + 'in' => 'formData', + 'schema' => ['description' => 'The ID of the parent category under which the new category is created. If you leave this parameter empty, a top-level category is created.', 'type' => 'string', 'required' => false, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', 'title' => ''], ], [ - 'name' => 'FileName', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'name' => 'ConnectorId', + 'in' => 'formData', + 'schema' => ['description' => 'The ID of the connector instance. You can obtain the ID from the Alibaba Cloud Model Studio console.', 'type' => 'string', 'title' => '', 'required' => false, 'example' => 'conn_xxxx'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'description' => 'The response object.', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'success', - ], + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'success', 'title' => ''], 'Data' => [ - 'description' => 'The returned data.'."\n", + 'description' => 'The data returned.', 'type' => 'object', 'properties' => [ - 'FileList' => [ - 'description' => 'The list of documents in the category.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The document object.'."\n", - 'type' => 'object', - 'properties' => [ - 'CategoryId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3510024405', - ], - 'CreateTime' => [ - 'description' => '', - 'type' => 'string', - 'example' => '2023-08-18 11:03:35', - ], - 'FileId' => [ - 'description' => 'The document ID, which is the `FileId` parameter returned by the [AddFile](~~AddFile~~) operation. To view the ID, click the icon next to the file name on the [Data Management](https://bailian.console.alibabacloud.com/#/data-center) page.'."\n", - 'type' => 'string', - 'example' => 'file_5ff599b3455a45db8c41b0054b361518_10098576', - ], - 'FileName' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'auto-test-1721096109278.pdf', - ], - 'FileType' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'docx', - ], - 'Parser' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'DASHSCOPE_DOCMIND', - ], - 'SizeInBytes' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '512', - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], - 'Tags' => [ - 'description' => '', - 'type' => 'array', - 'items' => [ - 'description' => '', - 'type' => 'string', - 'example' => '', - ], - ], - ], - ], - ], - 'HasNext' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], - 'MaxResults' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '20', - ], - 'NextToken' => [ - 'description' => '', - 'type' => 'string', - 'example' => '4jzbJk9J6lNeuXD9hP0viA==', - ], - 'TotalCount' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '48', - ], + 'CategoryId' => ['description' => 'The ID of the category. Save this ID for future API calls that use this category.', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', 'title' => ''], + 'CategoryName' => ['description' => 'The name of the category.', 'type' => 'string', 'example' => '类目名称', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Requests throttling triggered.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '8F97A63B-55F1-527F-9D6E-467B6A7E8CF1', - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Requests throttling triggered.', 'title' => ''], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'The ID of the request.', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB'], + 'Status' => ['description' => 'The HTTP status code returned.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was successful. Valid values:'."\n" + ."\n" + .'- true: The request was successful.'."\n" + ."\n" + .'- false: The request failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"success\\",\\n \\"Data\\": {\\n \\"FileList\\": [\\n {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx\\",\\n \\"CreateTime\\": \\"2024-09-09 11:03:35\\",\\n \\"FileId\\": \\"file_5ff599b3455a45db8c41b0054b361518_xxxxxxxx\\",\\n \\"FileName\\": \\"product-overview.pdf\\",\\n \\"FileType\\": \\"docx\\",\\n \\"Parser\\": \\"DASHSCOPE_DOCMIND\\",\\n \\"SizeInBytes\\": 512,\\n \\"Status\\": \\"PARSE_SUCCESS\\",\\n \\"Tags\\": [\\n \\"tag-A\\"\\n ]\\n }\\n ],\\n \\"HasNext\\": true,\\n \\"MaxResults\\": 20,\\n \\"NextToken\\": \\"4jzbJk9J6lNeuXD9hP0viA==\\",\\n \\"TotalCount\\": 48\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'ListFile', - 'description' => '* 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](~~2848578~~). 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.'."\n" - .'* 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.'."\n" - .'* This operation is idempotent.'."\n" + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"success\\",\\n \\"Data\\": {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\",\\n \\"CategoryName\\": \\"类目名称\\"\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => 'Add Category', + 'description' => '- You cannot use an API to add data tables. To add data tables, go to the [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) page in the console.'."\n" ."\n" - .'**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.'."\n", - ], - 'DeleteCategory' => [ - 'summary' => 'Deletes a specified category permanently.', - 'path' => '/{WorkspaceId}/datacenter/category/{CategoryId}/', - 'methods' => [ - 'delete', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - 'riskType' => 'none', - 'chargeType' => 'free', - ], - 'parameters' => [ - [ - 'name' => 'CategoryId', - 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3510024405', - ], - ], - [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3AXoiweeTyTd03IN', - ], - ], - ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Data' => [ - 'description' => 'data', - 'type' => 'object', - 'properties' => [ - 'CategoryId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX', - ], - ], - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'workspace id is null or invalid.', - ], - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'success', - ], + .'- A RAM user must obtain the required [API permissions](~~2848578~~) for Alibaba Cloud Model Studio and [join a workspace](~~2851098~~) before calling this operation. The `AliyunBailianDataFullAccess` permission, which includes the `sfm:AddCategory` permission, is required. An Alibaba Cloud account can call this operation directly without requiring authorization. To call this operation, use the latest version of the [Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29).'."\n" + ."\n" + .'- This operation is not idempotent.'."\n" + ."\n" + .'**Rate limiting:** Frequent calls to this operation are subject to rate limiting. Do not exceed a frequency of 5 calls per second. If rate limiting is triggered, try again later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddCategory'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddCategory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Data\\": {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\"\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"workspace id is null or invalid.\\",\\n \\"Code\\": \\"success\\"\\n}","type":"json"}]', - 'title' => 'DeleteCategory', ], - 'ListCategory' => [ - 'summary' => 'Lists the details about the next or multiple categories in a specified workspace.', - 'path' => '/{WorkspaceId}/datacenter/categories', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'AddConnector' => [ + 'summary' => 'Creates a connector. This API currently supports only file connectors.', + 'path' => '/{WorkspaceId}/datacenter/connector', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], - ], - [ - 'name' => 'CategoryType', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'UNSTRUCTURED', - 'enum' => [ - 'UNSTRUCTURED', - ], - ], + 'schema' => ['description' => 'The ID of the workspace that contains the knowledge base.', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oxxxx', 'title' => ''], ], [ - 'name' => 'ParentCategoryId', + 'name' => 'ConnectorName', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX', - ], + 'schema' => ['description' => 'The name of the connector.', 'type' => 'string', 'required' => true, 'maxLength' => 20, 'minLength' => 1, 'title' => '', 'example' => 'test-connector'], ], [ - 'name' => 'NextToken', + 'name' => 'ConnectorType', 'in' => 'formData', 'schema' => [ - 'description' => '', + 'description' => 'The type of the connector.', 'type' => 'string', - 'required' => false, - 'example' => 'AAAAAdH70eOCSCKtacdomNzak4U=', + 'required' => true, + 'enum' => ['FILE'], + 'title' => '', + 'example' => 'FILE', ], ], [ - 'name' => 'MaxResults', + 'name' => 'Description', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'maximum' => '500', - 'minimum' => '0', - 'example' => '20', - ], + 'schema' => ['description' => 'The description for the connector.', 'type' => 'string', 'required' => true, 'maxLength' => 200, 'minLength' => 1, 'title' => '', 'example' => '文件连接器'], ], [ - 'name' => 'CategoryName', + 'name' => 'FileConnectorConfig', 'in' => 'formData', + 'style' => 'json', 'schema' => [ - 'type' => 'string', - ], - ], - ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'success', - ], - 'Data' => [ - 'description' => '', - 'type' => 'object', - 'properties' => [ - 'CategoryList' => [ - 'description' => '', - 'type' => 'array', - 'items' => [ - 'description' => '', - 'type' => 'object', - 'properties' => [ - 'CategoryId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX', - ], - 'CategoryName' => [ - 'description' => '', - 'type' => 'string', - 'example' => '', - ], - 'CategoryType' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'UNSTRUCTURED', - ], - 'IsDefault' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], - 'ParentCategoryId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'cate_addd11b1b79a74e8bbd675c356a91ee3XXXXXXXX', - ], - ], - ], - ], - 'HasNext' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], - 'MaxResults' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '20', - ], - 'NextToken' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'AAAAALHWGpGoYCcYMxiFfmlhvh7Z4G8jiXR6IjHYd+M9WQVJ', - ], - 'TotalCount' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '20', - ], - ], - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'workspace id is null or invalid.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'description' => '', + 'RegionId' => ['description' => 'The region of the bucket.', 'type' => 'string', 'title' => '', 'required' => false, 'example' => 'cn-hangzhou'], + 'BucketName' => ['description' => 'The name of the bucket.', 'type' => 'string', 'title' => '', 'required' => false, 'example' => 'zyb-docker-registry-jn'], + 'StorageType' => [ + 'description' => 'The file storage location. Valid values:<br>`OSS_CUSTOM`: Use your own Object Storage Service (OSS) bucket.<br>`OSS_PLATFORM`: Use the platform-provided OSS bucket.<br><br>', 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', + 'enum' => ['OSS_CUSTOM', 'OSS_PLATFORM'], + 'title' => '', + 'required' => false, + 'example' => 'OSS_CUSTOM', ], ], - ], - ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"success\\",\\n \\"Data\\": {\\n \\"CategoryList\\": [\\n {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\",\\n \\"CategoryName\\": \\"类目1\\",\\n \\"CategoryType\\": \\"UNSTRUCTURED\\",\\n \\"IsDefault\\": true,\\n \\"ParentCategoryId\\": \\"cate_addd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\"\\n }\\n ],\\n \\"HasNext\\": true,\\n \\"MaxResults\\": 20,\\n \\"NextToken\\": \\"AAAAALHWGpGoYCcYMxiFfmlhvh7Z4G8jiXR6IjHYd+M9WQVJ\\",\\n \\"TotalCount\\": 20\\n },\\n \\"Message\\": \\"workspace id is null or invalid.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'ListCategory', - ], - 'AddCategory' => [ - 'summary' => 'Creates a category in the specified workspace to categorize and manage documents. You can create up to 1,000 categories in each workspace.', - 'path' => '/{WorkspaceId}/datacenter/category/', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - ], - 'parameters' => [ - [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace, in which to create the new category. To view the workspace ID, click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.alibabacloud.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3AXoiweeTyTd03IN', - ], - ], - [ - 'name' => 'CategoryName', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '', - ], - ], - [ - 'name' => 'CategoryType', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'UNSTRUCTURED', - 'enum' => [ - 'UNSTRUCTURED', - ], - ], - ], - [ - 'name' => 'ParentCategoryId', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', + 'title' => '', + 'description' => 'The parameters for the file connector.', 'required' => false, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX', + 'example' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'success', - ], + 'Code' => ['description' => 'The error code. A value of `Success` indicates that the request succeeded.', 'type' => 'string', 'example' => 'Success', 'title' => ''], 'Data' => [ - 'description' => '', 'type' => 'object', 'properties' => [ - 'CategoryId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX', - ], - 'CategoryName' => [ - 'description' => '', - 'type' => 'string', - 'example' => '', - ], + 'ConnectorId' => ['description' => 'The ID of the connector.', 'type' => 'string', 'title' => '', 'example' => 'conn_file_e0c9db4030b2465a9478028f7d76cd92_1234'], ], + 'description' => 'The data returned by the operation.', + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Requests throttling triggered.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '778C0B3B-03C1-5FC1-A947-36EDD13606AB', - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Current file status does not support delete.', 'title' => ''], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'title' => '', 'example' => '35A267BF-FBFA-54DB-8394-AA3B0742D833'], + 'Status' => ['description' => 'The HTTP status code.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request succeeded. Valid values:'."\n" + ."\n" + .'- true: The request was successful.'."\n" + ."\n" + .'- false: The request failed.', 'type' => 'boolean', 'example' => 'true'."\n", 'title' => ''], ], + 'title' => '', + 'description' => 'The response object.', + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"success\\",\\n \\"Data\\": {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\",\\n \\"CategoryName\\": \\"类目名称\\"\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'AddCategory', - 'description' => '* You cannot use API to create structured table. To create a table, go to [Data Management](https://bailian.console.alibabacloud.com/#/data-center) in the console. You can associate a knowledge base with ApsaraDB for RDS to automatically update structured knowledge base. For more information, see [Knowledge base](~~2807740~~).'."\n" - .'* If you are using a RAM user, you must first obtain the OpenAPI management permissions (namely sfm:AddCategory) of Model Studio. For more information, see [Grant OpenAPI permissions to a RAM user](~~2848578~~). 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.'."\n" - .'* You can create up to 1,000 categories in each workspace.'."\n" - .'* This interface is not idempotent.'."\n" + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'AddConnector', + 'description' => '- To call this operation, a RAM user (sub-account) must first have the required [API permissions](~~2848578~~) for Model Studio and be a member of a [business space](~~2851098~~). This requires the `AliyunBailianDataFullAccess` policy, which includes the sfm:AddCategory permission. A primary account can call this operation directly without authorization. We recommend using the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this operation.'."\n" ."\n" - .'**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.'."\n", + .'- This operation is not idempotent.'."\n" + ."\n" + .'**Throttling:**'."\n" + .'Do not call this operation more than 5 times per second. If a request is throttled, try again later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddConnector', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Success\\",\\n \\"Data\\": {\\n \\"ConnectorId\\": \\"conn_file_e0c9db4030b2465a9478028f7d76cd92_1234\\"\\n },\\n \\"Message\\": \\"Current file status does not support delete.\\",\\n \\"RequestId\\": \\"35A267BF-FBFA-54DB-8394-AA3B0742D833\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', ], 'AddFile' => [ - 'summary' => 'Imports an unstructured document stored in the temporary storage space to Data Management. You cannot use the API to import structured documents. Use the console instead.', 'path' => '/{WorkspaceId}/datacenter/file', - 'methods' => [ - 'put', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['put'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'LeaseId', 'in' => 'formData', - 'schema' => [ - 'description' => 'The lease ID, which corresponds to the `FileUploadLeaseId` parameter returned by the [ApplyFileUploadLease](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation.', - 'type' => 'string', - 'required' => true, - 'example' => '68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847', - ], + 'schema' => ['description' => 'The upload lease ID, which corresponds to the `FileUploadLeaseId` returned by the **ApplyFileUploadLease** operation.', 'type' => 'string', 'required' => true, 'example' => '68abd1dea7b6404d8f7d7b9f7fbd332d.17166xxxxxxxx', 'title' => ''], ], [ 'name' => 'Parser', 'in' => 'formData', - 'schema' => [ - 'description' => 'The parser. Valid value:'."\n" - ."\n" - .'* DASHSCOPE_DOCMIND: Intelligent document parsing by Alibaba Cloud.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'DASHSCOPE_DOCMIND', - ], + 'schema' => ['description' => 'The parser type. Valid values:'."\n" + ."\n" + .'- DOCMIND: intelligent document parsing'."\n" + .'- DOCMIND_DIGITAL: electronic document parsing'."\n" + .'- DOCMIND_LLM_VERSION: large language model document parsing'."\n" + .'- DASH_QWEN_VL_PARSER: Qwen VL parsing'."\n" + .'- DOCMIND_LLM_VERSION_MEDIA: audio and video parsing'."\n" + .'- AUTO_SELECT: automatic parser selection'."\n" + ."\n" + .'<props="intl">'."\n" + .'<note>The uploaded file is parsed by using the currently specified parser. If you set this parameter to AUTO_SELECT, the parser configured for the category is used.</note>'."\n" + .'</props>'."\n" + ."\n" + .'<props="china">'."\n" + .'<note>When CategoryType is set to UNSTRUCTURED, the parser parses the uploaded file based on the data parsing settings of the current category.</note>'."\n" + .'<note>When CategoryType is set to SESSION_FILE, the system parses the file content by using the default method, which cannot be changed.</note>'."\n" + .'</props>', 'type' => 'string', 'required' => true, 'example' => 'AUTO_SELECT', 'title' => ''], ], [ 'name' => 'CategoryId', 'in' => 'formData', - 'schema' => [ - 'description' => 'The primary key ID of the category to which the document is uploaded. This parameter corresponds to the `CategoryId` returned by the [AddCategory](https://www.alibabacloud.com/help/eh/model-studio/developer-reference/api-bailian-2023-12-29-addcategory) operation. You can also click the ID icon next to the category name on the Unstructured Data tab of the [Application Data](https://modelstudio.console.alibabacloud.com/#/data-center) page to view the ID. You can set the parameter to default, which specifies the Default Category created by the system.', - 'type' => 'string', - 'required' => true, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3510024405', - ], + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'- When CategoryType is set to UNSTRUCTURED, set this parameter to the category ID of the uploaded file, which is the `CategoryId` returned by the **AddCategory** operation. You can also go to [Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center), click the File tab, and then click the ID icon next to the category name to obtain the category ID. You can set this parameter to default to use the system-created default category.'."\n" + ."\n" + .'- When CategoryType is set to SESSION_FILE, set this parameter to "default".'."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'Set this parameter to the category ID of the uploaded file, which is the `CategoryId` returned by the **AddCategory** operation. You can also go to [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center), click the File tab, and then click the ID icon next to the category name to obtain the category ID. You can set this parameter to default to use the system-created default category.'."\n" + .'</props>', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'title' => ''], ], [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the document is uploaded. On the [homepage](https://modelstudio.console.alibabacloud.com/?tab=playground#/efm/prompt) of the console, click the workspace Details icon in the upper-left corner to view the workspace ID.', - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3AXoiweeTyTd03IN', - ], + 'schema' => ['description' => 'The workspace ID. The file is uploaded to this workspace. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", 'title' => ''], ], [ 'name' => 'Tags', 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => 'A list of tags associated with the document. The default value is null, which means no tags. You can specify up to 10 tags.'."\n", + 'description' => '- The list of tags associated with the file. You can specify up to 100 tags, and the total character length of all tags cannot exceed 700.'."\n" + .'- Default value: empty, which means no tags are set.', 'type' => 'array', - 'items' => [ - 'description' => 'The tag of the document. A tag can be up to 12 characters in length and can contain letters, digits, digits, underscores (\\_), and hyphens (-).'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'Product Introduction'."\n", - ], + 'items' => ['description' => 'The tag of the file. Each tag can contain up to 32 characters. The tag supports characters in the Unicode letter category (including English letters, Chinese characters, and digits), underscores (_), and hyphens (-).', 'type' => 'string', 'required' => false, 'example' => '产品介绍', 'title' => ''], 'required' => false, - 'maxItems' => 32, + 'maxItems' => 100, 'minItems' => 1, + 'title' => '', + 'example' => '', ], ], [ 'name' => 'CategoryType', 'in' => 'formData', 'schema' => [ - 'description' => 'The type of the category. Valid values:'."\n" - .'- UNSTRUCTURED'."\n" - .'- SESSION_FILE', + 'description' => 'The category type. This parameter is optional. Default value: UNSTRUCTURED. Valid values:'."\n" + .'- UNSTRUCTURED: category used for building knowledge base scenarios.'."\n" + ."\n" + .'<props="china">'."\n" + .'- SESSION_FILE: file used for [session interaction](https://www.alibabacloud.com/help/en/model-studio/user-guide/file-interaction) in agent applications.'."\n" + .'<note>When using `SESSION_FILE`, set the CategoryType parameter to `SESSION_FILE` when calling the ApplyFileUploadLease operation as well.</note>'."\n" + .'<note>The file is valid only for the current user session. After the user closes the session, the file expires. The maximum validity period is 7 days. Long-term storage is not supported.</note>'."\n" + .'</props>', 'type' => 'string', + 'default' => 'UNSTRUCTURED', + 'enum' => ['UNSTRUCTURED', 'SESSION_FILE'], 'required' => false, 'example' => 'UNSTRUCTURED', - 'default' => 'UNSTRUCTURED', - 'enum' => [ - 'UNSTRUCTURED', - 'SESSION_FILE', - ], + 'title' => '', ], ], [ 'name' => 'OriginalFileUrl', 'in' => 'formData', + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'Specifies a URL for the file. The system records this URL when building a [document search knowledge base](~~2807740~~). When you use the Alibaba Cloud Model Studio console to interact with an [agent application](~~2842749~~), this URL is returned with the retrieval results of the file through the `docUrl` field.'."\n" + ."\n" + .'> The agent application must have **Knowledge Base** enabled and the **Show answer sources** feature turned on. Otherwise, this parameter does not take effect.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'Specifies a URL for the file. The system records this URL when building a [document search knowledge base](~~2807740~~). When you use the Alibaba Cloud Model Studio console to interact with an [agent application](~~2842749~~), this URL is returned with the retrieval results of the file through the `docUrl` field.'."\n" + ."\n" + .'> The agent application must have **Knowledge Base** enabled and the **Show answer sources** feature turned on. Otherwise, this parameter does not take effect.'."\n" + ."\n" + .'</props>', 'type' => 'string', 'required' => false, 'example' => 'www.test.com/111.docx', 'title' => ''], + ], + [ + 'name' => 'ParserConfig', + 'in' => 'formData', + 'style' => 'json', 'schema' => [ - 'description' => '', - 'type' => 'string', + 'title' => '', + 'description' => 'The parser configuration. This parameter is required only when the parser type is set to Qwen VL parsing.', + 'type' => 'object', + 'properties' => [ + 'ModelName' => [ + 'title' => '', + 'description' => 'The model name.', + 'type' => 'string', + 'example' => 'qwen-vl-max', + 'enum' => ['qwen-vl-max', 'qwen-vl-plus', 'qwen3-vl-plus'], + 'required' => false, + ], + 'ModelPrompt' => ['title' => '', 'description' => 'The prompt used when calling Qwen VL parsing.', 'type' => 'string', 'example' => '#角色'."\n" + .'你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。'."\n" + .'# 任务目标'."\n" + .'请结合输入图片,详细描述图片中的内容。', 'maxLength' => 1500, 'minLength' => 1, 'required' => false], + ], 'required' => false, - 'example' => 'https://thisistest.com/abc.pdf', + 'example' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'DataCenter.FileTooLarge', - ], + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'DataCenter.FileTooLarge', 'title' => ''], 'Data' => [ - 'description' => 'The returned data fields.'."\n", + 'description' => 'The data field returned by the operation.', 'type' => 'object', 'properties' => [ - 'FileId' => [ - 'description' => 'The primary key ID of the document. We recommend that you store the ID because it is required for all subsequent API operations related to this document.'."\n", - 'type' => 'string', - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX', - ], - 'Parser' => [ - 'description' => 'The parser that is used to parse the document. Valid value:'."\n" - ."\n" - .'* DASHSCOPE_DOCMIND: Intelligent document parsing by Alibaba Cloud.'."\n", - 'type' => 'string', - 'example' => 'DASHSCOPE_DOCMIND', - ], + 'FileId' => ['description' => 'The file ID. Keep this value safe because it is used in all subsequent API operations related to this file.', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], + 'Parser' => ['description' => 'The parser type used to parse the file. Valid values:'."\n" + .'- DASHSCOPE_DOCMIND: Alibaba Cloud intelligent document parsing.', 'type' => 'string', 'example' => 'DASHSCOPE_DOCMIND', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'User not authorized to operate on the specified resource.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', - ], - 'Status' => [ - 'description' => 'The HTTP status code.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'string', - 'example' => 'true', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB'], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the call was successful. Valid values:'."\n" + .'- true: The call was successful.'."\n" + .'- false: The call failed.', 'type' => 'string', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"DataCenter.FileTooLarge\\",\\n \\"Data\\": {\\n \\"FileId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\",\\n \\"Parser\\": \\"DASHSCOPE_DOCMIND\\"\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource.\\",\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","type":"json"}]', - 'title' => 'AddFile', - 'description' => '* Before you call this operation, make sure that you have obtained the lease and uploaded the document to the temporary storage space by using the [ApplyFileUploadLease](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation. For more information, see [Upload files by calling API](https://www.alibabacloud.com/help/en/model-studio/developer-reference/upload-files-by-calling-api).'."\n" + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Add file', + 'summary' => 'Imports a file from the temporary storage of Alibaba Cloud Model Studio into an Alibaba Cloud Model Studio data connection (formerly known as application data).', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:AddFile permission), and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Invoke this operation by using the latest <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>.'."\n" ."\n" - .'> After you call this operation, the used lease ID expires immediately. Do not use the same lease ID to submit new requests.'."\n" + .'- This operation is not idempotent.'."\n" ."\n" - .'* You must call this operation within 12 hours after you call the [ApplyFileUploadLease](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-applyfileuploadlease) operation. Otherwise, the lease expires and the request fails.'."\n" - .'* After you call this operation, the system parses and imports your document. The process takes some time.'."\n" - .'* This interface is not idempotent.', + .'**Throttling:**'."\n" + .'This operation is subject to throttling. Do not exceed 10 calls per second. If you are throttled, retry later.', + 'changeSet' => [ + ['createdAt' => '2025-09-28T10:20:10.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-05-08T07:51:53.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-12-26T07:33:02.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-09-18T08:46:20.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddFile'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"DataCenter.FileTooLarge\\",\\n \\"Data\\": {\\n \\"FileId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\",\\n \\"Parser\\": \\"DASHSCOPE_DOCMIND\\"\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource.\\",\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","type":"json"}]', ], 'AddFilesFromAuthorizedOss' => [ - 'summary' => '将已授权OSS Bucket中的文件添加到百炼应用数据', 'path' => '/{WorkspaceId}/datacenter/file/fromoss', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - 'autoTest' => true, - 'tenantRelevance' => 'tenant', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-3z7uw7fwz0vxxxx', - ], + 'schema' => ['description' => 'The workspace ID. Files are imported into this workspace. For more information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', 'title' => ''], ], [ 'name' => 'CategoryId', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', - ], + 'schema' => ['description' => 'The ID of the category to which the files are imported. This is the `CategoryId` returned by the AddCategory operation. You can also obtain the category ID by clicking the ID icon next to the category name on the <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center) - Files tab</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) - Files tab</props>. You can pass in `default` to use the system-created default category.', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'title' => ''], ], [ 'name' => 'CategoryType', 'in' => 'formData', 'schema' => [ - 'description' => '', + 'description' => 'The category type. Optional. Default value: UNSTRUCTURED. Valid values:'."\n" + .'- UNSTRUCTURED: category for building knowledge base scenarios.'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'> This operation does not support importing SESSION_FILE for agent application [conversation interaction](https://www.alibabacloud.com/help/en/model-studio/user-guide/file-interaction). Use the **AddFile** operation to upload SESSION_FILE from a local source.'."\n" + ."\n" + .'</props>', + 'enumValueTitles' => ['UNSTRUCTURED' => 'UNSTRUCTURED'], 'type' => 'string', 'required' => true, - 'enumValueTitles' => [ - 'UNSTRUCTURED' => 'UNSTRUCTURED', - ], + 'enum' => ['UNSTRUCTURED', 'SESSION_FILE'], 'example' => 'UNSTRUCTURED', - 'enum' => [ - 'UNSTRUCTURED', - 'SESSION_FILE', - ], + 'title' => '', ], ], [ 'name' => 'OssRegionId', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'cn-beijing', - ], + 'schema' => ['description' => 'The region ID of the OSS bucket. For more information, see [OSS regions and endpoints](~~31837~~).', 'type' => 'string', 'required' => true, 'example' => 'cn-beijing', 'title' => ''], ], [ 'name' => 'OssBucketName', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'bucketNamexxxxx', - ], + 'schema' => ['description' => 'The name of the OSS bucket. For more information, see [Buckets](~~177682~~).', 'type' => 'string', 'required' => true, 'example' => 'bucketNamexxxxx', 'title' => ''], ], [ 'name' => 'FileDetails', 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => '', + 'description' => 'The list of files to import. A maximum of 10 files can be uploaded at a time.'."\n" + .'> A maximum of 10 files can be uploaded at a time.'."\n" + .'>', 'type' => 'array', 'items' => [ - 'description' => '', + 'description' => 'The file object.', 'type' => 'object', 'properties' => [ - 'FileName' => [ - 'description' => '', + 'FileName' => ['description' => 'The name of the file to import. The file name must include the file format extension.'."\n" + .'- Supported formats: pdf, docx, doc, txt, md, pptx, ppt, xlsx, xls, html, png, jpg, jpeg, bmp, and gif.'."\n" + .'- The file name must be 4 to 128 characters in length.'."\n" + .'- For file upload requirements and limits, see [Knowledge base quotas and limits](~~2880605~~).'."\n" + ."\n" + .'><notice>If the name of the imported file is the same as an existing file in the knowledge base, the operation still returns a `Status` of `SUCCESS`, but the file is not actually imported. The existing file with the same name remains unchanged. Make sure that each imported file name is unique.></notice>'."\n" + .'> To create a data table and upload data, use the Model Studio console. This is not supported through the API.', 'type' => 'string', 'required' => true, 'maxLength' => 500, 'minLength' => 1, 'example' => 'this_is_temp_xxxx.pdf', 'title' => ''], + 'OssKey' => ['description' => 'The key of the file in the OSS bucket. For more information, see [Object naming conventions](~~273129~~).', 'type' => 'string', 'required' => true, 'maxLength' => 256, 'minLength' => 1, 'example' => 'root/path/this_is_temp_xxxx.pdf', 'title' => ''], + 'Parser' => [ + 'title' => '', + 'description' => 'The parser type. Valid values:'."\n" + ."\n" + .'- DOCMIND: intelligent document parsing.'."\n" + .'- DOCMIND_DIGITAL: electronic document parsing.'."\n" + .'- DOCMIND_LLM_VERSION: LLM-based document parsing.'."\n" + .'- DASH_QWEN_VL_PARSER: Qwen VL parsing.'."\n" + .'- DOCMIND_LLM_VERSION_MEDIA: audio and video parsing.'."\n" + .'- AUTO_SELECT: automatic parser selection.'."\n" + ."\n" + .'<props="intl">'."\n" + .'<note>The uploaded file is parsed by using the specified parser. If you set this parameter to AUTO_SELECT, the parser configured for the category is used.</note>'."\n" + .'</props>'."\n" + ."\n" + .'<props="china">'."\n" + .'<note>When CategoryType is UNSTRUCTURED, the parser parses the uploaded file based on the data parsing settings of the current category.</note>'."\n" + .'<note>When CategoryType is SESSION_FILE, the system uses the default method (which cannot be changed) to parse the file content.</note>'."\n" + .'</props>', 'type' => 'string', - 'required' => true, - 'example' => 'this_is_temp_xxxx.pdf', - 'maxLength' => 500, - 'minLength' => 1, + 'required' => false, + 'example' => 'AUTO_SELECT', + 'default' => 'AUTO_SELECT', + 'enum' => ['DOCMIND', 'DOCMIND_DIGITAL', 'DOCMIND_LLM_VERSION', 'DASH_QWEN_VL_PARSER', 'DOCMIND_LLM_VERSION_MEDIA', 'AUTO_SELECT'], ], - 'OssKey' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'root/path/this_is_temp_xxxx.pdf', - 'maxLength' => 256, - 'minLength' => 1, + 'ParserConfig' => [ + 'title' => '', + 'description' => 'The parser configuration. This parameter is required only when the parser type is set to Qwen VL parsing.', + 'type' => 'object', + 'properties' => [ + 'ModelName' => [ + 'title' => '', + 'description' => 'The model name.', + 'type' => 'string', + 'example' => 'qwen-vl-max', + 'enum' => ['qwen-vl-max', 'qwen-vl-plus', 'qwen3-vl-plus'], + 'required' => false, + ], + 'ModelPrompt' => ['title' => '', 'description' => 'The prompt used when calling Qwen VL parsing.', 'type' => 'string', 'example' => '#角色'."\n" + .'你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。'."\n" + .'# 任务目标'."\n" + .'请结合输入图片,详细描述图片中的内容。', 'maxLength' => 1000, 'minLength' => 1, 'required' => false], + ], + 'required' => false, + 'example' => '', ], ], 'required' => true, + 'title' => '', + 'example' => '', ], 'required' => true, 'maxItems' => 10, 'minItems' => 1, + 'title' => '', + 'example' => '', ], ], [ @@ -1061,448 +624,463 @@ 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => '', + 'title' => '', + 'description' => 'The list of tags associated with the file. Default value: empty, which means the file is not associated with any tags. A maximum of 10 tags can be specified.', 'type' => 'array', - 'items' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'items' => ['description' => 'The tag of the file. Each tag can be up to 12 characters in length and supports characters in the Unicode letter category (including English letters, Chinese characters, and digits), underscores (_), and hyphens (-).', 'type' => 'string', 'required' => false, 'example' => '产品介绍', 'title' => ''], 'required' => false, + 'example' => '', ], ], [ 'name' => 'OverWriteFileByOssKey', 'in' => 'formData', - 'schema' => [ - 'title' => '是否按照osossKey覆盖类目中的相同文件', - 'type' => 'boolean', - ], + 'schema' => ['title' => '', 'description' => 'Specifies whether to overwrite files with the same OssKey in the category. Default value: false, which means files are not overwritten.', 'type' => 'boolean', 'required' => false, 'example' => 'false'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'success', - ], + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'success', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The data field returned by the operation.', 'type' => 'object', 'properties' => [ 'AddFileResultList' => [ - 'description' => '', + 'description' => 'The list of file import results.', 'type' => 'array', 'items' => [ + 'description' => 'The list of file import results.', 'type' => 'object', 'properties' => [ - 'FileId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'file_809f469a59ac449586ec692576xxxxx_102248XXX', - ], - 'OssKey' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'root/path/this_is_temp_xxxx.pdf', - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'success', - ], - 'Msg' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'size too large', - ], + 'FileId' => ['description' => 'The file ID. Keep this value safe because it is required for all subsequent API operations related to this file.', 'type' => 'string', 'example' => 'file_809f469a59ac449586ec692576xxxxx_102248XXX', 'title' => ''], + 'OssKey' => ['description' => 'The key of the imported file in the OSS bucket.', 'type' => 'string', 'example' => 'root/path/this_is_temp_xxxx.pdf', 'title' => ''], + 'Status' => ['description' => 'The file import status. Valid values:'."\n" + ."\n" + .'- SUCCESS: The import to application data is complete.'."\n" + .'- FAILED: The import to application data failed.'."\n" + ."\n" + .'> Only files with a SUCCESS status can be used to create or update a knowledge base.'."\n" + .'>', 'type' => 'string', 'example' => 'SUCCESS', 'title' => ''], + 'Msg' => ['description' => 'The error message returned when the file import fails.', 'type' => 'string', 'example' => 'size too large', 'title' => ''], ], + 'title' => '', + 'example' => '', ], + 'title' => '', + 'example' => '', ], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Cant find out category for category_id param.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'true', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Cant find out category for category_id param.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the call was successful. Valid values:'."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'string', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Import files from an authorized OSS bucket', + 'summary' => 'Imports files from an authorized OSS bucket into Alibaba Cloud Model Studio application data.', + 'description' => '- Make sure the OSS bucket belongs to the same Alibaba Cloud account as Model Studio and that authorization has been completed as described in [Importing data from OSS configuration instructions](~~2782155~~).'."\n" + .' '."\n" + .' - Supported bucket storage types do not include Archive, Cold Archive, or Deep Cold Archive. Buckets with content encryption enabled are supported. Buckets with public read/write, public read, or private access are supported.'."\n" + .' - To use a bucket with [Referer-based hotlink protection](~~2636937~~) enabled, add the domain name `*.console.aliyun.com` to the Referer whitelist as described in [Allow access only from trusted websites](~~2636937~~).'."\n" + ."\n" + .'- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Model Studio (the `AliyunBailianDataFullAccess` permission is required, which includes the sfm:AddFilesFromAuthorizedOss permission) and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Call this operation by using the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>.'."\n" + .'- This operation does not have idempotence.'."\n" + ."\n" + .'**Rate limit:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 5 calls per second. If throttled, retry later.', + 'changeSet' => [ + ['createdAt' => '2025-09-10T05:36:04.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-08-22T09:15:24.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddFilesFromAuthorizedOss'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddFilesFromAuthorizedOss', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"success\\",\\n \\"Data\\": {\\n \\"AddFileResultList\\": [\\n {\\n \\"FileId\\": \\"file_809f469a59ac449586ec692576xxxxx_102248XXX\\",\\n \\"OssKey\\": \\"root/path/this_is_temp_xxxx.pdf\\",\\n \\"Status\\": \\"SUCCESS\\",\\n \\"Msg\\": \\"size too large\\"\\n }\\n ]\\n },\\n \\"Message\\": \\"Cant find out category for category_id param.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","type":"json"}]', ], - 'ApplyFileUploadLease' => [ - 'summary' => 'Applies for a document upload lease to upload a document. You cannot use the API to upload structured documents. Use the console instead.', - 'path' => '/{WorkspaceId}/datacenter/category/{CategoryId}', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'AddTable' => [ + 'summary' => 'Add a table for the table data connector.', + 'path' => '/{WorkspaceId}/datacenter/table', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'CategoryId', + 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The primary key ID of the category to which the uploaded document belongs. You can click the ID icon next to the category name on the Unstructured Data tab of the [Data Management](https://bailian.console.aliyun.com/#/data-center) page to view the ID. You can set the parameter to default, which specifies the Default Category created by the system.', - 'type' => 'string', - 'required' => true, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3510024405', - ], + 'schema' => ['description' => 'The ID of the workspace to which the file belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", 'title' => ''], ], [ - 'name' => 'FileName', + 'name' => 'TableName', 'in' => 'formData', - 'schema' => [ - 'description' => 'The name of the uploaded document, including the extension. Supported formats: pdf, doc, docx, md, txt, ppt, and pptx. The document name must be 4 to 128 characters in length.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '', - ], + 'schema' => ['description' => 'The table name.', 'type' => 'string', 'required' => true, 'maxLength' => 64, 'minLength' => 1, 'example' => 'ads_wjjr_basc_enterprise_di', 'title' => ''], ], [ - 'name' => 'Md5', + 'name' => 'TableDesc', 'in' => 'formData', - 'schema' => [ - 'description' => 'The MD5 value of the uploaded document. This parameter is verified by the server (not in the current version).'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '19657c391f6c70bcea63c154d8606bb3', - 'maxLength' => 64, - 'minLength' => 1, - ], + 'schema' => ['title' => '', 'description' => 'The table description.', 'type' => 'string', 'required' => false, 'maxLength' => 200, 'minLength' => 1, 'example' => 'table description'], ], [ - 'name' => 'SizeInBytes', + 'name' => 'ConnectorId', 'in' => 'formData', - 'schema' => [ - 'description' => 'The size of the uploaded document, in bytes. This parameter is verified by the server (not in the current version). Valid values: 1 to 100000000.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '1000', - ], + 'schema' => ['description' => 'The connector ID.', 'type' => 'string', 'required' => true, 'example' => 'connector-d51861492df64257', 'title' => ''], ], [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the uploaded document belongs. On the [homepage](https://bailian.console.aliyun.com/knowledge-base#/home) of the console, click the workspace Details icon in the upper-left corner to view the workspace ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3AXoiweeTyTd03IN', - ], - ], - [ - 'name' => 'CategoryType', + 'name' => 'TableColumns', 'in' => 'formData', + 'style' => 'json', 'schema' => [ - 'type' => 'string', - 'default' => 'UNSTRUCTURED', - 'enum' => [ - 'UNSTRUCTURED', - 'SESSION_FILE', + 'title' => '', + 'description' => 'The column information of the table.', + 'type' => 'array', + 'items' => [ + 'title' => '', + 'description' => 'The information of a single column.', + 'type' => 'object', + 'properties' => [ + 'ColumnName' => ['title' => '', 'description' => 'The column name.', 'type' => 'string', 'required' => true, 'maxLength' => 15, 'minLength' => 1, 'example' => 'column1'], + 'ColumnDesc' => ['title' => '', 'description' => 'The column description.', 'type' => 'string', 'required' => false, 'maxLength' => 15, 'minLength' => 0, 'example' => 'desc'], + 'DataType' => [ + 'title' => '', + 'description' => 'The data type.', + 'type' => 'string', + 'required' => true, + 'example' => 'string', + 'default' => 'string', + 'enum' => ['string', 'double', 'long', 'datetime', 'image_url'], + ], + ], + 'required' => true, + 'example' => '', ], - ], - ], - [ - 'name' => 'UseInternalEndpoint', - 'in' => 'formData', - 'schema' => [ - 'type' => 'boolean', - 'default' => 'false', + 'required' => true, + 'minItems' => 1, + 'example' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'DataCenter.FileTooLarge', - ], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'Index.Forbidden', 'title' => ''], 'Data' => [ - 'description' => 'The returned data fields.'."\n", + 'description' => 'The returned data.', 'type' => 'object', 'properties' => [ - 'FileUploadLeaseId' => [ - 'description' => 'The unique ID of the lease.', - 'type' => 'string', - 'example' => '1e6a159107384782be5e45ac4759b247.1719325231035', - ], - 'Param' => [ - 'description' => 'The HTTP request parameters used to upload the document.'."\n", - 'type' => 'object', - 'properties' => [ - 'Headers' => [ - 'description' => 'The key-value pair to be placed in the Header. Both the key and the value are strings.'."\n", - 'type' => 'any', - 'example' => ' "X-bailian-extra": "MTAwNTQyNjQ5NTE2OTE3OA==",'."\n" - .' "Content-Type": "application/pdf"', - ], - 'Method' => [ - 'description' => 'The HTTP call method. Valid values:'."\n" - ."\n" - .'* PUT'."\n" - .'* POST'."\n", - 'type' => 'string', - 'example' => 'PUT', - ], - 'Url' => [ - 'description' => 'The upload URL of the document.'."\n", - 'type' => 'string', - 'example' => 'https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D', - ], - ], - ], - 'Type' => [ - 'description' => 'The upload method of the document. Valid values:'."\n" - ."\n" - .'* OSS.PreSignedURL'."\n" - .'* HTTP'."\n", - 'type' => 'string', - 'example' => 'HTTP', - ], + 'TableId' => ['description' => 'The table ID.', 'type' => 'string', 'example' => 'table_b6ddc67e7df14db38b74ef5e2e0fe24e_12792097', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'User not authorized to operate on the specified resource', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', - ], - 'Status' => [ - 'description' => 'The HTTP status code.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '778C0B3B-03C1-5FC1-A947-36EDD13606AB'], + 'Status' => ['description' => 'The status code returned by the interface.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the API call was successful. Valid values:'."\n" + ."\n" + .'- true: The call was successful.'."\n" + .'- false: The call failed.', 'type' => 'boolean', 'example' => 'True', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'AddTable', + 'description' => '- RAM users (sub-accounts) must first obtain the [API permissions](~~2848578~~) for Chinese China Bailian (requires `AliyunBailianDataFullAccess`, which includes the sfm:AddTable permission), and [join a workspace](~~2851098~~) before calling this API. Alibaba Cloud accounts (primary accounts) can call this API directly without authorization. We recommend that you call this API by using the latest <props="china">[Chinese China Bailian SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Chinese China Bailian SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>.'."\n" + ."\n" + .'- This API is not idempotent.'."\n" + ."\n" + .'**Throttling:**'."\n" + .'This API is subject to throttling when called frequently. Do not exceed 10 calls per second. If throttling is triggered, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddTable', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"DataCenter.FileTooLarge\\",\\n \\"Data\\": {\\n \\"FileUploadLeaseId\\": \\"1e6a159107384782be5e45ac4759b247.1719325231035\\",\\n \\"Param\\": {\\n \\"Headers\\": \\"\\\\\\"X-bailian-extra\\\\\\":\\\\\\"MTAwNTQyNjQ5NTE2OTE3OA==\\\\\\",\\\\n\\\\\\"Content-Type\\\\\\":\\\\\\"application/pdf\\\\\\"\\",\\n \\"Method\\": \\"PUT\\",\\n \\"Url\\": \\"https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D\\"\\n },\\n \\"Type\\": \\"HTTP\\"\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource\\",\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'ApplyFileUploadLease', - 'description' => '* This operation returns an HTTP URL that can be used to upload an unstructured document (the lease) and parameters required for the upload. Structured documents are not supported.'."\n" - .'* The HTTP URL returned by this operation is valid only for minutes. Upload the document before the URL expires.'."\n" - .'* After you apply for a lease and upload a document, the document is stored in a temporary storage space for 12 hours. '."\n" - .'* This interface is not idempotent.', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.Forbidden\\",\\n \\"Data\\": {\\n \\"TableId\\": \\"table_b6ddc67e7df14db38b74ef5e2e0fe24e_12792097\\"\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"778C0B3B-03C1-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', ], - 'DeleteFile' => [ - 'summary' => 'Deletes a specified unstructured document permanently. You cannot use the API to delete structured documents, see the Usage notes section of this topic.', - 'path' => '/{WorkspaceId}/datacenter/file/{FileId}/', - 'methods' => [ - 'delete', - ], - 'schemes' => [ - 'https', - ], + 'ApplyFileUploadLease' => [ + 'summary' => 'Request an upload lease for uploading knowledge base files or files for agent application conversational interactions.', + 'path' => '/{WorkspaceId}/datacenter/category/{CategoryId}', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'FileId', + 'name' => 'CategoryId', 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX', - ], + 'schema' => ['description' => 'When uploading files for building a [knowledge base](~~2807740~~):'."\n" + ."\n" + .'- This field represents the category ID to which the uploaded file belongs, which is the `CategoryId` returned by the **AddCategory** API. You can also obtain it by clicking the ID icon next to the category name in <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center) - Files tab</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) - Files tab</props>. You can pass in default here to use the system-created "Default Category".'."\n" + .'> To create a new data table and upload data, use the Alibaba Cloud Model Studio console. This is not supported through the API.'."\n" + .'>'."\n" + .'<props="china">'."\n" + .'When uploading files for agent application [conversational interactions](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction):'."\n" + ."\n" + .'- You can simply pass in default here. The system will automatically create or match a default category. Dynamic file category APIs and console management pages will be available in the future.'."\n" + .'</props>', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'title' => ''], + ], + [ + 'name' => 'FileName', + 'in' => 'formData', + 'schema' => ['description' => 'When uploading files for building a [knowledge base](~~2807740~~):'."\n" + .'- This field represents the name of the uploaded file. The file name must include the file format extension. Supported formats:'."\n" + .' - Documents (less than 150 MB): doc, docx, wps, ppt, pptx, xls, xlsx, md, txt, pdf, epub, mobi.'."\n" + .' - Spreadsheets (recommended within 10 MB and 100,000 rows): xls, xlsx.'."\n" + .' - Plain text (recommended not to exceed 10 MB): md, txt.'."\n" + .' - Images (less than 20 MB, shortest side > 15 px, longest side < 8192 px, aspect ratio < 50): png, jpg, jpeg, bmp, gif.'."\n" + .' - Audio: aac, amr, flac, flv, m4a, mp3, mpeg, ogg, opus, wav, webm, wma.'."\n" + .' - Video: mp4, mkv, avi, mov, wmv.'."\n" + .'- The file name must be 4 to 128 characters in length. For other limits, see [Knowledge base quotas and limits](~~2880605~~).'."\n" + .'> To create a new data table and upload data, use the Alibaba Cloud Model Studio console. This is not supported through the API.'."\n" + .'>'."\n" + .'<props="china">'."\n" + .'When uploading files for agent application [conversational interactions](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction):'."\n" + ."\n" + .'- This field represents the name of the uploaded file. The file name must include the file format extension. Supported formats:'."\n" + .' - Documents: doc, docx, wps, ppt, pptx, xls, xlsx, md, txt, pdf, epub, mobi.'."\n" + .' - Images: png, jpg, jpeg, bmp, gif.'."\n" + .' - Audio: aac, amr, flac, flv, m4a, mp3, mpeg, ogg, opus, wav, webm, wma.'."\n" + .' - Video: mp4, mkv, avi, mov, wmv.'."\n" + .'- The file name must be 4 to 128 characters in length.'."\n" + .'</props>', 'type' => 'string', 'required' => true, 'example' => 'XXXX产品清单.pdf', 'title' => ''], + ], + [ + 'name' => 'Md5', + 'in' => 'formData', + 'schema' => ['description' => 'The MD5 value of the uploaded file. The server will verify this field (currently not enabled). Please fill in the correct value.', 'type' => 'string', 'required' => true, 'maxLength' => 64, 'minLength' => 1, 'example' => '19657c391f6c70bcea63c154d8606bb3', 'title' => ''], + ], + [ + 'name' => 'SizeInBytes', + 'in' => 'formData', + 'schema' => ['description' => 'The size of the uploaded file in bytes. The server will verify this field (currently not enabled). Please fill in the correct value. Valid values: 1 B to 100 MB.', 'type' => 'string', 'required' => true, 'example' => '1000', 'title' => ''], ], [ 'name' => 'WorkspaceId', 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the uploaded file belongs. For information about how to obtain the workspace ID, see [How to use workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', 'title' => ''], + ], + [ + 'name' => 'CategoryType', + 'in' => 'formData', 'schema' => [ - 'description' => '', + 'description' => 'The category type. If this parameter is not specified, the default value is UNSTRUCTURED. Valid values:'."\n" + ."\n" + .'UNSTRUCTURED: category for building [knowledge base](~~2807740~~) scenarios.'."\n" + .'<props="china">'."\n" + .'SESSION_FILE: upload files for agent application [conversational interactions](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction).'."\n" + .'</props>'."\n" + ."\n" + .'> To create a new data table and upload data, use the Alibaba Cloud Model Studio console. This is not supported through the API.'."\n" + .'>', 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', + 'default' => 'UNSTRUCTURED', + 'enum' => ['UNSTRUCTURED', 'SESSION_FILE'], + 'required' => false, + 'example' => 'UNSTRUCTURED', + 'title' => '', + ], + ], + [ + 'name' => 'UseInternalEndpoint', + 'in' => 'formData', + 'schema' => [ + 'description' => '<props="china">'."\n" + ."\n" + .'If you have enabled [Alibaba Cloud Model Studio secure storage](https://help.aliyun.com/zh/model-studio/configure-resources-in-private-network) and need to generate a lease URL that is only accessible from the Alibaba Cloud internal network in the same region, you can set this parameter to true to improve security. If this parameter is not specified, the default value is false, which generates a publicly accessible lease URL.'."\n" + .'> If you have not enabled Alibaba Cloud Model Studio secure storage, or are unsure whether you are using it, do not set this parameter to true (upload will fail).'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'If you have enabled Alibaba Cloud Model Studio secure storage and need to generate a lease URL that is only accessible from the Alibaba Cloud internal network in the same region, you can set this parameter to true to improve security. If this parameter is not specified, the default value is false, which generates a publicly accessible lease URL.'."\n" + .'> If you have not enabled Alibaba Cloud Model Studio secure storage, or are unsure whether you are using it, do not set this parameter to true (upload will fail).'."\n" + .'</props>', + 'enumValueTitles' => [], + 'type' => 'boolean', + 'default' => 'false', + 'required' => false, + 'example' => 'false', + 'title' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'InvalidParameter', - ], + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'DataCenter.FileTooLarge', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The data returned.', 'type' => 'object', 'properties' => [ - 'FileId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX', + 'FileUploadLeaseId' => ['description' => 'The unique ID of the lease. You need to use this parameter when you call the **AddFile** API.', 'type' => 'string', 'example' => '1e6a159107384782be5e45ac4759b247.1719325231035', 'title' => ''], + 'Param' => [ + 'description' => 'The HTTP request parameters for uploading the file.', + 'type' => 'object', + 'properties' => [ + 'Headers' => ['description' => 'Key-value pairs that need to be included in the header. Both keys and values are strings.'."\n" + ."\n" + .'> The returned Content-Type may be empty. You can upload the file with the empty value.', 'type' => 'any', 'example' => '"X-bailian-extra":"MTAwNTQyNjQ5NTE2OTE3OA==",'."\n" + .'"Content-Type":"application/pdf"', 'title' => ''], + 'Method' => ['description' => 'The HTTP method. Valid values:'."\n" + .'- PUT'."\n" + .'- POST', 'type' => 'string', 'example' => 'PUT', 'title' => ''], + 'Url' => ['description' => 'The upload URL of the file.'."\n" + ."\n" + .'> This URL is a pre-signed URL. FormData upload is not supported. You must upload the file in binary mode.', 'type' => 'string', 'example' => 'https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D', 'title' => ''], + ], + 'title' => '', + 'example' => '', ], + 'Type' => ['description' => 'The upload method of the file. Valid values:'."\n" + .'- OSS.PreSignedURL'."\n" + .'- HTTP', 'type' => 'string', 'example' => 'HTTP', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Current file status does not support delete.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB'], + 'Status' => ['description' => 'The status code returned.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the API call is successful. Valid values:'."\n" + ."\n" + .'- true: The call is successful.'."\n" + .'- false: The call failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"DataCenter.FileTooLarge\\",\\n \\"Data\\": {\\n \\"FileUploadLeaseId\\": \\"1e6a159107384782be5e45ac4759b247.1719325231035\\",\\n \\"Param\\": {\\n \\"Headers\\": \\"\\\\\\"X-bailian-extra\\\\\\":\\\\\\"MTAwNTQyNjQ5NTE2OTE3OA==\\\\\\",\\\\n\\\\\\"Content-Type\\\\\\":\\\\\\"application/pdf\\\\\\"\\",\\n \\"Method\\": \\"PUT\\",\\n \\"Url\\": \\"https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D\\"\\n },\\n \\"Type\\": \\"HTTP\\"\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource\\",\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => 'Apply for a file upload lease', + 'description' => '- RAM users (sub-accounts) must first obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:ApplyFileUploadLease permission), and [join a workspace](~~2851098~~) before calling this API. Alibaba Cloud accounts (primary accounts) can directly call this API without authorization. We recommend that you call this API by using the latest <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>.'."\n" + ."\n\n" + .'- This API is not idempotent.'."\n" + ."\n" + .'**Throttling:**'."\n" + .'This API is subject to throttling if called too frequently. The frequency must not exceed 10 calls per second. If throttled, please retry later.', + 'changeSet' => [ + ['createdAt' => '2025-04-07T07:31:45.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-12-26T07:33:02.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-08-20T07:11:43.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ApplyFileUploadLease'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:ApplyFileUploadLease', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"InvalidParameter\\",\\n \\"Data\\": {\\n \\"FileId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\"\\n },\\n \\"Message\\": \\"Current file status does not support delete.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'DeleteFile', ], - 'DescribeFile' => [ - 'summary' => 'Obtains the basic information of a document, including the document name, type, and status.', - 'path' => '/{WorkspaceId}/datacenter/file/{FileId}/', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], + 'ApplyTempStorageLease' => [ + 'summary' => 'This interface is intended for pro-code deployment only; other scenarios are currently not supported. It is used to apply for a temporary file upload lease. After obtaining the lease, you must upload the file manually.', + 'path' => '/{WorkspaceId}/datacenter', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the document belongs. On the [homepage](https://bailian.console.aliyun.com/knowledge-base#/home) of the console, click the workspace Details icon in the upper-left corner to view the workspace ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3AXoiweeTyTd03IN', - ], + 'name' => 'FileName', + 'in' => 'formData', + 'schema' => ['title' => '', 'description' => 'The file name, including the file extension.'."\n", 'type' => 'string', 'required' => true, 'example' => 'example.txt'], ], [ - 'name' => 'FileId', + 'name' => 'SizeInBytes', + 'in' => 'formData', + 'schema' => ['title' => '', 'description' => 'The size of the file, in bytes.'."\n", 'type' => 'integer', 'format' => 'int64', 'required' => true, 'minimum' => '0', 'example' => '1024'], + ], + [ + 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The primary key ID of the document. You can click the ID icon next to the file name on the [Data Management](https://bailian.console.aliyun.com/knowledge-base#/data-center) page to view the ID.', - 'type' => 'string', - 'required' => true, - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX', - ], + 'schema' => ['title' => '', 'description' => 'The Model Studio workspace ID.'."\n", 'type' => 'string', 'required' => true, 'example' => 'llm-mbhn96xxxx'], ], ], 'responses' => [ @@ -1512,166 +1090,77 @@ 'description' => 'Schema of Response'."\n", 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'Success', - ], + 'Code' => ['title' => '', 'description' => 'The status code.'."\n", 'type' => 'string', 'example' => 'DataCenter.FileTooLarge'], 'Data' => [ + 'title' => '', 'description' => 'The returned data fields.'."\n", 'type' => 'object', 'properties' => [ - 'CategoryId' => [ - 'description' => 'The ID of the category to which the document belongs.'."\n", - 'type' => 'string', - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX', - ], - 'CreateTime' => [ - 'description' => 'The timestamp when the document was uploaded to Model Studio. Format: yyyy-MM-dd HH:mm:ss. Time zone: UTC + 8.'."\n", - 'type' => 'string', - 'example' => '2024-05-26 12:45:43', - ], - 'FileId' => [ - 'description' => 'The primary key ID of the document.'."\n", - 'type' => 'string', - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX', - ], - 'FileName' => [ - 'description' => 'The name of the document.'."\n", - 'type' => 'string', - 'example' => 'test.pdf', - ], - 'FileType' => [ - 'description' => 'The file type of the document. The value is an extension. Valid values: pdf, docx, doc, txt, md, pptx, and ppt.'."\n", - 'type' => 'string', - 'example' => 'pdf', - ], - 'Parser' => [ - 'description' => 'The parser that is used to parse the document. Valid value:'."\n" - ."\n" - .'* DASHSCOPE_DOCMIND: The default document parser.'."\n", - 'type' => 'string', - 'example' => 'DASHSCOPE_DOCMIND', - ], - 'SizeInBytes' => [ - 'description' => 'The size of the document. Unit: bytes.'."\n", - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1234', - ], - 'Status' => [ - 'description' => 'The status of the document. Valid values:'."\n" - ."\n" - .'* INIT: pending parsing.'."\n" - .'* PARSING'."\n" - .'* PARSE_SUCCESS'."\n" - .'* PARSE_FAILED'."\n", - 'type' => 'string', - 'example' => 'PARSE_SUCCESS', - ], - 'Tags' => [ - 'description' => 'The tags that are associated with the document. A document can be associated with multiple tags.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The tag of the document.'."\n", - 'type' => 'string', - 'example' => 'Product Introduction'."\n", + 'TempStorageLeaseId' => ['title' => '', 'description' => 'Unique lease ID. This parameter is required when retrieving the uploaded file within the application later.'."\n", 'type' => 'string', 'example' => '1e6a159107384782be5e45ac4759b247.1719325231035'], + 'Param' => [ + 'title' => '', + 'description' => 'HTTP parameters used for uploading the file.'."\n", + 'type' => 'object', + 'properties' => [ + 'Headers' => ['title' => '', 'description' => 'K-V fields to be included in the Header; both Key and Value are strings.'."\n", 'type' => 'any', 'example' => 'Content-Type: application/json'], + 'Method' => ['title' => '', 'description' => 'HTTP method for the call. Valid values: PUT POST'."\n", 'type' => 'string', 'example' => 'PUT'], + 'Url' => ['title' => '', 'description' => 'Authorized URL for the file upload.'."\n", 'type' => 'string', 'example' => 'https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D'], ], - ], - 'ParseResultDownloadUrl' => [ - 'type' => 'string', + 'example' => '', ], ], + 'example' => '', ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Requests throttling triggered.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'description' => 'The HTTP status code.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], + 'Message' => ['title' => '', 'description' => 'The error message.'."\n", 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource'], + 'RequestId' => ['title' => '', 'description' => 'The request ID.'."\n", 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB'], + 'Status' => ['title' => '', 'description' => 'The HTTP status code returned.'."\n", 'type' => 'string', 'example' => '200'], + 'Success' => ['title' => '', 'description' => 'Indicates whether the request was successful.'."\n", 'type' => 'boolean', 'default' => 'true', 'example' => ''], ], + 'example' => '', ], ], - 403 => [ - 'schema' => [ - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'type' => 'string', - ], - 'HttpStatusCode' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'Message' => [ - 'type' => 'string', - ], - 'Success' => [ - 'type' => 'boolean', - ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'ApplyTempStorageLease', + 'description' => '1\\. This interface is intended for pro-code deployment only; other scenarios are currently not supported. 2. After obtaining the temporary file upload lease via this interface, upload the file manually.'."\n", + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:ApplyTempStorageLease', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Success\\",\\n \\"Data\\": {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\",\\n \\"CreateTime\\": \\"2024-09-09 12:45:43\\",\\n \\"FileId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\",\\n \\"FileName\\": \\"XXX产品介绍.pdf\\",\\n \\"FileType\\": \\"pdf\\",\\n \\"Parser\\": \\"DASHSCOPE_DOCMIND\\",\\n \\"SizeInBytes\\": 1234,\\n \\"Status\\": \\"PARSE_SUCCESS\\",\\n \\"Tags\\": [\\n \\"产品介绍\\"\\n ],\\n \\"ParseResultDownloadUrl\\": \\"\\"\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'DescribeFile', - 'description' => 'Before you call this API, make sure that your document is uploaded to the [Data Management](https://bailian.console.aliyun.com/knowledge-base#/data-center) page of Alibaba Cloud Model Studio.'."\n" - ."\n" - .'* You can also call this operation to query unstructured documents that you upload on the [Data Management](https://bailian.console.aliyun.com/knowledge-base#/data-center) page.'."\n" - .'* This operation is idempotent.'."\n" - ."\n" - .'**Throttling:** Make sure that the interval between the two queries is at least 15 seconds. Otherwise, you may trigger system throttling. If throttling is triggered, try again later.', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"DataCenter.FileTooLarge\\",\\n \\"Data\\": {\\n \\"TempStorageLeaseId\\": \\"1e6a159107384782be5e45ac4759b247.1719325231035\\",\\n \\"Param\\": {\\n \\"Headers\\": \\"Content-Type: application/json\\",\\n \\"Method\\": \\"PUT\\",\\n \\"Url\\": \\"https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D\\"\\n }\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource\\",\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": false\\n}","type":"json"}]', ], - 'UpdateFileTag' => [ - 'summary' => 'Updates the tags of a specified document.', - 'path' => '/{WorkspaceId}/datacenter/file/{FileId}', - 'methods' => [ - 'put', - ], - 'schemes' => [ - 'https', - ], + 'BatchUpdateFileTag' => [ + 'summary' => 'This operation updates document tags in a data connection in batches.', + 'path' => '/{WorkspaceId}/datacenter/batchupdatetag', + 'methods' => ['put'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREsfm8JET0F', - ], + 'abilityTreeNodes' => ['FEATUREsfm8JET0F'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], @@ -1679,502 +1168,185 @@ [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-3z7uw7fwz0vxxxx', - ], - ], - [ - 'name' => 'FileId', - 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', - ], + 'schema' => ['description' => 'The workspace ID. To get this ID, go to the Model Studio <props="china">[console home](https://bailian.console.aliyun.com/knowledge-base#/home)</props><props="intl">[console home](https://bailian.console.alibabacloud.com/#/home)</props> and click the workspace details icon in the upper-left corner.', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', 'title' => ''], ], [ - 'name' => 'Tags', + 'name' => 'FileInfos', 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'title' => '文档标签,单个文档最多支持添加10个标签', - 'description' => '', 'type' => 'array', 'items' => [ + 'type' => 'object', + 'properties' => [ + 'FileId' => ['description' => 'The file ID. To get this ID, go to the <props="china">[application data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[application data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> page and click the ID icon next to the file name.', 'type' => 'string', 'required' => true, 'example' => 'file_3d5319366e2c46309f4c11cfbeacd5fd_10045951', 'title' => ''], + 'tags' => [ + 'type' => 'array', + 'items' => ['description' => 'The tag. It can be up to 32 characters long and must not contain spaces. Supported characters include Unicode letters (such as English letters, Chinese characters, and numbers), underscores (\\_), and hyphens (-).', 'type' => 'string', 'required' => false, 'example' => 'TagA', 'title' => ''], + 'required' => true, + 'maxItems' => 100, + 'minItems' => 1, + 'description' => '- A list of up to 100 tags to associate with the file. The total length of all tags cannot exceed 700 characters.', + 'title' => '', + 'example' => '', + ], + ], + 'required' => true, 'description' => '', - 'type' => 'string', - 'required' => false, + 'title' => '', 'example' => '', ], 'required' => true, - 'maxItems' => 32, + 'maxItems' => 20, 'minItems' => 1, - ], - ], - ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Success', - ], - 'Data' => [ - 'description' => '', - 'type' => 'object', - 'properties' => [ - 'FileId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', - ], - ], - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Requests throttling triggered.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'RequestId', - 'type' => 'string', - 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833', - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], - ], - ], - ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Success\\",\\n \\"Data\\": {\\n \\"FileId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\"\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'UpdateFileTag', - ], - 'GetParseSettings' => [ - 'summary' => 'Queries the data parsing settings in a specified category.', - 'path' => '/{WorkspaceId}/datacenter/parser/settings', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'autoTest' => true, - 'tenantRelevance' => 'tenant', - ], - 'parameters' => [ - [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the file belongs. For more information, see [Use workspaces](~~2587495~~).'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'llm-3shx2gu255oqxxxx', + 'description' => 'A list of files to update.', + 'title' => '', + 'example' => '', ], ], [ - 'name' => 'CategoryId', - 'in' => 'query', + 'name' => 'UpdateMode', + 'in' => 'formData', 'schema' => [ - 'description' => 'The category ID, which is the `CategoryId` returned by **AddCategory**. To view the category ID, click the ID icon next to the category name on the Unstructured Data tab of the [Application Data](https://bailian.console.alibabacloud.com/?tab=app#/data-center) page.'."\n", + 'description' => 'The update mode. Valid values are APPEND and OVERWRITE.', 'type' => 'string', + 'default' => 'OVERWRITE', + 'enum' => ['OVERWRITE', 'APPEND'], 'required' => false, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', + 'example' => 'OVERWRITE', + 'title' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833', - ], + 'Code' => ['description' => 'The response code. A value of Success indicates that the call was successful.', 'type' => 'string', 'example' => 'Success', 'title' => ''], 'Data' => [ - 'description' => 'The returned data fields.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The returned data.'."\n", - 'type' => 'object', - 'properties' => [ - 'FileType' => [ - 'description' => 'The file type. Valid values are: pdf, docx, doc, etc. All supported file types in the category are listed here.'."\n", - 'type' => 'string', - 'example' => 'pdf', - ], - 'ParserDisplayName' => [ - 'description' => 'The display name of the parsing method.'."\n", - 'type' => 'string', - 'example' => 'Digital parsing', - ], - 'ParserConfig' => [ - 'description' => 'The parser configuration. Currently, this is available only for Qwen VL parsing.'."\n", - 'type' => 'object', - 'properties' => [ - 'ModelName' => [ - 'description' => 'The model name.'."\n", - 'type' => 'string', - 'example' => '- qwen-vl-max'."\n" - .'- qwen-vl-plus', - ], - 'ModelPrompt' => [ - 'description' => 'The prompt used for parsing.'."\n", - 'type' => 'string', - 'example' => '# Role '."\n" - .'You are a professional image content annotator, skilled in identifying and describing the contents of images. '."\n" - ."\n" - .'# Task Objective '."\n" - .'Based on the input image, provide a detailed description of its contents.', - ], - ], - ], - 'Parser' => [ - 'description' => 'The parser used for files of the current type. Valid values:'."\n" - ."\n" - .'* DOCMIND (Intelligent parsing)'."\n" - .'* DOCMIND_DIGITAL (Digital parsing)'."\n" - .'* DOCMIND_LLM_VERSION (LLM parsing)'."\n" - .'* DASH_QWEN_VL_PARSER (Qwen VL parsing)'."\n", - 'type' => 'string', - 'example' => 'DOCMIND', - ], - ], - ], - ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indicates whether the call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'workspace id is null or invalid.', - ], - 'Code' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'success', - ], - ], - ], - ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Data\\": [\\n {\\n \\"FileType\\": \\"pdf\\",\\n \\"ParserDisplayName\\": \\"电子文档解析\\",\\n \\"ParserConfig\\": {\\n \\"ModelName\\": \\"qwen-vl-max\\",\\n \\"ModelPrompt\\": \\"#角色\\\\n你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。\\\\n# 任务目标\\\\n请结合输入图片,详细描述图片中的内容。\\"\\n },\\n \\"Parser\\": \\"DOCMIND\\"\\n }\\n ],\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"workspace id is null or invalid.\\",\\n \\"Code\\": \\"success\\"\\n}","type":"json"}]', - 'title' => 'GetParseSettings', - ], - 'GetAvailableParserTypes' => [ - 'summary' => 'Lists all supported parser types based on the input file type (file extension).', - 'path' => '/{WorkspaceId}/datacenter/parser/parsertype', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'autoTest' => true, - 'tenantRelevance' => 'tenant', - ], - 'parameters' => [ - [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the file belongs. For more information, see [Use workspaces](~~2587495~~).'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-3shx2gu255oqxxxx', - ], - ], - [ - 'name' => 'FileType', - 'in' => 'query', - 'schema' => [ - 'description' => 'The file type. Valid values: pdf, docx, and doc.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'pdf', - 'enum' => [ - 'doc', - 'docx', - 'ppt', - 'pptx', - 'xls', - 'xlsx', - 'md', - 'txt', - 'pdf', - 'png', - 'jpg', - 'jpeg', - 'bmp', - 'gif', - 'html', - ], - ], - ], - ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-7734-4F9A-8464-2446XXXXXXX', - ], - 'Data' => [ - 'description' => 'The data returned.'."\n", 'type' => 'object', 'properties' => [ - 'FileType' => [ - 'description' => 'The file type, which is the same as the FileType in the input parameter.'."\n", - 'type' => 'string', - 'example' => 'pdf', - ], - 'ParserList' => [ - 'description' => 'The list of supported parsers'."\n", + 'UpdateFileTagResultList' => [ 'type' => 'array', 'items' => [ - 'description' => 'A parser object'."\n", 'type' => 'object', 'properties' => [ - 'DisplayName' => [ - 'description' => 'The display name of the parsing method.'."\n", - 'type' => 'string', - 'example' => '', - ], - 'Parser' => [ - 'description' => 'The parser code. Valid values:'."\n" - ."\n" - .'* DOCMIND (Intelligent parsing)'."\n" - .'* DOCMIND_DIGITAL (Digital parsing)'."\n" - .'* DOCMIND_LLM_VERSION (LLM parsing)'."\n" - .'* DASH_QWEN_VL_PARSER (Qwen VL parsing)'."\n", - 'type' => 'string', - 'example' => 'DOCMIND', - ], + 'FileId' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'file_f40f2a32205d44b4a93b11617113da15_10045951', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the tags for the specific file were updated. Valid values:'."\n" + ."\n" + .'- true: The tags were updated successfully.'."\n" + ."\n" + .'- false: The tag update failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'ErrorCode' => ['description' => 'The error code. This parameter is returned only if Success is false.', 'type' => 'string', 'example' => 'NoPermission', 'title' => ''], + 'ErrorMessage' => ['description' => 'The error message. This parameter is returned only if Success is false.', 'type' => 'string', 'example' => 'FileId not exists.', 'title' => ''], ], + 'description' => '', + 'title' => '', + 'example' => '', ], + 'description' => 'A list of the tag update results.', + 'title' => '', + 'example' => '', ], ], + 'description' => 'The data returned by the operation.', + 'title' => '', + 'example' => '', ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indicates whether the call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], - 'Message' => [ - 'description' => 'The error message that is returned if the request failed.'."\n", - 'type' => 'string', - 'example' => 'User not authorized to operate on the specified resource', - ], - 'Code' => [ - 'description' => 'The error code returned.'."\n", - 'type' => 'string', - 'example' => 'DataCenter.Throttling', - ], + 'Message' => ['description' => 'The response message.', 'type' => 'string', 'example' => 'Required parameter(FileId) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'title' => '', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The status code returned for the request.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was accepted. Check `UpdateFileTagResultList` for the status of each file. Valid values:'."\n" + ."\n" + .'- true: The request was accepted.'."\n" + ."\n" + .'- false: The request failed, for example, due to an invalid parameter.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'title' => '', + 'description' => 'The response schema.', + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'BatchUpdateFileTag', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-7734-4F9A-8464-2446XXXXXXX\\",\\n \\"Data\\": {\\n \\"FileType\\": \\"pdf\\",\\n \\"ParserList\\": [\\n {\\n \\"DisplayName\\": \\"智能文档解析\\",\\n \\"Parser\\": \\"DOCMIND\\"\\n }\\n ]\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"User not authorized to operate on the specified resource\\",\\n \\"Code\\": \\"DataCenter.Throttling\\"\\n}","type":"json"}]', - 'title' => 'GetAvailableParserTypes', + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Success\\",\\n \\"Data\\": {\\n \\"UpdateFileTagResultList\\": [\\n {\\n \\"FileId\\": \\"file_f40f2a32205d44b4a93b11617113da15_10045951\\",\\n \\"Success\\": true,\\n \\"ErrorCode\\": \\"NoPermission\\",\\n \\"ErrorMessage\\": \\"FileId not exists.\\"\\n }\\n ]\\n },\\n \\"Message\\": \\"Required parameter(FileId) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', ], 'ChangeParseSetting' => [ - 'summary' => '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.', + 'summary' => 'Configures the parsing method for specific file types. For example, specifies large model document parsing for .pdf files or Qwen VL parsing for .jpg files.', 'path' => '/{WorkspaceId}/datacenter/parser/settings', - 'methods' => [ - 'put', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['put'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - 'autoTest' => true, - 'tenantRelevance' => 'tenant', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the category belongs. For more information, see [Use workspaces](~~2587495~~).'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-3z7uw7fwz0vxxxx', - ], + 'schema' => ['description' => 'The ID of the workspace to which the category belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', 'title' => ''], ], [ 'name' => 'CategoryId', 'in' => 'formData', - 'schema' => [ - 'description' => 'The category ID, which is the `CategoryId` returned by **AddCategory**. To view the category ID, click the ID icon next to the category name on the Unstructured Data tab of the [Application Data](https://bailian.console.alibabacloud.com/?tab=app#/data-center) page.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', - 'maxLength' => 128, - 'minLength' => 1, - ], + 'schema' => ['description' => 'The category ID, which is the `CategoryId` returned by the **AddCategory** operation. You can also obtain it by clicking the ID icon next to the category name on the <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center) - Files tab</props><props="intl">[Application Data](https://bailian.console.alibabacloud.com/?tab=app#/data-center) - Unstructured Data tab</props>.', 'type' => 'string', 'required' => true, 'maxLength' => 128, 'minLength' => 1, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'title' => ''], ], [ 'name' => 'FileType', 'in' => 'formData', 'schema' => [ - 'description' => 'The file type. Valid values: pdf, docx, and doc.'."\n", + 'description' => 'The file type (extension). Valid values:'."\n" + .'- doc'."\n" + .'- docx'."\n" + .'- ppt'."\n" + .'- pptx'."\n" + .'- xls'."\n" + .'- xlsx'."\n" + .'- md'."\n" + .'- txt'."\n" + .'- pdf'."\n" + .'- png'."\n" + .'- jpg'."\n" + .'- jpeg'."\n" + .'- bmp'."\n" + .'- gif'."\n" + .'- html', 'type' => 'string', 'required' => true, + 'enum' => ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'md', 'txt', 'pdf', 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'html'], 'example' => 'pdf', - 'enum' => [ - 'doc', - 'docx', - 'ppt', - 'pptx', - 'xls', - 'xlsx', - 'md', - 'txt', - 'pdf', - 'png', - 'jpg', - 'jpeg', - 'bmp', - 'gif', - 'html', - ], + 'title' => '', ], ], [ 'name' => 'Parser', 'in' => 'formData', 'schema' => [ - 'description' => 'The parser code. Valid values:'."\n" - ."\n" - .'* DOCMIND (Intelligent parsing)'."\n" - .'* DOCMIND_DIGITAL (Digital parsing)'."\n" - .'* DOCMIND_LLM_VERSION (LLM parsing)'."\n" - .'* DASH_QWEN_VL_PARSER (Qwen VL parsing)'."\n", + 'description' => 'The parser identifier code. Different parsers are applicable to different scenarios. For more information, see "Knowledge Base". Valid values:'."\n" + .'- DOCMIND (Intelligent Document Parsing)'."\n" + .'- DOCMIND_DIGITAL (Electronic Document Parsing)'."\n" + .'- DOCMIND_LLM_VERSION (Large Model Document Parsing)'."\n" + .'- DASH_QWEN_VL_PARSER (Qwen VL Parsing)'."\n" + .'- DOCMIND_LLM_VERSION_MEDIA (Audio/Video Parsing)', + 'enumValueTitles' => ['DOCMIND' => 'Intelligent Document Parsing.', 'DOCMIND_LLM_VERSION' => 'Large Model Document Parsing.', 'DOCMIND_DIGITAL' => 'Electronic Document Parsing.', 'DASH_QWEN_VL_PARSER' => 'Qwen VL Parsing.'], 'type' => 'string', 'required' => true, - 'enumValueTitles' => [ - 'DOCMIND' => '', - 'DOCMIND_LLM_VERSION' => '', - 'DOCMIND_DIGITAL' => '', - 'DASH_QWEN_VL_PARSER' => '', - ], + 'enum' => ['DOCMIND', 'DOCMIND_DIGITAL', 'DOCMIND_LLM_VERSION', 'DASH_SENSEVOICE', 'RAG_VIDEO_PARSER', 'DASH_QWEN_VL_PARSER', 'BAILIAN_TXT_PARSER'], 'example' => 'DOCMIND', - 'enum' => [ - 'DOCMIND', - 'DOCMIND_DIGITAL', - 'DOCMIND_LLM_VERSION', - 'DASH_SENSEVOICE', - 'RAG_VIDEO_PARSER', - 'DASH_QWEN_VL_PARSER', - 'BAILIAN_TXT_PARSER', - ], + 'title' => '', ], ], [ @@ -2182,164 +1354,141 @@ 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => 'The parser configuration. Currently, this is available only for Qwen VL parsing.'."\n", + 'description' => 'The parser configuration. This parameter is required only when the parser is set to Qwen VL Parsing.', 'type' => 'object', 'properties' => [ 'modelName' => [ - 'description' => 'The model name.'."\n" - ."\n" - .'Valid values:'."\n" - ."\n" - .'* qwen-vl-max'."\n" - .'* qwen-vl-plus'."\n", + 'description' => 'The model name.', + 'enumValueTitles' => ['qwen-vl-max' => 'qwen-vl-max', 'qwen-vl-plus' => 'qwen-vl-plus'], 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [ - 'qwen-vl-max' => 'qwen-vl-max', - 'qwen-vl-plus' => 'qwen-vl-plus', - ], 'example' => 'qwen-vl-max', - 'enum' => [ - 'qwen-vl-max', - 'qwen-vl-plus', - ], - ], - 'modelPrompt' => [ - 'description' => 'The prompt used for parsing.'."\n", - 'type' => 'string', + 'enum' => ['qwen-vl-max', 'qwen-vl-plus', 'qwen3-vl-plus'], 'required' => false, - 'example' => '', + 'title' => '', ], + 'modelPrompt' => ['description' => 'The prompt used when calling Qwen VL Parsing.', 'type' => 'string', 'maxLength' => 1500, 'minLength' => 1, 'required' => false, 'example' => '#角色'."\n" + .'你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。'."\n" + .'# 任务目标'."\n" + .'请结合输入图片,详细描述图片中的内容。', 'title' => ''], ], 'required' => false, + 'title' => '', + 'example' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '7BA8ADD9-53D6-53F0-918F-A1E776AD230E', - ], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '7BA8ADD9-53D6-53F0-918F-A1E776AD230E'], 'Data' => [ - 'description' => 'The returned data fields.'."\n", + 'description' => 'The business data returned when the request is successful.', 'type' => 'object', 'properties' => [ - 'ChangeResult' => [ - 'description' => 'The result of the modification.'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], + 'ChangeResult' => ['description' => 'Indicates whether the configuration was changed. Valid values:'."\n" + .'- true: The configuration was updated.'."\n" + .'- false: The configuration was not changed. The modification failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indicates whether the call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'User not authorized to operate on the specified resource.', - ], - 'Code' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'InvalidParameter', - ], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the call was successful. Valid values:'."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource.', 'title' => ''], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'InvalidParameter', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Modify category parsing settings', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:ChangeParseSetting permission), and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Invoke this operation by using the latest <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>.'."\n" + ."\n" + .'- This operation is not idempotent.'."\n" + ."\n" + .'**Throttling:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If throttled, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:ChangeParseSetting', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"7BA8ADD9-53D6-53F0-918F-A1E776AD230E\\",\\n \\"Data\\": {\\n \\"ChangeResult\\": true\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"User not authorized to operate on the specified resource.\\",\\n \\"Code\\": \\"InvalidParameter\\"\\n}","type":"json"}]', - 'title' => 'ChangeParseSetting', ], 'CreateIndex' => [ - 'summary' => 'Create a knowledge base of the document search type.', + 'summary' => 'Use this API to create two types of knowledge bases: unstructured knowledge bases for documents, audio, or video, and structured knowledge bases for data queries or image Q&A.', 'path' => '/{WorkspaceId}/index/create', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREsfmCPN1XS', - ], + 'abilityTreeNodes' => ['FEATUREsfmCPN1XS'], ], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', 'allowEmptyValue' => false, - 'schema' => [ - 'description' => 'The workspace ID. The knowledge base will be created in this workspace. For more information, see [How to use workspace](~~2587495~~).'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], + 'schema' => ['description' => 'The ID of the workspace where you want to create the knowledge base. For more information about how to obtain the workspace ID, see [How to use workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', 'title' => ''], ], [ 'name' => 'Name', 'in' => 'query', 'allowEmptyValue' => false, - 'schema' => [ - 'description' => 'The name of the knowledge base. The name must be 1 to 20 characters in length, and can contain Chinese characters, letters, digits, underscores (\\_), hyphens (-), periods (.), and colons (:).'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '', - ], + 'schema' => ['description' => 'The name of the knowledge base. The name can be 1 to 20 characters in length and can contain Chinese characters, letters, digits, underscores (\\_), hyphens (-), periods (.), and colons (:).', 'type' => 'string', 'required' => true, 'example' => '企业帮助文档库', 'title' => ''], ], [ 'name' => 'StructureType', 'in' => 'query', 'schema' => [ - 'description' => 'The type of the knowledge base. Valid values:'."\n" + 'description' => 'The type of the knowledge base.'."\n" + ."\n" + .'**Valid values**:'."\n" ."\n" - .'* unstructured: The document search type.'."\n" + .'- unstructured: A knowledge base for document search, audio, or video. The default scenario for document search is basic document Q\\&A.'."\n" ."\n" - .'> After you create a knowledge base, its type cannot be changed. This operation does not support data query and image Q\\&A types. Use the console instead.'."\n", + .'<props="china">'."\n" + ."\n" + .'- structured: A knowledge base for data query or image Q\\&A.'."\n" + ."\n" + .'</props>'."\n" + ."\n\n" + .'> The type of a knowledge base cannot be changed after it is created.', + 'enumValueTitles' => ['unstructured' => 'unstructured'], 'type' => 'string', 'required' => true, - 'enumValueTitles' => [ - 'unstructured' => 'unstructured', - ], - 'example' => 'structured', + 'example' => 'unstructured', + 'title' => '', ], ], [ @@ -2347,15 +1496,32 @@ 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ - 'description' => 'The embedding model used in the knowledge base. The embedding model converts the original input prompt and knowledge text into numerical embeddings for similarity comparison. The default and only model available is text-embedding-v2. It supports multiple languages including Chinese and English and normalizes the embedding results. For more information, see [Embedding](~~2842587~~). Valid values:'."\n" + 'description' => '<props="china">'."\n" + ."\n" + .'The vector model used by the knowledge base. A vector model converts the original input prompt and knowledge text into numerical vectors to compare their similarity. The text-embedding-v4 model is a comprehensive upgrade over the text-embedding-v3 model in terms of language support, vectorization of code snippets, and vector dimension selection. It is suitable for most scenarios. For more information, see [Vectorization](~~2842587~~). Valid values:'."\n" + ."\n" + .'- text-embedding-v4'."\n" + ."\n" + .'- text-embedding-v3'."\n" + ."\n" + .'If you do not specify this parameter, \\`text-embedding-v3\\` is used.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'- The vector model used by the knowledge base. A vector model converts the original input prompt and knowledge text into numerical vectors to compare their similarity. The default text-embedding-v2 model (which cannot be changed for now) supports both Chinese and English, along with multiple other languages, and normalizes the vector results. For more information, see [Vectorization](~~2842587~~). Valid values:'."\n" ."\n" - .'* text-embedding-v2'."\n" + .'</props>'."\n" + ."\n\n" + .'- text-embedding-v2'."\n" ."\n" - .'The default value is null, which means using text-embedding-v2.'."\n", + .'If you do not specify this parameter, \\`text-embedding-v2\\` is used.', + 'enumValueTitles' => [], 'type' => 'string', 'required' => false, - 'enumValueTitles' => [], - 'example' => 'text-embedding-v2', + 'title' => '', + 'example' => '', ], ], [ @@ -2363,102 +1529,141 @@ 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ - 'description' => 'The re-ranking model used in the knowledge base. The re-rank model is a scoring system outside the knowledge base. It calculates the similarity score of the query and text chunks in the knowledge base and ranks them in descending order. Then, the model returns the top K chunks with the highest scores. Valid values:'."\n" + 'description' => 'The reranking model used by the knowledge base. The reranking model is an external scoring system that calculates a similarity score between the user\'s question and each text chunk in the knowledge base, sorts them in descending order, and returns the top K text chunks. Valid values:'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'- qwen3-rerank-hybrid: qwen3-rerank (hybrid) reranking.'."\n" + ."\n" + .'- qwen3-rerank: qwen3-rerank reranking.'."\n" + ."\n" + .'- gte-rerank-hybrid: gte-rerank (hybrid) reranking.'."\n" + ."\n" + .'- gte-rerank: gte-rerank reranking.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'- gte-rerank-hybrid: Official reranking.'."\n" + ."\n" + .'- gte-rerank: gte-rerank reranking.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'If you do not specify this parameter, \\`qwen3-rerank\\` is used.'."\n" + ."\n" + .'> Use \\`qwen3-rerank\\` if you only need semantic sorting. Use \\`qwen3-rerank-hybrid\\` if you need both semantic sorting and text-matching features to ensure relevance.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'If you do not specify this parameter, \\`gte-rerank-hybrid\\` is used.'."\n" + ."\n" + .'> Use \\`gte-rerank\\` if you only need semantic sorting. Use \\`gte-rerank-hybrid\\` if you need both semantic sorting and text-matching features to ensure relevance.'."\n" ."\n" - .'* gte-rerank-hybrid'."\n" - .'* gte-rerank'."\n" + .'</props>'."\n" ."\n" - .'The default value is empty, which means using gte-rerank-hybrid.'."\n" + .'<props="china">'."\n" ."\n" - .'> If you need only semantic ranking, we recommend gte-rerank. If you need both semantic ranking and text matching features to ensure relevance, we recommend gte-rerank-hybrid.'."\n", + .'> The \\`gte-rerank-hybrid\\` and \\`gte-rerank\\` models are no longer updated and are not recommended.'."\n" + ."\n" + .'</props>', + 'enumValueTitles' => ['gte-rerank-hybrid' => 'Official reranking', 'gte-rerank' => 'gte-rerank reranking'], 'type' => 'string', 'required' => false, - 'enumValueTitles' => [ - 'gte-rerank-hybrid' => '', - 'gte-rerank' => 'gte-rerank', - ], 'example' => 'gte-rerank-hybrid', + 'title' => '', ], ], [ 'name' => 'RerankMinScore', 'in' => 'query', 'allowEmptyValue' => true, - 'schema' => [ - 'description' => 'The similarity threshold. Only chunks with a similarity score higher than this value can be recalled. This parameter is used to filter chunks returned by the re-rank model. Valid values: 0.01 to 1.00.'."\n" - ."\n" - .'Default value: 0.01.'."\n", - 'type' => 'number', - 'format' => 'double', - 'required' => false, - 'example' => '0.20', - ], + 'schema' => ['description' => 'The similarity threshold. Only text chunks with a similarity score greater than this value are recalled. This is used to filter the text chunks returned by the reranking model. The value must be between 0.01 and 1.00.'."\n" + ."\n" + .'If you do not specify this parameter, the default value 0.01 is used.', 'type' => 'number', 'format' => 'double', 'required' => false, 'example' => '0.20', 'title' => ''], ], [ 'name' => 'ChunkSize', 'in' => 'query', 'allowEmptyValue' => true, - 'schema' => [ - 'description' => 'The chunk size, which is the maximum number of characters in each chunk. Text exceeding this length may be truncated.'."\n" - ."\n" - .'Valid values: 1 to 6000. Default value: 500.'."\n" - ."\n" - .'> If `ChunkSize` is set to a value less than 100, `OverlapSize` is required. Or, if you do not pass these two parameters, the system uses the default values of the two.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '128', - ], + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'The chunk size, which is the maximum number of characters for each text chunk. If this length is exceeded:'."\n" + ."\n" + .'- **Smart chunking** (the \\`chunkMode\\` parameter is not specified): The text is likely to be truncated.'."\n" + ."\n" + .'- **Custom chunking** (the \\`chunkMode\\` parameter is specified): The text is forcibly truncated.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'The chunk size, which is the maximum number of characters for each text chunk. If this length is exceeded, the text is likely to be truncated.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'The value must be between 1 and 6000. If you do not specify this parameter, the default value 500 is used.'."\n" + ."\n" + .'> If you set \\`ChunkSize\\` to a value less than 100, you must also set \\`OverlapSize\\`. You can also leave both parameters unspecified, and the system will use the default values.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '128', 'title' => ''], ], [ 'name' => 'OverlapSize', 'in' => 'query', 'allowEmptyValue' => true, - 'schema' => [ - 'description' => 'The overlap size, which is the number of overlapping characters between two consecutive chunks. Valid values: 0 to 1024.'."\n" - ."\n" - .'Default value: 100.'."\n" - ."\n" - .'> `OverlapSize` must be less than `ChunkSize`. Otherwise, chunking errors may occur.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '16', - ], + 'schema' => ['description' => 'The overlap size, which is the number of overlapping characters between the current text chunk and the previous one. The value must be between 0 and 1024.'."\n" + ."\n" + .'If you do not specify this parameter, the default value 100 is used.'."\n" + ."\n" + .'> \\`OverlapSize\\` must be smaller than \\`ChunkSize\\`. Otherwise, chunking errors will occur.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '16', 'title' => ''], ], [ 'name' => 'Separator', 'in' => 'query', 'allowEmptyValue' => true, - 'schema' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => ',', - ], + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'The sentence separator. This parameter takes effect only when \\`chunkMode\\` is set to **regex**. It is ignored in other modes, even if specified. You can enter a regular expression (multiple expressions are not supported) to split the file into smaller text chunks.'."\n" + ."\n" + .'For smart chunking (the \\`chunkMode\\` parameter is not specified), you can leave this parameter empty.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'string', 'required' => false, 'example' => '(?<=。)', 'title' => ''], ], [ 'name' => 'SourceType', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ - 'description' => '> This parameter is required in the latest version of the SDK. Otherwise, when you call SubmitIndexJob, an error will occur: Required parameter(data_sources) missing or invalid.'."\n" + 'description' => '><notice>'."\n" + ."\n" + .'In the latest SDK version, this parameter is required. Otherwise, calling the SubmitIndexJob operation will result in the error: Required parameter(data\\_sources) missing or invalid.'."\n" + ."\n" + .'></notice>'."\n" ."\n" .'The source of the imported data. Valid values:'."\n" ."\n" - .'* DATA_CENTER_CATEGORY: The category type, that is to import all files in one or more specified categories in [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center).'."\n" - .'* DATA_CENTER_FILE: The file type, that is to import one or more specified files in [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center).'."\n" + .'- DATA\\_CENTER\\_CATEGORY: Category type. Imports all files under the specified categories in <props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>. You can import multiple categories at the same time.'."\n" + ."\n" + .'- DATA\\_CENTER\\_FILE: File type. Imports the specified files from <props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>. You can import multiple files at the same time.'."\n" ."\n" - .'> If set to DATA_CENTER_CATEGORY, `CategoryIds` is required. If set to DATA_CENTER_FILE, `DocumentIds` is required.'."\n" + .'> If you set this parameter to DATA\\_CENTER\\_CATEGORY, you must specify the \\`CategoryIds\\` parameter. If you set this parameter to DATA\\_CENTER\\_FILE, you must specify the \\`DocumentIds\\` parameter.'."\n" ."\n" - .'> To create an empty knowledge base, you can use an empty category with no files: Set this parameter to DATA_CENTER_CATEGORY, and `CategoryIds` to the ID of an empty category.'."\n", + .'> To create an empty knowledge base, use an empty category that contains no files. Set this parameter to DATA\\_CENTER\\_CATEGORY and specify the ID of the empty category for \\`CategoryIds\\`.', + 'enumValueTitles' => ['DATA_CENTER_CATEGORY' => 'Category type', 'DATA_CENTER_FILE' => 'File type'], 'type' => 'string', 'required' => false, - 'enumValueTitles' => [ - 'DATA_CENTER_CATEGORY' => '', - 'DATA_CENTER_FILE' => '', - ], 'example' => 'DATA_CENTER_FILE', + 'title' => '', ], ], [ @@ -2467,15 +1672,12 @@ 'allowEmptyValue' => true, 'style' => 'json', 'schema' => [ - 'description' => 'The files to imported to the knowledge base. Specify the file IDs to import (up to 10,000 files). To add more files later, call **SubmitIndexAddDocumentsJob**.'."\n", + 'description' => 'You can import files when you create a knowledge base. Specify a list of files to import by providing their IDs. We recommend importing no more than 10,000 files. If you have more files, you can call the **SubmitIndexAddDocumentsJob** operation to import them later.', 'type' => 'array', - 'items' => [ - 'description' => 'A file ID, which is the `FileId` returned by **AddFile**. You can also go to the [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) page. Click the ID icon next to the file to get its ID.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX', - ], + 'items' => ['description' => 'The file ID. This is the `FileId` returned by the **AddFile** operation. You can also obtain the ID by clicking the ID icon next to the file name in the [file connector](https://bailian.console.aliyun.com/cn-beijing?tab=app#/connector/list) under Data Connectors or on the Files tab of <props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>.', 'type' => 'string', 'required' => false, 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], 'required' => false, + 'title' => '', + 'example' => '', ], ], [ @@ -2484,15 +1686,12 @@ 'allowEmptyValue' => true, 'style' => 'json', 'schema' => [ - 'description' => 'The files to imported to the knowledge base. Specify the category IDs. All files under the categories will be imported (up to 10,000 files). To add more files later, call **SubmitIndexAddDocumentsJob**.'."\n", + 'description' => 'You can import files when you create a knowledge base. Specify category IDs to import all files under the corresponding categories. We recommend importing no more than 10,000 files. If you have more files, you can call the **SubmitIndexAddDocumentsJob** operation to import them later.', 'type' => 'array', - 'items' => [ - 'description' => 'The category ID, which is the `CategoryId` returned by **AddCategory**. You can also go to the [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) page. Click the ID icon next to the category to get its ID.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'ca_hiu2383nf934j', - ], + 'items' => ['description' => 'The category ID. This is the \\`CategoryId\\` returned by the **AddCategory** operation. You can also obtain it on the Files tab of <props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> by clicking the ID icon next to the category name.', 'type' => 'string', 'required' => false, 'example' => 'ca_hiu2383nfxxxx', 'title' => ''], 'required' => false, + 'title' => '', + 'example' => '', ], ], [ @@ -2501,1497 +1700,1944 @@ 'allowEmptyValue' => false, 'style' => 'json', 'schema' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", + 'description' => '<props="china">'."\n" + ."\n" + .'Obtain the table ID on the Tables tab of the table connector in Data Connections by clicking the ID icon next to the table name. If the list contains multiple IDs, only the first one is used.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'array', - 'items' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'required' => false, - ], - ], - [ - 'name' => 'DataSource', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'object', - 'properties' => [ - 'CredentialId' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'CredentialKey' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'Database' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'Endpoint' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'IsPrivateLink' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'boolean', - 'required' => false, - ], - 'Region' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'SubPath' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'SubType' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'Table' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - 'Type' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], - ], + 'items' => ['type' => 'string', 'description' => '', 'required' => false, 'title' => '', 'example' => ''], 'required' => false, + 'title' => '', + 'example' => '', ], ], [ 'name' => 'SinkType', 'in' => 'query', 'schema' => [ - 'description' => 'The vector storage type of the knowledge base. For more information, see [Knowledge base](~~2807740~~). Valid values:'."\n" + 'description' => 'The storage class for the knowledge base vectors. For more information, see [Knowledge bases](~~2807740~~). Valid values:'."\n" ."\n" - .'* BUILT_IN: The vector data is hosted by Alibaba Cloud Model Studio.'."\n" - .'* ADB: AnalyticDB for PostgreSQL database. If you need advanced features, such as managing, auditing, and monitoring, we recommend ADB.'."\n" + .'- BUILT\\_IN: Hosts the vector data on the Alibaba Cloud Model Studio platform.'."\n" ."\n" - .'> If you have not used AnalyticDB for AnalyticDB in Model Studio before, go to the [Create Knowledge Base](https://bailian.console.alibabacloud.com/#/knowledge-base/create) page, select ADB-PG as Vector Storage Type, and follow the instructions to grant permissions. If you specify ADB, the `SinkInstanceId` and `SinkRegion` parameters are required.'."\n", + .'- ADB: AnalyticDB for PostgreSQL. We recommend choosing ADB if you need advanced features such as database management, auditing, and monitoring.'."\n" + ."\n" + .'> If you have not used ADB storage on Alibaba Cloud Model Studio, go to the <props="intl">[Create Knowledge Base](https://bailian.console.alibabacloud.com/#/knowledge-base/create)</props> page, set the vector storage class to ADB-PG, and follow the on-screen instructions to grant the required permissions. If you set this parameter to ADB, you must specify the \\`SinkInstanceId\\` and \\`SinkRegion\\` parameters.', + 'enumValueTitles' => ['BUILT_IN' => 'BUILT\\_IN', 'ADB' => 'ADB'], 'type' => 'string', 'required' => true, - 'enumValueTitles' => [ - 'BUILT_IN' => 'BUILT_IN', - 'ADB' => 'ADB', - ], - 'example' => 'DEFAULT', + 'example' => 'BUILT_IN', + 'title' => '', ], ], [ 'name' => 'SinkInstanceId', 'in' => 'query', 'allowEmptyValue' => true, - 'schema' => [ - 'description' => 'The ID of the AnalyticDB for PostgreSQL instance. Required only when `SinkType` is set to ADB. Get the ID on the [Instances](https://gpdbnext.console.aliyun.com/gpdb/list) page of AnalyticDB for PostgreSQL.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'gp-bp321093j84', - ], + 'schema' => ['description' => 'The ID of the AnalyticDB for PostgreSQL instance. This parameter is required only when \\`SinkType\\` is set to ADB. Go to the [AnalyticDB for PostgreSQL instance list](https://gpdbnext.console.aliyun.com/gpdb/list) page to obtain this ID.', 'type' => 'string', 'required' => false, 'example' => 'gp-bp32109xxxx', 'title' => ''], ], [ 'name' => 'SinkRegion', 'in' => 'query', 'allowEmptyValue' => true, - 'schema' => [ - 'description' => 'The region of the AnalyticDB for PostgreSQL instance. Required only when `SinkType` is set to ADB. Call [DescribeRegions](https://www.alibabacloud.com/help/zh/analyticdb/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions?spm=a2c63.p38356.0.i3) to obtain the region list.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'cn-hangzhou', - ], + 'schema' => ['description' => 'The region where the AnalyticDB for PostgreSQL instance is located. This parameter is required only when \\`SinkType\\` is set to ADB. You can call the <props="intl">[DescribeRegions ](https://www.alibabacloud.com/help/zh/analyticdb/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions?spm=a2c63.p38356.0.i3)</props>operation to obtain a list of regions.', 'type' => 'string', 'required' => false, 'example' => 'cn-hangzhou', 'title' => ''], ], [ 'name' => 'Columns', 'in' => 'query', 'style' => 'json', 'schema' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", + 'description' => '<props="china">'."\n" + ."\n" + .'The structure of the data table (column names, types, etc.).'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'array', 'items' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", + 'description' => '> This parameter is not yet available. Do not specify it.', 'type' => 'object', 'properties' => [ - 'Column' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'source_column_name1', - ], - 'IsRecall' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'boolean', - 'required' => false, - 'example' => 'true', - ], - 'IsSearch' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'boolean', - 'required' => false, - 'example' => 'true', - ], - 'Name' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'index_column_name1', - ], + 'Column' => ['description' => '> This parameter is not yet available. Do not specify it.', 'type' => 'string', 'required' => false, 'example' => 'school', 'title' => ''], + 'IsRecall' => ['description' => '<props="china">'."\n" + ."\n" + .'Specifies whether to participate in model response generation. If enabled, the retrieval results from this column are used as input for the LLM to generate an answer. Valid values:'."\n" + ."\n" + .'- true: Enabled.'."\n" + ."\n" + .'- false: Disabled.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'boolean', 'required' => false, 'example' => 'true', 'title' => ''], + 'IsSearch' => ['description' => '<props="china">'."\n" + ."\n" + .'Specifies whether to participate in knowledge base retrieval. If enabled, the knowledge base is allowed to search for data in this column. Valid values:'."\n" + ."\n" + .'- true: Enabled.'."\n" + ."\n" + .'- false: Disabled.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'boolean', 'required' => false, 'example' => 'true'."\n", 'title' => ''], + 'Name' => ['description' => '<props="china">'."\n" + ."\n" + .'The field name. It must be consistent with the table header of the data table created in Application Data.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'string', 'required' => false, 'example' => '学校', 'title' => ''], 'Type' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", + 'description' => '<props="china">'."\n" + ."\n" + .'The field type. It must be consistent with the table header of the data table created in Application Data. Valid values:'."\n" + ."\n" + .'- string'."\n" + ."\n" + .'- double'."\n" + ."\n" + .'- long'."\n" + ."\n" + .'- datetime'."\n" + ."\n" + .'- image\\_url'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', + 'enumValueTitles' => [], 'type' => 'string', 'required' => false, - 'enumValueTitles' => [], 'example' => 'string', + 'title' => '', ], ], 'required' => false, + 'title' => '', + 'example' => '', ], 'required' => false, + 'title' => '', + 'example' => '', ], ], [ 'name' => 'Description', 'in' => 'query', - 'schema' => [ - 'description' => 'The description of the knowledge base. The description must be 0 to 1,000 characters in length. This parameter is empty by default.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'schema' => ['description' => 'The description of the knowledge base. The description can be 0 to 1,000 English or Chinese characters in length.'."\n" + .'The default value is empty.', 'type' => 'string', 'required' => false, 'example' => '企业帮助文档库包括了公司制度、产品清单等重要资料。', 'title' => ''], ], [ 'name' => 'metaExtractColumns', 'in' => 'query', 'style' => 'json', 'schema' => [ - 'description' => 'The metadata extraction configurations. Metadata refers to a set of additional attributes associated with unstructured data, which are integrated into text chunks in key-value pairs. For more information, see [Knowledge base](~~2807740~~).'."\n", + 'description' => 'The metadata extraction configuration. Metadata is a series of additional attributes related to unstructured data content. These attributes are integrated into text chunks as key-value pairs. For more information, see [Knowledge bases](~~2807740~~).', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ - 'Key' => [ - 'description' => 'The metadata key. It must be 1 to 50 characters in length and must be English letters or underscores. If you specify this parameter, the `Value` and `Type` parameters are required.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'author', - ], - 'Value' => [ - 'description' => 'The metadata value.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'Tim', - ], + 'Key' => ['description' => 'The metadata field. The field name can be 1 to 50 characters in length and must consist of letters or underscores. If you specify this parameter, you must also specify the \\`Value\\` and \\`Type\\` parameters.', 'type' => 'string', 'required' => false, 'example' => 'author', 'title' => ''], + 'Value' => ['description' => 'The value of the metadata field.', 'type' => 'string', 'required' => false, 'example' => 'Tim', 'title' => ''], 'Type' => [ - 'description' => 'The type of the metadata field. Valid values:'."\n" + 'description' => 'The method for obtaining the value of the metadata field. Valid values:'."\n" ."\n" - .'* constant'."\n" - .'* variable'."\n" - .'* custom_prompt'."\n" - .'* regular'."\n" - .'* keywords'."\n" + .'- constant: Constant.'."\n" ."\n" - .'Enumerated value:'."\n" + .'- variable: Variable.'."\n" ."\n" - .'* constant: constant extraction.'."\n" - .'* keywords: keyword extraction.'."\n" - .'* custom_prompt: LLM.'."\n" - .'* variable: variable extraction.'."\n" - .'* regular: regular expression.'."\n", + .'- custom\\_prompt: Large Language Model (LLM).'."\n" + ."\n" + .'- regular: Regular expression.'."\n" + ."\n" + .'- keywords: Keyword search.', + 'enumValueTitles' => ['constant' => 'Constant extraction', 'keywords' => 'Keyword extraction', 'custom_prompt' => 'Large Language Model', 'variable' => 'Variable extraction', 'regular' => 'Regular expression'], 'type' => 'string', 'required' => false, - 'enumValueTitles' => [ - 'constant' => '', - 'keywords' => '', - 'custom_prompt' => '', - 'variable' => '', - 'regular' => '', - ], 'example' => 'constant', + 'title' => '', ], - 'Desc' => [ - 'description' => 'The description of the metadata field. The description must be 0 to 1,000 characters in length, and can contain Chinese characters, letters, digits, underscores (\\_), hyphens (-), periods (.), and colons (:). This parameter is left empty by default.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'AuthorName'."\n", - ], + 'Desc' => ['description' => 'The Chinese description of the metadata field. The description can be 0 to 1,000 characters in length and can contain Chinese characters, letters, digits, underscores (\\_), hyphens (-), periods (.), and colons (:). The default value is empty.', 'type' => 'string', 'required' => false, 'example' => '作者名', 'title' => ''], 'EnableLlm' => [ - 'description' => 'When set to true, the key and value of this metadata filed will participate in the generation process of the model, together with the chunk. Valid values:'."\n" + 'description' => 'If enabled, the metadata field and its value are used along with the text chunk content in the answer generation process of the LLM. Valid values:'."\n" + ."\n" + .'- true: Enabled.'."\n" ."\n" - .'* true'."\n" - .'* false'."\n" + .'- false: Disabled.'."\n" ."\n" - .'Default value: false.'."\n", + .'The default value is false.', + 'enumValueTitles' => ['true' => 'Enabled', 'false' => 'Disabled'], 'type' => 'boolean', 'required' => false, - 'enumValueTitles' => [ - 'true' => '', - 'false' => '', - ], 'example' => 'false', + 'title' => '', ], 'EnableSearch' => [ - 'description' => 'When set to true, the key and value of this metadata filed will participate in the knowledge base retrieval, together with the chunk. Valid values:'."\n" + 'description' => 'If enabled, the metadata field and its value are used along with the text chunk content in the knowledge base retrieval process. Valid values:'."\n" ."\n" - .'* true'."\n" - .'* false'."\n" + .'- true: Enabled.'."\n" ."\n" - .'Default value: false.'."\n", + .'- false: Disabled.'."\n" + ."\n" + .'The default value is false.', + 'enumValueTitles' => ['true' => 'Enabled', 'false' => 'Disabled'], 'type' => 'boolean', 'required' => false, - 'enumValueTitles' => [ - 'true' => '', - 'false' => '', - ], 'example' => 'false', + 'title' => '', ], ], 'required' => false, 'description' => '', + 'title' => '', + 'example' => '', ], 'required' => false, + 'title' => '', + 'example' => '', ], ], [ 'name' => 'enableHeaders', 'in' => 'query', 'schema' => [ - 'description' => 'Whether to treat the first row of all .xlsx and .xls files as headers and concatenate them into each text chunk. This prevents the models from mistakenly interpreting headers as regular data rows.'."\n" + 'description' => 'Specifies whether to treat the first row of all .xlsx and .xls files as the table header and append it to each text chunk. This prevents the LLM from treating the header as a regular data row.'."\n" ."\n" - .'> Enable this feature only when all imported files are in .xlsx or .xls format and contain headers. Otherwise, leave it disabled.'."\n" + .'> We recommend enabling this feature only when all imported files are in .xlsx or .xls format and contain a header. Otherwise, do not enable it.'."\n" ."\n" .'Valid values:'."\n" ."\n" - .'* true'."\n" - .'* false'."\n" + .'- true: Enabled.'."\n" + ."\n" + .'- false: Disabled.'."\n" ."\n" - .'Default value: false.'."\n", + .'If you do not specify this parameter, this feature is disabled by default.', + 'enumValueTitles' => ['true' => 'Enabled', 'false' => 'Disabled'], 'type' => 'boolean', 'required' => false, - 'enumValueTitles' => [ - 'true' => '', - 'false' => '', - ], 'example' => 'false', + 'title' => '', ], ], [ 'name' => 'chunkMode', 'in' => 'query', 'schema' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", + 'description' => '<props="china">'."\n" + ."\n" + .'Enables custom chunking and specifies the chunking policy. For more information, see [Knowledge bases](~~2807740~~).'."\n" + ."\n" + .'Possible values (only one value can be specified at a time):'."\n" + ."\n" + .'- **length**: Chunks by length. The text is strictly chunked according to the \\`ChunkSize\\` and \\`OverlapSize\\` you specify. If you do not specify these two parameters, the system uses the default values (\\`ChunkSize\\` is 500, \\`OverlapSize\\` is 100). Chunking by length does not support \\`Separator\\` (it is ignored even if specified).'."\n" + ."\n" + .'- **page**: Chunks by page. If \\`ChunkSize\\` is specified, it is also considered during chunking (if not specified, the default value 500 is used). Chunking by page does not support \\`OverlapSize\\` or \\`Separator\\` (they are ignored even if specified).'."\n" + ."\n" + .'- **h1**: Chunks by level-1 heading. If \\`ChunkSize\\` is specified, it is also considered during chunking (if not specified, the default value 500 is used). Chunking by level-1 heading does not support \\`OverlapSize\\` or \\`Separator\\` (they are ignored even if specified).'."\n" + ."\n" + .'- **h2**: Chunks by level-2 heading. If \\`ChunkSize\\` is specified, it is also considered during chunking (if not specified, the default value 500 is used). Chunking by level-2 heading does not support \\`OverlapSize\\` or \\`Separator\\` (they are ignored even if specified).'."\n" + ."\n" + .'- **regex**: Chunks by regular expression. You must specify the \\`Separator\\` parameter. If \\`ChunkSize\\` is specified, it is also considered during chunking (if not specified, the default value 500 is used). Chunking by regular expression does not support \\`OverlapSize\\` (it is ignored even if specified).'."\n" + ."\n" + .'If you do not specify this parameter, smart chunking is used by default.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', + 'enumValueTitles' => ['regex' => 'Chunk by regular expression', 'length' => 'Chunk by length', 'h1' => 'Chunk by level-1 heading', 'h2' => 'Chunk by level-2 heading', 'page' => 'Chunk by page'], 'type' => 'string', 'required' => false, - 'enumValueTitles' => [ - 'regex' => '', - 'length' => '', - 'h1' => '', - 'h2' => '', - 'page' => '', - ], 'example' => 'regex', + 'title' => '', ], ], [ 'name' => 'EnableRewrite', 'in' => 'query', 'schema' => [ - 'description' => 'Whether to enable rewriting for multi-turn conversations. Valid values:'."\n" + 'description' => 'Specifies whether to enable multi-turn conversation rewriting. Valid values:'."\n" + ."\n" + .'- true: Enabled.'."\n" ."\n" - .'* true'."\n" - .'* false'."\n" + .'- false: Disabled.'."\n" ."\n" - .'Default value: true.'."\n", + .'If you do not specify this parameter, this feature is enabled by default.', + 'enumValueTitles' => ['true' => 'Enabled', 'false' => 'Disabled'], 'type' => 'boolean', 'required' => false, - 'enumValueTitles' => [ - 'true' => '', - 'false' => '', - ], 'example' => 'true', + 'title' => '', ], ], [ 'name' => 'CreateIndexType', 'in' => 'query', - 'schema' => [ - 'description' => '> This parameter is not available. Do not specify this parameter.'."\n", - 'type' => 'string', - 'required' => false, - ], + 'schema' => ['description' => '> This parameter is not yet available. Do not specify it.', 'type' => 'string', 'required' => false, 'example' => 'standard', 'title' => ''], ], [ 'name' => 'pipelineCommercialType', 'in' => 'query', 'allowEmptyValue' => false, 'schema' => [ + 'description' => '<props="china">'."\n" + ."\n" + .'The [edition type](~~2997110~~) of the knowledge base. Valid values:'."\n" + ."\n" + .'- standard: Standard Edition'."\n" + ."\n" + .'- enterprise: Ultimate Edition'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'string', 'example' => 'standard', 'default' => 'standard', - 'enum' => [ - 'enterprise', - 'standard', - ], + 'enum' => ['enterprise', 'standard'], + 'required' => false, + 'title' => '', ], ], [ 'name' => 'pipelineCommercialCu', 'in' => 'query', 'allowEmptyValue' => false, - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'maximum' => '200', - 'minimum' => '1', - 'example' => '1', - 'default' => '1', - ], + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'The number of RCUs for the knowledge base. This parameter is required only when \\`pipelineCommercialType\\` is set to \\`enterprise\\`. The value must be between 1 and 200.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'integer', 'format' => 'int32', 'maximum' => '200', 'minimum' => '1', 'example' => '1', 'default' => '1', 'required' => false, 'title' => ''], ], [ 'name' => 'pipelineRetrieveRateLimitStrategy', 'in' => 'query', 'allowEmptyValue' => false, 'schema' => [ + 'description' => '<props="china">'."\n" + ."\n" + .'The rate limiting policy for the knowledge base dependency chain. This parameter is required only when \\`pipelineCommercialType\\` is set to \\`enterprise\\`.'."\n" + .'Value:'."\n" + .'downgrade: Degrades the service (switches to using a lightweight retrieval chain).'."\n" + .'If you do not specify this parameter, the default value \\`downgrade\\` is used.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not yet available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'string', 'example' => 'downgrade', 'default' => 'downgrade', - 'enum' => [ - 'downgrade', - ], + 'enum' => ['downgrade'], + 'required' => false, + 'title' => '', ], ], + [ + 'name' => 'knowledgeType', + 'in' => 'query', + 'schema' => ['description' => 'The data source code. This parameter is required when creating a data query knowledge base and is used with \\`table\\` and \\`database\\`.'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'We recommend using the new \\`connectId\\` parameter, which you can obtain from the data connector card on the [Data Connections](https://modelstudio.console.alibabacloud.com/?tab=app#/connector/list) page. This parameter is still compatible but will no longer be maintained in the future.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'> - This operation does not support associating custom databases. Use the Alibaba Cloud Model Studio console to create them.', 'type' => 'string', 'required' => false, 'example' => 'document', 'title' => ''], + ], + [ + 'name' => 'RerankMode', + 'in' => 'query', + 'allowEmptyValue' => true, + 'schema' => [ + 'description' => 'The name of the data table. This parameter is required when creating a data query knowledge base.'."\n" + ."\n" + .'The data table must exist in the data source specified by \\`connectId\\` or \\`datasourceCode\\`.', + 'enumValueTitles' => ['similar: 相似模式。' => 'similar: 相似模式。', 'custom: 自定义模式。' => 'custom: 自定义模式。', 'qa:(默认值) 问答模式。' => 'qa:(默认值) 问答模式。', 'similar: ' => 'similar: Similarity mode.', 'custom: ' => 'custom: Custom mode.', '' => 'qa: (Default) Q\\&A mode.'], + 'type' => 'string', + 'required' => false, + 'example' => 'qa', + 'title' => '', + ], + ], + [ + 'name' => 'RerankInstruct', + 'in' => 'query', + 'allowEmptyValue' => true, + 'schema' => ['description' => 'The name of the database. This parameter is required when creating a data query knowledge base.'."\n" + ."\n" + .'The database must exist in the data source specified by \\`datasourceCode\\`.', 'type' => 'string', 'required' => false, 'title' => '', 'example' => ''], + ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'The error code.'."\n", - 'type' => 'string', - 'example' => 'Forbidden', - ], + 'Code' => ['description' => 'Error status code', 'type' => 'string', 'title' => '', 'example' => ''], 'Data' => [ - 'description' => 'The data returned if the request is successful.'."\n", + 'description' => 'The business data returned when the request is successful.', 'type' => 'object', 'properties' => [ - 'Id' => [ - 'description' => 'The knowledge base ID, or `IndexId`, is a unique identifier for the knowledge base created.'."\n" - ."\n" - .'> Keep this ID. It is required for all subsequent API operations related to this knowledge base.'."\n", - 'type' => 'string', - 'example' => 'jkurxhju6b', - ], + 'Id' => ['description' => 'The ID of the knowledge base, also known as \\`IndexId\\`. This is the unique identifier of the created knowledge base.'."\n" + ."\n" + .'> Keep this value safe. It will be used for all subsequent API operations related to this knowledge base.', 'type' => 'string', 'example' => 'jkurxhxxxx', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Invalid input, variable name is missing', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-7734-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the request is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true'."\n", - ], + 'Message' => ['description' => 'Error message', 'type' => 'string', 'title' => '', 'example' => ''], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Request ID', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A--2446A84821CA'], + 'Status' => ['description' => 'The status code returned by the interface.', 'type' => 'string', 'example' => '"200"', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was successful. Possible values:'."\n" + ."\n" + .'- true: Successful'."\n" + ."\n" + .'- false: Failed', 'type' => 'boolean', 'example' => 'true'."\n", 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], + 'staticInfo' => ['returnType' => 'synchronous'], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"\\",\\n \\"Data\\": {\\n \\"Id\\": \\"jkurxhxxxx\\"\\n },\\n \\"Message\\": \\"\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A--2446A84821CA\\",\\n \\"Status\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'CreateIndex', - 'description' => '* **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.'."\n" + 'title' => 'Create Knowledge Base ', + 'description' => '- **Permissions**:'."\n" ."\n" - .'* **Required permissions**'."\n" + .' - **RAM user**: A RAM user must obtain the required [API permissions](~~2848578~~) for Alibaba Cloud Model Studio and [join a workspace](~~2851098~~) before calling this operation. You can use the `AliyunBailianDataFullAccess` policy, which includes the \\`sfm:CreateIndex\\` permission required for this operation.'."\n" ."\n" - .' * **RAM users**: Must first obtain the [API permissions](~~2848578~~) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:CreateIndex permission required), and [become member of a workspace](~~2851098~~).'."\n" - .' * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.'."\n" + .' - **Alibaba Cloud account**: By default, Alibaba Cloud accounts have the required permissions and can call this operation directly.'."\n" ."\n" - .'* **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.'."\n" + .'- **How to call**: Use the latest version of the <props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this operation. The SDK handles the complex signature calculation logic to simplify the process.'."\n" ."\n" - .'* **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](~~2852772~~).'."\n" + .'- **What to do next**: This operation only initializes a knowledge base creation job. After calling this operation, you must call the **SubmitIndexJob** operation to complete the creation. Otherwise, an empty knowledge base is created. For related code examples, see [Knowledge base API guide](~~2852772~~).'."\n" ."\n" - .'* **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.'."\n" + .'- **Idempotence**: This operation is not idempotent. Repeated calls may create multiple knowledge bases with the same name. To ensure idempotence, query for the knowledge base before you create it.'."\n" ."\n" - .'**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.'."\n", - ], - 'GetIndexJobStatus' => [ - 'summary' => 'Queries the current status of a specified knowledge base creation or add document job.', - 'path' => '/{WorkspaceId}/index/job/status', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', + .'**Rate limiting:**'."\n" + .'Frequent calls to this operation are subject to rate limiting. Do not exceed a frequency of 10 calls per second. If you encounter rate limiting, retry the call later.', + 'changeSet' => [ + ['createdAt' => '2025-12-03T12:10:50.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-07-30T09:21:00.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-06-04T01:43:41.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-04-21T03:29:44.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-01-03T03:32:34.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-11-07T09:52:44.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-09-17T11:04:42.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateIndex'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:CreateIndex', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'CreateMemory' => [ + 'summary' => 'Creates a long-term memory.', + 'path' => '/{workspaceId}/memories', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/x-www-form-urlencoded', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'WorkspaceId', + 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], + 'schema' => ['title' => '', 'description' => 'The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx'], ], [ - 'name' => 'JobId', + 'name' => 'description', 'in' => 'query', + 'allowEmptyValue' => true, + 'schema' => ['title' => '', 'description' => 'The description of the long-term memory. The description must be 1 to 50 characters in length and can contain letters, digits, and characters in the Unicode letter category (including Chinese characters). The description can also contain colons (:), underscores (_), periods (.), and hyphens (-).', 'type' => 'string', 'required' => false, 'example' => '我的大模型应用$APP_ID关于A用户的长期记忆体'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'The knowledge base job ID, which is the `Data.Id` parameter returned by the [SubmitIndexJob](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) or [SubmitIndexAddDocumentsJob](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-submitindexadddocumentsjob) operations.', - 'type' => 'string', - 'required' => true, - 'example' => '20230718xxxx-146c93bf', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'memoryId' => ['title' => '', 'description' => 'The long-term memory ID.'."\n" + .'> Store this value properly. It is required for all subsequent API operations related to this long-term memory.'."\n" + .'>.', 'type' => 'string', 'example' => '6bff4f317a14442fbc9f73d29dbxxxx'], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A--2446A84821CA'], + ], + 'example' => '', ], ], - [ - 'name' => 'IndexId', - 'in' => 'query', - 'schema' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', - 'required' => true, - 'example' => '79c0aly8zw', + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'Memory.DescriptionInvalid', 'errorMessage' => 'Input parameter description is invalid.', 'description' => 'Memory\'s description is invalid'], + ], + 404 => [ + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], + ], + 500 => [ + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"memoryId\\": \\"6bff4f317a14442fbc9f73d29dbxxxx\\",\\n \\"requestId\\": \\"17204B98-xxxx-4F9A--2446A84821CA\\"\\n}","type":"json"}]', + 'title' => 'Create a long-term memory', + 'description' => '- You can store specific information from conversations (memory nodes. For more information, see [Long-term memory](https://www.alibabacloud.com/help/en/model-studio/user-guide/long-term-memory)) in a long-term memory. Agent applications can then reference this information in subsequent conversations. This is not an automatic creation procedure. You must first invoke the [CreateMemory](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-creatememory) operation to create a long-term memory and obtain the `memoryId`. Then pass the `memoryId` when you [invoke the agent application through the API](https://www.alibabacloud.com/help/en/model-studio/user-guide/application-calling).'."\n" + .' > Long-term memory does not support storing and managing user profiles through the API. Perform related operations in the console. For more information, see [Long-term memory](https://www.alibabacloud.com/help/en/model-studio/user-guide/long-term-memory#578ebae524m6l).'."\n" + .'- If you pass a `memoryId`, the system uses automatic creation to generate memory nodes (MemoryNode) under the specified long-term memory based on conversation records. You can also invoke the [CreateMemoryNode](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-creatememorynode) operation to manually create memory nodes.'."\n" + .'- This operation does not support idempotence.'."\n" + ."\n" + .'**Throttling:** Ensure that the interval between two consecutive requests is at least 1 second. Otherwise, throttling may be triggered. If throttling occurs, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateMemory'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:CreateMemory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], + ], + ], + 'CreateMemoryNode' => [ + 'summary' => 'Creates a memory node.', + 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'PageNumber', - 'in' => 'query', - 'schema' => [ - 'description' => 'Both the [SubmitIndexJob](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) and [SubmitIndexAddDocumentsJob](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-submitindexadddocumentsjob) operations support batch import of documents. This operation returns both the overall `Status` of the job and the `Document.Status` of each document. If there are a large number of documents, you can use the `PageNumber` parameter to perform a paged query. Pages start from page 1. Default value: 1.', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'workspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see [How to use workspaces](~~2587495~~).', 'type' => 'string', 'required' => false, 'example' => 'llm-us9hjmt32nysdm5v'."\n", 'title' => ''], ], [ - 'name' => 'pageSize', + 'name' => 'memoryId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The long-term memory ID, which is the memoryId returned by the **CreateMemory** operation.', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n"], + ], + [ + 'name' => 'content', 'in' => 'query', - 'schema' => [ - 'description' => 'The number of document import jobs that are displayed on each page. No maximum value. Default value: 10.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '10', - ], + 'schema' => ['title' => '', 'description' => 'The content of the memory node. The content must be 1 to 200 characters in length and can contain letters, digits, underscores (_), hyphens (-), periods (.), and colons (:).', 'type' => 'string', 'required' => true, 'example' => '用户喜欢吃西红柿炒鸡蛋'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'Index.Forbidden', - ], - 'Data' => [ - 'description' => 'The returned data.'."\n", - 'type' => 'object', - 'properties' => [ - 'Documents' => [ - 'description' => 'The list of imported documents.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The document object.'."\n", - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'Index.Document.ChunkError', - ], - 'DocId' => [ - 'description' => 'The primary key ID of the document.'."\n", - 'type' => 'string', - 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX', - ], - 'DocName' => [ - 'description' => 'The name of the document.'."\n", - 'type' => 'string', - 'example' => '', - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'document parse error', - ], - 'Status' => [ - 'description' => 'The import status of the document. Valid values:'."\n" - ."\n" - .'* INSERT_ERROR'."\n" - .'* RUNNING'."\n" - .'* DELETED'."\n" - .'* FINISH'."\n", - 'type' => 'string', - 'enumValueTitles' => [], - 'example' => 'RUNNING', - ], - 'GmtModified' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - ], - ], - ], - 'JobId' => [ - 'description' => 'The ID of the job.'."\n", - 'type' => 'string', - 'example' => '66122af12a4e45ddae6bd6c845556647', - ], - 'Status' => [ - 'description' => 'The status of the knowledge base job. Valid values:'."\n" - ."\n" - .'* COMPLETED'."\n" - .'* FAILED'."\n" - .'* RUNNING'."\n" - .'* PENDING'."\n", - 'type' => 'string', - 'enumValueTitles' => [ - 'COMPLETED' => '', - 'FAILED' => '', - 'RUNNING' => '', - 'PENDING' => '', - ], - 'example' => 'PENDING', - ], - ], - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'User not authorized to operate on the specified resource.', - ], - 'RequestId' => [ - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'title' => 'Id of the request', - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], + 'memoryNodeId' => ['title' => '', 'description' => 'The memory node ID.', 'type' => 'string', 'example' => '68de06c95368463a8be4a84efcxxxxxx'], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '8C56C7AF-xxxx-19CE-B018-E05E1EDCF4C5'], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.Forbidden\\",\\n \\"Data\\": {\\n \\"Documents\\": [\\n {\\n \\"Code\\": \\"Index.Document.ChunkError\\",\\n \\"DocId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\",\\n \\"DocName\\": \\"XXX产品介绍\\",\\n \\"Message\\": \\"document parse error\\",\\n \\"Status\\": \\"RUNNING\\",\\n \\"GmtModified\\": 0\\n }\\n ],\\n \\"JobId\\": \\"66122af12a4e45ddae6bd6c84555xxxx\\",\\n \\"Status\\": \\"PENDING\\"\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'GetIndexJobStatus', - 'description' => '1. A knowledge base job is running. You can call the [SubmitIndexJob](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-submitindexjob) operation to create a creation job or the [SubmitIndexAddDocumentsJob](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-submitindexadddocumentsjob) operation to create a add document job. Then, obtain the `JobId` returned by the operations.'."\n" - .'2. We recommend that you call this operation at intervals of more than 5 seconds.'."\n" - .'3. This interface is idempotent.', - ], - 'SubmitIndexJob' => [ - 'summary' => 'Submits a specified CreateIndex job to complete knowledge base creation.', - 'path' => '/{WorkspaceId}/index/submit_index_job', - 'methods' => [ - 'post', + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'Memory.MemoryNodeContentInvalid', 'errorMessage' => 'Memory node content is invalid.', 'description' => 'Memory node content is invalid.'], + ], + 404 => [ + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], + ['errorCode' => 'Memory.MemoryNodeNotFound', 'errorMessage' => 'MemoryNode not found.', 'description' => 'MemoryNode not found'], + ], + 500 => [ + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], + ], ], - 'schemes' => [ - 'https', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"memoryNodeId\\": \\"68de06c95368463a8be4a84efcxxxxxx\\",\\n \\"requestId\\": \\"8C56C7AF-xxxx-19CE-B018-E05E1EDCF4C5\\"\\n}","type":"json"}]', + 'title' => 'Create a memory node', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateMemoryNode'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:CreateMemoryNode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'CreatePromptTemplate' => [ + 'summary' => 'Create a prompt template.', + 'path' => '/{workspaceId}/promptTemplates', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'WorkspaceId', + 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], + 'schema' => ['title' => '', 'description' => 'Workspace ID.', 'type' => 'string', 'required' => true, 'example' => 'llm-czal8nvvwb8d4xxx'."\n"], ], [ - 'name' => 'IndexId', + 'name' => 'name', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'Template name.', 'type' => 'string', 'required' => true, 'example' => '小红书文案助手'], + ], + [ + 'name' => 'content', 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'Prompt template content.', 'type' => 'string', 'required' => true, 'example' => '请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', - 'required' => true, - 'example' => '79c0aly8zw', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'promptTemplateId' => ['title' => '', 'description' => 'Prompt template ID.', 'type' => 'string', 'example' => '6e49109bfeb94a39bb268f4e483ccxxx'], + 'requestId' => ['title' => '', 'description' => 'Request ID.', 'type' => 'string', 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx'."\n"], + ], + 'example' => '', ], ], ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'PromptTemplate.ContentInvalid', 'errorMessage' => 'Input parameter Content is invalid.', 'description' => 'The format of the input parameter Content is invalid.'], + ['errorCode' => 'PromptTemplate.NameInvalid', 'errorMessage' => 'Input parameter Name is invalid.', 'description' => 'The format of the input parameter Name is invalid.'], + ], + 500 => [ + ['errorCode' => 'PromptTemplate.InternalError', 'errorMessage' => 'Prompt template service inner exception.', 'description' => 'prompt template service internal exception'], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"promptTemplateId\\": \\"6e49109bfeb94a39bb268f4e483ccxxx\\",\\n \\"requestId\\": \\"FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx\\\\n\\"\\n}","type":"json"}]', + 'title' => 'Create a Prompt Template', + 'description' => 'This API does not currently support the creation of text-to-image prompt templates.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreatePromptTemplate'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:CreatePromptTemplate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + ], + ], + 'DeleteCategory' => [ + 'summary' => 'Permanently deletes a specified category.', + 'path' => '/{WorkspaceId}/datacenter/category/{CategoryId}/', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'CategoryId', + 'in' => 'path', + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'The category ID, which is the `CategoryId` returned by the **AddCategory** operation. You can also obtain it on the [Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center) > File tab by clicking the ID icon next to the category name.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'The category ID, which is the `CategoryId` returned by the **AddCategory** operation. You can also obtain it on the [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) > File tab by clicking the ID icon next to the category name.'."\n" + ."\n" + .'</props>.', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'title' => ''], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the category belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', 'title' => ''], + ], + ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'InvalidParameter', - ], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], 'Data' => [ - 'description' => 'The data returned.'."\n", + 'description' => 'The data field returned by the operation.', 'type' => 'object', 'properties' => [ - 'Id' => [ - 'description' => 'The primary key ID of the job, which is the `JobId` parameter of the [GetIndexJobStatus](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-getindexjobstatus) operation.', - 'type' => 'string', - 'example' => 'eFDr2fGRzP9gdDZWAdo3YQ==', - ], - 'IndexId' => [ - 'description' => 'The primary key ID of the knowledge base.'."\n", - 'type' => 'string', - 'example' => 'khdyak1uuj', - ], + 'CategoryId' => ['description' => 'The ID of the deleted category.', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'Success', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'True', - ], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the call was successful. Valid values:'."\n" + .'- true: The call was successful.'."\n" + .'- false: The call failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'workspace id is null or invalid.', 'title' => ''], + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'success', 'title' => ''], ], + 'example' => '', ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'RagIndex.IdempotentParameterMismatch', - 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Data\\": {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\"\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"workspace id is null or invalid.\\",\\n \\"Code\\": \\"success\\"\\n}","type":"json"}]', + 'title' => 'Delete a category', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (requiring `AliyunBailianDataFullAccess`, which includes the sfm:DeleteCategory permission), and [join a workspace](~~2851098~~) 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><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this operation.'."\n" + .'- This operation is idempotent.'."\n" + ."\n" + .'**Rate limiting:**'."\n" + .'This operation is subject to rate limiting. Do not exceed 5 calls per second. If you are throttled, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteCategory'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteCategory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Data\\": {\\n \\"Id\\": \\"eFDr2fGRzP9gdDZWAdo3xxxx\\",\\n \\"IndexId\\": \\"79c0alxxxx\\"\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'SubmitIndexJob', - 'description' => '1. Before you call this operation, you must call the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation and obtain the `IndexId`.'."\n" - .'2. Execution takes a period of time after this operation is called. Do not make new request before the request is returned.'."\n" - .'3. If you want to query the execution status of the job after you call this operation, call the [GetIndexJobStatus](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-getindexjobstatus) operation.'."\n" - .'4. This interface is not idempotent.', ], - 'SubmitIndexAddDocumentsJob' => [ - 'summary' => 'Adds parsed documents to an unstructured knowledge base. You cannot use the API to add knowledge to structured knowledge bases, see the Usage notes section of this topic.', - 'path' => '/{WorkspaceId}/index/add_documents_to_index', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'DeleteChunk' => [ + 'summary' => 'Deletes specified text chunks from a knowledge base. Deleted text chunks cannot be retrieved or recalled.', + 'path' => '/{WorkspaceId}/chunk/delete', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREsfm4VA8MJ', - ], - ], + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ + 'name' => 'PipelineId', + 'in' => 'query', + 'schema' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', 'title' => ''], + ], + [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], + 'schema' => ['description' => 'The workspace ID of the knowledge base. To obtain the workspace ID, refer to [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', 'title' => ''], ], [ - 'name' => 'IndexId', + 'name' => 'ChunkIds', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', + 'description' => 'The list of text chunks to delete. A maximum of 10 text chunk IDs can be specified in a single request.', + 'type' => 'array', + 'items' => ['description' => 'The text chunk ID, which is the `_id` field in `Metadata` of the Node object returned by the **ListChunks** operation.', 'type' => 'string', 'required' => true, 'example' => 'llm-5ip55o1zrzxx_09fe52x_xxxxx_033b551e10024029992e79767b151fxx_10024xx_0', 'title' => ''], 'required' => true, - 'example' => '79c0aly8zw', + 'title' => '', + 'example' => '', ], ], - [ - 'name' => 'SourceType', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:'."\n" - ."\n" - .'* DATA_CENTER_CATEGORY: The category type. Import all documents from one or more categories in Data Center.'."\n" - .'* DATA_CENTER_FILE: The document type. Import one or more documents from Data Center.'."\n" - ."\n" - .'> If this parameter is set to DATA_CENTER_CATEGORY, you must specify the `CategoryIds` parameter. If this parameter is set to DATA_CENTER_FILE, you must specify the `DocumentIds` parameter.', - 'type' => 'string', - 'required' => true, - 'enumValueTitles' => [ - 'DATA_CENTER_CATEGORY' => '', - 'DATA_CENTER_FILE' => '', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'."\n"], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'title' => '', 'example' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'title' => '', 'example' => ''], + 'Success' => ['description' => 'Indicates whether the call was successful. Valid values:'."\n" + ."\n" + .'- true: The call was successful.'."\n" + .'- false: The call failed.', 'type' => 'boolean', 'example' => 'true'."\n", 'title' => ''], + 'Data' => ['description' => 'The business data returned upon a successful request.', 'type' => 'boolean', 'example' => 'true'."\n", 'title' => ''], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200'."\n", 'title' => ''], ], - 'example' => 'DATA_CENTER_FILE', + 'example' => '', ], ], - [ - 'name' => 'DocumentIds', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => 'The list of the primary key IDs of the documents.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The primary key ID of the document. To view the ID, you can click the ID icon next to the file name on the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.', - 'type' => 'string', - 'required' => false, - 'example' => 'doc_ea4a504d9ce545508d8aa6d90371bf5410021401', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\\\n\\",\\n \\"Code\\": \\"\\",\\n \\"Message\\": \\"\\",\\n \\"Success\\": true,\\n \\"Data\\": true,\\n \\"Status\\": \\"200\\\\n\\"\\n}","type":"json"}]', + 'title' => 'Delete chunks', + 'description' => '<warning> Deleted text chunks cannot be recovered (hard delete). Proceed with caution.'."\n" + .'- **Permission requirements**:'."\n" + .' - **Resource Access Management (RAM) user**: Obtain [API permissions](~~2848578~~) for Model Studio first (you can use the `AliyunBailianDataFullAccess` policy, which includes the sfm:DeleteChunk permission required by this operation), and [join a workspace](~~2851098~~) before invoking this operation.'."\n" + .' - **Alibaba Cloud account**: Has permissions by default and can invoke this operation directly.'."\n" + .'- **Invocation method**: Use the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>. The SDK provides encapsulation of complex signature calculation logic and simplifies the invocation procedure.'."\n" + .'- **Effective latency**: Changes typically take effect immediately. During peak hours, there may be a slight delay (seconds).'."\n" + .'- **Idempotence**: This operation is idempotent. Repeated calls to delete an already deleted text chunk return a success response.'."\n" + ."\n" + .'**Rate limit:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If throttled, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteChunk', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], - 'required' => false, ], ], + ], + ], + 'DeleteConnector' => [ + 'summary' => '', + 'path' => '/{WorkspaceId}/datacenter/connector/{ConnectorId}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'CategoryIds', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => 'The list of primary key IDs of the category.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The primary key ID of the category. To view the category ID, you can click the ID icon next to the category name on the Unstructured Data tab of the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.', - 'type' => 'string', - 'required' => false, - 'example' => 'cate_21a407a3372c4ba7aedc649709143f0c10021401'."\n", - ], - 'required' => false, - ], + 'AK' => [], ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ - 'name' => 'ChunkMode', - 'in' => 'query', - 'schema' => [ - 'type' => 'string', - ], + 'name' => 'ConnectorId', + 'in' => 'path', + 'schema' => ['type' => 'string', 'required' => true, 'maxLength' => 256, 'minLength' => 1, 'description' => '', 'example' => 'connector-d51861492df64257', 'title' => ''], ], [ - 'name' => 'Separator', - 'in' => 'query', + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['type' => 'string', 'required' => true, 'description' => '', 'example' => 'llm-mbhn96xxxx', 'title' => ''], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'type' => 'string', + 'type' => 'object', + 'properties' => [ + 'Code' => ['type' => 'string', 'description' => '', 'example' => 'Index.InvalidParameter', 'title' => ''], + 'Data' => [ + 'type' => 'object', + 'properties' => [ + 'ConnectorId' => ['type' => 'string', 'description' => '', 'example' => 'conn_file_e0c9db4030b2465a9478028f7d76cd92_1234', 'title' => ''], + ], + 'description' => '', + 'title' => '', + 'example' => '', + ], + 'Message' => ['type' => 'string', 'description' => '', 'example' => 'User not authorized to operate on the specified resource', 'title' => ''], + 'RequestId' => ['type' => 'string', 'title' => '', 'description' => '', 'example' => '1C139002-0EC5-584C-A755-4B8B9FA080BE'], + 'Status' => ['type' => 'string', 'description' => '', 'example' => '200', 'title' => ''], + 'Success' => ['type' => 'boolean', 'description' => '', 'example' => 'true', 'title' => ''], + ], + 'title' => '', + 'description' => '', + 'example' => '', ], ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '', + 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:DeleteConnector权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" + .'- 本接口不具备幂等性。'."\n" + ."\n" + .'**限流说明:**'."\n" + .'本接口频繁调用会被限流,频率请勿超过5次/秒。如遇限流,请稍后重试。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Data\\": {\\n \\"ConnectorId\\": \\"conn_file_e0c9db4030b2465a9478028f7d76cd92_1234\\"\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource\\",\\n \\"RequestId\\": \\"1C139002-0EC5-584C-A755-4B8B9FA080BE\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + ], + 'DeleteFile' => [ + 'path' => '/{WorkspaceId}/datacenter/file/{FileId}/', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'ChunkSize', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - ], + 'AK' => [], ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ - 'name' => 'OverlapSize', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - ], + 'name' => 'FileId', + 'in' => 'path', + 'schema' => ['description' => 'The file ID, which is the `FileId` returned by the **AddFile** API. You can also obtain it on the <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> page by clicking the ID icon next to the file name.', 'type' => 'string', 'required' => true, 'maxLength' => 128, 'minLength' => 32, 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], ], [ - 'name' => 'EnableHeaders', - 'in' => 'query', - 'schema' => [ - 'type' => 'boolean', - ], + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the file belongs. For information about how to obtain the ID, see [How to use workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oxxxx', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '778C0B3B-03C1-5FC1-A947-36EDD13606AB', - ], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'InvalidParameter', 'title' => ''], 'Data' => [ - 'description' => 'The data returned.'."\n", + 'description' => 'The business data field of the API response.', 'type' => 'object', 'properties' => [ - 'Id' => [ - 'description' => 'The primary key ID of the task, `JobId`.'."\n", - 'type' => 'string', - 'example' => '42687eb254a34802bed398357f5498ae', - ], + 'FileId' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'Index.InvalidParameter', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Current file status does not support delete.', 'title' => ''], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The status code returned by the API.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the API call succeeded. Valid values:'."\n" + ."\n" + .'- true: Succeeded.'."\n" + ."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'IdempotentParameterMismatch', - 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Delete file ', + 'summary' => 'Permanently delete a specified file from application data. Deleting data tables via API is not supported. For details, see the API Guide below.', + 'description' => '- Deleting data tables via API is not supported. To delete a data table or specific data within a table, go to <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> to perform the operation.'."\n" + ."\n" + .'- This API is used to delete files in <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> and does not affect any knowledge bases that have already been built. To delete a file from a knowledge base, invoke the **DeleteIndexDocument** API.'."\n" + ."\n" + .'- A RAM user must first obtain the [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (requiring `AliyunBailianDataFullAccess`, which includes the `sfm:DeleteFile` permission point) and [join a workspace](~~2851098~~) before invoking this API. An Alibaba Cloud account can invoke this API directly without authorization. We recommend that you use the latest version of the <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to invoke this API.'."\n" + ."\n" + .'- This API can only delete files whose status is either Failed to Parse (`PARSE_FAILED`) or Parse Succeeded (`PARSE_SUCCESS`).'."\n" + ."\n" + .'- This API is idempotent.'."\n" + ."\n" + .'**Rate Limiting Notice:**<br>'."\n" + .'Frequent invocation of this API will trigger rate limiting. Do not exceed 10 requests per second. If rate limited, retry after a short wait.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteFile'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Data\\": {\\n \\"Id\\": \\"42687eb254a34802bed398357f5498ae\\"\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Code\\": \\"Index.InvalidParameter\\"\\n}","type":"json"}]', - 'title' => 'SubmitIndexAddDocumentsJob', - 'description' => '* You must first upload documents to [Data Management](https://bailian.console.aliyun.com/#/data-center) and obtain the `FileId`. The documents are the knowledge source of the knowledge base. For more information, see [Import Data](https://www.alibabacloud.com/help/en/model-studio/user-guide/data-import-instructions).'."\n" - .'* Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.'."\n" - .'* After you call this operation, you can call the [GetIndexJobStatus](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-getindexjobstatus) operation to query the status of the job. More than 20 calls to the GetIndexJobStatus operation per minute may trigger throttling.'."\n" - .'* Execution takes a period of time after this operation is called. Do not make new request before the request is returned. This interface is not idempotent.', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"InvalidParameter\\",\\n \\"Data\\": {\\n \\"FileId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\"\\n },\\n \\"Message\\": \\"Current file status does not support delete.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', ], - 'Retrieve' => [ - 'summary' => 'Queries information from a specified knowledge base.', - 'path' => '/{WorkspaceId}/index/retrieve', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'DeleteFiles' => [ + 'summary' => 'Delete files in batch', + 'path' => '/{WorkspaceId}/datacenter/file/delete', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'Query', - 'in' => 'query', - 'schema' => [ - 'description' => 'The input query prompt. The length and characters of the query are not limited.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the category belongs. For information about how to obtain it, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-mbhn96xxxx', 'title' => ''], ], [ - 'name' => 'DenseSimilarityTopK', - 'in' => 'query', + 'name' => 'FileIds', + 'in' => 'formData', + 'style' => 'json', 'schema' => [ - 'description' => 'Vector retrieval top K. After generating vectors based on input text, the top K chunks in the knowledge base that are most similar to the vector representation of the input text are retrieved. Valid values: 0 to 100. The sum of the `DenseSimilarityTopK` and `SparseSimilarityTopK` parameters must be less than or equal to 200.'."\n" - ."\n" - .'Default value: 100.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '100', - 'default' => '100', + 'description' => 'The list of IDs of the files to be deleted. A maximum of 20 files can be deleted in a single request.', + 'type' => 'array', + 'items' => ['description' => 'The ID of the file to be deleted.', 'type' => 'string', 'required' => false, 'example' => 'file_xxxx', 'title' => ''], + 'required' => true, + 'maxItems' => 20, + 'minItems' => 1, + 'title' => '', + 'example' => '', ], ], - [ - 'name' => 'EnableReranking', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'Specifies whether to enable reranking. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n" - ."\n" - .'Default value: true.', - 'type' => 'boolean', - 'required' => false, - 'enumValueTitles' => [ - 'true' => '', - 'false' => '', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'DataCenter.FileTooLarge', 'title' => ''], + 'Data' => [ + 'description' => 'The returned data.', + 'type' => 'object', + 'properties' => [ + 'DeleteFileResultList' => [ + 'description' => 'The deletion results.', + 'type' => 'array', + 'items' => [ + 'description' => 'The deletion result of a single file.', + 'type' => 'object', + 'properties' => [ + 'FileId' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'file_6b193b9b4b1546ef9eaa7340e69adfca_10052857', 'title' => ''], + 'Status' => ['description' => 'The file deletion status. Valid values:'."\n" + ."\n" + .'- DELETED: The file is deleted.'."\n" + .'- FAILED: The file fails to be deleted.'."\n" + .'- NOT_FOUND: The file is not found.', 'type' => 'string', 'example' => 'DELETED', 'title' => ''], + ], + 'title' => '', + 'example' => '', + ], + 'title' => '', + 'example' => '', + ], + ], + 'title' => '', + 'example' => '', + ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'Id of the request', 'type' => 'string', 'example' => '17204B98-7734-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The status code returned by the API.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the API call is successful. Valid values:'."\n" + .'- true: The call is successful.'."\n" + .'- false: The call fails.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], - 'example' => 'true', + 'example' => '', ], ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Delete files in batch', + 'description' => '- Deleting data tables through the API is not supported. To delete a data table or specific data in a table, go to <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>.'."\n" + .'- This API is used to delete files in <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>. It does not affect knowledge bases that have already been built. To delete files in a knowledge base, call the **DeleteIndexDocument** operation.'."\n" + .'- A RAM user (sub-account) must first obtain the [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which already includes the sfm:DeleteFiles permission) and [join a workspace](~~2851098~~) before calling this operation. The Alibaba Cloud account (main account) can call this operation directly without authorization. We recommend that you use the latest version of the <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this operation.'."\n" + .'- This operation can only delete files whose status is parsing failed (PARSE_FAILED) or parsing succeeded (PARSE_SUCCESS).'."\n" + .'- This operation is idempotent.'."\n" + ."\n" + .'**Throttling:**'."\n" + .'Frequent calls to this operation are throttled. Do not exceed 10 queries per second (QPS). If you are throttled, try again later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"DataCenter.FileTooLarge\\",\\n \\"Data\\": {\\n \\"DeleteFileResultList\\": [\\n {\\n \\"FileId\\": \\"file_6b193b9b4b1546ef9eaa7340e69adfca_10052857\\",\\n \\"Status\\": \\"DELETED\\"\\n }\\n ]\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"17204B98-7734-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + ], + 'DeleteIndex' => [ + 'summary' => 'Permanently deletes a specified knowledge base.', + 'path' => '/{WorkspaceId}/index/delete', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ - 'name' => 'EnableRewrite', + 'name' => 'IndexId', 'in' => 'query', + 'schema' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'required' => true, 'example' => 'f89ie0xxxx', 'title' => ''], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The workspace ID of the knowledge base. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', 'title' => ''], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'Specifies whether to enable multi-round conversation rewriting. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n" - ."\n" - .'Default value: false.', - 'type' => 'boolean', - 'required' => false, - 'enumValueTitles' => [ - 'true' => '', - 'false' => '', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'Index.InvalidParameter', 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + .'- true: The call was successful.'."\n" + .'- false: The call failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], - 'example' => 'false', + 'example' => '', ], ], - [ - 'name' => 'Rerank', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => 'Ranking configurations.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The ranking configurations object.'."\n", - 'type' => 'object', - 'properties' => [ - 'ModelName' => [ - 'description' => 'The name of the rank model. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values:'."\n" - ."\n" - .'* gte-rerank-hybrid: Recommended official model.'."\n" - .'* gte-rerank', - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [ - 'gte-rerank-hybrid' => '', - 'gte-rerank' => '', - ], - 'example' => 'gte-rerank-hybrid', - ], - ], - 'required' => false, + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => 'Delete a knowledge base', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Model Studio (requiring `AliyunBailianDataFullAccess`, which includes the sfm:DeleteIndex permission) and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Use the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to invoke this operation.'."\n" + .'- 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).'."\n" + .'- If the knowledge base is associated with an application, you must first dissociate it from the application before deleting it. This can currently only be done through the console. For more information, see [Knowledge base](~~2807740~~).'."\n" + .'- Deletion is irreversible. A deleted knowledge base cannot be recovered. Proceed with caution.'."\n" + .'- Invoking this operation does not delete files that have been imported into <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>.'."\n" + .'- This operation has idempotence.'."\n" + ."\n" + .'**Rate limit:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If you are throttled, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteIndex'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:DeleteIndex', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], - 'required' => false, ], ], + ], + ], + 'DeleteIndexDocument' => [ + 'summary' => 'Permanently deletes files from a specified knowledge base.', + 'path' => '/{WorkspaceId}/index/delete_index_document', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'RerankMinScore', - 'in' => 'query', - 'schema' => [ - 'description' => 'Similarity Threshold The lowest similarity score of chunks that can be returned. This parameter is used to filter text chunks returned by the rank model. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base). Valid values: \\[0.01-1.00]. The priority of this parameter is greater than the similarity threshold configured for the knowledge base.'."\n" - ."\n" - .'By default, this parameter is left empty. In this case, the similarity threshold of the knowledge base is used.', - 'type' => 'number', - 'format' => 'float', - 'required' => false, - 'example' => '0.20', - ], + 'AK' => [], ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ - 'name' => 'RerankTopN', + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the knowledge base belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', 'title' => ''], + ], + [ + 'name' => 'IndexId', 'in' => 'query', - 'schema' => [ - 'description' => 'The top N return data after reranking. Valid values: 1 to 20. Default value: 5.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '5', - 'default' => '5', - ], + 'schema' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', 'title' => ''], ], [ - 'name' => 'Rewrite', + 'name' => 'DocumentIds', 'in' => 'query', 'style' => 'json', 'schema' => [ - 'description' => 'Conversation rewriting configurations.'."\n", + 'description' => 'The list of file IDs.', 'type' => 'array', - 'items' => [ - 'description' => 'Conversation rewriting configurations object.'."\n", - 'type' => 'object', - 'properties' => [ - 'ModelName' => [ - 'description' => 'Conversation rewriting model name. The query rewriting model automatically adjusts the original prompt based on the context to improve retrieval performance. Valid value:'."\n" - ."\n" - .'* conv-rewrite-qwen-1.8b'."\n" - ."\n" - .'By default, this parameter is left empty, which means conv-rewrite-qwen-1.8b is used.'."\n", - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [ - 'conv-rewrite-qwen-1.8b' => '', + 'items' => ['description' => 'The file ID, which is the `FileId` returned by the **AddFile** operation. You can also obtain the file ID by clicking the ID icon next to the file name on the <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center) - Files</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) - Files</props> tab.', 'type' => 'string', 'required' => false, 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx', 'title' => ''], + 'required' => true, + 'title' => '', + 'example' => '', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'Index.InvalidParameter', 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + .'- true: The operation was successful.'."\n" + .'- false: The operation failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Data' => [ + 'description' => 'The business data field returned by the operation.', + 'type' => 'object', + 'properties' => [ + 'DeletedDocument' => [ + 'description' => 'The list of successfully deleted file IDs.', + 'type' => 'array', + 'items' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx', 'title' => ''], + 'title' => '', + 'example' => '', ], - 'example' => 'conv-rewrite-qwen-1.8b', ], + 'title' => '', + 'example' => '', ], - 'required' => false, + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], ], - 'required' => false, + 'example' => '', ], ], - [ - 'name' => 'SparseSimilarityTopK', - 'in' => 'query', - 'schema' => [ - 'description' => 'The top K of keyword retrieval. Chunks that exactly match the keywords of the input text are retrieved from the knowledge base. This filters out irrelevant chunks and boosts accuracy. Valid values: 0 to 100. The sum of the `DenseSimilarityTopK` and `SparseSimilarityTopK` parameters must be less than or equal to 200.'."\n" - ."\n" - .'Default value: 100.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '100', - 'default' => '100', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Success\\": true,\\n \\"Data\\": {\\n \\"DeletedDocument\\": [\\n \\"file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx\\"\\n ]\\n },\\n \\"Status\\": \\"200\\"\\n}","type":"json"}]', + 'title' => 'Delete files from a knowledge base', + 'description' => '- This operation does not support deleting data from data query or image Q&A knowledge bases. Use the Model Studio console instead.'."\n" + .'- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Model Studio (requiring `AliyunBailianDataFullAccess`, which includes the sfm:DeleteIndexDocument permission), before calling this operation. Alibaba Cloud accounts can call this operation directly without authorization. Use the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this operation.'."\n" + .'- 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).'."\n" + .'- You can only delete files whose status is import failed (INSERT_ERROR) or import succeeded (FINISH) in the knowledge base. To query the file status in a specified knowledge base, call the **ListIndexDocuments** operation.'."\n" + .'- Deletion is irreversible. The content of deleted files cannot be recovered, and the **Retrieve** operation can no longer retrieve related information. Proceed with caution.'."\n" + .'- Calling this operation does not delete documents that have been imported into <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>.'."\n" + .'- This operation is idempotent.'."\n" + ."\n" + .'**Throttling:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If you are throttled, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteIndexDocument'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteIndexDocument', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], + ], + ], + 'DeleteMemory' => [ + 'summary' => 'Permanently deletes a specified long-term memory.', + 'path' => '/{workspaceId}/memories/{memoryId}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ - 'name' => 'WorkspaceId', + 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], + 'schema' => ['title' => '', 'description' => 'The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx'], ], [ - 'name' => 'IndexId', - 'in' => 'query', + 'name' => 'memoryId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The ID of the long-term memory, which corresponds to the memoryId returned by the [CreateMemory](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-creatememory) operation.', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbdxxxx'."\n"], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', - 'required' => true, - 'example' => '5pwe0m2g6t', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n"], + ], + 'example' => '', ], ], - [ - 'name' => 'SaveRetrieverHistory', - 'in' => 'query', - 'schema' => [ - 'description' => 'Specifies whether to save the retrieve test history. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n" - ."\n" - .'Default value: false.'."\n", - 'type' => 'boolean', - 'required' => false, - 'example' => 'false', - 'default' => 'false', + ], + 'errorCodes' => [ + 404 => [ + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], + ], + 500 => [ + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\"\\n}","type":"json"}]', + 'title' => 'Delete long-term memory', + 'description' => '- Before calling this operation, make sure that your long-term memory has been created and has not been deleted (that is, the memoryId is valid).'."\n" + .'- The delete operation is irreversible. The deleted long-term memory, including all of its long-term memory nodes, cannot be recovered. The [GetMemory](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-getmemory) operation will no longer be able to retrieve its information. Proceed with caution.'."\n" + .'- This operation is idempotent.'."\n" + ."\n" + .'**Rate limit:** Make sure that the interval between two requests is at least 1 second. Otherwise, throttling may be triggered. If throttling occurs, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteMemory'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteMemory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], + ], + ], + 'DeleteMemoryNode' => [ + 'summary' => 'Deletes a memory fragment.', + 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes/{memoryNodeId}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'SearchFilters', - 'in' => 'query', - 'style' => 'json', + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'workspaceId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The workspace ID.', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdm5v'."\n"], + ], + [ + 'name' => 'memoryId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The long-term memory ID.', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n"], + ], + [ + 'name' => 'memoryNodeId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The memory fragment ID.', 'type' => 'string', 'required' => true, 'example' => '68de06c95368463a8be4a84efc872cc5'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'Specifies complex filter conditions. For more information about the syntax of SearchFilters, see the SearchFilter syntax section of this topic.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The filter condition object.'."\n", - 'type' => 'object', - 'required' => false, - 'additionalProperties' => [ - 'type' => 'string', - 'description' => 'The filter condition.'."\n", - 'example' => 'Alibaba Cloud Model Studio'."\n", - ], + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'], ], - 'required' => false, + 'example' => '', ], ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'Memory.MemoryNodeContentInvalid', 'errorMessage' => 'Memory node content is invalid.', 'description' => 'Memory node content is invalid.'], + ], + 404 => [ + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], + ['errorCode' => 'Memory.MemoryNodeNotFound', 'errorMessage' => 'MemoryNode not found.', 'description' => 'MemoryNode not found'], + ], + 500 => [ + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\"\\n}","type":"json"}]', + 'title' => 'Delete a memory fragment', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteMemoryNode'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteMemoryNode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + ], + ], + 'DeletePromptTemplate' => [ + 'summary' => 'Deletes a prompt template based on the template ID.', + 'path' => '/{workspaceId}/promptTemplates/{promptTemplateId}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'Images', - 'in' => 'query', - 'allowEmptyValue' => true, - 'style' => 'simple', + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'workspaceId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The workspace ID.'."\n", 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdxxx'], + ], + [ + 'name' => 'promptTemplateId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The template ID.'."\n", 'type' => 'string', 'required' => true, 'example' => '6e49109bfeb94a39bb268f4e483ccxxx'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'string', - 'required' => false, + 'title' => 'Schema of Response', + 'description' => 'Schema of Response'."\n", + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '', 'description' => 'The request ID.'."\n", 'type' => 'string', 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx'], ], - 'required' => false, + 'example' => '', ], ], + ], + 'errorCodes' => [ + 404 => [ + ['errorCode' => 'PromptTemplate.TemplateNotFound', 'errorMessage' => 'Prompt template not found.', 'description' => 'Prompt template not found'], + ], + 500 => [ + ['errorCode' => 'PromptTemplate.InternalError', 'errorMessage' => 'Prompt template service inner exception.', 'description' => 'prompt template service internal exception'], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx\\"\\n}","type":"json"}]', + 'title' => 'DeletePromptTemplate', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeletePromptTemplate'], + ], + ], + 'ramActions' => [ [ - 'name' => 'QueryHistory', - 'in' => 'query', - 'allowEmptyValue' => false, - 'style' => 'json', - 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'role' => [ - 'type' => 'string', - ], - 'content' => [ - 'type' => 'string', - ], - ], + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeletePromptTemplate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], ], + ], + 'DescribeFile' => [ + 'summary' => 'Queries the basic information of a file in application data, including the file name, type, and status.', + 'path' => '/{WorkspaceId}/datacenter/file/{FileId}/', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the file belongs. For more information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', 'title' => ''], + ], + [ + 'name' => 'FileId', + 'in' => 'path', + 'schema' => ['description' => 'The file ID, which is the `FileId` returned by the **AddFile** operation. You can also obtain the file ID by clicking the ID icon next to the file name on the <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center) - Files tab</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) - Files tab</props>.', 'type' => 'string', 'required' => true, 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], + ], + ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'Index.InvalidParameter', - ], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'Success', 'title' => ''], 'Data' => [ - 'description' => 'The returned data.'."\n", + 'description' => 'The data field returned by the operation.', 'type' => 'object', 'properties' => [ - 'Nodes' => [ - 'description' => 'The list of queried chunks.'."\n", + 'CategoryId' => ['description' => 'The ID of the category to which the file belongs.', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', 'title' => ''], + 'CreateTime' => ['description' => 'The timestamp when the file was added to Model Studio. Format: yyyy-MM-dd HH:mm:ss. Time zone: UTC+8.', 'type' => 'string', 'example' => '2024-09-09 12:45:43', 'title' => ''], + 'FileId' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], + 'FileName' => ['description' => 'The file name.', 'type' => 'string', 'example' => 'XXX产品介绍.pdf', 'title' => ''], + 'FileType' => ['description' => 'The file type (extension). Possible values: pdf, docx, doc, txt, md, pptx, ppt, xlsx, xls, html, png, jpg, jpeg, bmp, and gif.', 'type' => 'string', 'example' => 'pdf', 'title' => ''], + 'Parser' => ['description' => 'The parser type used to parse the file. Possible values:'."\n" + .'- DASHSCOPE_DOCMIND: the default document parser.', 'type' => 'string', 'example' => 'DASHSCOPE_DOCMIND', 'title' => ''], + 'SizeInBytes' => ['description' => 'The file size, in bytes.', 'type' => 'integer', 'format' => 'int64', 'example' => '1234', 'title' => ''], + 'Status' => ['description' => '<props="china">'."\n" + ."\n" + .'For files used in document-based knowledge bases (type: UNSTRUCTURED), possible values:'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'For files used in unstructured knowledge bases (type: UNSTRUCTURED), possible values:'."\n" + ."\n\n" + .'</props>'."\n" + ."\n" + .'- INIT: Pending parsing.'."\n" + .'- IN_PARSE_QUEUE: Queued for parsing.'."\n" + .'- PARSING: Being parsed.'."\n" + .'- PARSE_SUCCESS: Parsing completed.'."\n" + .'<note>The document can be imported into a knowledge base only after the status changes to PARSE_SUCCESS.</note>'."\n" + .'- PARSE_FAILED: Parsing failed.'."\n" + ."\n" + .'<props="china">'."\n" + .'For files used in agent application [session interaction](https://www.alibabacloud.com/help/en/model-studio/user-guide/file-interaction) (type: SESSION_FILE), possible values:'."\n" + ."\n" + .'- INIT: Pending parsing.'."\n" + .'- IN_PARSE_QUEUE: Queued for parsing.'."\n" + .'- PARSING: Being parsed.'."\n" + .'- PARSE_SUCCESS: Parsing completed.'."\n" + .'- PARSE_FAILED: Parsing failed.'."\n" + .'- SAFE_CHECKING: Safety check in progress.'."\n" + .'- SAFE_CHECK_FAILED: Safety check failed.'."\n" + .'- INDEX_BUILDING: Index being built.'."\n" + .'- INDEX_BUILD_SUCCESS: Index built.'."\n" + .'- INDEX_BUILDING_FAILED: Index building failed.'."\n" + .'- INDEX_DELETED: File index deleted.'."\n" + .'- FILE_IS_READY: File is ready.'."\n" + .'<note>Q&A is available only after the status changes to FILE_IS_READY.</note>'."\n" + .'- FILE_EXPIRED: File expired.'."\n" + .'<note>The file is valid only for the current user session. After the user closes the session, the file expires (maximum validity period: 7 days). Long-term retention is not supported.</note>'."\n" + .'</props>.', 'type' => 'string', 'example' => 'PARSE_SUCCESS', 'title' => ''], + 'Tags' => [ + 'description' => 'The list of tags associated with the file. A file can be associated with multiple tags.', 'type' => 'array', - 'items' => [ - 'description' => 'The chunk object.'."\n", - 'type' => 'object', - 'properties' => [ - 'Metadata' => [ - 'description' => 'The metadata map of the chunk.'."\n", - 'type' => 'any', - 'example' => '', - ], - 'Score' => [ - 'description' => 'The similarity score of the chunk. Valid values:\\[0-1].'."\n", - 'type' => 'number', - 'format' => 'double', - 'example' => '0.3', - ], - 'Text' => [ - 'description' => 'The text of the chunk.'."\n", - 'type' => 'string', - 'example' => '', - ], - ], - ], + 'items' => ['description' => 'The tag of the file.', 'type' => 'string', 'example' => '产品介绍', 'title' => ''], + 'title' => '', + 'example' => '', ], + 'ParseResultDownloadUrl' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''], + 'ParseErrorMessage' => ['title' => '', 'description' => 'The reason for the parsing failure.', 'type' => 'string', 'example' => 'Error Message'], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-7734-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Requests throttling triggered.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the call was successful. Valid values:'."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + ], + 'example' => '', + ], + ], + 403 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'Code' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''], + 'HttpStatusCode' => ['type' => 'integer', 'format' => 'int32', 'description' => '', 'title' => '', 'example' => ''], + 'Message' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''], + 'Success' => ['type' => 'boolean', 'description' => '', 'title' => '', 'example' => ''], ], 'description' => '', + 'title' => '', + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Data\\": {\\n \\"Nodes\\": [\\n {\\n \\"Metadata\\": \\"{\\\\n \\\\\\"parent\\\\\\": \\\\\\"\\\\\\",\\\\n \\\\\\"file_path\\\\\\": \\\\\\"https://***\\\\\\",\\\\n \\\\\\"image_url\\\\\\": [\\\\n \\\\\\"http://***\\\\\\"\\\\n ],\\\\n \\\\\\"nid\\\\\\": \\\\\\"***\\\\\\",\\\\n \\\\\\"title\\\\\\": \\\\\\"阿里云百炼文档\\\\\\",\\\\n \\\\\\"doc_id\\\\\\": \\\\\\"doc_***\\\\\\",\\\\n \\\\\\"content\\\\\\": \\\\\\"阿里云百炼是基于通义大模型、行业大模型以及三方大模型的一站式大模型开发平台。面向企业客户和个人开发者,提供完整的模型服务工具和全链路应用开发套件,预置丰富的能力插件,提供API及SDK等便捷的集成方式,高效完成大模型应用构建\\\\\\",\\\\n \\\\\\"workspace_id\\\\\\": \\\\\\"ws_***\\\\\\",\\\\n \\\\\\"hier_title\\\\\\": \\\\\\"阿里云百炼文档\\\\\\",\\\\n \\\\\\"doc_name\\\\\\": \\\\\\"阿里云百炼文档介绍.pdpf\\\\\\",\\\\n \\\\\\"pipeline_id\\\\\\": \\\\\\"rhd***\\\\\\",\\\\n \\\\\\"_id\\\\\\": \\\\\\"ws_***\\\\\\"\\\\n}\\",\\n \\"Score\\": 0.3,\\n \\"Text\\": \\"阿里云百炼是基于通义大模型、行业大模型以及三方大模型的一站式大模型开发平台。面向企业客户和个人开发者,提供完整的模型服务工具和全链路应用开发套件,预置丰富的能力插件,提供API及SDK等便捷的集成方式,高效完成大模型应用构建。\\"\\n }\\n ]\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"17204B98-7734-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'Retrieve', - 'description' => '* Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.'."\n" - .'* The response time may be long because this operation involves complex retrieval and matching. We recommend that you set appropriate timeout and retry policy for requests.'."\n" - .'* This interface is idempotent.'."\n", - 'requestParamsDescription' => '**SearchFilters syntax**'."\n" + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Success\\",\\n \\"Data\\": {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\",\\n \\"CreateTime\\": \\"2024-09-09 12:45:43\\",\\n \\"FileId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\",\\n \\"FileName\\": \\"XXX产品介绍.pdf\\",\\n \\"FileType\\": \\"pdf\\",\\n \\"Parser\\": \\"DASHSCOPE_DOCMIND\\",\\n \\"SizeInBytes\\": 1234,\\n \\"Status\\": \\"PARSE_SUCCESS\\",\\n \\"Tags\\": [\\n \\"产品介绍\\"\\n ],\\n \\"ParseResultDownloadUrl\\": \\"\\",\\n \\"ParseErrorMessage\\": \\"Error Message\\"\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => 'Query file status', + 'description' => '- A Resource Access Management (RAM) user must first obtain [API permissions](~~2848578~~) for Model Studio (`AliyunBailianDataFullAccess` or `AliyunBailianDataReadOnlyAccess`, both of which include the sfm:DescribeFile permission), and [join a workspace](~~2851098~~) before invoking this operation. An Alibaba Cloud account can invoke this operation directly without authorization. Use the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to invoke this operation.'."\n" ."\n" - .'* The filter conditions support sub groups. By default, the default semantics between sub groups is AND and cannot be modified. '."\n" + .'- This operation is idempotent.'."\n" ."\n" - .' * Fields within a sub group support the `_operator` = AND/OR logical operators and the AND semantics by default. Case insensitive. '."\n" - .' * Fields within a sub group support `_conditions` =\\[] for nested sub-conditions. By default, the logical relationship between sub-conditions is inherited from the `_operator` logical operator of the parent group. You can also use `_conditions_operator`= AND/OR to customize the logical relationship between sub-conditions.'."\n" - ."\n" - .'* Within a sub group, retrievable fields support `singleQuery`, `multiQuery`, and `rangeQuery`. '."\n" - ."\n" - .' * singleQuery: numeric values and strings.'."\n" - .' * multiQuery: an array of numeric values and strings.'."\n" - .' * rangeQuery: The `eq`, `neq`, and `like` attributes are supported. You cannot configure multiple (case insensitive) intervals for a field. The `gt`, `gte`, `lt`, and `lte` attributes are supported. We recommend that you set these values to numeric (case insensitive).'."\n" - ."\n" - .'<!---->'."\n" - ."\n" - .' Sample:'."\n" - ."\n" - .' {'."\n" - .' "search_filters": ['."\n" - .' {'."\n" - .' "singleQuery": "stringValue", // Single-value query'."\n" - .' "multiQuery": [ // Multi-value query.'."\n" - .' "stringValue1",'."\n" - .' "stringValue2"'."\n" - .' ],'."\n" - .' "logicQuery": { // Logic query.'."\n" - .' "like": "prefix"'."\n" - .' },'."\n" - .' "rangeQuery": { // Range query.'."\n" - .' "gte": intValue,'."\n" - .' "lte": intValue'."\n" - .' },'."\n" - .' "_conditions": [ // Nested sub-conditions.'."\n" - .' {'."\n" - .' "singleQuery": intValue'."\n" - .' }'."\n" - .' ]'."\n" - .' },'."\n" - .' {'."\n" - .' "_operator": "OR", // Multi-condition query.'."\n" - .' "singleQuery": "stringValue"'."\n" - .' }'."\n" - .' ]'."\n" - .' }'."\n", - ], - 'ListIndexDocuments' => [ - 'summary' => 'Queries the details of one or more documents in a specified knowledge base.', - 'path' => '/{WorkspaceId}/index/list_index_documents', - 'methods' => [ - 'get', + .'**Throttling:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If you are throttled, retry later.', + 'changeSet' => [ + ['createdAt' => '2024-09-18T08:46:20.000Z', 'description' => 'Response parameters changed'], ], - 'schemes' => [ - 'https', + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DescribeFile'], + ], ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:DescribeFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + ], + ], + 'GetAlipayTransferStatus' => [ + 'summary' => 'Queries the tipping status of the Alipay wallet bound to an application.', + 'path' => '/openapi/alipay/transfer/status', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/x-www-form-urlencoded', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], 'parameters' => [ [ - 'name' => 'IndexId', + 'name' => 'workspace_id', 'in' => 'query', - 'schema' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', - 'required' => true, - 'example' => '79c0aly8zw', - ], + 'schema' => ['description' => 'The Bailian workspace ID.', 'type' => 'string', 'required' => false, 'example' => 'llm-cxxxxxxb8d47ks', 'title' => ''], ], [ - 'name' => 'DocumentStatus', + 'name' => 'code', 'in' => 'query', + 'schema' => ['description' => 'The tipping code returned by the Alipay tipping link request.', 'type' => 'string', 'required' => false, 'example' => 'xxx-xxxx', 'title' => ''], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'The import status of the documents to be queried. Valid values:'."\n" - ."\n" - .'* INSERT_ERROR'."\n" - .'* RUNNING'."\n" - .'* DELETED'."\n" - .'* FINISH'."\n" - ."\n" - .'The default value is null, which means the import status is not used to filter the results.'."\n", - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [ - 'INSERT_ERROR' => '', - 'RUNNING' => '', - 'DELETED' => '', - 'FINISH' => '', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '', 'description' => 'The unique ID of the request.', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n"], + 'data' => [ + 'description' => 'The tipping result data.', + 'type' => 'object', + 'properties' => [ + 'code' => ['description' => 'The code associated with the tipping.', 'type' => 'string', 'example' => '0', 'title' => ''], + 'walletItemCode' => ['description' => 'The Alipay product wallet code.', 'type' => 'string', 'example' => 'xsdfsdf', 'title' => ''], + 'mainAccountId' => ['description' => 'The primary account ID (ignored by the API).', 'type' => 'string', 'example' => '1007576424487905', 'title' => ''], + 'accountId' => ['description' => 'The sub-account ID (ignored by the API).', 'type' => 'string', 'example' => '1348393307144609', 'title' => ''], + 'alipayOrderId' => ['description' => 'The Alipay order ID.', 'type' => 'string', 'example' => '1234234', 'title' => ''], + 'status' => ['description' => 'The tipping status. Valid values:'."\n" + .'- 1: Succeeded.'."\n" + .'- 0: Deleted.'."\n" + .'- 2: Pending tipping.'."\n" + .'- 3: Canceled.'."\n" + .'- 4: Refunded.'."\n" + .'- 5: Closed.'."\n" + .'- 6: Failed.'."\n" + .'- 7: Disputed or abnormal.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''], + 'creator' => ['description' => 'The creator (ignored by the API).', 'type' => 'string', 'example' => '234234', 'title' => ''], + 'modifier' => ['description' => 'The modifier (ignored by the API).', 'type' => 'string', 'example' => '234234', 'title' => ''], + 'alipayOrderDetail' => ['description' => 'The payment details (ignored by the API).', 'type' => 'string', 'example' => '{}', 'title' => ''], + 'title' => ['description' => 'The transfer title.', 'type' => 'string', 'example' => 'test', 'title' => ''], + 'qrURL' => ['description' => 'The tipping link (ignored by the API).', 'type' => 'string', 'example' => 'https://xxx.aliyun.com', 'title' => ''], + 'transAmount' => ['description' => 'The total order amount. Unit: CNY.', 'type' => 'string', 'example' => '0.22', 'title' => ''], + 'scope' => ['description' => 'The ownership status of the tipping application.', 'type' => 'string', 'example' => 'publish', 'title' => ''], + ], + 'title' => '', + 'example' => '', + ], ], - 'example' => 'FINISH', + 'example' => '', ], ], - [ - 'name' => 'DocumentName', - 'in' => 'query', - 'schema' => [ - 'description' => 'The names of the queried documents. The default value is null, which means the names are not used to filter the results.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => '', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\",\\n \\"data\\": {\\n \\"code\\": \\"0\\",\\n \\"walletItemCode\\": \\"xsdfsdf\\",\\n \\"mainAccountId\\": \\"1007576424487905\\",\\n \\"accountId\\": \\"1348393307144609\\",\\n \\"alipayOrderId\\": \\"1234234\\",\\n \\"status\\": 1,\\n \\"creator\\": \\"234234\\",\\n \\"modifier\\": \\"234234\\",\\n \\"alipayOrderDetail\\": \\"{}\\",\\n \\"title\\": \\"test\\",\\n \\"qrURL\\": \\"https://xxx.aliyun.com\\",\\n \\"transAmount\\": \\"0.22\\",\\n \\"scope\\": \\"publish\\"\\n }\\n}","type":"json"}]', + 'title' => 'Query alipay tipping status', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:GetAlipayTransferStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], + ], + ], + 'GetAlipayUrl' => [ + 'summary' => 'Retrieves the Alipay tipping URL for an application.', + 'path' => '/openapi/alipay/transfer/url', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'EnableNameLike', - 'in' => 'query', - 'schema' => [ - 'type' => 'string', - ], + 'AK' => [], ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ [ - 'name' => 'PageNumber', + 'name' => 'workspace_id', 'in' => 'query', - 'schema' => [ - 'description' => 'The page numbers of the pages to return. Pages start from page 1. Default value: 1.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], + 'schema' => ['description' => 'The ID of the Bailian workspace.', 'type' => 'string', 'required' => false, 'example' => 'xxxllm-czb8d47ks', 'title' => ''], ], [ - 'name' => 'PageSize', + 'name' => 'app_id', 'in' => 'query', + 'schema' => ['description' => 'The ID of the Bailian application.', 'type' => 'string', 'required' => false, 'example' => 'asfasdfxxasdf', 'title' => ''], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'The number of documents displayed on each page. No maximum value. Default value: 10.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '10', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => 'The unique ID of the request.', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n", 'title' => ''], + 'data' => [ + 'description' => 'The response data.', + 'type' => 'object', + 'properties' => [ + 'qrUrl' => ['description' => 'The generated tipping URL.', 'type' => 'string', 'example' => 'https://xxxxxx.aliyun-inc.com', 'title' => ''], + 'code' => ['description' => 'The tipping code used to query the tipping status.', 'type' => 'string', 'example' => 'xxsdfasfw', 'title' => ''], + ], + 'title' => '', + 'example' => '', + ], + ], + 'example' => '', ], ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\",\\n \\"data\\": {\\n \\"qrUrl\\": \\"https://xxxxxx.aliyun-inc.com\\",\\n \\"code\\": \\"xxsdfasfw\\"\\n }\\n}","type":"json"}]', + 'title' => 'Get alipay tipping URL', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:GetAlipayUrl', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + ], + ], + 'GetAvailableParserTypes' => [ + 'summary' => 'Lists all supported parser types based on the input file type (file extension).', + 'path' => '/{WorkspaceId}/datacenter/parser/parsertype', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the file belongs. For more information, see [Use workspaces](~~2587495~~).'."\n", 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', 'title' => ''], + ], + [ + 'name' => 'FileType', + 'in' => 'query', 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console.'."\n", + 'description' => 'The file type. Valid values: pdf, docx, and doc.'."\n", 'type' => 'string', 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', + 'example' => 'pdf', + 'enum' => ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'md', 'txt', 'pdf', 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'html'], + 'title' => '', ], ], ], @@ -4002,803 +3648,663 @@ 'description' => 'Schema of Response'."\n", 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833', - ], - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'InvalidParameter', - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'The request ID.'."\n", 'type' => 'string', 'example' => '17204B98-7734-4F9A-8464-2446XXXXXXX'], 'Data' => [ - 'description' => 'The returned data.'."\n", + 'description' => 'The data returned.'."\n", 'type' => 'object', 'properties' => [ - 'Documents' => [ - 'description' => 'The list of documents in the knowledge base.'."\n", + 'FileType' => ['description' => 'The file type, which is the same as the FileType in the input parameter.'."\n", 'type' => 'string', 'example' => 'pdf', 'title' => ''], + 'ParserList' => [ + 'description' => 'The list of supported parsers'."\n", 'type' => 'array', 'items' => [ - 'description' => 'The document object.'."\n", + 'description' => 'A parser object'."\n", 'type' => 'object', 'properties' => [ - 'SourceId' => [ - 'description' => 'For unstructured knowledge base, this parameter is the category ID. To view the category ID, you can click the ID icon next to the category name on the Unstructured Data tab of the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.'."\n" - ."\n" - .'For structured knowledge base, this parameter is the data table ID. To view the table ID, you can click the ID icon next to the table name on the Structured Data tab of the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.', - 'type' => 'string', - 'example' => 'cate_21a407a3372c4ba7aedc649709143f0c10021401', - ], - 'Id' => [ - 'description' => 'The primary key ID of the document.'."\n", - 'type' => 'string', - 'example' => 'doc_c134aa2073204a5d936d870bf960f56a10024701', - ], - 'Name' => [ - 'description' => 'The name of the document.'."\n", - 'type' => 'string', - 'example' => '', - ], - 'Size' => [ - 'description' => 'The size of the document. Unit: bytes.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '996764', - ], - 'DocumentType' => [ - 'description' => 'The format of the document. Valid values: pdf, docx, doc, txt, md, pptx, ppt, and EXCEL.'."\n", - 'type' => 'string', - 'example' => 'pdf', - ], - 'Status' => [ - 'description' => 'The import status of the document. Valid values:'."\n" - ."\n" - .'* INSERT_ERROR'."\n" - .'* RUNNING'."\n" - .'* DELETED'."\n" - .'* FINISH'."\n", - 'type' => 'string', - 'enumValueTitles' => [ - 'INSERT_ERROR' => 'INSERT_ERROR', - 'RUNNING' => 'RUNNING', - 'DELETED' => 'DELETED', - 'FINISH' => 'FINISH', - ], - 'example' => 'RUNNING', - ], - 'Code' => [ - 'description' => 'The error status code of document import.'."\n", - 'type' => 'string', - 'example' => '110002', - ], - 'Message' => [ - 'description' => 'The error message of document import.'."\n", - 'type' => 'string', - 'example' => 'check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid', - ], - 'GmtModified' => [ - 'type' => 'integer', - 'format' => 'int64', - ], + 'DisplayName' => ['description' => 'The display name of the parsing method.'."\n", 'type' => 'string', 'example' => '智能文档解析', 'title' => ''], + 'Parser' => ['description' => 'The parser code. Valid values:'."\n" + ."\n" + .'* DOCMIND (Intelligent parsing)'."\n" + .'* DOCMIND_DIGITAL (Digital parsing)'."\n" + .'* DOCMIND_LLM_VERSION (LLM parsing)'."\n" + .'* DASH_QWEN_VL_PARSER (Qwen VL parsing)'."\n", 'type' => 'string', 'example' => 'DOCMIND', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - ], - 'IndexId' => [ - 'description' => 'The primary key ID of the knowledge base.'."\n", - 'type' => 'string', - 'example' => 'pno97tn8iu', - ], - 'TotalCount' => [ - 'description' => 'The total number of documents returned.'."\n", - 'type' => 'integer', - 'format' => 'int64', - 'example' => '2437', - ], - 'PageNumber' => [ - 'description' => 'The specified page number.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => 'The specified number of documents on each page.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', + 'title' => '', + 'example' => '', ], ], + 'title' => '', + 'example' => '', ], - 'Status' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => '200', - ], + 'Status' => ['description' => 'The HTTP status code returned.'."\n", 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the call is successful. Valid values:'."\n" + ."\n" + .'* true'."\n" + .'* false'."\n", 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Message' => ['description' => 'The error message that is returned if the request failed.'."\n", 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource', 'title' => ''], + 'Code' => ['description' => 'The error code returned.'."\n", 'type' => 'string', 'example' => 'DataCenter.Throttling', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'GetAvailableParserTypes', + 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(`AliyunBailianDataFullAccess`或`AliyunBailianDataReadOnlyAccess`均可,已包括sfm:GetAvailableParserTypes权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版<props="china">[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>来调用本接口。'."\n" + ."\n" + .'- 本接口具有幂等性。'."\n" + ."\n" + .'**限流说明:**'."\n" + .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetAvailableParserTypes', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Code\\": \\"InvalidParameter\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Success\\": true,\\n \\"Data\\": {\\n \\"Documents\\": [\\n {\\n \\"SourceId\\": \\"cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx\\",\\n \\"Id\\": \\"doc_c134aa2073204a5d936d870bf960f56axxxxxxxx\\",\\n \\"Name\\": \\"product-overview\\",\\n \\"Size\\": 996765,\\n \\"DocumentType\\": \\"pdf\\",\\n \\"Status\\": \\"RUNNING\\",\\n \\"Code\\": \\"110002\\",\\n \\"Message\\": \\"check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid\\",\\n \\"GmtModified\\": 1744856423000\\n }\\n ],\\n \\"IndexId\\": \\"pno97txxxx\\",\\n \\"TotalCount\\": 2437,\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10\\n },\\n \\"Status\\": \\"200\\"\\n}","type":"json"}]', - 'title' => 'ListIndexDocuments', - 'description' => '* Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.'."\n" - .'* This interface is idempotent.'."\n", + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-7734-4F9A-8464-2446XXXXXXX\\",\\n \\"Data\\": {\\n \\"FileType\\": \\"pdf\\",\\n \\"ParserList\\": [\\n {\\n \\"DisplayName\\": \\"智能文档解析\\",\\n \\"Parser\\": \\"DOCMIND\\"\\n }\\n ]\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"User not authorized to operate on the specified resource\\",\\n \\"Code\\": \\"DataCenter.Throttling\\"\\n}","type":"json"}]', ], - 'ListIndexFileDetails' => [ - 'summary' => '查询Index文件详情', - 'path' => '/{WorkspaceId}/index/list_index_file_detail', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'GetConnector' => [ + 'summary' => 'Retrieves details about a connector. This operation currently supports only file connectors.', + 'path' => '/{WorkspaceId}/datacenter/connector', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'IndexId', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '79c0alxxxx', - ], + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the business space. To obtain this ID, see [Use business spaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', 'title' => ''], ], [ - 'name' => 'DocumentStatus', + 'name' => 'ConnectorName', 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [ - 'INSERT_ERROR' => 'INSERT_ERROR', - 'RUNNING' => 'RUNNING', - 'DELETED' => 'DELETED', - 'FINISH' => '', - ], - 'example' => 'FINISH', - ], + 'schema' => ['description' => 'The name of the connector to query. An exact match is required.', 'type' => 'string', 'required' => false, 'maxLength' => 20, 'minLength' => 0, 'title' => '', 'example' => '连接器名称'], ], [ - 'name' => 'DocumentName', + 'name' => 'ConnectorId', 'in' => 'query', + 'schema' => ['description' => 'The ID of the connector. You can find this ID in the [Model Studio console](https://bailian.console.aliyun.com/cn-beijing/?tab=app#/connector/list).', 'type' => 'string', 'title' => '', 'required' => false, 'example' => 'conn_file_xxxx'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => 'The result code.', 'type' => 'string', 'example' => 'success', 'title' => ''], + 'Data' => [ + 'type' => 'object', + 'properties' => [ + 'ConnectorId' => ['description' => 'The ID of the connector.', 'type' => 'string', 'example' => 'conn_file_e0c9db4030b2465a9478028f7d76cd92_1234', 'title' => ''], + 'ConnectorName' => ['description' => 'The name of the connector.', 'type' => 'string', 'example' => 'name', 'title' => ''], + 'ConnectorType' => ['description' => 'The type of the connector.', 'type' => 'string', 'example' => 'FILE', 'title' => ''], + 'Description' => ['description' => 'The description of the connector.', 'type' => 'string', 'example' => 'Description', 'title' => ''], + ], + 'description' => 'The returned data.', + 'title' => '', + 'example' => '', + ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Requests throttling triggered.', 'title' => ''], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'title' => '', 'example' => '7BA8ADD9-53D6-53F0-918F-A1E776AD230E'], + 'Status' => ['description' => 'The status code of the response.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was successful. The valid values are:'."\n" + ."\n" + .'- `true`: The call was successful.'."\n" + ."\n" + .'- `false`: The call failed.', 'type' => 'boolean', 'example' => 'True', 'title' => ''], + ], + 'title' => '', + 'description' => 'The response object.', 'example' => '', ], ], - [ - 'name' => 'PageNumber', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'GetConnector', + 'description' => '- To call this operation, a RAM user (sub-account) must have the required [API permissions](~~2848578~~) for Alibaba Cloud Model Studio and must [join a business space](~~2851098~~). This requires the `AliyunBailianDataFullAccess` policy, which includes the sfm:GetConnector permission. An Alibaba Cloud account (primary account) can call this operation directly. We recommend using 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.'."\n" + ."\n" + .'- This operation is idempotent.'."\n" + ."\n" + .'**Throttling:**'."\n" + .'This operation is subject to throttling. Do not exceed a frequency of 5 calls per second. If a request is throttled, try again later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetConnector', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"success\\",\\n \\"Data\\": {\\n \\"ConnectorId\\": \\"conn_file_e0c9db4030b2465a9478028f7d76cd92_1234\\",\\n \\"ConnectorName\\": \\"name\\",\\n \\"ConnectorType\\": \\"FILE\\",\\n \\"Description\\": \\"Description\\"\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"7BA8ADD9-53D6-53F0-918F-A1E776AD230E\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + ], + 'GetIndexJobStatus' => [ + 'summary' => 'Queries the current status of a specified knowledge base creation task or knowledge base document append task.', + 'path' => '/{WorkspaceId}/index/job/status', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'PageSize', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '10', - ], + 'AK' => [], ], + ], + 'consumes' => ['application/x-www-form-urlencoded'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-3z7uw7fwz0vexxxx', - ], + 'schema' => ['description' => 'The workspace ID. Ensure that the knowledge base you want to operate on is in this workspace. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', 'title' => ''], ], [ - 'name' => 'EnableNameLike', + 'name' => 'JobId', 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [ - 'true' => 'true', - 'false' => '', - ], - 'example' => 'false', - ], + 'schema' => ['description' => 'The knowledge base job ID, which is the `Data.Id` returned by the **SubmitIndexJob** or **SubmitIndexAddDocumentsJob** operation.', 'type' => 'string', 'required' => true, 'example' => '20230718xxxx-146c93bf', 'title' => ''], + ], + [ + 'name' => 'IndexId', + 'in' => 'query', + 'schema' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', 'title' => ''], + ], + [ + 'name' => 'PageNumber', + 'in' => 'query', + 'schema' => ['description' => 'Both the **SubmitIndexJob** and **SubmitIndexAddDocumentsJob** operations support batch file import. This operation returns the overall status of the knowledge base job (`Status`) and the import status of each file (`Document.Status`). If there are many files, use the `PageNumber` parameter for paged query. Minimum value: 1. Default value: 1.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', 'title' => ''], + ], + [ + 'name' => 'pageSize', + 'in' => 'query', + 'schema' => ['description' => 'The number of file import tasks to display per page in a paged query. No maximum limit. Default value: 10.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833', - ], - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'InvalidParameter'."\n", - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'Index.Forbidden', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The data field returned by the operation.', 'type' => 'object', 'properties' => [ 'Documents' => [ - 'description' => '', + 'description' => 'The list of files imported in this job.', 'type' => 'array', 'items' => [ - 'description' => '', + 'description' => 'The file object.', 'type' => 'object', 'properties' => [ + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'Index.Document.ChunkError', 'title' => ''], + 'DocId' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], + 'DocName' => ['description' => 'The file name.', 'type' => 'string', 'example' => 'XXX产品介绍', 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'document parse error', 'title' => ''], 'Status' => [ - 'description' => '', + 'description' => 'The file import status. Valid values:'."\n" + .'- INSERT_ERROR: Failed to import into the index.'."\n" + .'- RUNNING: Index building in progress.'."\n" + .'- DELETED: Deleted.'."\n" + .'- FINISH: Index building succeeded.'."\n" + .'- PARSE_FAILED: Parsing failed.'."\n" + .'- DOC_PARSING: Parsing in progress.', + 'enumValueTitles' => [], 'type' => 'string', 'example' => 'RUNNING', + 'title' => '', ], - 'EnableHeaders' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'true', - ], - 'OverlapSize' => [ - 'description' => '', - 'type' => 'string', - 'example' => '100', - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid', - ], - 'Size' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '996764'."\n", - ], - 'SourceId' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx'."\n", - ], - 'GmtModified' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1744856423000'."\n", - ], - 'DocumentType' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'pdf', - ], - 'ChunkMode' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'DashSplitter', - ], - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => '110002', - ], - 'separator' => [ - 'description' => '', - 'type' => 'string', - 'example' => '" "', - ], - 'Name' => [ - 'description' => '', - 'type' => 'string', - 'example' => '', - ], - 'ChunkSize' => [ - 'description' => '', - 'type' => 'string', - 'example' => '600', - ], - 'Id' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'doc_c134aa2073204a5d936d870bf960f56axxxxxxxx'."\n", - ], + 'GmtModified' => ['type' => 'integer', 'format' => 'int64', 'description' => '', 'title' => '', 'example' => ''], ], + 'title' => '', + 'example' => '', ], + 'title' => '', + 'example' => '', ], - 'IndexId' => [ - 'description' => '', + 'JobId' => ['description' => 'The job ID.', 'type' => 'string', 'example' => '66122af12a4e45ddae6bd6c84555xxxx', 'title' => ''], + 'Status' => [ + 'description' => 'The current status of the knowledge base job. Valid values:'."\n" + .'- COMPLETED: Execution succeeded.'."\n" + .'- FAILED: Execution failed.'."\n" + .'- RUNNING: Execution in progress.'."\n" + .'- PENDING: Waiting for execution.', + 'enumValueTitles' => ['COMPLETED' => 'Execution succeeded.', 'FAILED' => 'Execution failed.', 'RUNNING' => 'Execution in progress.', 'PENDING' => 'Waiting for execution.'], 'type' => 'string', - 'example' => '79c0alxxxx', - ], - 'TotalCount' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '100', - ], - 'PageNumber' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', + 'example' => 'PENDING', + 'title' => '', ], ], + 'title' => '', + 'example' => '', ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'RUNNING', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource.', 'title' => ''], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', 'title' => ''], + 'Status' => ['title' => '', 'description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200'], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.Forbidden\\",\\n \\"Data\\": {\\n \\"Documents\\": [\\n {\\n \\"Code\\": \\"Index.Document.ChunkError\\",\\n \\"DocId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\",\\n \\"DocName\\": \\"XXX产品介绍\\",\\n \\"Message\\": \\"document parse error\\",\\n \\"Status\\": \\"RUNNING\\",\\n \\"GmtModified\\": 0\\n }\\n ],\\n \\"JobId\\": \\"66122af12a4e45ddae6bd6c84555xxxx\\",\\n \\"Status\\": \\"PENDING\\"\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'gatewayOptions' => [ + 'gatewayProtocols' => [], + ], + 'title' => 'Query knowledge base job status', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (`AliyunBailianDataFullAccess` or `AliyunBailianDataReadOnlyAccess`, both of which include the sfm:GetIndexJobStatus permission), and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke 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><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to invoke this operation.'."\n" + .'- You must have a knowledge base job that is in progress. You can create a knowledge base creation task by invoking the **SubmitIndexJob** operation, or create a knowledge base document append task by invoking the **SubmitIndexAddDocumentsJob** operation. Obtain the corresponding `JobId`.'."\n" + .'- Invoke this operation at intervals of 5 seconds or more.'."\n" + .'- This operation supports idempotence.', + 'changeSet' => [ + ['createdAt' => '2025-03-25T06:25:53.000Z', 'description' => 'Response parameters changed'], + ['createdAt' => '2024-09-05T07:46:53.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetIndexJobStatus'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetIndexJobStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Code\\": \\"InvalidParameter\\\\n\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Success\\": true,\\n \\"Data\\": {\\n \\"Documents\\": [\\n {\\n \\"Status\\": \\"RUNNING\\",\\n \\"EnableHeaders\\": \\"true\\",\\n \\"OverlapSize\\": \\"100\\",\\n \\"Message\\": \\"check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid\\",\\n \\"Size\\": 996764,\\n \\"SourceId\\": \\"cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx\\\\n\\",\\n \\"GmtModified\\": 1744856423000,\\n \\"DocumentType\\": \\"pdf\\",\\n \\"ChunkMode\\": \\"DashSplitter\\",\\n \\"Code\\": \\"110002\\",\\n \\"separator\\": \\"\\\\\\" \\\\\\"\\",\\n \\"Name\\": \\"翻译平台运维文档\\\\n\\",\\n \\"ChunkSize\\": \\"600\\",\\n \\"Id\\": \\"doc_c134aa2073204a5d936d870bf960f56axxxxxxxx\\\\n\\"\\n }\\n ],\\n \\"IndexId\\": \\"79c0alxxxx\\",\\n \\"TotalCount\\": 2437,\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10\\n },\\n \\"Status\\": \\"200\\"\\n}","type":"json"}]', - 'title' => 'ListIndexFileDetails', ], - 'UpdateIndex' => [ - 'summary' => '更新索引任务', - 'path' => '/{WorkspaceId}/index/update', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'GetIndexMonitor' => [ + 'summary' => 'You can call the GetIndexMonitor operation to query monitoring data for a specified knowledge base within a specific time range. This data is crucial for App Performance Analytics, capacity planning, and cost management. The monitoring data includes two main dimensions: storage and retrieval. Storage monitoring retrieves the index storage limit and current usage of the knowledge base. Retrieval monitoring retrieves performance metrics for the query period, such as peak queries per second (QPS), total requests, and average QPS. The metrics are provided as totals and are also broken down by time window. The requests are categorized as successful, failed, and rate-limited.', + 'path' => '/{WorkspaceId}/rag/index/monitor', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'readAndWrite', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-3shx2gu255oqxxxx', - ], + 'schema' => ['description' => 'The ID of the workspace where the knowledge base is located.', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', 'title' => ''], ], [ - 'name' => 'Id', + 'name' => 'IndexId', 'in' => 'query', - 'allowEmptyValue' => false, 'schema' => [ - 'title' => '幂等参数', - 'description' => '', + 'description' => 'The unique ID of the target knowledge base.', + 'enumValueTitles' => [], 'type' => 'string', 'required' => true, - 'example' => '79c0alxxxx', + 'example' => 'kb-123456xxxx'."\n", + 'title' => '', ], ], [ - 'name' => 'Name', + 'name' => 'StartTimestamp', 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'schema' => ['description' => 'The start of the time range to query. This is a UNIX timestamp in seconds.', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'example' => '1767604500', 'title' => ''], ], [ - 'name' => 'Description', + 'name' => 'EndTimestamp', 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'schema' => ['description' => 'The end of the time range to query. The end time can be a maximum of 30 days after the start time. This is a UNIX timestamp in seconds.', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'example' => '1767604500', 'title' => ''], ], - [ - 'name' => 'RerankMinScore', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '0.01', + 'description' => 'Schema of Response', + 'title' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => 'The request ID.', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB'], + 'Code' => ['description' => 'The status code.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Data' => ['description' => 'The core data object of the response.'."\n" + ."\n" + .'**pipelineCommercialType** (String): The edition of the knowledge base.'."\n" + ."\n" + .'- standard: Standard Edition'."\n" + ."\n" + .'- enterprise: Ultimate Edition'."\n" + ."\n" + .'**storageMonitorData** (Object): The storage monitoring data of the knowledge base.'."\n" + ."\n" + .'- indexStorageLimit (Number): The index storage limit of the knowledge base, in GB.'."\n" + ."\n" + .'- indexStorageUsage (Number): The current index storage usage of the knowledge base, in GB.'."\n" + ."\n" + .'**pipelineCommercialCu** (Integer): The number of RCU for the Ultimate Edition knowledge base. For example: 2.'."\n" + ."\n" + .'**qpsMonitorData** (Object): The aggregated retrieval monitoring data for the knowledge base over the entire query period.'."\n" + ."\n" + .'- peakQps (Integer): The peak QPS over the entire time period.'."\n" + ."\n" + .'- totalRequests (Integer): The total number of requests over the entire time period.'."\n" + ."\n" + .'- avgQpsOfActiveSeconds (Number): The average QPS during active seconds over the entire time period. Active seconds are seconds in which calls were made.'."\n" + ."\n" + .'- monitorData (Array): An array of detailed monitoring data broken down by time window. Each object in the array represents the performance statistics for a single time window.'."\n" + ."\n" + .' <details>'."\n" + ."\n" + .' <summary>'."\n" + ."\n" + .' Sub-properties'."\n" + ."\n" + .' </summary>'."\n" + ."\n" + .' - successData (Object): The statistics for successful requests within this window.'."\n" + ."\n" + .' - limitData (Object): The statistics for rate-limited requests within this window.'."\n" + ."\n" + .' - failData (Object): The statistics for failed calls within this window.'."\n" + ."\n" + .' - peakQpsInWindowRange (Integer): The total peak QPS within this window (successful + rate-limited + failed).'."\n" + ."\n" + .' - totalRequests (Integer): The total number of requests within this window (successful + rate-limited + failed).'."\n" + ."\n" + .' - windowRange (Integer): The start time of the time window (UNIX timestamp in seconds).'."\n" + ."\n" + .' - windowRangeEnd (Integer): The end time of the time window (UNIX timestamp in seconds).'."\n" + ."\n" + .' - avgQpsOfActiveSeconds (Number): The average QPS during active seconds within this window.'."\n" + ."\n" + .' **The successData, limitData, and failData objects have the same internal structure, as described below:**'."\n" + ."\n" + .' - peakQpsInWindowRange (Integer): The peak QPS for the corresponding status.'."\n" + ."\n" + .' - totalRequests (Integer): The total number of requests for the corresponding status.'."\n" + ."\n" + .' - avgQpsOfActiveSeconds (Number): The average QPS during active seconds for the corresponding status.'."\n" + ."\n" + .' </details>', 'type' => 'any', 'example' => '{'."\n" + .' "code": "Success",'."\n" + .' "status_code": 200,'."\n" + .' "data": {'."\n" + .'"pipelineCommercialType": "standard", "storageMonitorData": Object{...},'."\n" + .' "qpsMonitorData": Object{...}'."\n" + .' },'."\n" + .' "success": true,'."\n" + .' "message": "success",'."\n" + .' "request_id": "65d34b79-b97e-478e-a0a3-xxx",'."\n" + .' "status": "SUCCESS"'."\n" + .'}', 'title' => ''], + 'Message' => ['description' => 'The status message.', 'type' => 'string', 'example' => 'success', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was successful.', 'type' => 'boolean', 'example' => 'true'."\n", 'title' => ''], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'integer', 'format' => 'int32', 'example' => 'SUCCESS', 'title' => ''], + ], + 'example' => '', ], ], - [ - 'name' => 'DenseSimilarityTopK', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'maximum' => '100', - 'minimum' => '0', - 'example' => '100', - 'default' => '100', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Retrieve knowledge base monitoring data', + 'description' => '<props="intl">'."\n" + ."\n" + .'This operation is not available on the Alibaba Cloud International Website (www\\.alibabacloud.com).'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'- Before you call this operation, a RAM user must obtain the required [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (which requires the `AliyunBailianDataFullAccess` permission) and [join a workspace](~~2851098~~). Alibaba Cloud accounts can call this operation directly without authorization. You can call this operation using the latest version of the [Alibaba Cloud Model Studio software development kit (SDK)](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29). Before you call this operation, make sure that the specified knowledge base has been created and has not been deleted. This means that the knowledge base ID (`IndexId`) must be valid. This operation is idempotent. The maximum query time range (EndTimestamp - StartTimestamp) is 30 days. The granularity of the time window in the returned data is dynamically adjusted based on the query time range.'."\n" + ."\n" + .'</props>', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetIndexMonitor', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Code\\": \\"200\\",\\n \\"Data\\": \\"{\\\\n \\\\\\"code\\\\\\": \\\\\\"Success\\\\\\",\\\\n \\\\\\"status_code\\\\\\": 200,\\\\n \\\\\\"data\\\\\\": {\\\\n\\\\\\"pipelineCommercialType\\\\\\": \\\\\\"standard\\\\\\", \\\\\\"storageMonitorData\\\\\\": Object{...},\\\\n \\\\\\"qpsMonitorData\\\\\\": Object{...}\\\\n },\\\\n \\\\\\"success\\\\\\": true,\\\\n \\\\\\"message\\\\\\": \\\\\\"success\\\\\\",\\\\n \\\\\\"request_id\\\\\\": \\\\\\"65d34b79-b97e-478e-a0a3-xxx\\\\\\",\\\\n \\\\\\"status\\\\\\": \\\\\\"SUCCESS\\\\\\"\\\\n}\\",\\n \\"Message\\": \\"success\\",\\n \\"Success\\": true,\\n \\"Status\\": 0\\n}","type":"json"}]', + ], + 'GetMemory' => [ + 'summary' => 'Retrieves the description of a specified long-term memory.', + 'path' => '/{workspaceId}/memories/{memoryId}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'SparseSimilarityTopK', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'maximum' => '100', - 'minimum' => '0', - 'example' => '100', - 'default' => '100', - ], + 'AK' => [], ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ - 'name' => 'PipelineCommercialType', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'standard', - 'enum' => [ - 'standard', - 'enterprise', - ], - ], + 'name' => 'workspaceId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx'], ], [ - 'name' => 'PipelineCommercialCu', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'maximum' => '200', - 'minimum' => '1', - 'example' => '3', - ], + 'name' => 'memoryId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The ID of the long-term memory, which corresponds to the memoryId returned by the [CreateMemory](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-creatememory) operation.', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbxxxx'."\n"], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '', - 'type' => 'string', - 'example' => '17204B98-7734-4F9A-8464-xxx', - ], - 'Data' => [ - 'description' => '', - 'type' => 'object', - 'properties' => [ - 'Id' => [ - 'description' => '', - 'type' => 'string', - 'example' => '79c0alxxxx', - ], - ], - ], - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true', - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'Success', - ], + 'description' => ['description' => 'The description of the long-term memory.', 'type' => 'string', 'example' => '我的大模型应用$APP_ID关于A用户的长期记忆体', 'title' => ''], + 'memoryId' => ['description' => 'The ID of the long-term memory.', 'type' => 'string', 'example' => '6bff4f317a14442fbc9f73d29dbdxxxx', 'title' => ''], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'], + 'workspaceId' => ['title' => '', 'description' => 'The ID of the workspace to which the long-term memory belongs.', 'type' => 'string', 'example' => 'llm-3z7uw7fwz0vexxxx'], ], + 'example' => '', ], ], ], - 'errorCodes' => [], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-7734-4F9A-8464-xxx\\",\\n \\"Data\\": {\\n \\"Id\\": \\"79c0alxxxx\\"\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Code\\": \\"Success\\"\\n}","type":"json"}]', - ], - 'DeleteIndexDocument' => [ - 'summary' => 'Deletes one or more documents from a specified unstructured knowledge base permanently. You cannot use the API to delete structured documents, see the Usage notes section of this topic.', - 'path' => '/{WorkspaceId}/index/delete_index_document', - 'methods' => [ - 'post', + 'errorCodes' => [ + 404 => [ + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], + ], + 500 => [ + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], + ], ], - 'schemes' => [ - 'https', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"description\\": \\"我的大模型应用$APP_ID关于A用户的长期记忆体\\",\\n \\"memoryId\\": \\"6bff4f317a14442fbc9f73d29dbdxxxx\\",\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\",\\n \\"workspaceId\\": \\"llm-3z7uw7fwz0vexxxx\\"\\n}","type":"json"}]', + 'title' => 'Retrieve long-term memory', + 'description' => '- This operation is idempotent.'."\n" + ."\n" + .'**Rate limit:** Ensure that the interval between two consecutive requests is at least 1 second. Otherwise, throttling may be triggered. If throttling occurs, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetMemory'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetMemory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'GetMemoryNode' => [ + 'summary' => 'Retrieves a memory fragment.', + 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes/{memoryNodeId}', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'readAndWrite', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'WorkspaceId', + 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], + 'schema' => ['title' => '', 'description' => 'The workspace ID.', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdm5v'."\n"], ], [ - 'name' => 'IndexId', - 'in' => 'query', - 'schema' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', - 'required' => true, - 'example' => '79c0aly8zw', - ], + 'name' => 'memoryId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The long-term memory ID.', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n"], ], [ - 'name' => 'DocumentIds', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => 'The list of the primary key IDs of the documents.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The primary key ID of the document. To view the ID, you can click the ID icon next to the file name on the [Data Management](https://bailian.console.aliyun.com/#/data-center) page.', - 'type' => 'string', - 'required' => false, - 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_10151493', - ], - 'required' => true, - ], + 'name' => 'memoryNodeId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The memory fragment ID.', 'type' => 'string', 'required' => true, 'example' => '68de06c95368463a8be4a84efc872cc5'."\n"], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'Index.InvalidParameter', - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], - 'Data' => [ - 'description' => 'The parameters returned by the operation.'."\n", - 'type' => 'object', - 'properties' => [ - 'DeletedDocument' => [ - 'description' => 'The list of primary key IDs of documents that are deleted.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The primary key ID of the document.'."\n", - 'type' => 'string', - 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_10151493', - ], - ], - ], - ], - 'Status' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => '200', - ], + 'content' => ['title' => '', 'description' => 'The content of the memory fragment.', 'type' => 'string', 'example' => '用户喜欢吃西红柿炒鸡蛋'."\n"], + 'memoryId' => ['title' => '', 'description' => 'The long-term memory ID.', 'type' => 'string', 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n"], + 'memoryNodeId' => ['title' => '', 'description' => 'The memory fragment ID.', 'type' => 'string', 'example' => '68de06c95368463a8be4a84efc872cc5'], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'."\n"], + 'workspaceId' => ['title' => '', 'description' => 'The workspace ID.', 'type' => 'string', 'example' => 'llm-us9hjmt32nysdm5v'."\n"], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Success\\": true,\\n \\"Data\\": {\\n \\"DeletedDocument\\": [\\n \\"file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx\\"\\n ]\\n },\\n \\"Status\\": \\"200\\"\\n}","type":"json"}]', - 'title' => 'DeleteIndexDocument', - 'description' => '* Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.'."\n" - .'* Only documents with the INSERT_ERROR and FINISH states can be deleted. To query the status of documents in a specified knowledge base, call the [ListIndexDocuments](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-listindexdocuments) operation.'."\n" - .'* After you delete a document, it cannot be recovered and the [Retrieve](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-retrieve) operation cannot query information about the document. We recommend that you proceed with caution.'."\n" - .'* Imported documents are not deleted from the [Data Management](https://bailian.console.aliyun.com/#/data-center) if you call this operation.'."\n" - .'* This interface is idempotent.', - ], - 'ListIndices' => [ - 'summary' => 'Lists the details about the next or multiple knowledge bases in a specified workspace.', - 'path' => '/{WorkspaceId}/index/list_indices', - 'methods' => [ - 'get', + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'Memory.MemoryNodeContentInvalid', 'errorMessage' => 'Memory node content is invalid.', 'description' => 'Memory node content is invalid.'], + ], + 404 => [ + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], + ['errorCode' => 'Memory.MemoryNodeNotFound', 'errorMessage' => 'MemoryNode not found.', 'description' => 'MemoryNode not found'], + ], + 500 => [ + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], + ], ], - 'schemes' => [ - 'https', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"content\\": \\"用户喜欢吃西红柿炒鸡蛋\\\\n\\",\\n \\"memoryId\\": \\"6bff4f317a14442fbc9f73d29dbd5fc3\\\\n\\",\\n \\"memoryNodeId\\": \\"68de06c95368463a8be4a84efc872cc5\\",\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\\\n\\",\\n \\"workspaceId\\": \\"llm-us9hjmt32nysdm5v\\\\n\\"\\n}","type":"json"}]', + 'title' => 'Retrieve a memory fragment', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetMemoryNode'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetMemoryNode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'GetParseSettings' => [ + 'summary' => 'Queries the data parsing settings in a specified category.', + 'path' => '/{WorkspaceId}/datacenter/parser/settings', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREsfm4VA8MJ', - ], - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], 'parameters' => [ [ - 'name' => 'IndexName', - 'in' => 'query', - 'schema' => [ - 'description' => 'The name of the knowledge base. You can query knowledge base by name. The name must be 1 to 20 characters in length and can contain characters classified as letter in Unicode, including English letters, Chinese characters, digits, among others. The name can also contain colons (:), underscores (\\_), periods (.), and hyphens (-).'."\n" - ."\n" - .'This parameter is left empty by default, which means that all knowledge bases in the specified workspace are queried.'."\n", - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [], - 'example' => 'idx_status_score', - ], - ], - [ - 'name' => 'PageNumber', - 'in' => 'query', - 'schema' => [ - 'description' => 'The number of the pages to return. Pages start from page 1. Default value: 1.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => '1', - ], + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the file belongs. For more information, see [Use workspaces](~~2587495~~).'."\n", 'type' => 'string', 'required' => false, 'example' => 'llm-3shx2gu255oqxxxx', 'title' => ''], ], [ - 'name' => 'PageSize', + 'name' => 'CategoryId', 'in' => 'query', - 'schema' => [ - 'description' => 'The number of knowledge bases to display on each page. No maximum value. Default value: 10.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => '10', - ], - ], - [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3Nt27MYcoK191ISp', - ], + 'schema' => ['description' => 'The category ID, which is the `CategoryId` returned by **AddCategory**. To view the category ID, click the ID icon next to the category name on the Unstructured Data tab of the [Application Data](https://bailian.console.alibabacloud.com/?tab=app#/data-center) page.'."\n", 'type' => 'string', 'required' => false, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'title' => ''], ], ], 'responses' => [ @@ -4808,387 +4314,412 @@ 'description' => 'Schema of Response'."\n", 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'The request ID.'."\n", 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'], 'Data' => [ - 'description' => 'The returned data.'."\n", - 'type' => 'object', - 'properties' => [ - 'PageNumber' => [ - 'description' => 'The specified page number.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => 'The specified number of documents on each page.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'TotalCount' => [ - 'description' => 'The total number of knowledge bases returned.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '48', - ], - 'Indices' => [ - 'description' => 'The list of knowledge bases.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The knowledge base object.'."\n", + 'description' => 'The returned data fields.'."\n", + 'type' => 'array', + 'items' => [ + 'description' => 'The returned data.'."\n", + 'type' => 'object', + 'properties' => [ + 'FileType' => ['description' => 'The file type. Valid values are: pdf, docx, doc, etc. All supported file types in the category are listed here.'."\n", 'type' => 'string', 'example' => 'pdf', 'title' => ''], + 'ParserDisplayName' => ['description' => 'The display name of the parsing method.'."\n", 'type' => 'string', 'example' => '电子文档解析', 'title' => ''], + 'ParserConfig' => [ + 'description' => 'The parser configuration. Currently, this is available only for Qwen VL parsing.'."\n", 'type' => 'object', 'properties' => [ - 'Id' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', - 'example' => '259899', - ], - 'Name' => [ - 'description' => 'The name of the knowledge base.'."\n", - 'type' => 'string', - 'example' => 'temp_mUB4j', - ], - 'Description' => [ - 'description' => 'The description of the knowledge base.'."\n", - 'type' => 'string', - 'example' => 'If each RAM user belongs to a RAM group, the configuration is considered compliant.', - ], - 'StructureType' => [ - 'description' => 'The vector storage type of the knowledge base. Valid values:'."\n" - ."\n" - .'* UNSTRUCTURED'."\n", - 'type' => 'string', - 'enumValueTitles' => [], - 'example' => 'structured', - ], - 'ChunkSize' => [ - 'description' => 'The estimated length of chunks. Valid values: \\[1-2048].'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '5', - ], - 'OverlapSize' => [ - 'description' => 'The overlap length. Valid values: \\[0-1024].'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'Separator' => [ - 'description' => 'The clause identifier. Separate multiple clause identifiers with |. Valid values:'."\n" - ."\n" - .'* \\n: line break'."\n" - .'* ,: Chinese comma'."\n" - .'* ,: English comma'."\n" - .'* 。 : Chinese full stop'."\n" - .'* .: English full stop'."\n" - .'* ! : Chinese exclamation point'."\n" - .'* ! : English exclamation point'."\n" - .'* ;: Chinese semicolon'."\n" - .'* ;: English semicolon'."\n" - .'* ? : Chinese question mark'."\n" - .'* ?: English question mark'."\n", - 'type' => 'string', - 'example' => '\\n', - ], - 'EmbeddingModelName' => [ - 'description' => 'The name of the embedding model. Valid values:'."\n" - ."\n" - .'* text-embedding-v2'."\n", - 'type' => 'string', - 'example' => 'conv-rewrite-qwen-1.8b', - ], - 'RerankModelName' => [ - 'description' => 'The name of the rank model. Valid values:'."\n" - ."\n" - .'* gte-rerank-hybrid'."\n" - .'* gte-rerank'."\n", - 'type' => 'string', - 'example' => 'gte-rerank-hybrid', - ], - 'RerankMinScore' => [ - 'description' => 'Similarity Threshold Valid values: \\[0.01-1.00].'."\n", - 'type' => 'string', - 'example' => '0.01', - ], - 'SourceType' => [ - 'description' => 'The data type of [Data Management](https://bailian.console.aliyun.com/#/data-center). For unstructured knowledge base, possible values:'."\n" - ."\n" - .'* DATA_CENTER_CATEGORY: The category type.'."\n" - .'* DATA_CENTER_FILE: The document type.'."\n" - ."\n" - .'For structured knowledge base, possible values:'."\n" - ."\n" - .'* DATA_CENTER_STRUCTURED_TABLE: The data table type.'."\n", - 'type' => 'string', - 'example' => 'DATA_CENTER_FILE', - ], - 'DocumentIds' => [ - 'description' => 'The list of the primary key IDs of the documents.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The primary key ID of the document.'."\n", - 'type' => 'string', - 'example' => 'file_8c67b438043848199ffaa903d29addd4_10151493', - ], - ], - 'SinkType' => [ - 'description' => 'The vector storage type of the knowledge base. Valid values:'."\n" - ."\n" - .'* ES: Built-in vector database.'."\n" - .'* BUILT_IN: Built-in vector database.'."\n" - .'* ADB: AnalyticDB for PostgreSQL database.'."\n", - 'type' => 'string', - 'example' => 'es', - ], - 'SinkInstanceId' => [ - 'description' => 'The ID of the vector storage instance.'."\n", - 'type' => 'string', - 'example' => 'gp-bp1gq62t1788yw2ol', - ], - 'SinkRegion' => [ - 'description' => 'The region of the vector storage instance.'."\n", - 'type' => 'string', - 'example' => 'cn-hangzhou', - ], - 'ConfgModel' => [ + 'ModelName' => [ + 'description' => 'The model name.'."\n", 'type' => 'string', + 'example' => 'qwen-vl-max', + 'enumValueTitles' => ['qwen-vl-max' => 'qwen-vl-max', 'qwen-vl-plus' => 'qwen-vl-plus'], + 'title' => '', ], - 'EnableRewrite' => [ - 'type' => 'boolean', - ], + 'ModelPrompt' => ['description' => 'The prompt used for parsing.'."\n", 'type' => 'string', 'example' => '#角色'."\n" + .'你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。'."\n" + .'# 任务目标'."\n" + .'请结合输入图片,详细描述图片中的内容。', 'title' => ''], ], + 'title' => '', + 'example' => '', ], + 'Parser' => ['description' => 'The parser used for files of the current type. Valid values:'."\n" + ."\n" + .'* DOCMIND (Intelligent parsing)'."\n" + .'* DOCMIND_DIGITAL (Digital parsing)'."\n" + .'* DOCMIND_LLM_VERSION (LLM parsing)'."\n" + .'* DASH_QWEN_VL_PARSER (Qwen VL parsing)'."\n", 'type' => 'string', 'example' => 'DOCMIND', 'title' => ''], ], + 'title' => '', + 'example' => '', ], + 'title' => '', + 'example' => '', ], - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'Index.InvalidParameter', - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], + 'Status' => ['description' => 'The HTTP status code returned.'."\n", 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the call is successful. Valid values:'."\n" + ."\n" + .'* true'."\n" + .'* false'."\n", 'type' => 'boolean', 'example' => 'True', 'title' => ''], + 'Message' => ['description' => 'The error message.'."\n", 'type' => 'string', 'example' => 'workspace id is null or invalid.', 'title' => ''], + 'Code' => ['description' => 'The status code.'."\n", 'type' => 'string', 'example' => 'success', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Data\\": [\\n {\\n \\"FileType\\": \\"pdf\\",\\n \\"ParserDisplayName\\": \\"电子文档解析\\",\\n \\"ParserConfig\\": {\\n \\"ModelName\\": \\"qwen-vl-max\\",\\n \\"ModelPrompt\\": \\"#角色\\\\n你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。\\\\n# 任务目标\\\\n请结合输入图片,详细描述图片中的内容。\\"\\n },\\n \\"Parser\\": \\"DOCMIND\\"\\n }\\n ],\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"workspace id is null or invalid.\\",\\n \\"Code\\": \\"success\\"\\n}","type":"json"}]', + 'title' => 'GetParseSettings', + 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(`AliyunBailianDataFullAccess`或`AliyunBailianDataReadOnlyAccess`均可,已包括sfm:GetParseSettings权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版<props="china">[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>来调用本接口。'."\n" + ."\n" + .'- 本接口具有幂等性。'."\n" + ."\n" + .'**限流说明:**'."\n" + .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetParseSettings', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Data\\": {\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 48,\\n \\"Indices\\": [\\n {\\n \\"Id\\": \\"lecxr5xxxx\\",\\n \\"Name\\": \\"XXXX产品清单\\",\\n \\"Description\\": \\"清单中产品主要面向海外客户。\\",\\n \\"StructureType\\": \\"UNSTRUCTURED\\",\\n \\"ChunkSize\\": 5,\\n \\"OverlapSize\\": 10,\\n \\"Separator\\": \\"\\\\\\\\n\\",\\n \\"EmbeddingModelName\\": \\"text-embedding-v2\\",\\n \\"RerankModelName\\": \\"gte-rerank-hybrid\\",\\n \\"RerankMinScore\\": \\"0.01\\",\\n \\"SourceType\\": \\"DATA_CENTER_FILE\\",\\n \\"DocumentIds\\": [\\n \\"file_8c67b438043848199ffaa903d29addd4_xxxxxxxx\\"\\n ],\\n \\"SinkType\\": \\"BUILT_IN\\",\\n \\"SinkInstanceId\\": \\"gp-bp1gq62t1788yxxxx\\",\\n \\"SinkRegion\\": \\"cn-hangzhou\\",\\n \\"ConfgModel\\": \\"recommend\\",\\n \\"EnableRewrite\\": false\\n }\\n ]\\n },\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Success\\": true,\\n \\"Status\\": \\"200\\"\\n}","type":"json"}]', - 'title' => 'ListIndices', - 'description' => 'This interface is idempotent.'."\n", ], - 'DeleteIndex' => [ - 'summary' => 'Deletes a specified knowledge base permanently.', - 'path' => '/{WorkspaceId}/index/delete', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'GetPromptTemplate' => [ + 'summary' => 'Obtains a prompt template based on the template ID.', + 'path' => '/{workspaceId}/promptTemplates/{promptTemplateId}', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'readAndWrite', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'IndexId', - 'in' => 'query', + 'name' => 'workspaceId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The workspace ID.'."\n", 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdxxx'], + ], + [ + 'name' => 'promptTemplateId', + 'in' => 'path', + 'schema' => ['title' => '', 'description' => 'The template ID.'."\n", 'type' => 'string', 'required' => true, 'example' => '6e49109bfeb94a39bb268f4e483ccxxx'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', - 'required' => true, - 'example' => 'f89ie0fj5a', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response'."\n", + 'type' => 'object', + 'properties' => [ + 'content' => ['title' => '', 'description' => 'The template content.'."\n", 'type' => 'string', 'example' => '请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}'], + 'name' => ['title' => '', 'description' => 'The template name.'."\n", 'type' => 'string', 'example' => '小红书文案助手'], + 'promptTemplateId' => ['title' => '', 'description' => 'The template ID.'."\n", 'type' => 'string', 'example' => '6e49109bfeb94a39bb268f4e483ccxxx'], + 'requestId' => ['title' => '', 'description' => 'The request ID.'."\n", 'type' => 'string', 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'], + 'workspaceId' => ['title' => '', 'description' => 'The workspace ID.'."\n", 'type' => 'string', 'example' => 'llm-us9hjmt32nysdxxx'], + 'variables' => [ + 'title' => '', + 'description' => 'The variables of the template.'."\n", + 'type' => 'array', + 'items' => ['description' => 'The template variable.'."\n", 'type' => 'string', 'example' => 'theme', 'title' => ''], + 'example' => '["theme"]', + ], + ], + 'example' => '', + ], + ], + ], + 'errorCodes' => [ + 404 => [ + ['errorCode' => 'PromptTemplate.TemplateNotFound', 'errorMessage' => 'Prompt template not found.', 'description' => 'Prompt template not found'], + ], + 500 => [ + ['errorCode' => 'PromptTemplate.InternalError', 'errorMessage' => 'Prompt template service inner exception.', 'description' => 'prompt template service internal exception'], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"content\\": \\"请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}\\",\\n \\"name\\": \\"小红书文案助手\\",\\n \\"promptTemplateId\\": \\"6e49109bfeb94a39bb268f4e483ccxxx\\",\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\",\\n \\"workspaceId\\": \\"llm-us9hjmt32nysdxxx\\",\\n \\"variables\\": [\\n \\"theme\\"\\n ]\\n}","type":"json"}]', + 'title' => 'GetPromptTemplate', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetPromptTemplate'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetPromptTemplate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], + ], + ], + 'ListCategory' => [ + 'summary' => 'Retrieves the details of one or more categories in a specified workspace.', + 'path' => '/{WorkspaceId}/datacenter/categories', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace. For details, see [Work with workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', 'title' => ''], + ], + [ + 'name' => 'ConnectorId', + 'in' => 'formData', + 'schema' => ['description' => 'The ID of the connector.', 'type' => 'string', 'required' => false, 'example' => 'file_conn_xxxxx', 'title' => ''], + ], + [ + 'name' => 'CategoryType', + 'in' => 'formData', 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. You can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console to view the workspace ID.'."\n", + 'description' => 'The type of category to query. Valid value:'."\n" + ."\n" + .'- `UNSTRUCTURED`: A category for unstructured data.'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'> This API does not support querying structured data tables.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This API does not support querying structured data tables.'."\n" + ."\n" + .'</props>', 'type' => 'string', 'required' => true, - 'example' => 'ws_3AXoiweeTyTd03IN', + 'enum' => ['UNSTRUCTURED'], + 'example' => 'UNSTRUCTURED', + 'title' => '', ], ], + [ + 'name' => 'ParentCategoryId', + 'in' => 'formData', + 'schema' => ['description' => 'The ID of the parent category.', 'type' => 'string', 'required' => false, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', 'title' => ''], + ], + [ + 'name' => 'NextToken', + 'in' => 'formData', + 'schema' => ['description' => 'The pagination token. To retrieve the next page of results, pass the `NextToken` value from the previous response.', 'type' => 'string', 'required' => false, 'example' => 'AAAAAdH70eOCSCKtacdomNzak4U=', 'title' => ''], + ], + [ + 'name' => 'MaxResults', + 'in' => 'formData', + 'schema' => ['description' => 'The maximum number of categories to return per page. The valid range is 1 to 200.'."\n" + ."\n" + .'Default value: 20. If this parameter is not specified or is set to a value less than 1, the default value is used. If a value greater than 200 is specified, the maximum value of 200 is used.', 'type' => 'integer', 'format' => 'int32', 'maximum' => '500', 'minimum' => '0', 'required' => false, 'example' => '20', 'title' => ''], + ], + [ + 'name' => 'CategoryName', + 'in' => 'formData', + 'schema' => ['description' => 'Filters the results to include only the category with this exact name. If this parameter is omitted, no filtering is applied.', 'type' => 'string', 'required' => false, 'example' => '产品清单', 'title' => ''], + ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'description' => 'The response object.', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'HTTP status code'."\n", - 'type' => 'string', - 'example' => 'Index.InvalidParameter', - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', - ], - 'Status' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'success', 'title' => ''], + 'Data' => [ + 'description' => 'The response payload.', + 'type' => 'object', + 'properties' => [ + 'CategoryList' => [ + 'description' => 'The list of categories.', + 'type' => 'array', + 'items' => [ + 'description' => 'A category object.', + 'type' => 'object', + 'properties' => [ + 'CategoryId' => ['description' => 'The category ID.', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', 'title' => ''], + 'CategoryName' => ['description' => 'The category name.', 'type' => 'string', 'example' => '类目1', 'title' => ''], + 'CategoryType' => ['description' => 'The category type. The only valid value is:'."\n" + ."\n" + .'- `UNSTRUCTURED`: A standard category.', 'type' => 'string', 'example' => 'UNSTRUCTURED', 'title' => ''], + 'IsDefault' => ['description' => 'Indicates whether the category is the default. Valid values:'."\n" + ."\n" + .'- `true`: The category is the default.'."\n" + ."\n" + .'- `false`: The category is not the default.'."\n" + ."\n" + .'You cannot delete the default category.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'ParentCategoryId' => ['description' => 'The parent category ID.', 'type' => 'string', 'example' => 'cate_addd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', 'title' => ''], + ], + 'title' => '', + 'example' => '', + ], + 'title' => '', + 'example' => '', + ], + 'HasNext' => ['description' => 'Indicates whether more results are available for retrieval. Valid values:'."\n" + ."\n" + .'- `true`: More results are available.'."\n" + ."\n" + .'- `false`: This is the last page of results.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'MaxResults' => ['description' => 'The maximum number of results to return per page.', 'type' => 'integer', 'format' => 'int32', 'example' => '20', 'title' => ''], + 'NextToken' => ['description' => 'The token used to retrieve the next page of results. This parameter is omitted when no more results are available.', 'type' => 'string', 'example' => 'AAAAALHWGpGoYCcYMxiFfmlhvh7Z4G8jiXR6IjHYd+M9WQVJ', 'title' => ''], + 'TotalCount' => ['description' => 'The total number of matching categories.', 'type' => 'integer', 'format' => 'int32', 'example' => '20', 'title' => ''], + ], + 'title' => '', + 'example' => '', ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'workspace id is null or invalid.', 'title' => ''], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The status code for the request.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request succeeded. Valid values:'."\n" + ."\n" + .'- `true`: The request succeeded.'."\n" + ."\n" + .'- `false`: The request failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"success\\",\\n \\"Data\\": {\\n \\"CategoryList\\": [\\n {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\",\\n \\"CategoryName\\": \\"类目1\\",\\n \\"CategoryType\\": \\"UNSTRUCTURED\\",\\n \\"IsDefault\\": true,\\n \\"ParentCategoryId\\": \\"cate_addd11b1b79a74e8bbd675c356a91ee3xxxxxxxx\\"\\n }\\n ],\\n \\"HasNext\\": true,\\n \\"MaxResults\\": 20,\\n \\"NextToken\\": \\"AAAAALHWGpGoYCcYMxiFfmlhvh7Z4G8jiXR6IjHYd+M9WQVJ\\",\\n \\"TotalCount\\": 20\\n },\\n \\"Message\\": \\"workspace id is null or invalid.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => 'Category List ', + 'description' => '- This API does not support querying data tables.'."\n" + ."\n" + .'- To call this API, a RAM user must first obtain the required [API permission](~~2848578~~) for Model Studio and [join a workspace](~~2851098~~). This requires the `AliyunBailianDataFullAccess` permission, which includes the `sfm:ListCategory` permission. Alibaba Cloud accounts can call this API directly. Use the latest version of the <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>.'."\n" + ."\n" + .'- This operation supports pagination. When making your first request, set the `MaxResults` parameter to specify the maximum number of items to return. If more items are available, the response includes a `NextToken`. To retrieve the next page of results, set the `NextToken` parameter to the value from the previous response and specify `MaxResults` again. An empty `NextToken` indicates that no more results are available.'."\n" + ."\n" + .'- This operation is idempotent.'."\n" + ."\n" + .'**Rate limiting:** This API is subject to rate limiting. Do not exceed 5 requests per second. If the system throttles a request, retry it after a short interval.', + 'changeSet' => [ + ['createdAt' => '2025-05-23T08:26:21.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListCategory'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListCategory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'DeleteIndex', - 'description' => '* Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.'."\n" - .'* If a knowledge base is being called by an application, disassociate the knowledge base before you can delete it. To disassociate the knowledge base, you must use the console. For more information, see [Create a knowledge base](https://www.alibabacloud.com/help/en/model-studio/user-guide/rag-knowledge-base).'."\n" - .'* After you delete a knowledge base, it cannot be recovered. We recommend that you proceed with caution.'."\n" - .'* Imported documents are not deleted from the [Data Management](https://bailian.console.aliyun.com/#/data-center) if you call this operation.'."\n" - .'* This interface is idempotent.', ], 'ListChunks' => [ - 'summary' => 'For unstructured knowledge base, obtains the details of all chunks of a specified document; for structured knowledge base, obtains the details of all chunks.', + 'summary' => 'Queries the list and information of text chunks.', 'path' => '/{WorkspaceId}/index/list_chunks', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. To view the workspace ID, you can click the Workspace Details icon in the upper-left corner on the [homepage](https://bailian.console.aliyun.com/#/home) of the console.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'ws_3AXoiweeTyTd03IN', - ], + 'schema' => ['description' => 'The workspace ID of the knowledge base. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', 'title' => ''], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ - 'description' => 'The body of the request parameters.'."\n", + 'description' => 'The body of the request parameters.', 'type' => 'object', 'properties' => [ 'Fields' => [ - 'description' => 'An array of field names. This parameter is used to filter non-private fields (prefixed with_underscores) in the Metadata parameter returned by this operation. By default, this parameter is left empty, which means all non-private fields in the Metadata parameter are returned. If you only want specified non-private fields, such as title, set this parameter to title.'."\n", + 'description' => 'An array of field names used to filter non-private fields (those not prefixed with an underscore _) in the Metadata field returned by this operation. By default, Fields is empty, and all non-private fields in Metadata are returned. To return only specific non-private fields in Metadata, such as title, pass title in this parameter.'."\n" + ."\n" + .'Default value: empty.', 'type' => 'array', - 'items' => [ - 'description' => 'The name of the field.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'name', - ], - 'required' => false, - ], - 'Filed' => [ - 'description' => 'The primary key ID of the document. This parameter is not required for structured knowledge base, but is required for unstructured knowledge base. To view the ID, you can click the ID icon next to the file name on the [Data Management](https://bailian.console.aliyun.com/#/data-center) page. You can filter returned chunks by the document ID. This parameter is left empty by default.', - 'type' => 'string', - 'required' => false, - 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_10151493', - ], - 'FileId' => [ - 'type' => 'string', - ], - 'IndexId' => [ - 'description' => 'The primary key ID of the knowledge base, which is the `Data.Id` parameter returned by the [CreateIndex](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-createindex) operation.', - 'type' => 'string', - 'required' => true, - 'example' => 'otoru9en4v', - ], - 'PageNum' => [ - 'description' => 'The number of the pages to return. Pages start from page 1. Default value: 1.'."\n", - 'type' => 'integer', - 'format' => 'int32', + 'items' => ['description' => 'The field name.', 'type' => 'string', 'required' => false, 'example' => 'name', 'title' => ''], 'required' => false, - 'example' => '1', - ], - 'PageSize' => [ 'title' => '', - 'description' => 'The number of chunks to display on each page. Maximum value: 100. Default value: 10.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '10', + 'example' => '', ], + 'Filed' => ['description' => 'The file ID field in the legacy Model Studio SDK. The usage and default value are identical to those of the `FileId` field. If you are using the following versions (or later) of the Model Studio SDK, use the `FileId` field instead. If you are using the SWIFT Model Studio SDK, continue to use this field.'."\n" + ."\n" + .'- Java (async): 1.0.18'."\n" + .'- Java: 1.10.2'."\n" + .'- TypeScript: 1.10.2'."\n" + .'- Go: 1.10.2'."\n" + .'- PHP: 1.10.2'."\n" + .'- Python: 1.10.2'."\n" + .'- C#: 1.10.2'."\n" + .'- C++: 1.10.17'."\n" + ."\n" + .'> **How to check the Model Studio SDK version**: Visit the <props="china">[Model Studio SDK center](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK center](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>, click "**Install**" in the left-side navigation pane, set the API version to "**2023-12-29**", select your programming language, and then click "**History Versions**" to view the version.', 'type' => 'string', 'required' => false, 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx', 'title' => ''], + 'FileId' => ['description' => '<props="china">'."\n" + ."\n" + .'The file ID, which is the `FileId` returned by the **AddFile** operation. This field is not required for data query or image Q&A knowledge bases. This field is required for document search or audio/video search knowledge bases. You can also obtain the file ID by clicking the ID icon next to the file name on the Files tab of [Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center). You can use the file ID to filter the returned chunks. Default value: empty.'."\n" + ."\n\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'The file ID, which is the `FileId` returned by the **AddFile** operation. This field is not required for data query or image Q&A knowledge bases. This field is required for document search knowledge bases. You can also obtain the file ID by clicking the ID icon next to the file name on the Files tab of'."\n" + .'[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center). You can use the file ID to filter the returned chunks. Default value: empty.'."\n" + ."\n" + .'</props>.', 'type' => 'string', 'required' => false, 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx', 'title' => ''], + 'IndexId' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'required' => true, 'example' => 'otoru9xxxx', 'title' => ''], + 'PageNum' => ['description' => 'The page number to query. Minimum value: 1. Default value: 1.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', 'title' => ''], + 'PageSize' => ['description' => 'The number of text chunks to display per page in a paged query. Maximum value: 100. Default value: 10.', 'type' => 'integer', 'title' => '', 'format' => 'int32', 'required' => false, 'example' => '10'], ], 'required' => false, + 'title' => '', + 'example' => '', ], ], ], @@ -5197,186 +4728,183 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => 'The error code.'."\n", - 'type' => 'string', - 'example' => 'Index.InvalidParameter', - ], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'Index.InvalidParameter', 'title' => ''], 'Data' => [ - 'description' => 'The data returned.'."\n", + 'description' => 'The business data returned by the operation.', 'type' => 'object', 'properties' => [ 'Nodes' => [ - 'description' => 'The list of chunks.'."\n", + 'description' => 'The list of text chunks.', 'type' => 'array', 'items' => [ - 'description' => 'The chunk object.'."\n", + 'description' => 'The text chunk object.', 'type' => 'object', 'properties' => [ - 'Metadata' => [ - 'description' => 'The metadata map of the chunk.'."\n", - 'type' => 'any', - 'example' => '', - ], - 'Score' => [ - 'description' => 'The similarity score of the chunk.'."\n", - 'type' => 'number', - 'format' => 'double', - 'example' => '0.3', - ], - 'Text' => [ - 'description' => 'The text of the chunk.'."\n", - 'type' => 'string', - 'example' => '', - ], + 'Metadata' => ['description' => '<props="china">'."\n" + ."\n" + .'The metadata map of the text chunk.'."\n" + ."\n" + .'> The `file_path` field in the metadata map of document search knowledge bases is meaningless. Do not use it in your business code.'."\n" + ."\n" + .'> When retrieving a document search knowledge base, if a chunk contains an image, the image is returned through the `image_url` field in the metadata map, along with an expiration time.'."\n" + ."\n" + .'> When retrieving an audio/video search knowledge base, if a chunk contains audio, the audio is returned through the `audio_url` field in the metadata map, along with an expiration time.'."\n" + ."\n" + .'> When retrieving an audio/video search knowledge base, if a chunk contains video, the video is returned through the `video_url` field in the metadata map, along with an expiration time.'."\n" + ."\n" + .'</props>'."\n" + .'<props="intl">'."\n" + ."\n" + .'The metadata map of the text chunk.'."\n" + ."\n" + .'> The `file_path` field in the metadata map of document search knowledge bases is meaningless. Do not use it in your business code.'."\n" + ."\n" + .'> When retrieving a document search knowledge base, if a chunk contains an image, the image is returned through the `image_url` field in the metadata map, along with an expiration time.'."\n" + ."\n" + .'</props>.', 'type' => 'any', 'example' => '{'."\n" + .' "file_path": "https://bailian-***",'."\n" + .' "parent": "阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。",'."\n" + .' "is_displayed_chunk_content": "true",'."\n" + .' "image_url": [],'."\n" + .' "nid": "83***",'."\n" + .' "source": "0",'."\n" + .' "_score": 0,'."\n" + .' "title": "",'."\n" + .' "doc_id": "file_24e***",'."\n" + .' "content": "阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。",'."\n" + .' "_rc_score": 0,'."\n" + .' "workspace_id": "llm-zna***",'."\n" + .' "hier_title": "",'."\n" + .' "doc_name": "什么是阿里云百炼",'."\n" + .' "pipeline_id": "j6b***",'."\n" + .' "_id": "llm-zna5***"'."\n" + .'}', 'title' => ''], + 'Score' => ['description' => 'The similarity score of the text chunk.', 'type' => 'number', 'format' => 'double', 'example' => '0', 'title' => ''], + 'Text' => ['description' => 'The content of the text chunk.', 'type' => 'string', 'example' => '阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。', 'title' => ''], ], + 'title' => '', + 'example' => '', ], + 'title' => '', + 'example' => '', ], - 'Total' => [ - 'description' => 'The total number of chunks returned.'."\n", - 'type' => 'integer', - 'format' => 'int64', - 'example' => '16', - ], + 'Total' => ['description' => 'The total number of returned results.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '8F97A63B-55F1-527F-9D6E-467B6A7E8CF1', - ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1'], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], 'description' => '', + 'title' => '', + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], + 'staticInfo' => ['returnType' => 'synchronous'], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Data\\": {\\n \\"Nodes\\": [\\n {\\n \\"Metadata\\": \\"{\\\\n \\\\\\"file_path\\\\\\": \\\\\\"https://bailian-***\\\\\\",\\\\n \\\\\\"parent\\\\\\": \\\\\\"阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。\\\\\\",\\\\n \\\\\\"is_displayed_chunk_content\\\\\\": \\\\\\"true\\\\\\",\\\\n \\\\\\"image_url\\\\\\": [],\\\\n \\\\\\"nid\\\\\\": \\\\\\"83***\\\\\\",\\\\n \\\\\\"source\\\\\\": \\\\\\"0\\\\\\",\\\\n \\\\\\"_score\\\\\\": 0,\\\\n \\\\\\"title\\\\\\": \\\\\\"\\\\\\",\\\\n \\\\\\"doc_id\\\\\\": \\\\\\"file_24e***\\\\\\",\\\\n \\\\\\"content\\\\\\": \\\\\\"阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。\\\\\\",\\\\n \\\\\\"_rc_score\\\\\\": 0,\\\\n \\\\\\"workspace_id\\\\\\": \\\\\\"llm-zna***\\\\\\",\\\\n \\\\\\"hier_title\\\\\\": \\\\\\"\\\\\\",\\\\n \\\\\\"doc_name\\\\\\": \\\\\\"什么是阿里云百炼\\\\\\",\\\\n \\\\\\"pipeline_id\\\\\\": \\\\\\"j6b***\\\\\\",\\\\n \\\\\\"_id\\\\\\": \\\\\\"llm-zna5***\\\\\\"\\\\n}\\",\\n \\"Score\\": 0,\\n \\"Text\\": \\"阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。\\"\\n }\\n ],\\n \\"Total\\": 1\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'ListChunks', - 'description' => '* Before you call this operation, make sure that your knowledge base is created and is not deleted. That is, the primary key ID of the knowledge base `IndexId` is valid.'."\n" - .'* This interface is idempotent.'."\n", - ], - 'UpdateChunk' => [ - 'summary' => 'Modifies the content and title of a specified text chunk in the knowledge base, and sets whether the chunk participates in knowledge base retrieval.', - 'path' => '/{WorkspaceId}/chunk/update', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', + 'title' => 'Query chunk list under an index', + 'description' => '- For document search<props="china"> or audio/video search</props> knowledge bases, this operation queries all chunks of a specified file. For data query or image Q&A knowledge bases, this operation retrieves information about all text chunks.'."\n" + .'- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:ChunkList permission), and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Use the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to invoke this operation.'."\n" + .'- 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).'."\n" + .'- This operation has idempotence.'."\n" + ."\n" + .'**Rate limit:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If you are throttled, retry later.', + 'changeSet' => [ + ['createdAt' => '2024-12-12T05:56:53.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-09-25T05:49:26.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListChunks'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ChunkList', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'ListFile' => [ + 'summary' => 'Retrieves the details of one or more documents in a specified category.', + 'path' => '/{WorkspaceId}/datacenter/files', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'readAndWrite', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'PipelineId', - 'in' => 'query', - 'schema' => [ - 'description' => 'The knowledge base ID, which is the `Data.Id` returned by **CreateIndex**. You can also get it on the [Knowledge Base](https://modelstudio.console.alibabacloud.com/?tab=app#/knowledge-base) page.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '79c0alxxxx'."\n", - ], + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The workspace ID to which the category belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", 'title' => ''], ], [ - 'name' => 'DataId', + 'name' => 'CategoryId', 'in' => 'query', - 'schema' => [ - 'description' => 'The file ID, which is the `FileId` returned by **AddFile**. You can also go to the [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) page. Click the ID icon next to your file to get its ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'doc_c134aa2073204a5d936d870bf960f56axxxxxxxx'."\n", - ], + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'The category ID, which is the `CategoryId` returned by the **AddCategory** operation. You can also obtain it on the [Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center) - Files tab by clicking the ID icon next to the category name.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'The category ID, which is the `CategoryId` returned by the **AddCategory** operation. You can also obtain it on the [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) - Files tab by clicking the ID icon next to the category name.'."\n" + ."\n" + .'</props>.', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'title' => ''], ], [ - 'name' => 'ChunkId', + 'name' => 'NextToken', 'in' => 'query', - 'schema' => [ - 'description' => 'The ID of the text chunk to be modified. You can find it in the Node.Metadata.\\_id field returned by **ListChunks**.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-5ip55o1zrzxx_09fe52x_table_033b551e10024029992e79767b151fxx_10024xx_0', - ], + 'schema' => ['description' => 'The pagination token. Set this to the NextToken value returned by the previous API call.', 'type' => 'string', 'required' => false, 'example' => 'AAAAAdH70eOCSCKtacdomNzak4U=', 'title' => ''], ], [ - 'name' => 'IsDisplayedChunkContent', + 'name' => 'MaxResults', 'in' => 'query', - 'schema' => [ - 'description' => 'Specifies whether this text chunk participates in knowledge base retrieval. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n" - ."\n" - .'Default value: true.'."\n", - 'type' => 'boolean', - 'required' => true, - 'example' => 'true', - ], + 'schema' => ['description' => 'The number of entries per page for paging. Valid values: 1 to 200.'."\n" + ."\n" + .'Default value:'."\n" + .'If no value is set or the value is less than 1, the default value is 20. If the value is set to greater than 200, the default value is 200.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20', 'title' => ''], ], [ - 'name' => 'content', + 'name' => 'FileName', 'in' => 'query', - 'schema' => [ - 'description' => 'The new content of the chunk. The content must be between 10 and 6,000 characters in length and cannot exceed the maximum chunk length set when the knowledge base was created.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '', - ], - ], - [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. For more information, see [How to use workspace](~~2587495~~).'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-3z7uw7fwz0vexxxx'."\n", - ], + 'schema' => ['description' => 'The file name (without extension). Only exact match is supported. Fuzzy search is not supported.', 'type' => 'string', 'required' => false, 'example' => 'product-overview', 'title' => ''], ], [ - 'name' => 'title', + 'name' => 'FileIds', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => 'The new title of the chunk. The title must be 0 to 50 characters in length and can be an empty string. If you specify an empty string, the existing title is cleared. If you do not pass this parameter, the original title remains unchanged.'."\n", - 'type' => 'string', + 'title' => '', + 'description' => 'The list of file IDs to query. A maximum of 20 files can be queried at a time.', + 'type' => 'array', + 'items' => ['title' => '', 'description' => 'The file ID.', 'type' => 'string', 'example' => 'file_xxxx', 'required' => false], 'required' => false, + 'maxItems' => 20, + 'minItems' => 0, 'example' => '', ], ], @@ -5384,732 +4912,929 @@ 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'."\n", - ], - 'Code' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'InvalidParameter'."\n", - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'success', 'title' => ''], 'Data' => [ - 'description' => 'The data returned if the request is successful.'."\n", - 'type' => 'boolean', - 'example' => 'true', - ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', + 'description' => 'The data field returned by the operation.', + 'type' => 'object', + 'properties' => [ + 'FileList' => [ + 'description' => 'The list of files in the category.', + 'type' => 'array', + 'items' => [ + 'description' => 'The file object.', + 'type' => 'object', + 'properties' => [ + 'CategoryId' => ['description' => 'The ID of the category to which the file belongs.', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'title' => ''], + 'CreateTime' => ['description' => 'The timestamp when the file was added to Alibaba Cloud Model Studio. Format: yyyy-MM-dd HH:mm:ss. Time zone: UTC+8.', 'type' => 'string', 'example' => '2024-09-09 11:03:35', 'title' => ''], + 'FileId' => ['description' => 'The file ID, which is the `FileId` returned by the **AddFile** operation. You can also obtain it on the <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> page by clicking the icon next to the file name.', 'type' => 'string', 'example' => 'file_5ff599b3455a45db8c41b0054b361518_xxxxxxxx', 'title' => ''], + 'FileName' => ['description' => 'The file name.', 'type' => 'string', 'example' => 'product-overview.pdf', 'title' => ''], + 'FileType' => ['description' => 'The file format type. Valid values: pdf, docx, doc, txt, md, pptx, ppt, xlsx, xls, html, png, jpg, jpeg, bmp, and gif.', 'type' => 'string', 'example' => 'docx', 'title' => ''], + 'Parser' => ['description' => 'The document parser. Valid values:'."\n" + .'- DASHSCOPE_DOCMIND: Alibaba Cloud intelligent document parsing.', 'type' => 'string', 'example' => 'DASHSCOPE_DOCMIND', 'title' => ''], + 'SizeInBytes' => ['description' => 'The file size in bytes.', 'type' => 'integer', 'format' => 'int64', 'example' => '512', 'title' => ''], + 'Status' => ['description' => 'The file parsing status. Valid values:'."\n" + .'- INIT: Initialization state. Waiting to be scheduled.'."\n" + .'- PARSING: Parsing in progress.'."\n" + .'- PARSE_SUCCESS: Parsing completed.'."\n" + .'- PARSE_FAILED: Parsing failed.', 'type' => 'string', 'example' => 'PARSE_SUCCESS', 'title' => ''], + 'ParseErrorMessage' => ['title' => '', 'description' => 'The reason for parsing failure.', 'type' => 'string', 'example' => 'Error Message'], + 'Tags' => [ + 'description' => 'The list of tags associated with the file. A document can be associated with multiple tags.', + 'type' => 'array', + 'items' => ['description' => 'The file tag.', 'type' => 'string', 'example' => 'tag-A', 'title' => ''], + 'title' => '', + 'example' => '', + ], + ], + 'title' => '', + 'example' => '', + ], + 'title' => '', + 'example' => '', + ], + 'HasNext' => ['description' => 'Indicates whether there is a next page of category data that matches the query conditions. Valid values:'."\n" + .'- true: Yes.'."\n" + .'- false: No.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'MaxResults' => ['description' => 'The number of entries per page for paging.', 'type' => 'integer', 'format' => 'int32', 'example' => '20', 'title' => ''], + 'NextToken' => ['description' => 'The pagination token returned by this call.', 'type' => 'string', 'example' => '4jzbJk9J6lNeuXD9hP0viA==', 'title' => ''], + 'TotalCount' => ['description' => 'The total number of entries in the returned results.', 'type' => 'integer', 'format' => 'int32', 'example' => '48', 'title' => ''], + ], + 'title' => '', + 'example' => '', ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Requests throttling triggered.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1'], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + .'- true: Successful. '."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Code\\": \\"\\",\\n \\"Message\\": \\"\\",\\n \\"Success\\": true,\\n \\"Data\\": true,\\n \\"Status\\": \\"\\\\\\"200\\\\\\"\\"\\n}","type":"json"}]', - 'title' => 'UpdateChunk', - 'description' => '* **Limits**: This operation supports only knowledge base of the document search type. Data query and image Q\\&A types are not supported.'."\n" + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"success\\",\\n \\"Data\\": {\\n \\"FileList\\": [\\n {\\n \\"CategoryId\\": \\"cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx\\",\\n \\"CreateTime\\": \\"2024-09-09 11:03:35\\",\\n \\"FileId\\": \\"file_5ff599b3455a45db8c41b0054b361518_xxxxxxxx\\",\\n \\"FileName\\": \\"product-overview.pdf\\",\\n \\"FileType\\": \\"docx\\",\\n \\"Parser\\": \\"DASHSCOPE_DOCMIND\\",\\n \\"SizeInBytes\\": 512,\\n \\"Status\\": \\"PARSE_SUCCESS\\",\\n \\"ParseErrorMessage\\": \\"Error Message\\",\\n \\"Tags\\": [\\n \\"tag-A\\"\\n ]\\n }\\n ],\\n \\"HasNext\\": true,\\n \\"MaxResults\\": 20,\\n \\"NextToken\\": \\"4jzbJk9J6lNeuXD9hP0viA==\\",\\n \\"TotalCount\\": 48\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => 'File list', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:ListFile permission), and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Invoke this operation by using the latest <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>.'."\n" + .'- For paging on the first page, only set `MaxResults` to limit the number of entries returned. The `NextToken` in the response serves as the credential for querying subsequent pages. When querying subsequent pages, set the `NextToken` parameter to the `NextToken` value obtained from the previous response (if `NextToken` is empty, all results have been returned and no further requests are needed), and set `MaxResults` to limit the number of entries returned.'."\n" ."\n" - .'* **Required permissions**:'."\n" + .'- This operation is idempotent.'."\n" ."\n" - .' * **RAM users**: Must first obtain the [API permissions](~~2848578~~) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:UpdateChunk permission required), and [become member of a workspace](~~2851098~~).'."\n" - .' * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.'."\n" - ."\n" - .'* **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.'."\n" - ."\n" - .'* **Delay**: The update takes effect immediately. During peak hours, the update may take place in seconds.'."\n" - ."\n" - .'* **Idempotence**: This operation is idempotent. If you perform a repeated operation on a chunk that has already been updated, the interface returns a success.'."\n" - ."\n" - .'**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.'."\n", - ], - 'DeleteChunk' => [ - 'summary' => 'Deletes a specified text chunk from a knowledge base. The deleted chunk cannot be retrieved or recalled.', - 'path' => '/{WorkspaceId}/chunk/delete', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', + .'**Rate limit:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 5 calls per second. If throttled, retry later.', + 'changeSet' => [ + ['createdAt' => '2024-10-15T01:42:54.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-09-18T08:46:20.000Z', 'description' => 'Response parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListFile'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'ListIndexDocuments' => [ + 'summary' => 'Retrieves files and their summary information from a specified knowledge base.', + 'path' => '/{WorkspaceId}/index/list_index_documents', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'readAndWrite', + 'consumes' => ['application/x-www-form-urlencoded'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'PipelineId', + 'name' => 'IndexId', + 'in' => 'query', + 'schema' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', 'title' => ''], + ], + [ + 'name' => 'DocumentStatus', 'in' => 'query', 'schema' => [ - 'description' => 'The knowledge base ID, which is the `Data.Id` parameter returned by **CreateIndex**.'."\n", + 'description' => 'Filters the returned file list by file import status. Valid values:'."\n" + .'- INSERT_ERROR: failed to import to the index.'."\n" + .'- RUNNING: index building in progress.'."\n" + .'- DELETED: deleted.'."\n" + .'- FINISH: index building succeeded.'."\n" + .'- PARSE_FAILED: parsing failed.'."\n" + .'- DOC_PARSING: parsing in progress.'."\n" + ."\n" + .'Default value: empty, which means no filtering by file import status.', + 'enumValueTitles' => [], 'type' => 'string', - 'required' => true, - 'example' => '79c0alxxxx', + 'required' => false, + 'example' => 'FINISH', + 'title' => '', ], ], [ - 'name' => 'WorkspaceId', - 'in' => 'path', + 'name' => 'DocumentName', + 'in' => 'query', + 'schema' => ['description' => 'Filters the returned file list by file name (without the file extension). Default value: empty, which means no filtering by file name.', 'type' => 'string', 'required' => false, 'example' => 'product-overview', 'title' => ''], + ], + [ + 'name' => 'EnableNameLike', + 'in' => 'query', 'schema' => [ - 'description' => 'The ID of the workspace to which the knowledge base belongs. For more information, see [How to use workspace](~~2587495~~).'."\n", + 'description' => 'Specifies whether to enable fuzzy matching for file names. This parameter is used together with the `DocumentName` parameter. Valid values:'."\n" + .'- true: Performs fuzzy matching on the returned file list based on the file name.'."\n" + .'- false: Performs exact matching on the returned file list based on the file name.'."\n" + ."\n" + .'Default value: false.', + 'enumValueTitles' => ['true' => 'enabled.', 'false' => 'disabled.'], 'type' => 'string', - 'required' => true, - 'example' => 'llm-3z7uw7fwz0vexxxx', + 'required' => false, + 'example' => 'false', + 'title' => '', ], ], [ - 'name' => 'ChunkIds', + 'name' => 'PageNumber', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => 'The list of text chunks to be deleted. You can specify up to 10 chunk IDs at a time.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The text chunk ID, which is the `_id` field in the `Metadata` of the Node object returned by **ListChunks**.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-5ip55o1zrzxx_09fe52x_table_033b551e10024029992e79767b151fxx_10024xx_0', - ], - 'required' => true, - ], + 'schema' => ['description' => 'The page number. Minimum value: 1. Default value: 1.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', 'title' => ''], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => 'The number of files to display per page in a paged query. No maximum limit.'."\n" + .'Default value: 10.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', 'title' => ''], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The workspace ID of the knowledge base. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'."\n", - ], - 'Code' => [ - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'InvalidParameter'."\n", - ], - 'Message' => [ - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.'."\n", - ], - 'Success' => [ - 'description' => 'Indications whether the API call is successful. Valid values:'."\n" - ."\n" - .'* true'."\n" - .'* false'."\n", - 'type' => 'boolean', - 'example' => 'true'."\n", - ], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'InvalidParameter', 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], 'Data' => [ - 'description' => 'The data returned if the request is successful.'."\n", - 'type' => 'boolean', - 'example' => 'true'."\n", - ], - 'Status' => [ - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200'."\n", + 'description' => 'The data field returned by the operation.', + 'type' => 'object', + 'properties' => [ + 'Documents' => [ + 'description' => 'The list of files in the knowledge base, sorted by document import time in descending order (consistent with the console).', + 'type' => 'array', + 'items' => [ + 'description' => 'The file object.', + 'type' => 'object', + 'properties' => [ + 'SourceId' => ['description' => '<props="china">'."\n" + ."\n" + .'For document search or audio/video search knowledge bases, this parameter specifies the category ID, which is the `CategoryId` returned by the **AddCategory** operation. You can also obtain it by clicking the ID icon next to the category name on the Files tab of [Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center).'."\n" + ."\n\n" + .'For data query or image Q&A knowledge bases, this parameter specifies the data table ID. You can obtain it by clicking the ID icon next to the data table name on the Tables tab of [Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center).'."\n" + ."\n\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'For document search knowledge bases, this parameter specifies the category ID, which is the `CategoryId` returned by the **AddCategory** operation. You can also obtain it by clicking the ID icon next to the category name on the Files tab of [Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center).'."\n" + ."\n\n" + .'For data query or image Q&A knowledge bases, this parameter specifies the data table ID. You can obtain it by clicking the ID icon next to the data table name on the Tables tab of [Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center).'."\n" + ."\n" + .'</props>', 'type' => 'string', 'example' => 'cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx', 'title' => ''], + 'Id' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'doc_c134aa2073204a5d936d870bf960f56axxxxxxxx', 'title' => ''], + 'Name' => ['description' => 'The file name.', 'type' => 'string', 'example' => 'product-overview', 'title' => ''], + 'Size' => ['description' => 'The file size, in bytes.', 'type' => 'integer', 'format' => 'int32', 'example' => '996765', 'title' => ''], + 'DocumentType' => ['description' => 'The file format type. Valid values: pdf, docx, doc, txt, md, pptx, ppt, png, jpg, jpeg, bmp, gif, and EXCEL.', 'type' => 'string', 'example' => 'pdf', 'title' => ''], + 'Status' => [ + 'description' => 'The file import status. Valid values:'."\n" + .'- INSERT_ERROR: File import failed.'."\n" + .'- RUNNING: File import in progress.'."\n" + .'- DELETED: File deleted.'."\n" + .'- FINISH: File import succeeded.', + 'enumValueTitles' => ['INSERT_ERROR' => 'file import failed.', 'RUNNING' => 'file import in progress.', 'DELETED' => 'file deleted.', 'FINISH' => 'file import succeeded.'], + 'type' => 'string', + 'example' => 'RUNNING', + 'title' => '', + ], + 'Code' => ['description' => 'The error status code for file import.', 'type' => 'string', 'example' => '110002', 'title' => ''], + 'Message' => ['description' => 'The error message for file import.', 'type' => 'string', 'example' => 'check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid', 'title' => ''], + 'GmtModified' => ['description' => 'The time when the file was imported to the knowledge base, in UNIX timestamp format.', 'type' => 'integer', 'format' => 'int64', 'example' => '1744856423000', 'title' => ''], + ], + 'title' => '', + 'example' => '', + ], + 'title' => '', + 'example' => '', + ], + 'IndexId' => ['description' => 'The knowledge base ID.', 'type' => 'string', 'example' => 'pno97txxxx', 'title' => ''], + 'TotalCount' => ['description' => 'The total number of returned results.', 'type' => 'integer', 'format' => 'int64', 'example' => '2437', 'title' => ''], + 'PageNumber' => ['description' => 'The returned page number.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''], + 'PageSize' => ['description' => 'The returned number of entries per page.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''], + ], + 'title' => '', + 'example' => '', ], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\\\n\\",\\n \\"Code\\": \\"\\",\\n \\"Message\\": \\"\\",\\n \\"Success\\": true,\\n \\"Data\\": true,\\n \\"Status\\": \\"200\\\\n\\"\\n}","type":"json"}]', - 'title' => 'DeleteChunk', - 'description' => '**'."\n" - ."\n" - .'**Warning** After a text chunk is deleted, it cannot be restored. Proceed with caution.'."\n" - ."\n" - .'* **Required permissions**:'."\n" - ."\n" - .' * **RAM users**: Must first obtain the [API permissions](~~2848578~~) of Model Studio (such as the `AliyunBailianDataFullAccess` policy, which includes the sfm:DeleteChunk permission required), and [become member of a workspace](~~2851098~~).'."\n" - .' * **Alibaba Cloud account**: Has the permission by default, and can call the operation directly.'."\n" - ."\n" - .'* **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.'."\n" - ."\n" - .'* **Delay**: The update takes effect immediately. During peak hours, the update may take place in seconds.'."\n" - ."\n" - .'* **Idempotence**: This operation is idempotent. If you perform a repeated operation on a chunk that has already been deleted, the interface returns a success.'."\n" + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Code\\": \\"InvalidParameter\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Success\\": true,\\n \\"Data\\": {\\n \\"Documents\\": [\\n {\\n \\"SourceId\\": \\"cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx\\",\\n \\"Id\\": \\"doc_c134aa2073204a5d936d870bf960f56axxxxxxxx\\",\\n \\"Name\\": \\"product-overview\\",\\n \\"Size\\": 996765,\\n \\"DocumentType\\": \\"pdf\\",\\n \\"Status\\": \\"RUNNING\\",\\n \\"Code\\": \\"110002\\",\\n \\"Message\\": \\"check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid\\",\\n \\"GmtModified\\": 1744856423000\\n }\\n ],\\n \\"IndexId\\": \\"pno97txxxx\\",\\n \\"TotalCount\\": 2437,\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10\\n },\\n \\"Status\\": \\"200\\"\\n}","type":"json"}]', + 'title' => 'Query files in a knowledge base', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:ListIndexFiles permission) and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Use the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to invoke this operation.'."\n" + .'- 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).'."\n" + .'- This operation has idempotence.'."\n" ."\n" - .'**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.'."\n", - ], - 'GetIndexMonitor' => [ - 'summary' => '获取索引监控情况', - 'path' => '/{WorkspaceId}/rag/index/monitor', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', + .'**Throttling:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 15 calls per second. If you are throttled, retry later.', + 'changeSet' => [ + ['createdAt' => '2025-06-04T01:43:41.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-03-25T06:25:53.000Z', 'description' => 'Response parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '15', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListIndexDocuments'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListIndexFiles', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'ListIndexFileDetails' => [ + 'summary' => 'Retrieves the files in a specified knowledge base along with their details.', + 'path' => '/{WorkspaceId}/index/list_index_file_detail', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-3shx2gu255oqxxxx', - ], + 'name' => 'IndexId', + 'in' => 'query', + 'schema' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'required' => false, 'example' => '79c0alxxxx', 'title' => ''], ], [ - 'name' => 'IndexId', + 'name' => 'DocumentStatus', 'in' => 'query', 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, + 'description' => 'Filters the returned file list by file import status. Valid values:'."\n" + ."\n" + .'- INSERT_ERROR: Failed to import to the index.'."\n" + .'- RUNNING: Index building in progress.'."\n" + .'- DELETED: Deleted.'."\n" + .'- FINISH: Index building succeeded.'."\n" + .'- PARSE_FAILED: Parsing failed.'."\n" + .'- DOC_PARSING: Parsing in progress.'."\n" + ."\n" + .'Default value: empty, which means no filtering by file import status.', 'enumValueTitles' => [], - 'example' => 'kb-123456xxxx'."\n", + 'type' => 'string', + 'required' => false, + 'example' => 'FINISH', + 'title' => '', ], ], [ - 'name' => 'StartTimestamp', + 'name' => 'DocumentName', 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'example' => '1767604500', - ], + 'schema' => ['description' => 'Filters the returned file details list by file name. Default value: empty, which means no filtering by file name.', 'type' => 'string', 'required' => false, 'example' => '翻译平台运维文档', 'title' => ''], ], [ - 'name' => 'EndTimestamp', + 'name' => 'PageNumber', + 'in' => 'query', + 'schema' => ['description' => 'The page number to query. Minimum value: 1. Default value: 1.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', 'title' => ''], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => 'The number of files to display per page for paging. Maximum value: 10.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', 'title' => ''], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the knowledge base belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', 'title' => ''], + ], + [ + 'name' => 'EnableNameLike', 'in' => 'query', 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'example' => '1767604500', + 'description' => 'Specifies whether to enable fuzzy matching for file names. This parameter is used together with the `DocumentName` parameter. Valid values:'."\n" + ."\n" + .'- true: Performs fuzzy matching on the returned file list based on the file name.'."\n" + .'- false: Performs exact matching on the returned file list based on the file name.'."\n" + ."\n" + .'Default value: false.', + 'enumValueTitles' => ['true' => 'enabled.', 'false' => 'disabled.'], + 'type' => 'string', + 'required' => false, + 'example' => 'false', + 'title' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '', - 'type' => 'string', - 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', - ], - 'Code' => [ - 'description' => '', - 'type' => 'string', - 'example' => '200', - ], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'example' => 'InvalidParameter'."\n", 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + ."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], 'Data' => [ - 'description' => '', - 'type' => 'any', - 'example' => '{'."\n" - .' "code": "Success",'."\n" - .' "status_code": 200,'."\n" - .' "data": {'."\n" - .' "storageMonitorData": Object{...},'."\n" - .' "qpsMonitorData": Object{...}'."\n" - .' },'."\n" - .' "success": true,'."\n" - .' "message": "success",'."\n" - .' "request_id": "65d34b79-b97e-478e-a0a3-xxx",'."\n" - .' "status": "SUCCESS"'."\n" - .'}', - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'success', - ], - 'Success' => [ - 'description' => '', - 'type' => 'boolean', - 'example' => 'true'."\n", - ], - 'Status' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'SUCCESS', + 'description' => 'The data field returned by the operation.', + 'type' => 'object', + 'properties' => [ + 'Documents' => [ + 'description' => 'The list of files in the knowledge base, sorted by file import time in descending order (consistent with the console).', + 'type' => 'array', + 'items' => [ + 'description' => 'The file object.', + 'type' => 'object', + 'properties' => [ + 'Status' => ['description' => 'The file import status. Valid values:'."\n" + ."\n" + .'- INSERT_ERROR: File import failed.'."\n" + .'- RUNNING: File import in progress.'."\n" + .'- DELETED: File deleted.'."\n" + .'- FINISH: File import succeeded.', 'type' => 'string', 'example' => 'RUNNING', 'title' => ''], + 'EnableHeaders' => ['description' => 'Indicates whether Excel file headers support concatenation.', 'type' => 'string', 'example' => 'true', 'title' => ''], + 'OverlapSize' => ['description' => 'The overlap length between segments.', 'type' => 'string', 'example' => '100', 'title' => ''], + 'Message' => ['description' => 'The error message for file import.', 'type' => 'string', 'example' => 'check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid', 'title' => ''], + 'Size' => ['description' => 'The file size, in bytes.', 'type' => 'integer', 'format' => 'int32', 'example' => '996764'."\n", 'title' => ''], + 'SourceId' => ['description' => 'The category ID.', 'type' => 'string', 'example' => 'cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx'."\n", 'title' => ''], + 'GmtModified' => ['description' => 'The time when the file was imported to the knowledge base, in UNIX timestamp format.', 'type' => 'integer', 'format' => 'int64', 'example' => '1744856423000'."\n", 'title' => ''], + 'DocumentType' => ['description' => 'The file format type. Valid values: pdf, docx, doc, txt, md, pptx, ppt, png, jpg, jpeg, bmp, gif, and EXCEL.', 'type' => 'string', 'example' => 'pdf', 'title' => ''], + 'ChunkMode' => ['description' => 'The custom chunking mode.', 'type' => 'string', 'example' => 'DashSplitter', 'title' => ''], + 'Code' => ['description' => 'The error status code for file import.', 'type' => 'string', 'example' => '110002', 'title' => ''], + 'separator' => ['description' => 'The sentence separator.', 'type' => 'string', 'example' => '" "', 'title' => ''], + 'Name' => ['description' => 'The file name.', 'type' => 'string', 'example' => '翻译平台运维文档'."\n", 'title' => ''], + 'ChunkSize' => ['description' => 'The segment length, which is the number of characters in each text chunk.', 'type' => 'string', 'example' => '600', 'title' => ''], + 'Id' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'doc_c134aa2073204a5d936d870bf960f56axxxxxxxx'."\n", 'title' => ''], + ], + 'title' => '', + 'example' => '', + ], + 'title' => '', + 'example' => '', + ], + 'IndexId' => ['description' => 'The knowledge base ID.', 'type' => 'string', 'example' => '79c0alxxxx', 'title' => ''], + 'TotalCount' => ['description' => 'The total number of returned results.', 'type' => 'integer', 'format' => 'int64', 'example' => '2437', 'title' => ''], + 'PageNumber' => ['description' => 'The returned page number.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''], + 'PageSize' => ['description' => 'The returned number of entries per page.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''], + ], + 'title' => '', + 'example' => '', ], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], ], + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Code\\": \\"InvalidParameter\\\\n\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Success\\": true,\\n \\"Data\\": {\\n \\"Documents\\": [\\n {\\n \\"Status\\": \\"RUNNING\\",\\n \\"EnableHeaders\\": \\"true\\",\\n \\"OverlapSize\\": \\"100\\",\\n \\"Message\\": \\"check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid\\",\\n \\"Size\\": 996764,\\n \\"SourceId\\": \\"cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx\\\\n\\",\\n \\"GmtModified\\": 1744856423000,\\n \\"DocumentType\\": \\"pdf\\",\\n \\"ChunkMode\\": \\"DashSplitter\\",\\n \\"Code\\": \\"110002\\",\\n \\"separator\\": \\"\\\\\\" \\\\\\"\\",\\n \\"Name\\": \\"翻译平台运维文档\\\\n\\",\\n \\"ChunkSize\\": \\"600\\",\\n \\"Id\\": \\"doc_c134aa2073204a5d936d870bf960f56axxxxxxxx\\\\n\\"\\n }\\n ],\\n \\"IndexId\\": \\"79c0alxxxx\\",\\n \\"TotalCount\\": 2437,\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10\\n },\\n \\"Status\\": \\"200\\"\\n}","type":"json"}]', + 'title' => 'Query file details in a knowledge base', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (`AliyunBailianDataFullAccess` is required, which includes the sfm:ListIndexFiles permission), before invoking this operation. Alibaba Cloud accounts can invoke 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><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to invoke this operation.'."\n" + .'- 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).'."\n" + .'- This operation has idempotence.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListIndexFileDetails', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Code\\": \\"200\\",\\n \\"Data\\": \\"{\\\\n \\\\\\"code\\\\\\": \\\\\\"Success\\\\\\",\\\\n \\\\\\"status_code\\\\\\": 200,\\\\n \\\\\\"data\\\\\\": {\\\\n \\\\\\"storageMonitorData\\\\\\": Object{...},\\\\n \\\\\\"qpsMonitorData\\\\\\": Object{...}\\\\n },\\\\n \\\\\\"success\\\\\\": true,\\\\n \\\\\\"message\\\\\\": \\\\\\"success\\\\\\",\\\\n \\\\\\"request_id\\\\\\": \\\\\\"65d34b79-b97e-478e-a0a3-xxx\\\\\\",\\\\n \\\\\\"status\\\\\\": \\\\\\"SUCCESS\\\\\\"\\\\n}\\",\\n \\"Message\\": \\"success\\",\\n \\"Success\\": true,\\n \\"Status\\": 0\\n}","type":"json"}]', ], - 'CreatePromptTemplate' => [ - 'summary' => 'Creates a prompt template.', - 'path' => '/{workspaceId}/promptTemplates', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'ListIndices' => [ + 'summary' => 'Retrieves the list of knowledge bases in a specified workspace.', + 'path' => '/{WorkspaceId}/index/list_indices', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', + 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREsfm4VA8MJ'], ], 'parameters' => [ [ - 'name' => 'workspaceId', - 'in' => 'path', + 'name' => 'IndexName', + 'in' => 'query', 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', + 'description' => 'The name of the knowledge base. You can use this parameter to search for a knowledge base by name. The name must be 1 to 20 characters in length and can contain characters classified as letters in Unicode (including English letters, Chinese characters, and digits). The name can also contain colons (:), underscores (_), periods (.), or hyphens (-).'."\n" + ."\n" + .'Default value: empty, which queries all knowledge bases in the specified workspace.', + 'enumValueTitles' => [], 'type' => 'string', - 'required' => true, - 'example' => 'llm-czal8nvvwb8d4xxx'."\n", + 'required' => false, + 'example' => 'idx_status_score', + 'title' => '', ], ], [ - 'name' => 'name', + 'name' => 'PageNumber', 'in' => 'query', - 'schema' => [ - 'title' => '模板名称', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '', - ], + 'schema' => ['description' => 'The page number. Minimum value: 1. Default value: 1.', 'type' => 'string', 'required' => false, 'example' => '1', 'title' => ''], ], [ - 'name' => 'content', + 'name' => 'PageSize', 'in' => 'query', - 'schema' => [ - 'title' => 'prompt模板内容', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '', - ], + 'schema' => ['description' => 'The number of knowledge bases to display per page in a paging query. No maximum limit.'."\n" + .'Default value: 10.', 'type' => 'string', 'required' => false, 'example' => '10', 'title' => ''], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace to which the knowledge base belongs. For more information, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oq6xxxx', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'promptTemplateId' => [ - 'title' => 'prompt模板Id', - 'description' => '', - 'type' => 'string', - 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', - ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx'."\n", + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Data' => [ + 'description' => 'The returned data.', + 'type' => 'object', + 'properties' => [ + 'PageNumber' => ['description' => 'The page number returned.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''], + 'PageSize' => ['description' => 'The number of entries per page returned.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''], + 'TotalCount' => ['description' => 'The total number of entries returned.', 'type' => 'integer', 'format' => 'int32', 'example' => '48', 'title' => ''], + 'Indices' => [ + 'description' => 'The list of knowledge bases.', + 'type' => 'array', + 'items' => [ + 'description' => 'The knowledge base object.', + 'type' => 'object', + 'properties' => [ + 'Id' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'example' => 'lecxr5xxxx', 'title' => ''], + 'Name' => ['description' => 'The name of the knowledge base.', 'type' => 'string', 'example' => 'XXXX产品清单', 'title' => ''], + 'Description' => ['description' => 'The description of the knowledge base.', 'type' => 'string', 'example' => '清单中产品主要面向海外客户。', 'title' => ''], + 'StructureType' => [ + 'description' => 'The type of the knowledge base. Valid values:'."\n" + ."\n" + .'- UNSTRUCTURED: document search.', + 'enumValueTitles' => [], + 'type' => 'string', + 'example' => 'UNSTRUCTURED', + 'title' => '', + ], + 'ChunkSize' => ['description' => 'The estimated chunk length. Valid values: 1 to 2048.', 'type' => 'integer', 'format' => 'int32', 'example' => '5', 'title' => ''], + 'OverlapSize' => ['description' => 'The chunk overlap length. Valid values: 0 to 1024.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''], + 'Separator' => ['description' => 'The sentence separator. If multiple separators are used, they are separated by |. Valid values:'."\n" + .'- \\'."\n" + .': line break'."\n" + .'- ,: Chinese comma'."\n" + .'- ,: English comma'."\n" + .'- 。: Chinese period'."\n" + .'- .: English period'."\n" + .'- !: Chinese exclamation mark'."\n" + .'- !: English exclamation mark'."\n" + .'- ;: Chinese semicolon'."\n" + .'- ;: English semicolon'."\n" + .'- ?: Chinese question mark'."\n" + .'- ?: English question mark.', 'type' => 'string', 'example' => '\\n', 'title' => ''], + 'EmbeddingModelName' => ['description' => 'The name of the embedding model. Valid values:'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'- text-embedding-v4: the text-embedding-v4 model.'."\n" + .'- text-embedding-v3: the text-embedding-v3 model.'."\n" + .'- text-embedding-v2: the text-embedding-v2 model.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'- text-embedding-v2: the text-embedding-v2 model.'."\n" + ."\n" + .'</props>.', 'type' => 'string', 'example' => 'text-embedding-v2', 'title' => ''], + 'RerankModelName' => ['description' => 'The name of the rerank model. Valid values:'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'- qwen3-rerank-hybrid: qwen3-rerank (hybrid) reranking.'."\n" + .'- qwen3-rerank: qwen3-rerank reranking.'."\n" + .'- gte-rerank-hybrid: gte-rerank (hybrid) reranking.'."\n" + .'- gte-rerank: gte-rerank reranking.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'- gte-rerank-hybrid: official reranking.'."\n" + .'- gte-rerank: gte-rerank reranking.'."\n" + ."\n" + .'</props>.', 'type' => 'string', 'example' => 'gte-rerank-hybrid', 'title' => ''], + 'RerankMinScore' => ['description' => 'The similarity threshold. Valid values: 0.01 to 1.00.', 'type' => 'string', 'example' => '0.01', 'title' => ''], + 'SourceType' => ['description' => 'The data type of Alibaba Cloud Model Studio <props="china">[application data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[application data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>.'."\n" + ."\n\n" + .'For document search<props="china">/audio and video search</props> knowledge bases, valid values:'."\n" + .'- DATA_CENTER_CATEGORY: category type.'."\n" + .'- DATA_CENTER_FILE: file type.'."\n" + ."\n" + .'For data query/image Q&A knowledge bases, valid values:'."\n" + .'- DATA_CENTER_STRUCTURED_TABLE: data table type.', 'type' => 'string', 'example' => 'DATA_CENTER_FILE', 'title' => ''], + 'DocumentIds' => [ + 'description' => 'The list of file IDs.', + 'type' => 'array', + 'items' => ['description' => 'The file ID.', 'type' => 'string', 'example' => 'file_8c67b438043848199ffaa903d29addd4_xxxxxxxx', 'title' => ''], + 'title' => '', + 'example' => '', + ], + 'SinkType' => ['description' => 'The vector storage type of the knowledge base. Valid values:'."\n" + .'- ES: built-in vector database.'."\n" + .'- BUILT_IN: built-in vector database.'."\n" + .'- ADB: AnalyticDB for PostgreSQL database.', 'type' => 'string', 'example' => 'BUILT_IN', 'title' => ''], + 'SinkInstanceId' => ['description' => 'The instance ID of the vector storage for the knowledge base.', 'type' => 'string', 'example' => 'gp-bp1gq62t1788yxxxx', 'title' => ''], + 'SinkRegion' => ['description' => 'The region of the vector storage instance for the knowledge base.', 'type' => 'string', 'example' => 'cn-hangzhou', 'title' => ''], + 'ConfgModel' => ['description' => 'The configuration mode used by this knowledge base. Valid values:'."\n" + .'- recommend: recommended configuration.'."\n" + .'- user-defined: custom configuration.', 'type' => 'string', 'example' => 'recommend', 'title' => ''], + 'EnableRewrite' => ['description' => 'Indicates whether <props="china">[multi-turn conversation rewriting](https://help.aliyun.com/model-studio/use-cases/rag-optimization#b7031e2ad6cji)</props><props="intl">[multi-turn conversation rewriting](https://www.alibabacloud.com/help/model-studio/use-cases/rag-optimization#b7031e2ad6cji)</props> is enabled for this knowledge base. Valid values:'."\n" + .'- true: Enabled.'."\n" + .'- false: Disabled.', 'type' => 'boolean', 'example' => 'false', 'title' => ''], + ], + 'title' => '', + 'example' => '', + ], + 'title' => '', + 'example' => '', + ], + ], + 'title' => '', + 'example' => '', ], + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'Index.InvalidParameter', 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], ], + 'example' => '', ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'PromptTemplate.ContentInvalid', - 'errorMessage' => 'Input parameter Content is invalid.', - ], - [ - 'errorCode' => 'PromptTemplate.NameInvalid', - 'errorMessage' => 'Input parameter Name is invalid.', - ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Data\\": {\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 48,\\n \\"Indices\\": [\\n {\\n \\"Id\\": \\"lecxr5xxxx\\",\\n \\"Name\\": \\"XXXX产品清单\\",\\n \\"Description\\": \\"清单中产品主要面向海外客户。\\",\\n \\"StructureType\\": \\"UNSTRUCTURED\\",\\n \\"ChunkSize\\": 5,\\n \\"OverlapSize\\": 10,\\n \\"Separator\\": \\"\\\\\\\\n\\",\\n \\"EmbeddingModelName\\": \\"text-embedding-v2\\",\\n \\"RerankModelName\\": \\"gte-rerank-hybrid\\",\\n \\"RerankMinScore\\": \\"0.01\\",\\n \\"SourceType\\": \\"DATA_CENTER_FILE\\",\\n \\"DocumentIds\\": [\\n \\"file_8c67b438043848199ffaa903d29addd4_xxxxxxxx\\"\\n ],\\n \\"SinkType\\": \\"BUILT_IN\\",\\n \\"SinkInstanceId\\": \\"gp-bp1gq62t1788yxxxx\\",\\n \\"SinkRegion\\": \\"cn-hangzhou\\",\\n \\"ConfgModel\\": \\"recommend\\",\\n \\"EnableRewrite\\": false\\n }\\n ]\\n },\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Success\\": true,\\n \\"Status\\": \\"200\\"\\n}","type":"json"}]', + 'title' => 'List knowledge bases', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:ListIndex 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><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this operation.'."\n" + .'- This operation is idempotent.'."\n" + ."\n" + .'**Rate limit:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If throttled, retry later.', + 'changeSet' => [ + ['createdAt' => '2025-07-30T09:21:00.000Z', 'description' => 'Response parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListIndices'], ], - 500 => [ - [ - 'errorCode' => 'PromptTemplate.InternalError', - 'errorMessage' => 'Prompt template service inner exception.', + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListIndex', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"promptTemplateId\\": \\"6e49109bfeb94a39bb268f4e483ccxxx\\",\\n \\"requestId\\": \\"FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx\\\\n\\"\\n}","type":"json"}]', - 'title' => 'CreatePromptTemplate', ], - 'GetPromptTemplate' => [ - 'summary' => 'Obtains a prompt template based on the template ID.', - 'path' => '/{workspaceId}/promptTemplates/{promptTemplateId}', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], + 'ListMemories' => [ + 'summary' => 'Retrieves the details of one or more long-term memory entities in a specified workspace.', + 'path' => '/{workspaceId}/memories', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => 'The workspace ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdxxx', - ], + 'schema' => ['title' => '', 'description' => 'The ID of the workspace to which the long-term memory entities belong. For information about how to obtain the workspace ID, see [How to use workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx'."\n"], ], [ - 'name' => 'promptTemplateId', - 'in' => 'path', - 'schema' => [ - 'title' => '模板Id', - 'description' => 'The template ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', - ], + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'The number of entries per page in a paged query. Valid values: 1 to 50.'."\n" + ."\n" + .'Default value: 10.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'The pagination token. Set this parameter to the NextToken value returned in the previous API call.', 'type' => 'string', 'required' => false, 'example' => 'dc270401186b433f975d7e1faaa3xxxx'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'content' => [ - 'title' => '模板内容', - 'description' => 'The template content.'."\n", - 'type' => 'string', - 'example' => '', - ], - 'name' => [ - 'title' => '模板名称', - 'description' => 'The template name.'."\n", - 'type' => 'string', - 'example' => '', - ], - 'promptTemplateId' => [ - 'title' => '模板Id', - 'description' => 'The template ID.'."\n", - 'type' => 'string', - 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', - ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'."\n", - ], - 'workspaceId' => [ - 'title' => '业务空间Id', - 'description' => 'The workspace ID.'."\n", - 'type' => 'string', - 'example' => 'llm-us9hjmt32nysdxxx'."\n", - ], - 'variables' => [ - 'title' => '模板变量', - 'description' => 'The variables of the template.'."\n", + 'maxResults' => ['description' => 'The number of long-term memory entities per page in a paged query.', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'title' => ''], + 'memories' => [ + 'description' => 'The long-term memory entity list.', 'type' => 'array', 'items' => [ - 'description' => 'The template variable.'."\n", - 'type' => 'string', - 'example' => 'theme', + 'description' => 'The long-term memory object.', + 'type' => 'object', + 'properties' => [ + 'description' => ['description' => 'The description of the long-term memory.', 'type' => 'string', 'example' => '我的大模型应用$APP_ID关于A用户的长期记忆体', 'title' => ''], + 'memoryId' => ['description' => 'The long-term memory ID.', 'type' => 'string', 'example' => '3fc531f4519444beaafffa4538f6xxxx', 'title' => ''], + ], + 'title' => '', + 'example' => '', ], - 'example' => '["theme"]', + 'title' => '', + 'example' => '', ], + 'nextToken' => ['description' => 'The pagination token returned in this call.', 'type' => 'string', 'example' => 'dc270401186b433f975d7e1faaa3xxxx', 'title' => ''], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n"], + 'totalCount' => ['description' => 'The total number of entries returned.', 'type' => 'integer', 'format' => 'int32', 'example' => '105', 'title' => ''], + 'workspaceId' => ['title' => '', 'description' => 'The ID of the workspace to which the long-term memory entity list belongs.', 'type' => 'string', 'example' => 'llm-3z7uw7fwz0vexxxx'."\n"], ], + 'example' => '', ], ], ], 'errorCodes' => [ + 400 => [ + ['errorCode' => 'Memory.MaxResultsInvalid', 'errorMessage' => 'Input parameter maxResults is invalid.', 'description' => 'Input parameter maxResults is invalid.'], + ['errorCode' => 'Memory.NextTokenInvalid', 'errorMessage' => 'Input parameter nextToken is invalid.', 'description' => 'The input nextToken is invalid.'], + ], 404 => [ - [ - 'errorCode' => 'PromptTemplate.TemplateNotFound', - 'errorMessage' => 'Prompt template not found.', - ], + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], ], 500 => [ - [ - 'errorCode' => 'PromptTemplate.InternalError', - 'errorMessage' => 'Prompt template service inner exception.', - ], + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"maxResults\\": 10,\\n \\"memories\\": [\\n {\\n \\"description\\": \\"我的大模型应用$APP_ID关于A用户的长期记忆体\\",\\n \\"memoryId\\": \\"3fc531f4519444beaafffa4538f6xxxx\\"\\n }\\n ],\\n \\"nextToken\\": \\"dc270401186b433f975d7e1faaa3xxxx\\",\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\",\\n \\"totalCount\\": 105,\\n \\"workspaceId\\": \\"llm-3z7uw7fwz0vexxxx\\\\n\\"\\n}","type":"json"}]', + 'title' => 'List long-term memories', + 'description' => '- When querying the first page of a paging query, set only `MaxResults` to limit the number of entries returned. The `NextToken` value in the response serves as the credential for querying subsequent pages. When querying subsequent pages, set the `NextToken` parameter to the `NextToken` value obtained from the previous response as the query credential (if `NextToken` is empty, all results have been returned and no further requests are needed), and settings `MaxResults` to limit the number of entries returned.'."\n" + .'- This operation supports idempotence.'."\n" + ."\n" + .'**Rate limit:** Ensure that the interval between two consecutive requests is at least 1 second. Otherwise, throttling may be triggered. If throttling occurs, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListMemories'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListMemories', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"content\\": \\"请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}\\",\\n \\"name\\": \\"小红书文案助手\\",\\n \\"promptTemplateId\\": \\"6e49109bfeb94a39bb268f4e483ccxxx\\",\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\",\\n \\"workspaceId\\": \\"llm-us9hjmt32nysdxxx\\",\\n \\"variables\\": [\\n \\"theme\\"\\n ]\\n}","type":"json"}]', - 'title' => 'GetPromptTemplate', ], - 'UpdatePromptTemplate' => [ - 'summary' => 'Updates a prompt template based on the template ID.', - 'path' => '/{workspaceId}/promptTemplates/{promptTemplateId}', - 'methods' => [ - 'patch', - ], - 'schemes' => [ - 'https', - ], + 'ListMemoryNodes' => [ + 'summary' => 'Retrieves a list of memory nodes.', + 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => 'The workspace ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdxxx', - ], + 'schema' => ['title' => '', 'description' => 'The workspace ID.', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdm5v'."\n"], ], [ - 'name' => 'promptTemplateId', + 'name' => 'memoryId', 'in' => 'path', - 'schema' => [ - 'title' => 'prompt模板Id', - 'description' => 'The template ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', - ], + 'schema' => ['title' => '', 'description' => 'The long-term memory ID.', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'], ], [ - 'name' => 'name', + 'name' => 'maxResults', 'in' => 'query', - 'schema' => [ - 'title' => '模板名称', - 'description' => 'The template name.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'allowEmptyValue' => true, + 'schema' => ['title' => '', 'description' => 'The maximum number of results to return.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '50', 'minimum' => '1', 'default' => '10', 'example' => '20'], ], [ - 'name' => 'content', + 'name' => 'nextToken', 'in' => 'query', - 'schema' => [ - 'title' => 'prompt模板内容', - 'description' => 'The template content.'."\n", - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'allowEmptyValue' => true, + 'schema' => ['title' => '', 'description' => 'The pagination token returned from a previous request. If specified, the query results are paginated based on the previous request.', 'type' => 'string', 'required' => false, 'example' => 'dc270401186b433f975d7e1faaa34e0e'."\n"], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", + 'title' => '', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'requestId' => [ - 'title' => '请求Id', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx'."\n", + 'maxResults' => ['title' => '', 'description' => 'The maximum number of results returned.', 'type' => 'integer', 'format' => 'int32', 'example' => '20'], + 'memoryNodes' => [ + 'title' => '', + 'description' => 'The array of memory nodes.', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'content' => ['title' => '', 'description' => 'The content of the memory node.', 'type' => 'string', 'example' => '用户喜欢吃西红柿炒鸡蛋'."\n"], + 'memoryNodeId' => ['title' => '', 'description' => 'The memory node ID.', 'type' => 'string', 'example' => '68de06c95368463a8be4a84efc872cc5'], + ], + 'description' => '', + 'title' => '', + 'example' => '', + ], + 'example' => '', ], + 'nextToken' => ['title' => '', 'description' => 'The token used for token-based pagination.', 'type' => 'string', 'example' => 'dc270401186b433f975d7e1faaa34e0e'."\n"], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad'."\n"], + 'totalCount' => ['title' => '', 'description' => 'The total number of memory nodes.', 'type' => 'integer', 'format' => 'int32', 'example' => '100'."\n"], ], + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'PromptTemplate.ContentInvalid', - 'errorMessage' => 'Input parameter Content is invalid.', - ], - [ - 'errorCode' => 'PromptTemplate.NameInvalid', - 'errorMessage' => 'Input parameter Name is invalid.', - ], + ['errorCode' => 'Memory.MaxResultsInvalid', 'errorMessage' => 'Input parameter maxResults is invalid.', 'description' => 'Input parameter maxResults is invalid.'], + ['errorCode' => 'Memory.MemoryNodeContentInvalid', 'errorMessage' => 'Memory node content is invalid.', 'description' => 'Memory node content is invalid.'], + ['errorCode' => 'Memory.NextTokenInvalid', 'errorMessage' => 'Input parameter nextToken is invalid.', 'description' => 'The input nextToken is invalid.'], ], 404 => [ - [ - 'errorCode' => 'PromptTemplate.TemplateNotFound', - 'errorMessage' => 'Prompt template not found.', - ], + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], + ['errorCode' => 'Memory.MemoryNodeNotFound', 'errorMessage' => 'MemoryNode not found.', 'description' => 'MemoryNode not found'], ], 500 => [ - [ - 'errorCode' => 'PromptTemplate.InternalError', - 'errorMessage' => 'Prompt template service inner exception.', - ], + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"maxResults\\": 20,\\n \\"memoryNodes\\": [\\n {\\n \\"content\\": \\"用户喜欢吃西红柿炒鸡蛋\\\\n\\",\\n \\"memoryNodeId\\": \\"68de06c95368463a8be4a84efc872cc5\\"\\n }\\n ],\\n \\"nextToken\\": \\"dc270401186b433f975d7e1faaa34e0e\\\\n\\",\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-114029103cad\\\\n\\",\\n \\"totalCount\\": 100\\n}","type":"json"}]', + 'title' => 'Retrieve memory node list', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListMemoryNodes'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListMemoryNodes', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx\\\\n\\"\\n}","type":"json"}]', - 'title' => 'UpdatePromptTemplate', ], - 'DeletePromptTemplate' => [ - 'summary' => 'Deletes a prompt template based on the template ID.', - 'path' => '/{workspaceId}/promptTemplates/{promptTemplateId}', - 'methods' => [ - 'delete', - ], - 'schemes' => [ - 'https', - ], + 'ListPromptTemplates' => [ + 'summary' => 'Obtains a list of prompt templates.', + 'path' => '/{workspaceId}/promptTemplates', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => 'The workspace ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdxxx', - ], + 'schema' => ['title' => '', 'description' => 'The workspace ID.'."\n", 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdxxx'], ], [ - 'name' => 'promptTemplateId', - 'in' => 'path', - 'schema' => [ - 'title' => '模板Id', - 'description' => 'The template ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', - ], + 'name' => 'name', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'The keyword that is used to search for templates.'."\n", 'type' => 'string', 'required' => false, 'example' => '小红书'], + ], + [ + 'name' => 'type', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'The type of the template. Valid values: · System · Custom'."\n", 'type' => 'string', 'required' => false, 'example' => 'System'], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'The maximum number of returned entries.'."\n", 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'The token that determines the start position of the query. Set this parameter to the value of the NextToken parameter that is returned from the last call.'."\n", 'type' => 'string', 'required' => false, 'example' => 'dc270401186b433f975d7e1faaa34e0e'], ], ], 'responses' => [ @@ -6119,291 +5844,764 @@ 'description' => 'Schema of Response'."\n", 'type' => 'object', 'properties' => [ - 'requestId' => [ - 'title' => '请求Id', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx', + 'maxResults' => ['title' => '', 'description' => 'The maximum number of returned entries.'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'nextToken' => ['title' => '', 'description' => 'The token that determines the start position of the next query.'."\n", 'type' => 'string', 'example' => 'dc270401186b433f975d7e1faaa34e0e'], + 'promptTemplates' => [ + 'title' => '', + 'description' => 'The templates.'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'content' => ['title' => '', 'description' => 'The template content'."\n", 'type' => 'string', 'example' => '请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}'], + 'name' => ['title' => '', 'description' => 'The template name.'."\n", 'type' => 'string', 'example' => '小红书文案'."\n"], + 'promptTemplateId' => ['title' => '', 'description' => 'The template ID.'."\n", 'type' => 'string', 'example' => 'd6935b7efbe34d11b13df9307151cf8c'], + 'type' => ['title' => '', 'description' => 'The template type.'."\n", 'type' => 'string', 'example' => '"System"'], + 'variables' => [ + 'title' => '', + 'description' => 'The variables of the template.'."\n", + 'type' => 'array', + 'items' => ['description' => 'The template variable.'."\n", 'type' => 'string', 'example' => '"theme"', 'title' => ''], + 'example' => '', + ], + ], + 'description' => '', + 'title' => '', + 'example' => '', + ], + 'example' => '', ], + 'requestId' => ['title' => '', 'description' => 'The request ID.'."\n", 'type' => 'string', 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5AB071'], + 'totalCount' => ['title' => '', 'description' => 'The total number of entries returned.'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '15'], + 'workspaceId' => ['title' => '', 'description' => 'The workspace ID.'."\n", 'type' => 'string', 'example' => 'llm-us9hjmt32nysdxxx'."\n"], ], + 'example' => '', ], ], ], 'errorCodes' => [ - 404 => [ - [ - 'errorCode' => 'PromptTemplate.TemplateNotFound', - 'errorMessage' => 'Prompt template not found.', - ], + 400 => [ + ['errorCode' => 'PromptTemplate.MaxResultsInvalid', 'errorMessage' => 'Input parameter MaxResults is invalid.', 'description' => 'The input parameter maxResults format is invalid.'], + ['errorCode' => 'PromptTemplate.NameInvalid', 'errorMessage' => 'Input parameter Name is invalid.', 'description' => 'The format of the input parameter Name is invalid.'], + ['errorCode' => 'PromptTemplate.NextTokenInvalid', 'errorMessage' => 'Input parameter NextToken is invalid.', 'description' => 'The input nextToken is invalid.'], + ['errorCode' => 'PromptTemplate.TypeInvalid', 'errorMessage' => 'Input parameter type is invalid.', 'description' => 'input type format is invalid'], ], 500 => [ - [ - 'errorCode' => 'PromptTemplate.InternalError', - 'errorMessage' => 'Prompt template service inner exception.', - ], + ['errorCode' => 'PromptTemplate.InternalError', 'errorMessage' => 'Prompt template service inner exception.', 'description' => 'prompt template service internal exception'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx\\"\\n}","type":"json"}]', - 'title' => 'DeletePromptTemplate', - ], - 'ListPromptTemplates' => [ - 'summary' => 'Obtains a list of prompt templates.', - 'path' => '/{workspaceId}/promptTemplates', - 'methods' => [ - 'get', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"maxResults\\": 10,\\n \\"nextToken\\": \\"dc270401186b433f975d7e1faaa34e0e\\",\\n \\"promptTemplates\\": [\\n {\\n \\"content\\": \\"请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}\\",\\n \\"name\\": \\"小红书文案\\\\n\\",\\n \\"promptTemplateId\\": \\"d6935b7efbe34d11b13df9307151cf8c\\",\\n \\"type\\": \\"\\\\\\"System\\\\\\"\\",\\n \\"variables\\": [\\n \\"\\\\\\"theme\\\\\\"\\"\\n ]\\n }\\n ],\\n \\"requestId\\": \\"FE9B6CBF-47E6-5D76-9C5D-B814DD5AB071\\",\\n \\"totalCount\\": 15,\\n \\"workspaceId\\": \\"llm-us9hjmt32nysdxxx\\\\n\\"\\n}","type":"json"}]', + 'title' => 'ListPromptTemplates', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListPromptTemplates'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListPromptTemplates', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'Retrieve' => [ + 'path' => '/{WorkspaceId}/index/retrieve', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'workspaceId', - 'in' => 'path', + 'name' => 'Query', + 'in' => 'query', + 'schema' => ['description' => 'The query, which is the original user prompt. There are no limits on the length of the query.', 'type' => 'string', 'required' => false, 'example' => '阿里云百炼平台介绍', 'title' => ''], + ], + [ + 'name' => 'DenseSimilarityTopK', + 'in' => 'query', + 'schema' => ['description' => 'The number of top-K similar text chunks to retrieve using vector retrieval. This is achieved by generating a vector representation of the query and searching the knowledge base for the K text chunks with the most similar vectors. The value must be an integer from 0 to 100. The sum of `DenseSimilarityTopK` and `SparseSimilarityTopK` must not exceed 200.'."\n" + ."\n" + .'Default value: 100.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100', 'title' => ''], + ], + [ + 'name' => 'EnableReranking', + 'in' => 'query', 'schema' => [ - 'title' => '业务空间Id', - 'description' => 'The workspace ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdxxx', + 'description' => 'Specifies whether to enable reranking. For more information, see [Knowledge base](~~2807740~~). Valid values:'."\n" + ."\n" + .'- `true`: Enables reranking.'."\n" + ."\n" + .'- `false`: Disables reranking.'."\n" + ."\n" + .'Default value: `true`.', + 'enumValueTitles' => ['true' => 'Enabled', 'false' => 'Disabled'], + 'type' => 'boolean', + 'required' => false, + 'example' => 'true', + 'title' => '', ], ], [ - 'name' => 'name', + 'name' => 'EnableRewrite', 'in' => 'query', 'schema' => [ - 'title' => '基于模板名称搜索', - 'description' => 'The keyword that is used to search for templates.'."\n", - 'type' => 'string', + 'description' => 'Specifies whether to enable <props="china">[conversational query rewriting](https://help.aliyun.com/model-studio/use-cases/rag-optimization#b7031e2ad6cji)</props><props="intl">[conversational query rewriting](https://www.alibabacloud.com/help/model-studio/use-cases/rag-optimization#b7031e2ad6cji)</props>.'."\n" + .'Valid values:'."\n" + ."\n" + .'- `true`: Enables conversational query rewriting.'."\n" + ."\n" + .'- `false`: Disables conversational query rewriting.'."\n" + ."\n" + .'Default value: `false`.', + 'enumValueTitles' => ['true' => 'Enabled', 'false' => 'Disabled'], + 'type' => 'boolean', + 'required' => false, + 'example' => 'false', + 'title' => '', + ], + ], + [ + 'name' => 'Rerank', + 'in' => 'query', + 'style' => 'json', + 'schema' => [ + 'description' => 'The reranking configurations.', + 'type' => 'array', + 'items' => [ + 'description' => 'An object containing reranking configurations.', + 'type' => 'object', + 'properties' => [ + 'ModelName' => [ + 'description' => 'The reranking model to use. Specifying a model here overrides the default model selected when the knowledge base was created. Valid values:'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'- `qwen3-rerank-hybrid`: Performs reranking by using the qwen3-rerank (hybrid) model.'."\n" + ."\n" + .'- `qwen3-rerank`: Performs reranking by using the qwen3-rerank model.'."\n" + ."\n" + .'- `gte-rerank-hybrid`: Performs reranking by using the gte-rerank (hybrid) model.'."\n" + ."\n" + .'- `gte-rerank`: Performs reranking by using the gte-rerank model.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'- `gte-rerank-hybrid`: Performs reranking by using the gte-rerank (hybrid) model.'."\n" + ."\n" + .'- `gte-rerank`: Performs reranking by using the gte-rerank model.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'If you do not specify this parameter, the model configured for the knowledge base is used.'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'> Use `qwen3-rerank` for semantic ranking only. We recommend `qwen3-rerank-hybrid` if you require both semantic ranking and text matching features for higher relevance.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> Use `gte-rerank` for semantic ranking only. We recommend `gte-rerank-hybrid` if you require both semantic ranking and text matching features for higher relevance.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'> The `gte-rerank-hybrid` and `gte-rerank` models are no longer updated and are not recommended for use.'."\n" + ."\n" + .'</props>', + 'enumValueTitles' => ['gte-rerank-hybrid' => 'Performs reranking by using the gte-rerank (hybrid) model.', 'gte-rerank' => 'Performs reranking by using the gte-rerank model.'], + 'type' => 'string', + 'required' => false, + 'example' => 'gte-rerank-hybrid', + 'title' => '', + ], + 'RerankMode' => [ + 'description' => '<props="china">'."\n" + ."\n" + .'Specifies the instruction intervention mode for the reranking model. This mode determines the model\'s scoring preference.'."\n" + ."\n" + .'**Valid values:**'."\n" + ."\n" + .'- `qa`: (Default) Q\\&A mode. The model assigns higher scores to candidates that directly answer the query. Recommended for Q\\&A scenarios.'."\n" + ."\n" + .'- `similar`: Similarity mode. The model assigns higher scores to candidates with high content similarity to the query. Recommended for match-based retrieval scenarios.'."\n" + ."\n" + .'- `custom`: Custom mode. The model\'s ranking behavior is determined by the instructions in the `RerankInstruct` parameter.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'This parameter is not yet available. Do not specify a value for it.'."\n" + ."\n" + .'</props>', + 'enumValueTitles' => ['similar: 相似模式。' => '`similar`: Similarity mode.', 'custom: 自定义模式。' => '`custom`: Custom mode.', 'qa:(默认值) 问答模式。' => '`qa`: (Default) Q\\&A mode.'], + 'type' => 'string', + 'required' => false, + 'example' => 'qa', + 'title' => '', + ], + 'RerankInstruct' => ['description' => '<props="intl">'."\n" + ."\n" + .'This parameter is not yet available. Do not specify a value for it.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="china">'."\n" + ."\n" + .'A natural language instruction to fine-tune the behavior of the reranking model.'."\n" + ."\n" + .'><notice>'."\n" + ."\n" + .'This parameter takes effect only when `RerankMode` is set to `custom`.'."\n" + ."\n" + .'></notice>'."\n" + ."\n" + .'</props>', 'type' => 'string', 'required' => false, 'title' => '', 'example' => ''], + ], + 'required' => false, + 'title' => '', + 'example' => '', + ], 'required' => false, + 'title' => '', 'example' => '', ], ], [ - 'name' => 'type', + 'name' => 'RerankMinScore', + 'in' => 'query', + 'schema' => ['description' => 'The similarity threshold for reranking. Only text chunks with a similarity score greater than this value are returned. The value must be between 0.01 and 1.00, inclusive. This parameter overrides the similarity threshold setting of the knowledge base.'."\n" + ."\n" + .'If not specified, the threshold configured for the knowledge base is used.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0.20', 'title' => ''], + ], + [ + 'name' => 'RerankTopN', 'in' => 'query', + 'schema' => ['description' => 'The number of top-ranked text chunks to return after reranking. The value must be an integer from 1 to 20. Default value: 5.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '5', 'title' => ''], + ], + [ + 'name' => 'Rewrite', + 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'title' => '模板类型,可选值:'."\n" - .'· System:系统预置模板'."\n" - .'· Custom:用户自定义模板', - 'description' => 'The type of the template. Valid values: · System · Custom'."\n", - 'type' => 'string', + 'description' => 'Configuration for conversational query rewriting.', + 'type' => 'array', + 'items' => [ + 'description' => 'An object containing configurations for conversational query rewriting.', + 'type' => 'object', + 'properties' => [ + 'ModelName' => [ + 'description' => 'Specifies the model for conversational query rewriting, which automatically rewrites the original query based on the conversation context to improve retrieval results. Valid value:'."\n" + ."\n" + .'- `conv-rewrite-qwen-1.8b`: The only model currently supported for this feature.'."\n" + ."\n" + .'If this parameter is not specified, `conv-rewrite-qwen-1.8b` is used by default.', + 'enumValueTitles' => ['conv-rewrite-qwen-1.8b' => 'The conv-rewrite-qwen-1.8b model'], + 'type' => 'string', + 'required' => false, + 'example' => 'conv-rewrite-qwen-1.8b', + 'title' => '', + ], + ], + 'required' => false, + 'title' => '', + 'example' => '', + ], 'required' => false, - 'example' => 'System', + 'title' => '', + 'example' => '', ], ], [ - 'name' => 'maxResults', + 'name' => 'SparseSimilarityTopK', + 'in' => 'query', + 'schema' => ['description' => 'The number of top-K text chunks to retrieve using keyword retrieval. This feature finds text chunks in the knowledge base that exactly match the keywords in the query. It helps filter out irrelevant text chunks and provide more accurate results.'."\n" + .'The value must be an integer from 0 to 100.'."\n" + .'The sum of `DenseSimilarityTopK` and `SparseSimilarityTopK` must not exceed 200.'."\n" + ."\n" + .'Default value: 100.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100', 'title' => ''], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace that contains the knowledge base. For more information, see [How to use workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", 'title' => ''], + ], + [ + 'name' => 'IndexId', 'in' => 'query', + 'schema' => ['description' => 'The ID of the knowledge base. This is the `Data.Id` value returned by the `CreateIndex` operation.'."\n" + ."\n" + .'> - Ensure the specified knowledge base exists and has not been deleted.', 'type' => 'string', 'required' => true, 'example' => '5pwe0mxxxx', 'title' => ''], + ], + [ + 'name' => 'SaveRetrieverHistory', + 'in' => 'query', + 'schema' => ['description' => 'Specifies whether to save the retrieval history for testing purposes. Valid values:'."\n" + ."\n" + .'- `true`: Saves the retrieval history.'."\n" + ."\n" + .'- `false`: Does not save the retrieval history.'."\n" + ."\n" + .'Default value: `false`.', 'type' => 'boolean', 'default' => 'false', 'required' => false, 'example' => 'false', 'title' => ''], + ], + [ + 'name' => 'SearchFilters', + 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'title' => '最大返回数量', - 'description' => 'The maximum number of returned entries.'."\n", - 'type' => 'integer', - 'format' => 'int32', + 'description' => 'Specifies custom retrieval conditions, such as tags, to filter semantic retrieval results and exclude irrelevant information.'."\n" + .'The filtering logic is applied only when the `is_displayed_chunk_content` parameter is set to `true`. For more information, see [SearchFilters for a knowledge base](~~2869641~~).', + 'type' => 'array', + 'items' => [ + 'description' => 'A search condition object.', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''], + 'title' => '', + 'example' => '', + ], 'required' => false, - 'example' => '10', + 'title' => '', + 'example' => '', ], ], [ - 'name' => 'nextToken', + 'name' => 'Images', 'in' => 'query', + 'allowEmptyValue' => true, + 'style' => 'simple', 'schema' => [ - 'title' => '由前一次的请求返回,传入时本次查询结果将基于前一次请求结果进行分页', - 'description' => 'The token that determines the start position of the query. Set this parameter to the value of the NextToken parameter that is returned from the last call.'."\n", - 'type' => 'string', + 'type' => 'array', + 'items' => ['description' => '<props="china">'."\n" + ."\n" + .'When you retrieve information from an image-based Q\\&A knowledge base, you can provide image URLs. If an image index exists in the knowledge base, the system converts the input image into a vector to retrieve relevant records. If no image index exists, the input image is not used for retrieval.'."\n" + ."\n" + .'> This field is not supported for knowledge bases of the document search, data query, or audio/video search type. This field has no effect if specified.'."\n" + ."\n" + .'> Make sure that the link is publicly accessible and points to a valid image file. Example: https\\://example.com/downloads/pic.jpg'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'When you retrieve information from an image-based Q\\&A knowledge base, you can provide image URLs. If an image index exists in the knowledge base, the system converts the input image into a vector to retrieve relevant records. If no image index exists, the input image is not used for retrieval.'."\n" + ."\n" + .'> This field is not supported for knowledge bases of the document search or data query type. This field has no effect if specified.'."\n" + ."\n" + .'> Make sure that the link is publicly accessible and points to a valid image file. Example: https\\://example.com/downloads/pic.jpg'."\n" + ."\n" + .'</props>', 'type' => 'string', 'required' => false, 'example' => 'https://example.com/downloads/pic.jpg', 'title' => ''], + 'required' => false, + 'description' => 'The URLs of images to include in the query.', + 'title' => '', + 'example' => '', + ], + ], + [ + 'name' => 'QueryHistory', + 'in' => 'query', + 'allowEmptyValue' => false, + 'style' => 'json', + 'schema' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'role' => ['description' => 'The role of the entity that sent the message.'."\n" + ."\n" + .'Valid values:'."\n" + ."\n" + .'- `user`: Indicates that the `content` is from the end user.'."\n" + ."\n" + .'- `assistant`: Indicates that the `content` is a response from the Model Studio application.', 'type' => 'string', 'required' => false, 'example' => 'user'."\n", 'title' => ''], + 'content' => ['description' => 'The content of the message for the specified `role`.', 'type' => 'string', 'required' => false, 'example' => '代表一段文本。', 'title' => ''], + ], + 'required' => false, + 'description' => '', + 'title' => '', + 'example' => '', + ], + 'description' => 'The conversation history, used for <props="china">[conversational query rewriting](https://help.aliyun.com/model-studio/use-cases/rag-optimization#b7031e2ad6cji)</props><props="intl">[conversational query rewriting](https://www.alibabacloud.com/help/model-studio/use-cases/rag-optimization#b7031e2ad6cji)</props>. This parameter is effective only when `EnableRewrite` is set to `true`.', 'required' => false, - 'example' => 'dc270401186b433f975d7e1faaa34e0e', + 'title' => '', + 'example' => '', + ], + ], + [ + 'name' => 'Extra', + 'in' => 'query', + 'style' => 'json', + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'uniqueId' => ['type' => 'string', 'maxLength' => 512, 'description' => '', 'title' => '', 'example' => ''], + ], + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", 'type' => 'object', 'properties' => [ - 'maxResults' => [ - 'title' => '最大返回数量', - 'description' => 'The maximum number of returned entries.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'nextToken' => [ - 'title' => '用于实现基于令牌的分页', - 'description' => 'The token that determines the start position of the next query.'."\n", - 'type' => 'string', - 'example' => 'dc270401186b433f975d7e1faaa34e0e', - ], - 'promptTemplates' => [ - 'title' => '模板列表', - 'description' => 'The templates.'."\n", - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'content' => [ - 'title' => '模板内容', - 'description' => 'The template content'."\n", - 'type' => 'string', - 'example' => '', - ], - 'name' => [ - 'title' => '模板名称', - 'description' => 'The template name.'."\n", - 'type' => 'string', - 'example' => '', - ], - 'promptTemplateId' => [ - 'title' => '模板Id', - 'description' => 'The template ID.'."\n", - 'type' => 'string', - 'example' => 'd6935b7efbe34d11b13df9307151cf8c', - ], - 'type' => [ - 'title' => '模板类型', - 'description' => 'The template type.'."\n", - 'type' => 'string', - 'example' => '"System"', - ], - 'variables' => [ - 'title' => '模板变量', - 'description' => 'The variables of the template.'."\n", - 'type' => 'array', - 'items' => [ - 'description' => 'The template variable.'."\n", - 'type' => 'string', - 'example' => '"theme"', + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'Index.InvalidParameter', 'title' => ''], + 'Data' => [ + 'description' => 'The business data returned by the API.', + 'type' => 'object', + 'properties' => [ + 'Nodes' => [ + 'description' => 'An array of retrieved text chunks.', + 'type' => 'array', + 'items' => [ + 'description' => 'A text chunk object.', + 'type' => 'object', + 'properties' => [ + 'Metadata' => ['description' => '<props="china">'."\n" + ."\n" + .'A map of metadata for the text chunk.'."\n" + ."\n" + .'> For document search knowledge bases, the `file_path` field in the metadata map is not applicable and should not be used in your application code.'."\n" + ."\n" + .'> When you retrieve data from a document search knowledge base, if a text chunk contains an image, its URL is returned in the `image_url` field of the metadata map. This URL expires.'."\n" + ."\n" + .'> When you retrieve data from an audio/video search knowledge base, if a text chunk contains audio, its URL is returned in the `audio_url` field of the metadata map. This URL expires.'."\n" + ."\n" + .'> When you retrieve data from an audio/video search knowledge base, if a text chunk contains video, its URL is returned in the `video_url` field of the metadata map. This URL expires.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'A map of metadata for the text chunk.'."\n" + ."\n" + .'> For document search knowledge bases, the `file_path` field in the metadata map is not applicable and should not be used in your application code.'."\n" + ."\n" + .'> When you retrieve data from a document search knowledge base, if a text chunk contains an image, its URL is returned in the `image_url` field of the metadata map. This URL expires.'."\n" + ."\n" + .'</props>', 'type' => 'any', 'example' => '{'."\n" + .' "parent": "",'."\n" + .' "file_path": "https://***",'."\n" + .' "image_url": ['."\n" + .' "http://***"'."\n" + .' ],'."\n" + .' "nid": "***",'."\n" + .' "title": "阿里云百炼文档",'."\n" + .' "doc_id": "doc_***",'."\n" + .' "content": "阿里云百炼是基于通义大模型、行业大模型以及三方大模型的一站式大模型开发平台。面向企业客户和个人开发者,提供完整的模型服务工具和全链路应用开发套件,预置丰富的能力插件,提供API及SDK等便捷的集成方式,高效完成大模型应用构建",'."\n" + .' "workspace_id": "ws_***",'."\n" + .' "hier_title": "阿里云百炼文档",'."\n" + .' "doc_name": "阿里云百炼文档介绍.pdpf",'."\n" + .' "pipeline_id": "rhd***",'."\n" + .' "_id": "ws_***"'."\n" + .'}', 'title' => ''], + 'Score' => ['description' => 'The similarity score of the text chunk, ranging from 0 to 1.', 'type' => 'number', 'format' => 'double', 'example' => '0.3', 'title' => ''], + 'Text' => ['description' => 'The content of the text chunk.', 'type' => 'string', 'example' => '阿里云百炼是基于通义大模型、行业大模型以及三方大模型的一站式大模型开发平台。面向企业客户和个人开发者,提供完整的模型服务工具和全链路应用开发套件,预置丰富的能力插件,提供API及SDK等便捷的集成方式,高效完成大模型应用构建。', 'title' => ''], ], + 'title' => '', + 'example' => '', ], + 'title' => '', + 'example' => '', ], - 'description' => '', ], + 'title' => '', + 'example' => '', ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5AB071', - ], - 'totalCount' => [ - 'title' => '数据总数', - 'description' => 'The total number of entries returned.'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '15', - ], - 'workspaceId' => [ - 'title' => '业务空间Id', - 'description' => 'The workspace ID.'."\n", - 'type' => 'string', - 'example' => 'llm-us9hjmt32nysdxxx'."\n", - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-7734-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The HTTP status code of the response.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the API call was successful. Valid values:'."\n" + ."\n" + .'- true: The call succeeded.'."\n" + ."\n" + .'- false: The call failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'PromptTemplate.MaxResultsInvalid', - 'errorMessage' => 'Input parameter MaxResults is invalid.', - ], - [ - 'errorCode' => 'PromptTemplate.NameInvalid', - 'errorMessage' => 'Input parameter Name is invalid.', - ], - [ - 'errorCode' => 'PromptTemplate.NextTokenInvalid', - 'errorMessage' => 'Input parameter NextToken is invalid.', - ], - [ - 'errorCode' => 'PromptTemplate.TypeInvalid', - 'errorMessage' => 'Input parameter type is invalid.', - ], - ], - 500 => [ - [ - 'errorCode' => 'PromptTemplate.InternalError', - 'errorMessage' => 'Prompt template service inner exception.', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Retrieve', + 'summary' => 'Retrieves information from a specified knowledge base.', + 'description' => '<props="china">'."\n" + ."\n" + .'- **How to call**: To retrieve information from a knowledge base, use the latest [Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29) with an [AccessKey](~~116401~~) or [Spring AI Alibaba](~~2990886~~) with an Alibaba Cloud Model Studio [API key](~~2712195~~). Both tools simplify your API calls by handling the complex signature calculation.'."\n" + ."\n" + .'- **Required permissions**:'."\n" + ."\n" + .' - **RAM user (sub-account)**: To call this API, a RAM user must be granted [API permissions](~~2848578~~) for Alibaba Cloud Model Studio and [join a workspace](~~2851098~~). You can use the `AliyunBailianDataFullAccess` policy, which includes the required `sfm:Retrieve` permission.'."\n" + ."\n" + .' - **Alibaba Cloud account (main account)**: This account has the required permissions by default and can call the API directly.'."\n" + ."\n" + .'- **Response latency**: This API call involves complex retrieval and matching operations, which can cause longer response times. We recommend configuring appropriate request timeouts and retry strategies.'."\n" + ."\n" + .'- **Idempotency**: This API is idempotent.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'- **How to call**: We recommend using the latest [Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29) to call this API. The SDK simplifies API calls by handling the complex signature calculation.'."\n" + ."\n" + .'- **Required permissions**:'."\n" + ."\n" + .' - **RAM user (sub-account)**: To call this API, a RAM user must be granted [API permissions](~~2848578~~) for Alibaba Cloud Model Studio and [join a workspace](~~2851098~~). You can use the `AliyunBailianDataFullAccess` policy, which includes the required `sfm:Retrieve` permission.'."\n" + ."\n" + .' - **Alibaba Cloud account (main account)**: This account has the required permissions by default and can call the API directly.'."\n" + ."\n" + .'- **Response latency**: This API call involves complex retrieval and matching operations, which can cause longer response times. We recommend configuring appropriate request timeouts and retry strategies.'."\n" + ."\n" + .'- **Idempotency**: This API is idempotent.'."\n" + ."\n" + .'</props>', + 'changeSet' => [ + ['createdAt' => '2025-04-10T01:52:18.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-03-13T02:55:14.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-09-17T11:06:28.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2024-07-23T07:45:53.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '2000', 'countWindow' => 1, 'regionId' => '*', 'api' => 'Retrieve'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:Retrieve', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"maxResults\\": 10,\\n \\"nextToken\\": \\"dc270401186b433f975d7e1faaa34e0e\\",\\n \\"promptTemplates\\": [\\n {\\n \\"content\\": \\"请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}\\",\\n \\"name\\": \\"小红书文案\\\\n\\",\\n \\"promptTemplateId\\": \\"d6935b7efbe34d11b13df9307151cf8c\\",\\n \\"type\\": \\"\\\\\\"System\\\\\\"\\",\\n \\"variables\\": [\\n \\"\\\\\\"theme\\\\\\"\\"\\n ]\\n }\\n ],\\n \\"requestId\\": \\"FE9B6CBF-47E6-5D76-9C5D-B814DD5AB071\\",\\n \\"totalCount\\": 15,\\n \\"workspaceId\\": \\"llm-us9hjmt32nysdxxx\\\\n\\"\\n}","type":"json"}]', - 'title' => 'ListPromptTemplates', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Data\\": {\\n \\"Nodes\\": [\\n {\\n \\"Metadata\\": \\"{\\\\n \\\\\\"parent\\\\\\": \\\\\\"\\\\\\",\\\\n \\\\\\"file_path\\\\\\": \\\\\\"https://***\\\\\\",\\\\n \\\\\\"image_url\\\\\\": [\\\\n \\\\\\"http://***\\\\\\"\\\\n ],\\\\n \\\\\\"nid\\\\\\": \\\\\\"***\\\\\\",\\\\n \\\\\\"title\\\\\\": \\\\\\"阿里云百炼文档\\\\\\",\\\\n \\\\\\"doc_id\\\\\\": \\\\\\"doc_***\\\\\\",\\\\n \\\\\\"content\\\\\\": \\\\\\"阿里云百炼是基于通义大模型、行业大模型以及三方大模型的一站式大模型开发平台。面向企业客户和个人开发者,提供完整的模型服务工具和全链路应用开发套件,预置丰富的能力插件,提供API及SDK等便捷的集成方式,高效完成大模型应用构建\\\\\\",\\\\n \\\\\\"workspace_id\\\\\\": \\\\\\"ws_***\\\\\\",\\\\n \\\\\\"hier_title\\\\\\": \\\\\\"阿里云百炼文档\\\\\\",\\\\n \\\\\\"doc_name\\\\\\": \\\\\\"阿里云百炼文档介绍.pdpf\\\\\\",\\\\n \\\\\\"pipeline_id\\\\\\": \\\\\\"rhd***\\\\\\",\\\\n \\\\\\"_id\\\\\\": \\\\\\"ws_***\\\\\\"\\\\n}\\",\\n \\"Score\\": 0.3,\\n \\"Text\\": \\"阿里云百炼是基于通义大模型、行业大模型以及三方大模型的一站式大模型开发平台。面向企业客户和个人开发者,提供完整的模型服务工具和全链路应用开发套件,预置丰富的能力插件,提供API及SDK等便捷的集成方式,高效完成大模型应用构建。\\"\\n }\\n ]\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"17204B98-7734-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', ], - 'CreateMemory' => [ - 'summary' => '创建Memory', - 'path' => '/{workspaceId}/memories', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'SubmitIndexAddDocumentsJob' => [ + 'path' => '/{WorkspaceId}/index/add_documents_to_index', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREsfm4VA8MJ'], ], 'parameters' => [ [ - 'name' => 'workspaceId', + 'name' => 'WorkspaceId', 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace that contains the knowledge base. To obtain the ID, see [How to use workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", 'title' => ''], + ], + [ + 'name' => 'IndexId', + 'in' => 'query', + 'schema' => ['description' => 'The knowledge base ID. This is the `Data.Id` returned by the **CreateIndex** API.', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', 'title' => ''], + ], + [ + 'name' => 'SourceType', + 'in' => 'query', 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', + 'description' => 'The type of the data source. Valid values:'."\n" + ."\n" + .'- DATA\\_CENTER\\_CATEGORY: Imports all documents from specified categories in <props="china">[application data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[application data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>. You can import documents from multiple categories.'."\n" + ."\n" + .'- DATA\\_CENTER\\_FILE: Imports specified files from <props="china">[application data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[application data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props>. You can import multiple files.'."\n" + ."\n" + .'> If you set this parameter to `DATA_CENTER_CATEGORY`, you must specify the `CategoryIds` parameter. If you set this parameter to `DATA_CENTER_FILE`, you must specify the `DocumentIds` parameter.', + 'enumValueTitles' => ['DATA_CENTER_CATEGORY' => 'Imports documents by category.', 'DATA_CENTER_FILE' => 'Imports documents by file.'], 'type' => 'string', 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v', + 'example' => 'DATA_CENTER_FILE', + 'title' => '', ], ], [ - 'name' => 'description', + 'name' => 'DocumentIds', 'in' => 'query', - 'allowEmptyValue' => true, + 'style' => 'json', 'schema' => [ - 'title' => '长期记忆体的描述信息,默认为空', - 'description' => '', - 'type' => 'string', + 'description' => 'A list of file IDs.', + 'type' => 'array', + 'items' => ['description' => 'The file ID. This is the `FileId` returned by the **AddFile** API. You can also obtain the ID on the <props="china">[application data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[application data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> page by clicking the ID icon next to the file name.', 'type' => 'string', 'required' => false, 'example' => 'doc_ea4a504d9ce545508d8aa6d90371bf54xxxxxxxx', 'title' => ''], + 'required' => false, + 'title' => '', + 'example' => '', + ], + ], + [ + 'name' => 'CategoryIds', + 'in' => 'query', + 'style' => 'json', + 'schema' => [ + 'description' => 'A list of category IDs.', + 'type' => 'array', + 'items' => ['description' => 'The category ID. This is the `CategoryId` returned by the **AddCategory** API. You can also obtain the ID on the **File** tab of the <props="china">[application data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[application data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> page by clicking the ID icon next to the category name.', 'type' => 'string', 'required' => false, 'example' => 'cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx'."\n", 'title' => ''], 'required' => false, + 'title' => '', + 'example' => '', + ], + ], + [ + 'name' => 'ChunkMode', + 'in' => 'query', + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'The custom chunking mode. This setting applies only to the documents added in the current job. For more information, see [knowledge base](~~2807740~~). Valid values (you can specify only one value):'."\n" + ."\n" + .'- **length**: Splits the text by a fixed length. The chunking strictly follows the specified `ChunkSize` and `OverlapSize`. If you do not specify these parameters, the system uses the default values: a `ChunkSize` of 500 and an `OverlapSize` of 100. This mode ignores the `Separator` parameter.'."\n" + ."\n" + .'- **page**: Splits the text by page. If `ChunkSize` is specified, its value is also applied during chunking. If `ChunkSize` is not set, a default value of 500 is used. This mode ignores the `OverlapSize` and `Separator` parameters.'."\n" + ."\n" + .'- **h1**: Splits the text by level-1 headings. If `ChunkSize` is specified, its value is also applied during chunking. If `ChunkSize` is not set, a default value of 500 is used. This mode ignores the `OverlapSize` and `Separator` parameters.'."\n" + ."\n" + .'- **h2**: Splits the text by level-2 headings. If `ChunkSize` is specified, its value is also applied during chunking. If `ChunkSize` is not set, a default value of 500 is used. This mode ignores the `OverlapSize` and `Separator` parameters.'."\n" + ."\n" + .'- **regex**: Splits the text by using a regular expression. The `Separator` parameter is required for this mode. If `ChunkSize` is specified, its value is also applied during chunking. If `ChunkSize` is not set, a default value of 500 is used. This mode ignores the `OverlapSize` parameter.'."\n" + ."\n" + .'If this parameter is not set, intelligent chunking is used by default.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'string', 'required' => false, 'example' => 'length', 'title' => ''], + ], + [ + 'name' => 'Separator', + 'in' => 'query', + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'The separator for chunking. This parameter is used only when `ChunkMode` is set to **regex**. You can specify a single regular expression (multiple expressions are not supported) to split the file into smaller text chunks. For more information, see [knowledge base](~~2807740~~).'."\n" + ."\n" + .'When you use intelligent chunking (when `ChunkMode` is not specified), leave this parameter empty.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'string', 'required' => false, 'example' => '(?<=。)', 'title' => ''], + ], + [ + 'name' => 'ChunkSize', + 'in' => 'query', + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'The chunk size. Specifies the maximum number of characters for each text chunk. This setting applies only to the documents added in the current job. If a text segment exceeds this size, the behavior depends on the chunking mode:'."\n" + ."\n" + .'- **Intelligent chunking** (if `ChunkMode` is not set): The text may be truncated.'."\n" + ."\n" + .'- **Custom chunking** (if `ChunkMode` is set): The text is forcibly split.'."\n" + ."\n" + .'The value must be in the range of \\[1, 6000]. Defaults to 500 if not specified.'."\n" + ."\n" + .'For more information, see [knowledge base](~~2807740~~).'."\n" + ."\n" + .'> If you specify a `ChunkSize` less than 100, you must also specify the `OverlapSize` parameter. You can also omit both parameters to use the system defaults.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '128', 'title' => ''], + ], + [ + 'name' => 'OverlapSize', + 'in' => 'query', + 'schema' => ['description' => '<props="china">'."\n" + ."\n" + .'Specifies the number of overlapping characters between adjacent text chunks. This setting applies only to the documents added in the current job. For more information, see [knowledge base](~~2807740~~). The value must be in the range of \\[0, 1024].'."\n" + ."\n" + .'Defaults to 100 if not specified.'."\n" + ."\n" + .'> The value of `OverlapSize` must be less than the value of `ChunkSize`. Otherwise, the chunking process may fail.'."\n" + ."\n" + .'</props>'."\n" + ."\n" + .'<props="intl">'."\n" + ."\n" + .'> This parameter is not available. Do not specify it.'."\n" + ."\n" + .'</props>', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '16', 'title' => ''], + ], + [ + 'name' => 'EnableHeaders', + 'in' => 'query', + 'schema' => [ + 'description' => 'Specifies whether to include Excel file headers. If set to `true`, the knowledge base treats the first row of all .xlsx and .xls files as the header and automatically prepends it to each text chunk (data row). This prevents the large language model (LLM) from misinterpreting the header as a regular data row.'."\n" + ."\n" + .'> Enable this parameter only if all imported documents are Excel files that contain a header.'."\n" + ."\n" + .'Valid values:'."\n" + ."\n" + .'- true: Enabled.'."\n" + ."\n" + .'- false: Disabled.'."\n" + ."\n" + .'Default value: false.', + 'enumValueTitles' => ['true' => 'Enabled', 'false' => 'Disabled'], + 'type' => 'boolean', + 'required' => false, + 'example' => 'false', + 'title' => '', + ], + ], + [ + 'name' => 'Extra', + 'in' => 'query', + 'style' => 'json', + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'uniqueId' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''], + ], + 'description' => '', + 'title' => '', 'example' => '', ], ], @@ -6412,305 +6610,425 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => 'The response object.', 'type' => 'object', 'properties' => [ - 'memoryId' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3', - ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad', + 'RequestId' => ['title' => 'Id of the request', 'description' => 'The request ID.', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB'], + 'Data' => [ + 'description' => 'The business data.', + 'type' => 'object', + 'properties' => [ + 'Id' => ['description' => 'The job ID, also known as `JobId`.', 'type' => 'string', 'example' => '42687eb254a34802bed398357f5498ae', 'title' => ''], + ], + 'title' => '', + 'example' => '', ], + 'Status' => ['description' => 'The response status code.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was successful. Valid values:'."\n" + ."\n" + .'- true: The request was successful.'."\n" + ."\n" + .'- false: The request failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Message' => ['description' => 'The error message returned on failure.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'Code' => ['description' => 'The error code returned on failure.', 'type' => 'string', 'example' => 'Index.InvalidParameter', 'title' => ''], ], + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'Memory.DescriptionInvalid', - 'errorMessage' => 'Input parameter description is invalid.', - ], + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], - 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Submit a knowledge base append job', + 'summary' => 'Adds parsed files to the specified knowledge base.', + 'description' => '<props="china">'."\n" + ."\n" + .'- This API does not support knowledge bases for data queries or image Q\\&A. To update these knowledge bases, see the [knowledge base](~~2807740~~) documentation.'."\n" + ."\n" + .'</props>'."\n" + ."\n\n" + .'<props="intl">'."\n" + ."\n" + .'- This API does not support knowledge bases for data queries or image Q\\&A. To update these knowledge bases, see the [knowledge base](~~2807740~~) documentation.'."\n" + ."\n" + .'</props>'."\n" + ."\n\n" + .'- A RAM user (sub-account) can call this API only after being granted the required [api permission](~~2848578~~) for Alibaba Cloud Model Studio (specifically, the `AliyunBailianDataFullAccess` policy, which includes the `sfm:SubmitIndexAddDocumentsJob` permission) and joining a [workspace](~~2851098~~). An Alibaba Cloud account can call this API directly without authorization. We recommend using the latest version of the <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this API.'."\n" + ."\n" + .'- Before calling this API, ensure your knowledge base exists and has a valid knowledge base ID (`IndexId`).'."\n" + ."\n" + .'- Before calling this API, you must first upload files to Alibaba Cloud Model Studio using the **AddFile** API.'."\n" + ."\n" + .'- After calling this API, the job runs in the background and may take several hours to complete, especially during peak times. Do not submit duplicate requests until the job is complete. To check the job status, call the **GetIndexJobStatus** API. The `Documents` file list returned by the GetIndexJobStatus API contains all files for the job, which is uniquely identified by the `job_id` you provided. You can check this list to verify whether each file was imported (parsed) successfully. Note that frequent calls to the GetIndexJobStatus API are subject to rate limiting. Do not exceed 20 calls per minute.'."\n" + ."\n" + .'- A successful API call indicates the job has been submitted for processing, which takes time. This API is not idempotent, so do not send duplicate requests; doing so will create multiple jobs.'."\n" + ."\n" + .'**Rate limiting:** This API is limited to 10 calls per second. If you exceed this limit, wait before retrying.', + 'changeSet' => [ + ['createdAt' => '2025-07-30T09:21:00.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2025-04-27T08:48:18.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SubmitIndexAddDocumentsJob'], ], - 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:SubmitIndexAddDocumentsJob', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"memoryId\\": \\"6bff4f317a14442fbc9f73d29dbxxxx\\",\\n \\"requestId\\": \\"17204B98-xxxx-4F9A--2446A84821CA\\"\\n}","type":"json"}]', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Data\\": {\\n \\"Id\\": \\"42687eb254a34802bed398357f5498ae\\"\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Code\\": \\"Index.InvalidParameter\\"\\n}","type":"json"}]', ], - 'GetMemory' => [ - 'summary' => '获取memory', - 'path' => '/{workspaceId}/memories/{memoryId}', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], + 'SubmitIndexJob' => [ + 'summary' => 'Submits a specified CreateIndex task to complete knowledge base creation.', + 'path' => '/{WorkspaceId}/index/submit_index_job', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'workspaceId', + 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'schema' => ['description' => 'The workspace ID to which the knowledge base belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", 'title' => ''], ], [ - 'name' => 'memoryId', - 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", - ], + 'name' => 'IndexId', + 'in' => 'query', + 'schema' => ['description' => 'The knowledge base ID, which is the `Data.Id` returned by the **CreateIndex** operation.', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'description' => [ - 'description' => '', - 'type' => 'string', + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'Index.InvalidParameter', 'title' => ''], + 'Data' => [ + 'description' => 'The business data returned by the operation.', + 'type' => 'object', + 'properties' => [ + 'Id' => ['description' => 'The task ID, which is the `JobId` required when calling the **GetIndexJobStatus** operation.', 'type' => 'string', 'example' => 'eFDr2fGRzP9gdDZWAdo3xxxx', 'title' => ''], + 'IndexId' => ['description' => 'The knowledge base ID.', 'type' => 'string', 'example' => '79c0alxxxx', 'title' => ''], + ], + 'title' => '', 'example' => '', ], - 'memoryId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", - ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad'."\n", - ], - 'workspaceId' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA'], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + .'- true: Successful.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], 'errorCodes' => [ - 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], - ], - 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', - ], + 400 => [ + ['errorCode' => 'RagIndex.IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => 'This request uses the same client token as the previous but different request. Do not reuse client tokens with different requests unless the request is the same.'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.InvalidParameter\\",\\n \\"Data\\": {\\n \\"Id\\": \\"eFDr2fGRzP9gdDZWAdo3xxxx\\",\\n \\"IndexId\\": \\"79c0alxxxx\\"\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => 'Submit a knowledge base creation task', + 'description' => '- Resource Access Management (RAM) users must first obtain [API permissions](~~2848578~~) for Model Studio (requires `AliyunBailianDataFullAccess`, which includes the sfm:SubmitIndexJob permission), and [join a workspace](~~2851098~~) before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Use the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to invoke this operation.'."\n" + .'- Before invoking this operation, you must invoke the **CreateIndex** operation and obtain the corresponding `IndexId`.'."\n" + .'- After invoking this operation, the node requires time to execute and may take several hours during peak periods. Do not submit duplicate requests before the node completes. To query the node execution status, invoke the **GetIndexJobStatus** operation.'."\n" + .'- After the knowledge base is created, you can associate it with an agent application<props="china"> or workflow application</props> in the same workspace through <props="china">[Application Management](https://bailian.console.aliyun.com/?tab=app#/app-center)</props><props="intl">[Application Management](https://modelstudio.console.alibabacloud.com/?tab=app#/app-center)</props> (or pass the `IndexID` through `rag_options` in [Application Calls](~~2846132~~)) to supplement your Model Studio application with private knowledge and up-to-date information. You can also choose not to use a Model Studio application and directly query the knowledge base by invoking the **Retrieve** operation.'."\n" + .'- This operation does not support idempotence.'."\n" + ."\n" + .'**Rate limit:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If throttled, retry later.', + 'changeSet' => [ + ['createdAt' => '2024-10-17T04:11:14.000Z', 'description' => 'Error codes changed'], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"description\\": \\"我的大模型应用$APP_ID关于A用户的长期记忆体\\",\\n \\"memoryId\\": \\"6bff4f317a14442fbc9f73d29dbdxxxx\\",\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\",\\n \\"workspaceId\\": \\"llm-3z7uw7fwz0vexxxx\\"\\n}","type":"json"}]', - ], - 'UpdateMemory' => [ - 'summary' => '更新memory', - 'path' => '/{workspaceId}/memories/{memoryId}', - 'methods' => [ - 'put', + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SubmitIndexJob'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:SubmitIndexJob', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'UpdateChunk' => [ + 'summary' => 'Modifies the content and title of a specified text chunk in a knowledge base, and specifies whether the chunk participates in knowledge base retrieval.', + 'path' => '/{WorkspaceId}/chunk/update', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'workspaceId', - 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'name' => 'PipelineId', + 'in' => 'query', + 'schema' => ['description' => 'The knowledge base ID. This is the `Data.Id` returned by the **CreateIndex** operation, or you can obtain it from the <props="china">[Knowledge Base](https://bailian.console.aliyun.com/?tab=app#/knowledge-base)</props><props="intl">[Knowledge Base](https://modelstudio.console.alibabacloud.com/?tab=app#/knowledge-base)</props> page.', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx'."\n", 'title' => ''], ], [ - 'name' => 'memoryId', + 'name' => 'DataId', + 'in' => 'query', + 'schema' => ['description' => 'The file ID. This is the `FileId` returned by the **AddFile** operation. You can also obtain it from the <props="china">[Application Data](https://bailian.console.aliyun.com/?tab=app#/data-center) - Files</props><props="intl">[Application Data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center) - Files</props> tab in the Model Studio console by clicking the ID icon next to the corresponding file.', 'type' => 'string', 'required' => true, 'example' => 'doc_c134aa2073204a5d936d870bf960f56axxxxxxxx'."\n", 'title' => ''], + ], + [ + 'name' => 'ChunkId', + 'in' => 'query', + 'schema' => ['description' => 'The ID of the text chunk to modify. You can obtain this value by calling the **ListChunks** operation. The value is in the Node.Metadata._id field of the response.', 'type' => 'string', 'required' => true, 'example' => 'llm-5ip55o1zrzxx_09fe52x_xxxxx_033b551e10024029992e79767b151fxx_10024xx_0', 'title' => ''], + ], + [ + 'name' => 'IsDisplayedChunkContent', + 'in' => 'query', + 'schema' => ['description' => 'Specifies whether this text chunk participates in knowledge base retrieval. Valid values:'."\n" + ."\n" + .'- true: Participates.'."\n" + .'- false: Does not participate.'."\n" + ."\n" + .'Default value: true.', 'type' => 'boolean', 'required' => true, 'example' => 'true', 'title' => ''], + ], + [ + 'name' => 'content', + 'in' => 'query', + 'schema' => ['description' => 'The new content of the text chunk. The content length must be between 10 and 6000 characters and cannot exceed the maximum segment length specified when the knowledge base was created.', 'type' => 'string', 'required' => true, 'example' => '在哲学中所获得的确定性类型不是科学的确定性(即对每个人的理智来说都一样的确定性),而是一种要在人类的整体本质中才能获得的亲证。哲学的每一形态都不同于科学,因为所有的哲学都没有得到一致的认可...', 'title' => ''], + ], + [ + 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3', - ], + 'schema' => ['description' => 'The workspace ID of the knowledge base. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx'."\n", 'title' => ''], ], [ - 'name' => 'description', + 'name' => 'title', 'in' => 'query', - 'schema' => [ - 'title' => '长期记忆描述信息', - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '', - ], + 'schema' => ['description' => 'The new title of the text chunk. The length is limited to 0 to 50 characters. An empty string is allowed. If you pass an empty string, the existing title is cleared. If you do not pass this parameter, the original title is retained.', 'type' => 'string', 'required' => false, 'example' => '什么是哲学', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad'."\n", - ], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'], + 'Code' => ['description' => 'The error status code.', 'type' => 'string', 'title' => '', 'example' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'title' => '', 'example' => ''], + 'Success' => ['description' => 'Indicates whether the operation was successful. Valid values:'."\n" + ."\n" + .'- true: Succeeded.'."\n" + .'- false: Failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Data' => ['description' => 'The business data returned upon a successful request.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Status' => ['description' => 'The status code returned by the operation.', 'type' => 'string', 'example' => '"200"', 'title' => ''], ], + 'example' => '', ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'Memory.DescriptionInvalid', - 'errorMessage' => 'Input parameter description is invalid.', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Code\\": \\"\\",\\n \\"Message\\": \\"\\",\\n \\"Success\\": true,\\n \\"Data\\": true,\\n \\"Status\\": \\"\\\\\\"200\\\\\\"\\"\\n}","type":"json"}]', + 'title' => 'Update a chunk', + 'description' => '- **Key limits**: This operation supports only document search knowledge bases. Data query and image Q&A knowledge bases are not supported.'."\n" + .'- **Permission requirements**:'."\n" + .' - **Resource Access Management (RAM) user**: Before invoking this operation, obtain [API permissions](~~2848578~~) for Model Studio (you can use the `AliyunBailianDataFullAccess` policy, which includes the sfm:UpdateChunk permission required by this operation), and [join a workspace](~~2851098~~).'."\n" + .' - **Alibaba Cloud account**: Has permissions by default and can invoke this operation directly.'."\n" + .'- **Calling method**: Use the latest <props="china">[Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>. The SDK provides encapsulation of complex signature calculation logic and simplifies the invocation procedure.'."\n" + .'- **Effective latency**: Updates typically take effect immediately. During peak hours, a slight delay (seconds) may occur.'."\n" + .'- **Idempotence**: This operation is idempotent. If you repeat the operation on a text chunk that has already been updated, the operation returns a success response.'."\n" + ."\n" + .'**Rate limit:**'."\n" + .'This operation is throttled if called too frequently. Do not exceed 10 calls per second. If you are throttled, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateChunk', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], - 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], + ], + ], + 'UpdateConnector' => [ + 'summary' => 'Updates a connector.', + 'path' => '/{WorkspaceId}/datacenter/connector/{ConnectorId}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], ], - 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'WorkspaceId', + 'in' => 'path', + 'schema' => ['description' => 'The ID of the workspace.', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', 'title' => ''], + ], + [ + 'name' => 'ConnectorId', + 'in' => 'path', + 'schema' => ['description' => 'The instance ID of the connector. You can find this ID in the Model Studio console.', 'type' => 'string', 'required' => true, 'example' => 'conn_xxxx', 'title' => ''], + ], + [ + 'name' => 'ConnectorName', + 'in' => 'formData', + 'schema' => ['description' => 'The name of the connector.', 'type' => 'string', 'required' => true, 'maxLength' => 20, 'minLength' => 1, 'title' => '', 'example' => 'test-connector'], + ], + [ + 'name' => 'Description', + 'in' => 'formData', + 'schema' => ['description' => 'A description of the connector.', 'type' => 'string', 'required' => true, 'maxLength' => 200, 'minLength' => 1, 'title' => '', 'example' => 'never_delete_aeip_95_us-west-1'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'Index.Forbidden', 'title' => ''], + 'Data' => [ + 'type' => 'object', + 'properties' => [ + 'ConnectorId' => ['description' => 'The ID of the connector.', 'type' => 'string', 'title' => '', 'example' => 'conn_file_e0c9db4030b2465a9478028f7d76cd92_1234'], + ], + 'description' => 'The data returned by the operation.', + 'title' => '', + 'example' => '', + ], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['description' => 'The ID of the request.', 'type' => 'string', 'title' => '', 'example' => '778C0B3B-03C1-5FC1-A947-36EDD13606AB'], + 'Status' => ['description' => 'The status code of the response.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was successful.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + ], + 'title' => '', + 'description' => 'The response object.', + 'example' => '', ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'UpdateConnector', + 'description' => '- A RAM user can call this operation only after they join a workspace and are granted the required [API permission](~~2848578~~) for Alibaba Cloud Model Studio (Bailian). The `AliyunBailianDataFullAccess` policy, which includes the `sfm:UpdateConnector` permission, is required. An Alibaba Cloud account can call this operation directly. Use the latest version of the <props="china">[Alibaba Cloud Model Studio (Bailian) SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio (Bailian) SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this operation.'."\n" + ."\n" + .'- This operation is not idempotent.'."\n" + ."\n" + .'**Throttling:** If you call this operation too frequently, the system may throttle your requests. Do not exceed a frequency of 5 calls per second. If a request is throttled, try again later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateConnector', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\"\\n}","type":"json"}]', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Index.Forbidden\\",\\n \\"Data\\": {\\n \\"ConnectorId\\": \\"conn_file_e0c9db4030b2465a9478028f7d76cd92_1234\\"\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"778C0B3B-03C1-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', ], - 'DeleteMemory' => [ - 'summary' => '删除memory', - 'path' => '/{workspaceId}/memories/{memoryId}', - 'methods' => [ - 'delete', - ], - 'schemes' => [ - 'https', - ], + 'UpdateFileTag' => [ + 'summary' => 'Updates the tags for a specified file.', + 'path' => '/{WorkspaceId}/datacenter/file/{FileId}', + 'methods' => ['put'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', + 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREsfm8JET0F'], + 'autoTest' => true, + 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ - 'name' => 'workspaceId', + 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'schema' => ['description' => 'The ID of the workspace that contains the file. For instructions on obtaining the ID, see [How to use workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', 'title' => ''], ], [ - 'name' => 'memoryId', + 'name' => 'FileId', 'in' => 'path', + 'schema' => ['description' => 'The ID of the file. You can obtain the ID from the <props="china">[application data](https://bailian.console.aliyun.com/?tab=app#/data-center)</props><props="intl">[application data](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)</props> page by clicking the ID icon next to the file name.', 'type' => 'string', 'required' => true, 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], + ], + [ + 'name' => 'Tags', + 'in' => 'formData', + 'style' => 'json', 'schema' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', + 'title' => '', + 'description' => '- The list of tags to associate with the file. You can specify a maximum of 100 tags. The combined length of all tag values cannot exceed 700 characters.', + 'type' => 'array', + 'items' => ['description' => 'The value of a tag. Each tag can be up to 32 characters long. Supported characters include Unicode letters (such as English and Chinese characters), digits, underscores (\\_), and hyphens (-). A tag cannot contain spaces.', 'type' => 'string', 'required' => false, 'example' => '标签A', 'title' => ''], 'required' => true, - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", + 'maxItems' => 100, + 'minItems' => 1, + 'example' => '', ], ], ], @@ -6718,1222 +7036,1359 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => 'The response body.', 'type' => 'object', 'properties' => [ - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad'."\n", + 'Code' => ['description' => 'The result code. A value of `Success` indicates that the request was successful.', 'type' => 'string', 'example' => 'Success', 'title' => ''], + 'Data' => [ + 'description' => 'The data returned.', + 'type' => 'object', + 'properties' => [ + 'FileId' => ['description' => 'The ID of the file.', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', 'title' => ''], + ], + 'title' => '', + 'example' => '', ], + 'Message' => ['description' => 'The response message.', 'type' => 'string', 'example' => 'Requests throttling triggered.', 'title' => ''], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'The request ID.', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'], + 'Status' => ['description' => 'The status code.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was successful. Valid values:'."\n" + ."\n" + .'- `true`: The request was successful.'."\n" + ."\n" + .'- `false`: The request failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'example' => '', ], ], ], - 'errorCodes' => [ - 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"Success\\",\\n \\"Data\\": {\\n \\"FileId\\": \\"file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx\\"\\n },\\n \\"Message\\": \\"Requests throttling triggered.\\",\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => 'Update File Tag', + 'description' => '- A RAM User (sub-account) must be granted the required [API permissions](~~2848578~~) for Alibaba Cloud Model Studio (the `AliyunBailianDataFullAccess` policy, which includes the `sfm:UpdateFileTag` permission) and [join a workspace](~~2851098~~) before calling this operation. An Alibaba Cloud account (main account) can call this operation directly without authorization. We recommend using the latest version of the <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props><props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props> to call this operation.'."\n" + ."\n" + .'**Throttling:** Do not call this operation more than 5 times per second. If a request is throttled, try again later.', + 'changeSet' => [ + ['createdAt' => '2025-09-28T10:20:10.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateFileTag'], ], - 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateFileTag', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\"\\n}","type":"json"}]', ], - 'ListMemories' => [ - 'summary' => '获取memory', - 'path' => '/{workspaceId}/memories', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], + 'UpdateIndex' => [ + 'summary' => 'Updates the configuration of a specified knowledge base.', + 'path' => '/{WorkspaceId}/index/update', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'workspaceId', + 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'schema' => ['description' => 'The workspace ID.', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', 'title' => ''], ], [ - 'name' => 'maxResults', + 'name' => 'Id', 'in' => 'query', - 'schema' => [ - 'title' => '最大返回数量', - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '10', - ], + 'allowEmptyValue' => false, + 'schema' => ['title' => 'Idempotent parameter', 'description' => 'The knowledge base ID.', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx'], ], [ - 'name' => 'nextToken', + 'name' => 'Name', + 'in' => 'query', + 'schema' => ['description' => 'The name of the knowledge base.', 'type' => 'string', 'required' => false, 'example' => '企业帮助文档库', 'title' => ''], + ], + [ + 'name' => 'Description', + 'in' => 'query', + 'schema' => ['description' => 'The description of the knowledge base.', 'type' => 'string', 'required' => false, 'example' => '企业知识库', 'title' => ''], + ], + [ + 'name' => 'RerankMinScore', + 'in' => 'query', + 'schema' => ['description' => 'The minimum score for sorting. The value must be between 0 and 1.', 'type' => 'string', 'required' => false, 'example' => '0.01', 'title' => ''], + ], + [ + 'name' => 'DenseSimilarityTopK', + 'in' => 'query', + 'schema' => ['description' => 'The number of most similar text segments to retrieve using vector search. A vector is generated for the input text, and the K most similar text segments are retrieved from the knowledge base. The value of K must be in the range of 0 to 100.'."\n" + .'The sum of `DenseSimilarityTopK` and `SparseSimilarityTopK` cannot exceed 200.'."\n" + ."\n" + .'Default value: 100.', 'type' => 'integer', 'format' => 'int32', 'maximum' => '100', 'minimum' => '0', 'default' => '100', 'required' => false, 'example' => '100', 'title' => ''], + ], + [ + 'name' => 'SparseSimilarityTopK', + 'in' => 'query', + 'schema' => ['description' => 'The number of text segments to retrieve using an exact keyword match. This helps filter out irrelevant text segments and provides more accurate results.'."\n" + .'The value must be in the range of 0 to 100.'."\n" + .'The sum of `DenseSimilarityTopK` and `SparseSimilarityTopK` cannot exceed 200.'."\n" + ."\n" + .'Default value: 100.', 'type' => 'integer', 'format' => 'int32', 'maximum' => '100', 'minimum' => '0', 'default' => '100', 'required' => false, 'example' => '100', 'title' => ''], + ], + [ + 'name' => 'PipelineCommercialType', 'in' => 'query', 'schema' => [ - 'title' => '由前一次的请求返回,传入时本次查询结果将基于前一次请求结果进行分页', - 'description' => '', + 'description' => 'The edition of the knowledge base. Valid values:'."\n" + ."\n" + .'- standard: Standard Edition'."\n" + ."\n" + .'- enterprise: Ultimate Edition', 'type' => 'string', + 'enum' => ['standard', 'enterprise'], 'required' => false, - 'example' => 'dc270401186b433f975d7e1faaa34e0e', + 'example' => 'standard', + 'title' => '', ], ], + [ + 'name' => 'PipelineCommercialCu', + 'in' => 'query', + 'schema' => ['description' => 'The number of Retrieval Compute Units (RCUs) for the Ultimate Edition knowledge base. This parameter is required only when PipelineCommercialType is set to enterprise.'."\n" + ."\n" + .'The value must be in the range of 1 to 200.', 'type' => 'integer', 'format' => 'int32', 'maximum' => '200', 'minimum' => '1', 'required' => false, 'example' => '3', 'title' => ''], + ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => 'The schema of the response.', + 'title' => 'Schema of Response ', 'type' => 'object', 'properties' => [ - 'maxResults' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'memories' => [ - 'description' => '', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'description' => [ - 'description' => '', - 'type' => 'string', - 'example' => '', - ], - 'memoryId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '3fc531f4519444beaafffa4538f60667', - ], - ], + 'RequestId' => ['title' => 'Id of the request ', 'description' => 'The request ID.', 'type' => 'string', 'example' => '17204B98-7734-4F9A-8464-xxx'], + 'Data' => [ + 'description' => 'The data returned.', + 'type' => 'object', + 'properties' => [ + 'Id' => ['description' => 'The knowledge base ID.', 'type' => 'string', 'example' => '79c0alxxxx', 'title' => ''], ], + 'title' => '', + 'example' => '', ], - 'nextToken' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'dc270401186b433f975d7e1faaa34e0e', - ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad'."\n", - ], - 'totalCount' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '105', - ], - 'workspaceId' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'example' => 'llm-us9hjmt32nysdm5v', - ], + 'Status' => ['description' => 'The status code returned by the API.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the request was successful. Valid values:'."\n" + ."\n" + .'true: The request was successful.'."\n" + ."\n" + .'false: The request failed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], + 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'Code' => ['description' => 'The status code.', 'type' => 'string', 'example' => 'Success', 'title' => ''], ], + 'example' => '', ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'Memory.MaxResultsInvalid', - 'errorMessage' => 'Input parameter maxResults is invalid.', - ], - [ - 'errorCode' => 'Memory.NextTokenInvalid', - 'errorMessage' => 'Input parameter nextToken is invalid.', - ], - ], - 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], - ], - 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', + 'errorCodes' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Update Knowledge Base ', + 'description' => '<props="intl">This operation is not available on the Alibaba Cloud International Website (www\\.alibabacloud.com).</props><props="china"></props>'."\n" + ."\n" + .'Before a RAM user can call this operation, the RAM user must have the `AliyunBailianDataFullAccess` permission for Alibaba Cloud Model Studio. For more information, see [Grant permissions](~~2848578~~). The RAM user must also be added to a workspace. For more information, see [Add a member to a workspace](~~2851098~~). An Alibaba Cloud account can call this operation without authorization. Use the latest version of the Alibaba Cloud Model Studio SDK to call this operation. For more information, see [Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29).'."\n" + .'Before you call this operation, ensure that the knowledge base is created and has not been deleted. The knowledge base ID (`Id`) must be valid.'."\n" + .'This operation is idempotent.', + 'requestParamsDescription' => 'Note: Specify at least one of the following parameters: Name, Description, or RerankMinScore.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateIndex', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"maxResults\\": 10,\\n \\"memories\\": [\\n {\\n \\"description\\": \\"我的大模型应用$APP_ID关于A用户的长期记忆体\\",\\n \\"memoryId\\": \\"3fc531f4519444beaafffa4538f6xxxx\\"\\n }\\n ],\\n \\"nextToken\\": \\"dc270401186b433f975d7e1faaa3xxxx\\",\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\",\\n \\"totalCount\\": 105,\\n \\"workspaceId\\": \\"llm-3z7uw7fwz0vexxxx\\\\n\\"\\n}","type":"json"}]', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-7734-4F9A-8464-xxx\\",\\n \\"Data\\": {\\n \\"Id\\": \\"79c0alxxxx\\"\\n },\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"Code\\": \\"Success\\"\\n}","type":"json"}]', ], - 'CreateMemoryNode' => [ - 'summary' => '创建记忆Node', - 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'UpdateMemory' => [ + 'summary' => 'Updates the description of a specified long-term memory.', + 'path' => '/{workspaceId}/memories/{memoryId}', + 'methods' => ['put'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'schema' => ['title' => '', 'description' => 'The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see [How to use a workspace](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx'], ], [ 'name' => 'memoryId', 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", - ], + 'schema' => ['title' => '', 'description' => 'The ID of the long-term memory, which corresponds to the memoryId returned by the [CreateMemory](https://www.alibabacloud.com/help/en/model-studio/developer-reference/api-bailian-2023-12-29-creatememory) operation.', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbdxxxx'], ], [ - 'name' => 'content', + 'name' => 'description', 'in' => 'query', - 'schema' => [ - 'title' => '长期记忆内容', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '', - ], + 'schema' => ['title' => '', 'description' => 'The new description. The description must be 1 to 50 characters in length and can contain characters in the letter category of Unicode, which includes letters, Chinese characters, and digits. The description can also contain half-width colons (:), underscores (_), periods (.), or hyphens (-).', 'type' => 'string', 'required' => false, 'example' => '我的大模型应用$APP_ID关于B用户的长期记忆体'."\n"], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'memoryNodeId' => [ - 'title' => '长期记忆节点Id', - 'description' => '', - 'type' => 'string', - 'example' => '68de06c95368463a8be4a84efc872cc5', - ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5', - ], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'], ], + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'Memory.MemoryNodeContentInvalid', - 'errorMessage' => 'Memory node content is invalid.', - ], + ['errorCode' => 'Memory.DescriptionInvalid', 'errorMessage' => 'Input parameter description is invalid.', 'description' => 'Memory\'s description is invalid'], ], 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], - [ - 'errorCode' => 'Memory.MemoryNodeNotFound', - 'errorMessage' => 'MemoryNode not found.', - ], + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], ], 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', - ], + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\"\\n}","type":"json"}]', + 'title' => 'Update long-term memory', + 'description' => '- This operation is idempotent.'."\n" + ."\n" + .'**Rate limit:** Ensure that the interval between two requests is at least 1 second. Otherwise, throttling may be triggered. If throttling occurs, retry later.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateMemory'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateMemory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"memoryNodeId\\": \\"68de06c95368463a8be4a84efcxxxxxx\\",\\n \\"requestId\\": \\"8C56C7AF-xxxx-19CE-B018-E05E1EDCF4C5\\"\\n}","type":"json"}]', ], - 'GetMemoryNode' => [ - 'summary' => '获取记忆Node', + 'UpdateMemoryNode' => [ + 'summary' => 'Updates a memory fragment.', 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes/{memoryNodeId}', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['put'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'schema' => ['title' => '', 'description' => 'The workspace ID.', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdm5v'."\n"], ], [ 'name' => 'memoryId', 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", - ], + 'schema' => ['title' => '', 'description' => 'The long-term memory ID.', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n"], ], [ 'name' => 'memoryNodeId', 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆节点Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '68de06c95368463a8be4a84efc872cc5'."\n", - ], + 'schema' => ['title' => '', 'description' => 'The memory fragment ID.', 'type' => 'string', 'required' => true, 'example' => '68de06c95368463a8be4a84efc872cc5'], + ], + [ + 'name' => 'content', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'The memory fragment content.', 'type' => 'string', 'required' => true, 'example' => '用户喜欢吃西红柿炒鸡蛋'."\n"], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', + 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'content' => [ - 'title' => '长期记忆节点内容', - 'description' => '', - 'type' => 'string', - 'example' => '', - ], - 'memoryId' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", - ], - 'memoryNodeId' => [ - 'title' => '长期记忆节点Id', - 'description' => '', - 'type' => 'string', - 'example' => '68de06c95368463a8be4a84efc872cc5', - ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'."\n", - ], - 'workspaceId' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'."\n"], ], + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'Memory.MemoryNodeContentInvalid', - 'errorMessage' => 'Memory node content is invalid.', - ], + ['errorCode' => 'Memory.MemoryNodeContentInvalid', 'errorMessage' => 'Memory node content is invalid.', 'description' => 'Memory node content is invalid.'], ], 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], - [ - 'errorCode' => 'Memory.MemoryNodeNotFound', - 'errorMessage' => 'MemoryNode not found.', - ], + ['errorCode' => 'Memory.MemoryIdNotFound', 'errorMessage' => 'Memory Id not exist or is not authorized.', 'description' => 'memoryId not found'], + ['errorCode' => 'Memory.MemoryNodeNotFound', 'errorMessage' => 'MemoryNode not found.', 'description' => 'MemoryNode not found'], ], 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', - ], + ['errorCode' => 'Memory.InternalError', 'errorMessage' => 'Memory service inner exception.', 'description' => 'Memory service inner exception.'."\n"], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\\\n\\"\\n}","type":"json"}]', + 'title' => 'Update a memory fragment', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateMemoryNode'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateMemoryNode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"content\\": \\"用户喜欢吃西红柿炒鸡蛋\\\\n\\",\\n \\"memoryId\\": \\"6bff4f317a14442fbc9f73d29dbd5fc3\\\\n\\",\\n \\"memoryNodeId\\": \\"68de06c95368463a8be4a84efc872cc5\\",\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\\\n\\",\\n \\"workspaceId\\": \\"llm-us9hjmt32nysdm5v\\\\n\\"\\n}","type":"json"}]', ], - 'UpdateMemoryNode' => [ - 'summary' => '更新记忆Node', - 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes/{memoryNodeId}', - 'methods' => [ - 'put', - ], - 'schemes' => [ - 'https', - ], + 'UpdatePromptTemplate' => [ + 'summary' => 'Updates a prompt template based on the template ID.', + 'path' => '/{workspaceId}/promptTemplates/{promptTemplateId}', + 'methods' => ['patch'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'workspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'schema' => ['title' => '', 'description' => 'The workspace ID.'."\n", 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdxxx'], ], [ - 'name' => 'memoryId', + 'name' => 'promptTemplateId', 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", - ], + 'schema' => ['title' => '', 'description' => 'The template ID.'."\n", 'type' => 'string', 'required' => true, 'example' => '6e49109bfeb94a39bb268f4e483ccxxx'], ], [ - 'name' => 'memoryNodeId', - 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆节点Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '68de06c95368463a8be4a84efc872cc5', - ], + 'name' => 'name', + 'in' => 'query', + 'schema' => ['title' => '', 'description' => 'The template name.'."\n", 'type' => 'string', 'required' => false, 'example' => '小红书文案助手'], ], [ 'name' => 'content', 'in' => 'query', - 'schema' => [ - 'title' => '长期记忆内容', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '', - ], + 'schema' => ['title' => '', 'description' => 'The template content.'."\n", 'type' => 'string', 'required' => false, 'example' => '请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => 'Schema of Response'."\n", 'type' => 'object', 'properties' => [ - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'."\n", - ], + 'requestId' => ['title' => '', 'description' => 'The request ID.'."\n", 'type' => 'string', 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx'."\n"], ], + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'Memory.MemoryNodeContentInvalid', - 'errorMessage' => 'Memory node content is invalid.', - ], + ['errorCode' => 'PromptTemplate.ContentInvalid', 'errorMessage' => 'Input parameter Content is invalid.', 'description' => 'The format of the input parameter Content is invalid.'], + ['errorCode' => 'PromptTemplate.NameInvalid', 'errorMessage' => 'Input parameter Name is invalid.', 'description' => 'The format of the input parameter Name is invalid.'], ], 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], - [ - 'errorCode' => 'Memory.MemoryNodeNotFound', - 'errorMessage' => 'MemoryNode not found.', - ], + ['errorCode' => 'PromptTemplate.TemplateNotFound', 'errorMessage' => 'Prompt template not found.', 'description' => 'Prompt template not found'], ], 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', - ], + ['errorCode' => 'PromptTemplate.InternalError', 'errorMessage' => 'Prompt template service inner exception.', 'description' => 'prompt template service internal exception'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\\\n\\"\\n}","type":"json"}]', - ], - 'DeleteMemoryNode' => [ - 'summary' => '删除记忆Node', - 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes/{memoryNodeId}', - 'methods' => [ - 'delete', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx\\\\n\\"\\n}","type":"json"}]', + 'title' => 'UpdatePromptTemplate', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdatePromptTemplate'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdatePromptTemplate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], ], + ], + 'UpdateTableFromAuthorizedOss' => [ + 'summary' => 'Update a table in an Alibaba Cloud Model Studio data connector using a file from an authorized OSS bucket.', + 'path' => '/{WorkspaceId}/datacenter/table/fromoss/{TableId}', + 'methods' => ['put'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', + 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREsfm8JET0F'], + 'autoTest' => true, + 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ - 'name' => 'workspaceId', + 'name' => 'WorkspaceId', 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", - ], + 'schema' => ['description' => 'ID of the workspace that owns the file. For details, see [Use workspaces](~~2587495~~).', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', 'title' => ''], ], [ - 'name' => 'memoryId', + 'name' => 'TableId', 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", - ], + 'schema' => ['description' => 'ID of the table to update.', 'type' => 'string', 'required' => true, 'title' => '', 'example' => 'table_100b51399c404966b7d49f71e388a3fd_12738336'], ], [ - 'name' => 'memoryNodeId', - 'in' => 'path', + 'name' => 'OssBucket', + 'in' => 'formData', + 'schema' => ['description' => 'Name of the OSS bucket. For details, see [bucket](~~177682~~).', 'type' => 'string', 'required' => true, 'title' => '', 'example' => 'yinghuo-ai'], + ], + [ + 'name' => 'OssRegionId', + 'in' => 'formData', + 'schema' => ['description' => 'Region ID of the OSS bucket. For details, see [OSS regions and endpoints](~~31837~~).', 'type' => 'string', 'required' => true, 'title' => '', 'example' => 'cn-beijing'], + ], + [ + 'name' => 'OssKey', + 'in' => 'formData', + 'schema' => ['description' => 'Object key of the file in the OSS bucket. For details, see [object naming](~~273129~~).', 'type' => 'string', 'required' => true, 'title' => '', 'example' => 'a0deedbce4a8162b8d66c63ace28330c'], + ], + [ + 'name' => 'UpdateMode', + 'in' => 'formData', 'schema' => [ - 'title' => '长期记忆节点Id', - 'description' => '', + 'description' => 'Update mode. Valid values: APPEND and OVERWRITE.', 'type' => 'string', 'required' => true, - 'example' => '68de06c95368463a8be4a84efc872cc5', + 'enum' => ['APPEND', 'OVERWRITE'], + 'title' => '', + 'example' => 'OVERWRITE', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'."\n", + 'Code' => ['description' => 'Error status code.', 'type' => 'string', 'example' => 'DataCenter.FileTooLarge', 'title' => ''], + 'Data' => [ + 'type' => 'object', + 'properties' => [ + 'TableId' => ['description' => 'Same as the input TableId parameter.', 'type' => 'string', 'title' => '', 'example' => 'table_df96ebd5da8640e5a0991b3d15f39d4d_12792097'], + 'Status' => ['description' => 'Current table status. After upload, the status usually changes to TO\\_IMPORT. This means the system has accepted the uploaded file and is waiting to schedule it into the data table.', 'type' => 'string', 'title' => '', 'example' => 'TO_IMPORT'], + ], + 'description' => 'Data field of the response.', + 'title' => '', + 'example' => '', ], + 'Message' => ['description' => 'Error message.', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', 'title' => ''], + 'RequestId' => ['description' => 'ID of the request.', 'type' => 'string', 'title' => '', 'example' => '7BA8ADD9-53D6-53F0-918F-A1E776AD230E'], + 'Status' => ['description' => 'Status code returned by the operation.', 'type' => 'string', 'example' => '200', 'title' => ''], + 'Success' => ['description' => 'Indicates whether the operation succeeded.', 'type' => 'boolean', 'example' => 'true', 'title' => ''], ], + 'title' => '', + 'description' => 'Schema of Response', + 'example' => '', ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'Memory.MemoryNodeContentInvalid', - 'errorMessage' => 'Memory node content is invalid.', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'UpdateTableFromAuthorizedOss', + 'description' => '- Ensure that the OSS bucket belongs to the same Alibaba Cloud account as your Alibaba Cloud Model Studio instance. You must also complete the authorization steps described in [Configure data import from OSS](~~2782155~~).'."\n" + ."\n" + .' - The bucket storage class must not be Archive, Cold Archive, or Deep Cold Archive. Buckets with server-side encryption are supported. public-read-write, public-read, and private buckets are also supported.'."\n" + ."\n" + .' - If you use a bucket with [Referer-based hotlink protection](~~2636937~~), you must add `*.console.aliyun.com` to the Referer whitelist. For more information, see [Allow access only from trusted websites](~~2636937~~).'."\n" + ."\n" + .'- Before a RAM user (sub-account) can call this operation, they must obtain [API permissions](~~2848578~~) for Alibaba Cloud Model Studio and [join a workspace](~~2851098~~). The AliyunBailianDataFullAccess policy includes the required `sfm:UpdateTableFromAuthorizedOss` permission. An Alibaba Cloud account (root account) can call this operation directly without additional permissions. We recommend that you use the latest version of the <props="china">[Alibaba Cloud Model Studio SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)</props> or <props="intl">[Alibaba Cloud Model Studio SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)</props>.'."\n" + ."\n" + .'- This operation is not idempotent.'."\n" + ."\n" + .'**Rate limiting:** This operation is subject to rate limiting. Do not call it more than five times per second. If you reach the limit, wait before you try again.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"DataCenter.FileTooLarge\\",\\n \\"Data\\": {\\n \\"TableId\\": \\"table_df96ebd5da8640e5a0991b3d15f39d4d_12792097\\",\\n \\"Status\\": \\"TO_IMPORT\\"\\n },\\n \\"Message\\": \\"Required parameter(%s) missing or invalid, please check the request parameters.\\",\\n \\"RequestId\\": \\"7BA8ADD9-53D6-53F0-918F-A1E776AD230E\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', + ], + ], + 'endpoints' => [ + ['regionId' => 'cn-beijing', 'regionName' => 'China (Beijing)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'bailian.cn-beijing.aliyuncs.com', 'endpoint' => 'bailian.cn-beijing.aliyuncs.com', 'vpc' => 'bailian-vpc.cn-beijing.aliyuncs.com'], + ['regionId' => 'ap-southeast-1', 'regionName' => 'Singapore', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'bailian.ap-southeast-1.aliyuncs.com', 'endpoint' => 'bailian.ap-southeast-1.aliyuncs.com', 'vpc' => 'bailian-vpc.ap-southeast-1.aliyuncs.com'], + ], + 'errorCodes' => [ + ['code' => 'DataCenter.AccessFileFailed', 'message' => 'Failed to read the uploaded file. Check whether the file has been uploaded successfully.', 'http_code' => 400, 'description' => 'Failed to read the uploaded file. Check whether the file has been uploaded successfully.'], + ['code' => 'DataCenter.ExceedLimit', 'message' => 'You have reached the maximum number of upload files limit.', 'http_code' => 400, 'description' => 'The maximum number of uploaded files allowed has been reached.'], + ['code' => 'DataCenter.FileTooLarge', 'message' => 'The file size is too large.', 'http_code' => 400, 'description' => 'The file size exceeds the limit. For the maximum file limit, see Bailian official document library.'], + ['code' => 'DataCenter.InternalError', 'message' => 'System inner exception.', 'http_code' => 500, 'description' => 'System inner exception.'], + ['code' => 'DataCenter.Throttling', 'message' => 'Calls are too frequent, triggering system throttling.', 'http_code' => 429, 'description' => 'Calls are too frequent, triggering system throttling. Please ensure no less than 15 seconds between 2 requests.'], + ['code' => 'EnterpriseData.UserDataIsEmpty', 'message' => 'Enterprise data user data is empty.', 'http_code' => 400, 'description' => 'Enterprise data user data is empty.'], + ['code' => 'LLMService.ApiKey.TokenCreateFailed', 'message' => 'Large language model ApiKey Token creation failed.', 'http_code' => 400, 'description' => 'Large language model ApiKey Token creation failed.'], + ['code' => 'LLMService.WorkspaceId.NotExists.', 'message' => 'you are not authorized to this workspace, or workspace not exists.', 'http_code' => 403, 'description' => 'The business space does not exist or has no permissions.'], + ['code' => 'Memory.DescriptionInvalid', 'message' => 'Input parameter description is invalid.', 'http_code' => 400, 'description' => 'Memory\'s description is invalid'], + ['code' => 'Memory.InternalError', 'message' => 'Memory service inner exception.', 'http_code' => 500, 'description' => 'Memory service inner exception.'."\n"], + ['code' => 'Memory.MaxResultsInvalid', 'message' => 'Input parameter maxResults is invalid.', 'http_code' => 400, 'description' => 'Input parameter maxResults is invalid.'], + ['code' => 'Memory.MemoryIdNotFound', 'message' => 'Memory Id not exist or is not authorized.', 'http_code' => 404, 'description' => 'memoryId not found'], + ['code' => 'Memory.MemoryNodeContentInvalid', 'message' => 'Memory node content is invalid.', 'http_code' => 400, 'description' => 'Memory node content is invalid.'], + ['code' => 'Memory.MemoryNodeNotFound', 'message' => 'MemoryNode not found.', 'http_code' => 404, 'description' => 'MemoryNode not found'], + ['code' => 'Memory.NextTokenInvalid', 'message' => 'Input parameter nextToken is invalid.', 'http_code' => 400, 'description' => 'The input nextToken is invalid.'], + ['code' => 'PromptTemplate.ContentInvalid', 'message' => 'Input parameter Content is invalid.', 'http_code' => 400, 'description' => 'The format of the input parameter Content is invalid.'], + ['code' => 'PromptTemplate.InternalError', 'message' => 'Prompt template service inner exception.', 'http_code' => 500, 'description' => 'prompt template service internal exception'], + ['code' => 'PromptTemplate.MaxResultsInvalid', 'message' => 'Input parameter MaxResults is invalid.', 'http_code' => 400, 'description' => 'The input parameter maxResults format is invalid.'], + ['code' => 'PromptTemplate.NameInvalid', 'message' => 'Input parameter Name is invalid.', 'http_code' => 400, 'description' => 'The format of the input parameter Name is invalid.'], + ['code' => 'PromptTemplate.NextTokenInvalid', 'message' => 'Input parameter NextToken is invalid.', 'http_code' => 400, 'description' => 'The input nextToken is invalid.'], + ['code' => 'PromptTemplate.TemplateNotFound', 'message' => 'Prompt template not found.', 'http_code' => 404, 'description' => 'Prompt template not found'], + ['code' => 'PromptTemplate.TypeInvalid', 'message' => 'Input parameter type is invalid.', 'http_code' => 400, 'description' => 'input type format is invalid'], + ['code' => 'RagIndex.IdempotentParameterMismatch', 'message' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'http_code' => 400, 'description' => 'This request uses the same client token as the previous but different request. Do not reuse client tokens with different requests unless the request is the same.'], + ['code' => 'Train.Unsupport.Release', 'message' => 'Before releasing the resource group, take the model managed by the resource group offline.', 'http_code' => 403, 'description' => 'Undownload the resource group management model before releasing the resource group.'], + ], + 'changeSet' => [ + [ + 'apis' => [ + ['description' => 'Request parameters changed', 'api' => 'CreateIndex'], + ], + 'createdAt' => '2025-12-03T12:11:04.000Z', + 'description' => '', + ], + [ + 'apis' => [ + ['description' => 'Request parameters changed', 'api' => 'Retrieve'], + ], + 'createdAt' => '2024-07-23T08:07:57.000Z', + 'description' => '', + ], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteCategory'], + ['threshold' => '2000', 'countWindow' => 1, 'regionId' => '*', 'api' => 'Retrieve'], + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddCategory'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteMemory'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetPromptTemplate'], + ['threshold' => '-1', 'countWindow' => 1, 'regionId' => '*'], + ['threshold' => '15', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListIndexDocuments'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListIndices'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListMemories'], + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListFile'], + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddFilesFromAuthorizedOss'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateIndex'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteIndex'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetMemoryNode'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdatePromptTemplate'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListPromptTemplates'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListChunks'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetMemory'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteFile'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeletePromptTemplate'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetIndexJobStatus'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddFile'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteMemoryNode'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateMemory'], + ['threshold' => '1', 'countWindow' => 10, 'regionId' => '*', 'api' => 'ApplyTempStorageLease'], + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateFileTag'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreatePromptTemplate'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListMemoryNodes'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DescribeFile'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ApplyFileUploadLease'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SubmitIndexAddDocumentsJob'], + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListCategory'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateMemoryNode'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateMemoryNode'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteIndexDocument'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateMemory'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SubmitIndexJob'], + ], + ], + 'ram' => [ + 'productCode' => 'SFM', + 'productName' => 'Alibaba Cloud Model Studio', + 'ramCodes' => ['sfm'], + 'ramLevel' => 'OPERATION', + 'ramConditions' => [], + 'ramActions' => [ + [ + 'apiName' => 'AddConnector', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddConnector', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', - ], - [ - 'errorCode' => 'Memory.MemoryNodeNotFound', - 'errorMessage' => 'MemoryNode not found.', + ], + [ + 'apiName' => 'ChangeParseSetting', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:ChangeParseSetting', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', + ], + [ + 'apiName' => 'UpdateConnector', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateConnector', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'UpdateFileTag', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateFileTag', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\"\\n}","type":"json"}]', - ], - 'ListMemoryNodes' => [ - 'summary' => '获取记忆Node列表', - 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes', - 'methods' => [ - 'get', + [ + 'apiName' => 'AddCategory', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddCategory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'DeleteCategory', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteCategory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'UpdatePromptTemplate', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdatePromptTemplate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], - 'consumes' => [ - 'application/json', + [ + 'apiName' => 'DeleteChunk', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteChunk', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'produces' => [ - 'application/json', + [ + 'apiName' => 'GetAlipayTransferStatus', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:GetAlipayTransferStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'operationType' => 'write', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'ListCategory', + 'description' => '', 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', + 'ramAction' => [ + 'action' => 'sfm:ListCategory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'parameters' => [ - [ - 'name' => 'workspaceId', - 'in' => 'path', - 'schema' => [ - 'title' => '业务空间Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'llm-us9hjmt32nysdm5v'."\n", + [ + 'apiName' => 'CreateMemoryNode', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:CreateMemoryNode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'memoryId', - 'in' => 'path', - 'schema' => [ - 'title' => '长期记忆Id', - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3', + ], + [ + 'apiName' => 'ListIndices', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListIndex', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'maxResults', - 'in' => 'query', - 'allowEmptyValue' => true, - 'schema' => [ - 'title' => '最大返回数量', - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'maximum' => '50', - 'minimum' => '1', - 'example' => '20', - 'default' => '10', + ], + [ + 'apiName' => 'UpdateMemory', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateMemory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'nextToken', - 'in' => 'query', - 'allowEmptyValue' => true, - 'schema' => [ - 'title' => '由前一次的请求返回,传入时本次查询结果将基于前一次请求结果进行分页', - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'dc270401186b433f975d7e1faaa34e0e'."\n", + ], + [ + 'apiName' => 'ListChunks', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ChunkList', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'maxResults' => [ - 'title' => '最大请求数量', - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '20', - ], - 'memoryNodes' => [ - 'title' => '长期记忆节点数组', - 'description' => '', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'content' => [ - 'title' => '长期记忆节点内容', - 'description' => '', - 'type' => 'string', - 'example' => '', - ], - 'memoryNodeId' => [ - 'title' => '长期记忆节点Id', - 'description' => '', - 'type' => 'string', - 'example' => '68de06c95368463a8be4a84efc872cc5', - ], - ], - ], - ], - 'nextToken' => [ - 'title' => '用于实现基于令牌的分页', - 'description' => '', - 'type' => 'string', - 'example' => 'dc270401186b433f975d7e1faaa34e0e'."\n", - ], - 'requestId' => [ - 'title' => '请求Id', - 'description' => '', - 'type' => 'string', - 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad'."\n", - ], - 'totalCount' => [ - 'title' => '长期记忆节点总数', - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '100'."\n", - ], - ], + [ + 'apiName' => 'SubmitIndexAddDocumentsJob', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:SubmitIndexAddDocumentsJob', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'Memory.MaxResultsInvalid', - 'errorMessage' => 'Input parameter maxResults is invalid.', + [ + 'apiName' => 'ListIndexFileDetails', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListIndexFileDetails', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], - [ - 'errorCode' => 'Memory.MemoryNodeContentInvalid', - 'errorMessage' => 'Memory node content is invalid.', + ], + ], + [ + 'apiName' => 'UpdateTableFromAuthorizedOss', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateTableFromAuthorizedOss', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], - [ - 'errorCode' => 'Memory.NextTokenInvalid', - 'errorMessage' => 'Input parameter nextToken is invalid.', + ], + ], + [ + 'apiName' => 'ListFile', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - 404 => [ - [ - 'errorCode' => 'Memory.MemoryIdNotFound', - 'errorMessage' => 'Memory Id not exist or is not authorized.', + ], + [ + 'apiName' => 'Retrieve', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:Retrieve', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], - [ - 'errorCode' => 'Memory.MemoryNodeNotFound', - 'errorMessage' => 'MemoryNode not found.', + ], + ], + [ + 'apiName' => 'AddFile', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - 500 => [ - [ - 'errorCode' => 'Memory.InternalError', - 'errorMessage' => 'Memory service inner exception.', + ], + [ + 'apiName' => 'ListMemories', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListMemories', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'SubmitIndexJob', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:SubmitIndexJob', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"maxResults\\": 20,\\n \\"memoryNodes\\": [\\n {\\n \\"content\\": \\"用户喜欢吃西红柿炒鸡蛋\\\\n\\",\\n \\"memoryNodeId\\": \\"68de06c95368463a8be4a84efc872cc5\\"\\n }\\n ],\\n \\"nextToken\\": \\"dc270401186b433f975d7e1faaa34e0e\\\\n\\",\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-114029103cad\\\\n\\",\\n \\"totalCount\\": 100\\n}","type":"json"}]', - ], - 'GetAlipayTransferStatus' => [ - 'summary' => '查询支付宝打赏状态', - 'path' => '/openapi/alipay/transfer/status', - 'methods' => [ - 'get', - 'post', + [ + 'apiName' => 'DeleteFile', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'AddTable', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddTable', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'BatchUpdateFileTag', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:BatchUpdateFileTag', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], - 'consumes' => [ - 'application/json', + [ + 'apiName' => 'GetParseSettings', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetParseSettings', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'produces' => [ - 'application/json', + [ + 'apiName' => 'DeleteMemory', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteMemory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'autoTest' => true, - 'tenantRelevance' => 'tenant', + [ + 'apiName' => 'DeletePromptTemplate', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeletePromptTemplate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'parameters' => [ - [ - 'name' => 'workspace_id', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'llm-cxxxxxxb8d47ks', + [ + 'apiName' => 'ListMemoryNodes', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListMemoryNodes', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'code', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'xxx-xxxx', + ], + [ + 'apiName' => 'CreateIndex', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:CreateIndex', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'requestId' => [ - 'title' => 'Id of the request', - 'description' => '', - 'type' => 'string', - 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n", - ], - 'data' => [ - 'description' => '', - 'type' => 'object', - 'properties' => [ - 'code' => [ - 'description' => '', - 'type' => 'string', - 'example' => '0', - ], - 'walletItemCode' => [ - 'type' => 'string', - ], - 'mainAccountId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '1007576424487905', - ], - 'accountId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '1348393307144609', - ], - 'alipayOrderId' => [ - 'description' => '', - 'type' => 'string', - ], - 'status' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'creator' => [ - 'description' => '', - 'type' => 'string', - ], - 'modifier' => [ - 'description' => '', - 'type' => 'string', - ], - 'alipayOrderDetail' => [ - 'description' => '', - 'type' => 'string', - ], - 'title' => [ - 'description' => '', - 'type' => 'string', - ], - 'qrURL' => [ - 'description' => '', - 'type' => 'string', - ], - 'transAmount' => [ - 'description' => '', - 'type' => 'string', - ], - 'scope' => [ - 'description' => '', - 'type' => 'string', - ], - ], - ], - ], + [ + 'apiName' => 'DeleteConnector', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteConnector', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'UpdateIndex', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateIndex', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\",\\n \\"data\\": {\\n \\"code\\": \\"0\\",\\n \\"walletItemCode\\": \\"xsdfsdf\\",\\n \\"mainAccountId\\": \\"1007576424487905\\",\\n \\"accountId\\": \\"1348393307144609\\",\\n \\"alipayOrderId\\": \\"1234234\\",\\n \\"status\\": 1,\\n \\"creator\\": \\"234234\\",\\n \\"modifier\\": \\"234234\\",\\n \\"alipayOrderDetail\\": \\"{}\\",\\n \\"title\\": \\"test\\",\\n \\"qrURL\\": \\"https://xxx.aliyun.com\\",\\n \\"transAmount\\": \\"0.22\\",\\n \\"scope\\": \\"publish\\"\\n }\\n}","type":"json"}]', - ], - 'GetAlipayUrl' => [ - 'summary' => '支付宝打赏链接', - 'path' => '/openapi/alipay/transfer/url', - 'methods' => [ - 'get', + [ + 'apiName' => 'UpdateMemoryNode', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateMemoryNode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'GetAvailableParserTypes', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetAvailableParserTypes', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'ApplyTempStorageLease', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:ApplyTempStorageLease', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], - 'consumes' => [ - 'application/json', + [ + 'apiName' => 'ListIndexDocuments', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListIndexFiles', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'produces' => [ - 'application/json', + [ + 'apiName' => 'GetConnector', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetConnector', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'DescribeFile', + 'description' => '', 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'autoTest' => true, - 'tenantRelevance' => 'tenant', + 'ramAction' => [ + 'action' => 'sfm:DescribeFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'parameters' => [ - [ - 'name' => 'workspace_id', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, + [ + 'apiName' => 'DeleteMemoryNode', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteMemoryNode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'app_id', - 'in' => 'query', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, + ], + [ + 'apiName' => 'GetMemory', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetMemory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'requestId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n", - ], - 'data' => [ - 'description' => '', - 'type' => 'object', - 'properties' => [ - 'qrUrl' => [ - 'description' => '', - 'type' => 'string', - ], - 'code' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'xxsdfasfw', - ], - ], - ], - ], + [ + 'apiName' => 'CreateMemory', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:CreateMemory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'DeleteIndex', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:DeleteIndex', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\",\\n \\"data\\": {\\n \\"qrUrl\\": \\"https://xxxxxx.aliyun-inc.com\\",\\n \\"code\\": \\"xxsdfasfw\\"\\n }\\n}","type":"json"}]', - ], - 'ApplyTempStorageLease' => [ - 'summary' => 'This interface is intended for pro-code deployment only; other scenarios are currently not supported. It is used to apply for a temporary file upload lease. After obtaining the lease, you must upload the file manually.', - 'path' => '/{WorkspaceId}/datacenter', - 'methods' => [ - 'post', + [ + 'apiName' => 'DeleteIndexDocument', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteIndexDocument', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'GetIndexJobStatus', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetIndexJobStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'AddFilesFromAuthorizedOss', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:AddFilesFromAuthorizedOss', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], - 'consumes' => [ - 'application/json', + [ + 'apiName' => 'GetPromptTemplate', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetPromptTemplate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'produces' => [ - 'application/json', + [ + 'apiName' => 'GetIndexMonitor', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetIndexMonitor', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', + [ + 'apiName' => 'UpdateChunk', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'sfm:UpdateChunk', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'parameters' => [ - [ - 'name' => 'FileName', - 'in' => 'formData', - 'schema' => [ - 'title' => '文件名称,需要包含文件后缀', - 'description' => 'The file name, including the file extension.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'example.txt', + [ + 'apiName' => 'CreatePromptTemplate', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'sfm:CreatePromptTemplate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'SizeInBytes', - 'in' => 'formData', - 'schema' => [ - 'title' => '文件大小(单位字节)', - 'description' => 'The size of the file, in bytes.'."\n", - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'minimum' => '0', - 'example' => '1024', + ], + [ + 'apiName' => 'ListPromptTemplates', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'sfm:ListPromptTemplates', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'WorkspaceId', - 'in' => 'path', - 'schema' => [ - 'title' => '百炼业务空间id', - 'description' => 'The Model Studio workspace ID.'."\n", - 'type' => 'string', - 'required' => true, - 'example' => 'llm-mbhn96xxxx', + ], + [ + 'apiName' => 'GetMemoryNode', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'sfm:GetMemoryNode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response'."\n", - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'title' => '错误状态码。', - 'description' => 'The status code.'."\n", - 'type' => 'string', - 'example' => 'DataCenter.FileTooLarge', - ], - 'Data' => [ - 'title' => '接口业务数据字段。', - 'description' => 'The returned data fields.'."\n", - 'type' => 'object', - 'properties' => [ - 'TempStorageLeaseId' => [ - 'title' => '租约唯一 ID,后续应用内获取上传的文件时,需要使用该参数。', - 'description' => 'Unique lease ID. This parameter is required when retrieving the uploaded file within the application later.'."\n", - 'type' => 'string', - 'example' => '1e6a159107384782be5e45ac4759b247.1719325231035', - ], - 'Param' => [ - 'title' => '用于上传文件的 HTTP 参数。', - 'description' => 'HTTP parameters used for uploading the file.'."\n", - 'type' => 'object', - 'properties' => [ - 'Headers' => [ - 'title' => '需要放到Header中的K-V字段,K和V均为字符串。', - 'description' => 'K-V fields to be included in the Header; both Key and Value are strings.'."\n", - 'type' => 'any', - 'example' => 'Content-Type: application/json', - ], - 'Method' => [ - 'title' => 'HTTP 调用方法,可能值为:'."\n" - .'PUT'."\n" - .'POST', - 'description' => 'HTTP method for the call. Valid values: PUT POST'."\n", - 'type' => 'string', - 'example' => 'PUT', - ], - 'Url' => [ - 'title' => '文件上传的授权 URL 地址。', - 'description' => 'Authorized URL for the file upload.'."\n", - 'type' => 'string', - 'example' => 'https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D', - ], - ], - ], - ], - ], - 'Message' => [ - 'title' => '错误信息。', - 'description' => 'The error message.'."\n", - 'type' => 'string', - 'example' => 'User not authorized to operate on the specified resource', - ], - 'RequestId' => [ - 'title' => '请求 ID。', - 'description' => 'The request ID.'."\n", - 'type' => 'string', - 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', - ], - 'Status' => [ - 'title' => '接口返回的状态码。', - 'description' => 'The HTTP status code returned.'."\n", - 'type' => 'string', - 'example' => '200', - ], - 'Success' => [ - 'title' => '接口调用是否成功', - 'description' => 'Indicates whether the request was successful.'."\n", - 'type' => 'boolean', - 'default' => 'true', - ], - ], + [ + 'apiName' => 'DeleteFiles', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'sfm:DeleteFiles', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'GetAlipayUrl', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:GetAlipayUrl', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'ApplyFileUploadLease', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'sfm:ApplyFileUploadLease', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'SFM', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"DataCenter.FileTooLarge\\",\\n \\"Data\\": {\\n \\"TempStorageLeaseId\\": \\"1e6a159107384782be5e45ac4759b247.1719325231035\\",\\n \\"Param\\": {\\n \\"Headers\\": \\"Content-Type: application/json\\",\\n \\"Method\\": \\"PUT\\",\\n \\"Url\\": \\"https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D\\"\\n }\\n },\\n \\"Message\\": \\"User not authorized to operate on the specified resource\\",\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"Status\\": \\"200\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => 'ApplyTempStorageLease', - 'description' => '1\\. This interface is intended for pro-code deployment only; other scenarios are currently not supported. 2. After obtaining the temporary file upload lease via this interface, upload the file manually.'."\n", - ], - ], - 'endpoints' => [ - [ - 'regionId' => 'cn-beijing', - 'endpoint' => 'bailian.cn-beijing.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-finance-1', - 'endpoint' => 'bailian.cn-shanghai-finance-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-1', - 'endpoint' => 'bailian.ap-southeast-1.aliyuncs.com', ], + 'resourceTypes' => [], ], ]; |
