summaryrefslogtreecommitdiff
path: root/data/en_us/bailian
diff options
context:
space:
mode:
authorZhineng Li <[email protected]>2026-02-13 10:54:11 +0800
committerZhineng Li <[email protected]>2026-02-13 10:54:11 +0800
commit7347bac4ab7e136157fc94777e6cf87ef9e08599 (patch)
tree0dec367dac6e152161a6f7cc0dba6ebbef1f34a2 /data/en_us/bailian
downloadacs-metadata-full-7347bac4ab7e136157fc94777e6cf87ef9e08599.tar.gz
acs-metadata-full-7347bac4ab7e136157fc94777e6cf87ef9e08599.zip
Diffstat (limited to 'data/en_us/bailian')
-rw-r--r--data/en_us/bailian/2023-06-01/api-docs.php1336
-rw-r--r--data/en_us/bailian/2023-12-29/api-docs.php7939
2 files changed, 9275 insertions, 0 deletions
diff --git a/data/en_us/bailian/2023-06-01/api-docs.php b/data/en_us/bailian/2023-06-01/api-docs.php
new file mode 100644
index 0000000..f41be77
--- /dev/null
+++ b/data/en_us/bailian/2023-06-01/api-docs.php
@@ -0,0 +1,1336 @@
+<?php return [
+ 'version' => '1.0',
+ 'info' => [
+ 'style' => 'RPC',
+ 'product' => 'bailian',
+ 'version' => '2023-06-01',
+ ],
+ 'directories' => [
+ [
+ 'id' => 189572,
+ 'title' => 'enterprise knowledge base',
+ 'type' => 'directory',
+ 'children' => [
+ 'SubmitDocumentImportJob',
+ 'DescribeDocumentImportJob',
+ 'ListDocs',
+ 'DescribeDoc',
+ 'DeleteDoc',
+ 'UpdateDocAttribute',
+ 'DeleteDocumentTag',
+ 'UpdateDocumentTag',
+ 'CreateDocumentTag',
+ 'ListDocumentTags',
+ ],
+ ],
+ [
+ 'id' => 187898,
+ 'title' => 'Prompt Engineering',
+ 'type' => 'directory',
+ 'children' => [
+ 'GetPrompt',
+ ],
+ ],
+ 'CreateToken',
+ ],
+ 'components' => [
+ 'schemas' => [],
+ ],
+ 'apis' => [
+ 'SubmitDocumentImportJob' => [
+ 'summary' => '提交文档批量上传任务',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'create',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ [
+ 'name' => 'Docs',
+ 'in' => 'query',
+ 'style' => 'flat',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'Name' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '',
+ ],
+ 'URL' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'http://xxxx.com',
+ ],
+ 'Type' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'RAW',
+ ],
+ 'StoreId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '661dxxxx904f',
+ ],
+ 'TagIds' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '471dxxxx3427',
+ ],
+ 'required' => false,
+ ],
+ 'OwnerId' => [
+ 'type' => 'string',
+ ],
+ ],
+ 'required' => false,
+ ],
+ 'required' => true,
+ ],
+ ],
+ ],
+ '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' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB',
+ ],
+ 'JobId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '20230718xxxx-146c93bf',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"JobId\\": \\"20230718xxxx-146c93bf\\"\\n}","type":"json"}]',
+ ],
+ 'DescribeDocumentImportJob' => [
+ 'summary' => '查询异步上传文档的任务结果',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'JobId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '20230718xxxx-146c93bf',
+ ],
+ ],
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ ],
+ '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' => '35A267BF-xxxx-54DB-8394-AA3B0742D833',
+ ],
+ 'JobId' => [
+ 'title' => 'Id of the request',
+ 'description' => 'Id of the request',
+ 'type' => 'string',
+ 'example' => '20230718xxxx-146c93bf',
+ ],
+ 'Status' => [
+ 'title' => 'Id of the request',
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'Docs' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'Name' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'Status' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'DocId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '8C8FxxxxC3EE',
+ ],
+ 'FailReason' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"JobId\\": \\"20230718xxxx-146c93bf\\",\\n \\"Status\\": \\"成功\\",\\n \\"Docs\\": [\\n {\\n \\"Name\\": \\"文档1\\",\\n \\"Status\\": \\"导入完成\\",\\n \\"DocId\\": \\"8C8FxxxxC3EE\\",\\n \\"FailReason\\": \\"导入索引失败\\"\\n }\\n ]\\n}","type":"json"}]',
+ ],
+ 'ListDocs' => [
+ 'summary' => '分页查询文档',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'list',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ [
+ 'name' => 'PageSize',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'maximum' => '20',
+ 'minimum' => '1',
+ 'example' => '20',
+ 'default' => '20',
+ ],
+ ],
+ [
+ 'name' => 'PageNo',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'minimum' => '1',
+ 'example' => '1',
+ 'default' => '1',
+ ],
+ ],
+ [
+ 'name' => 'Name',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ [
+ 'name' => 'StoreId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '661dxxxx904f',
+ ],
+ ],
+ [
+ 'name' => 'TagIds',
+ 'in' => 'query',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '471dxxxx3427',
+ ],
+ 'required' => false,
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'PageNo' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'example' => '1',
+ ],
+ 'PageSize' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'example' => '20',
+ ],
+ 'Total' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'example' => '30',
+ ],
+ 'Docs' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'DocId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '8C8FxxxxC3EE',
+ ],
+ 'Name' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'Size' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '1.08MB',
+ ],
+ 'Status' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'Type' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'RAW',
+ ],
+ 'OwnerId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '22968',
+ ],
+ 'FailReason' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'Tags' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'TagId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '471dxxxx3427',
+ ],
+ 'TagName' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ ],
+ ],
+ ],
+ 'UploadTime' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '2024-01-12 10:43:02',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"PageNo\\": 1,\\n \\"PageSize\\": 20,\\n \\"Total\\": 30,\\n \\"Docs\\": [\\n {\\n \\"DocId\\": \\"8C8FxxxxC3EE\\",\\n \\"Name\\": \\"文档1\\",\\n \\"Size\\": \\"1.08MB\\",\\n \\"Status\\": \\"导入完成\\",\\n \\"Type\\": \\"RAW\\",\\n \\"OwnerId\\": \\"22968\\",\\n \\"FailReason\\": \\"导入索引失败\\",\\n \\"Tags\\": [\\n {\\n \\"TagId\\": \\"471dxxxx3427\\",\\n \\"TagName\\": \\"标签1\\"\\n }\\n ],\\n \\"UploadTime\\": \\"2024-01-12 10:43:02\\"\\n }\\n ]\\n}","type":"json"}]',
+ ],
+ 'DescribeDoc' => [
+ 'summary' => '根据文档ID获取单个文档信息',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'DocId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '8C8FxxxxC3EE',
+ ],
+ ],
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ ],
+ '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' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB',
+ ],
+ 'DocId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '8C8FxxxxC3EE',
+ ],
+ 'Name' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'Size' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '1.12MB',
+ ],
+ 'Status' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'Type' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'RAW',
+ ],
+ 'OwnerId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '19539',
+ ],
+ 'FailReason' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'UploadTime' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '2024-01-12 10:43:02',
+ ],
+ 'Tags' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'TagId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '471dxxxx3427',
+ ],
+ 'TagName' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"DocId\\": \\"8C8FxxxxC3EE\\",\\n \\"Name\\": \\"文档1\\",\\n \\"Size\\": \\"1.12MB\\",\\n \\"Status\\": \\"导入完成\\",\\n \\"Type\\": \\"RAW\\",\\n \\"OwnerId\\": \\"19539\\",\\n \\"FailReason\\": \\"导入索引失败\\",\\n \\"UploadTime\\": \\"2024-01-12 10:43:02\\",\\n \\"Tags\\": [\\n {\\n \\"TagId\\": \\"471dxxxx3427\\",\\n \\"TagName\\": \\"标签1\\"\\n }\\n ]\\n}","type":"json"}]',
+ ],
+ 'DeleteDoc' => [
+ 'summary' => '删除文档',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'delete',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'DocId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '8C8FxxxxC3EE',
+ ],
+ ],
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'DocId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '8C8FxxxxC3EE',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"DocId\\": \\"8C8FxxxxC3EE\\"\\n}","type":"json"}]',
+ ],
+ 'UpdateDocAttribute' => [
+ 'summary' => '根据文档ID更新文档信息',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'update',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ [
+ 'name' => 'DocId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '8C8FxxxxC3EE',
+ ],
+ ],
+ [
+ 'name' => 'Name',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ [
+ 'name' => 'DelAllTags',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'boolean',
+ 'required' => false,
+ 'example' => 'false',
+ 'default' => 'false',
+ ],
+ ],
+ [
+ 'name' => 'TagIds',
+ 'in' => 'query',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '471dxxxx3427',
+ ],
+ 'required' => false,
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'DocId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '8C8FxxxxC3EE',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"DocId\\": \\"8C8FxxxxC3EE\\"\\n}","type":"json"}]',
+ ],
+ 'DeleteDocumentTag' => [
+ 'summary' => '删除文档标签',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'delete',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'TagId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '471dxxxx3427',
+ ],
+ ],
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'TagId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '471dxxxx3427',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"17204B98-xxxx-4F9A-8464-2446A84821CA\\",\\n \\"TagId\\": \\"471dxxxx3427\\"\\n}","type":"json"}]',
+ ],
+ 'UpdateDocumentTag' => [
+ 'summary' => '修改文档标签',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'update',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ [
+ 'name' => 'TagId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '471dxxxx3427',
+ ],
+ ],
+ [
+ 'name' => 'Name',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '',
+ ],
+ ],
+ ],
+ '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' => '1C139002-xxxx-584C-A755-4B8B9FA080BE',
+ ],
+ 'TagId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '471dxxxx3427',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"1C139002-xxxx-584C-A755-4B8B9FA080BE\\",\\n \\"TagId\\": \\"471dxxxx3427\\"\\n}","type":"json"}]',
+ ],
+ 'CreateDocumentTag' => [
+ 'summary' => '创建文档标签',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'create',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ [
+ 'name' => 'Name',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '',
+ ],
+ ],
+ ],
+ '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' => '35A267BF-xxxx-54DB-8394-AA3B0742D833',
+ ],
+ 'TagId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '471dxxxx3427',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35A267BF-xxxx-54DB-8394-AA3B0742D833\\",\\n \\"TagId\\": \\"471dxxxx3427\\"\\n}","type":"json"}]',
+ ],
+ 'ListDocumentTags' => [
+ 'summary' => '分页查询企业管理标签',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'list',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '2818xxxx_p_efm',
+ ],
+ ],
+ [
+ 'name' => 'TagId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '471dxxxx3427',
+ ],
+ ],
+ [
+ 'name' => 'Name',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ [
+ 'name' => 'PageSize',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'minimum' => '1',
+ 'example' => '20',
+ 'default' => '20',
+ ],
+ ],
+ [
+ 'name' => 'PageNo',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'minimum' => '1',
+ 'example' => '1',
+ 'default' => '1',
+ ],
+ ],
+ ],
+ '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' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB',
+ ],
+ 'PageNo' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'example' => '1',
+ ],
+ 'PageSize' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'example' => '20',
+ ],
+ 'Total' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'example' => '30',
+ ],
+ 'TagList' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'Name' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'TagId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '471dxxxx3427',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"778C0B3B-xxxx-5FC1-A947-36EDD13606AB\\",\\n \\"PageNo\\": 1,\\n \\"PageSize\\": 20,\\n \\"Total\\": 30,\\n \\"TagList\\": [\\n {\\n \\"Name\\": \\"标签1\\",\\n \\"TagId\\": \\"471dxxxx3427\\"\\n }\\n ]\\n}","type":"json"}]',
+ ],
+ 'GetPrompt' => [
+ 'summary' => 'prompt模板调用接口',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'http',
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'c160c841c8e54295bf2f441432785944_p_efm',
+ ],
+ ],
+ [
+ 'name' => 'PromptId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'marketCopy',
+ ],
+ ],
+ [
+ 'name' => 'Vars',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ ],
+ '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' => '1C139002-0EC5-584C-A755-4B8B9FA080BE',
+ ],
+ 'Success' => [
+ 'description' => '',
+ 'type' => 'boolean',
+ 'example' => 'True',
+ ],
+ 'Code' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '100004',
+ ],
+ 'Message' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'HttpStatusCode' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '200',
+ ],
+ 'Data' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'PromptId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'marketCopy',
+ ],
+ 'PromptContent' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"1C139002-0EC5-584C-A755-4B8B9FA080BE\\",\\n \\"Success\\": true,\\n \\"Code\\": \\"100004\\",\\n \\"Message\\": \\"参数缺失\\",\\n \\"HttpStatusCode\\": \\"200\\",\\n \\"Data\\": {\\n \\"PromptId\\": \\"cfec40c311f14f3e976403059d8f0116\\",\\n \\"PromptContent\\": \\"你是一名在小红书平台具有丰富经验的专业爆款营销文案策划人,现在请以“蓝牙智能耳机”为核心主题,撰写一段极具吸引力的小红书营销内容。要求内容包括:一个引人入胜且符合SEO优化原则的标题,以及一段详细且富有情感煽动力的正文。在正文中,请至少插入5个不同的emoji表情,以增加内容的互动性和视觉吸引力。此外,请根据该主题,设计并提供最多5个热门推荐标签,这些标签需具有高度概括主题和吸引目标用户群的特点。\\"\\n }\\n}","type":"json"}]',
+ ],
+ 'CreateToken' => [
+ 'summary' => '创建临时token',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'none',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'AgentKey',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'ac627989eb4f8a98ed05fd098beee5_p_efm',
+ ],
+ ],
+ ],
+ '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' => '778C0B3B-03C1-5FC1-A947-36EDD13606AB',
+ ],
+ 'Success' => [
+ 'description' => '',
+ 'type' => 'boolean',
+ 'example' => 'True',
+ ],
+ 'Code' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'Forbidden',
+ ],
+ 'Message' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ 'HttpStatusCode' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '200',
+ ],
+ 'Data' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'Token' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '89158587dfb7d85a335f98de4966d840',
+ ],
+ 'ExpiredTime' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int64',
+ 'example' => '1664177985651',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"778C0B3B-03C1-5FC1-A947-36EDD13606AB\\",\\n \\"Success\\": true,\\n \\"Code\\": \\"Forbidden\\",\\n \\"Message\\": \\"错误信息\\",\\n \\"HttpStatusCode\\": \\"200\\",\\n \\"Data\\": {\\n \\"Token\\": \\"89158587dfb7d85a335f98de4966d840\\",\\n \\"ExpiredTime\\": 1664177985651\\n }\\n}","type":"json"}]',
+ ],
+ ],
+ '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',
+ ],
+ ],
+];
diff --git a/data/en_us/bailian/2023-12-29/api-docs.php b/data/en_us/bailian/2023-12-29/api-docs.php
new file mode 100644
index 0000000..8f66272
--- /dev/null
+++ b/data/en_us/bailian/2023-12-29/api-docs.php
@@ -0,0 +1,7939 @@
+<?php return [
+ 'version' => '1.0',
+ 'info' => [
+ 'style' => 'ROA',
+ 'product' => 'bailian',
+ 'version' => '2023-12-29',
+ ],
+ 'directories' => [
+ [
+ 'id' => 260944,
+ 'title' => 'Application data',
+ 'type' => 'directory',
+ 'children' => [
+ 'ListFile',
+ 'DeleteCategory',
+ 'ListCategory',
+ 'AddCategory',
+ 'AddFile',
+ 'AddFilesFromAuthorizedOss',
+ 'ApplyFileUploadLease',
+ 'DeleteFile',
+ 'DescribeFile',
+ 'UpdateFileTag',
+ 'GetParseSettings',
+ 'GetAvailableParserTypes',
+ 'ChangeParseSetting',
+ ],
+ ],
+ [
+ 'id' => 260955,
+ 'title' => 'Knowledge base',
+ 'type' => 'directory',
+ 'children' => [
+ 'CreateIndex',
+ 'GetIndexJobStatus',
+ 'SubmitIndexJob',
+ 'SubmitIndexAddDocumentsJob',
+ 'Retrieve',
+ 'ListIndexDocuments',
+ 'ListIndexFileDetails',
+ 'UpdateIndex',
+ 'DeleteIndexDocument',
+ 'ListIndices',
+ 'DeleteIndex',
+ 'ListChunks',
+ 'UpdateChunk',
+ 'DeleteChunk',
+ 'GetIndexMonitor',
+ ],
+ ],
+ [
+ 'id' => 260969,
+ 'title' => 'Prompt engineering',
+ 'type' => 'directory',
+ 'children' => [
+ 'CreatePromptTemplate',
+ 'GetPromptTemplate',
+ 'UpdatePromptTemplate',
+ 'DeletePromptTemplate',
+ 'ListPromptTemplates',
+ 'ListPromptTemplates',
+ ],
+ ],
+ [
+ 'id' => 260986,
+ 'title' => 'Others',
+ 'type' => 'directory',
+ 'children' => [
+ [
+ 'id' => 260975,
+ 'title' => 'Long term memory',
+ 'type' => 'directory',
+ 'children' => [
+ 'CreateMemory',
+ 'GetMemory',
+ 'UpdateMemory',
+ 'DeleteMemory',
+ 'ListMemories',
+ 'CreateMemoryNode',
+ 'GetMemoryNode',
+ 'UpdateMemoryNode',
+ 'DeleteMemoryNode',
+ 'ListMemoryNodes',
+ ],
+ ],
+ 'GetAlipayTransferStatus',
+ 'GetAlipayUrl',
+ 'ApplyTempStorageLease',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ '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 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',
+ ],
+ ],
+ [
+ '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' => 'NextToken',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'AAAAAdH70eOCSCKtacdomNzak4U=',
+ ],
+ ],
+ [
+ 'name' => 'MaxResults',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'example' => '20',
+ ],
+ ],
+ [
+ 'name' => 'FileName',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'success',
+ ],
+ 'Data' => [
+ 'description' => 'The returned data.'."\n",
+ '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',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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"
+ ."\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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ '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' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'ws_3Nt27MYcoK191ISp',
+ ],
+ ],
+ [
+ 'name' => 'CategoryType',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'UNSTRUCTURED',
+ 'enum' => [
+ 'UNSTRUCTURED',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'ParentCategoryId',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX',
+ ],
+ ],
+ [
+ 'name' => 'NextToken',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'AAAAAdH70eOCSCKtacdomNzak4U=',
+ ],
+ ],
+ [
+ 'name' => 'MaxResults',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'maximum' => '500',
+ 'minimum' => '0',
+ 'example' => '20',
+ ],
+ ],
+ [
+ 'name' => 'CategoryName',
+ 'in' => 'formData',
+ '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' => '',
+ 'type' => 'string',
+ 'example' => '200',
+ ],
+ 'Success' => [
+ 'description' => '',
+ 'type' => 'boolean',
+ 'example' => 'true',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ 'required' => false,
+ 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX',
+ ],
+ ],
+ ],
+ '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' => [
+ 'CategoryId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3XXXXXXXX',
+ ],
+ 'CategoryName' => [
+ 'description' => '',
+ 'type' => 'string',
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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"
+ ."\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",
+ ],
+ '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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ '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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ '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",
+ '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",
+ ],
+ 'required' => false,
+ 'maxItems' => 32,
+ 'minItems' => 1,
+ ],
+ ],
+ [
+ 'name' => 'CategoryType',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => 'The type of the category. Valid values:'."\n"
+ .'- UNSTRUCTURED'."\n"
+ .'- SESSION_FILE',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'UNSTRUCTURED',
+ 'default' => 'UNSTRUCTURED',
+ 'enum' => [
+ 'UNSTRUCTURED',
+ 'SESSION_FILE',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'OriginalFileUrl',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'https://thisistest.com/abc.pdf',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => 'The status code.'."\n",
+ 'type' => 'string',
+ 'example' => 'DataCenter.FileTooLarge',
+ ],
+ 'Data' => [
+ 'description' => 'The returned data fields.'."\n",
+ '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',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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"
+ ."\n"
+ .'> After you call this operation, the used lease ID expires immediately. Do not use the same lease ID to submit new requests.'."\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.',
+ ],
+ 'AddFilesFromAuthorizedOss' => [
+ 'summary' => '将已授权OSS Bucket中的文件添加到百炼应用数据',
+ 'path' => '/{WorkspaceId}/datacenter/file/fromoss',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'CategoryId',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx',
+ ],
+ ],
+ [
+ 'name' => 'CategoryType',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'enumValueTitles' => [
+ 'UNSTRUCTURED' => 'UNSTRUCTURED',
+ ],
+ 'example' => 'UNSTRUCTURED',
+ 'enum' => [
+ 'UNSTRUCTURED',
+ 'SESSION_FILE',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'OssRegionId',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'cn-beijing',
+ ],
+ ],
+ [
+ 'name' => 'OssBucketName',
+ 'in' => 'formData',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'bucketNamexxxxx',
+ ],
+ ],
+ [
+ 'name' => 'FileDetails',
+ 'in' => 'formData',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'FileName' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'this_is_temp_xxxx.pdf',
+ 'maxLength' => 500,
+ 'minLength' => 1,
+ ],
+ 'OssKey' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'root/path/this_is_temp_xxxx.pdf',
+ 'maxLength' => 256,
+ 'minLength' => 1,
+ ],
+ ],
+ 'required' => true,
+ ],
+ 'required' => true,
+ 'maxItems' => 10,
+ 'minItems' => 1,
+ ],
+ ],
+ [
+ 'name' => 'Tags',
+ 'in' => 'formData',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ 'name' => 'OverWriteFileByOssKey',
+ 'in' => 'formData',
+ 'schema' => [
+ 'title' => '是否按照osossKey覆盖类目中的相同文件',
+ 'type' => 'boolean',
+ ],
+ ],
+ ],
+ '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' => [
+ 'AddFileResultList' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ '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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'none',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'CategoryId',
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'FileName',
+ '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' => '',
+ ],
+ ],
+ [
+ 'name' => 'Md5',
+ '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,
+ ],
+ ],
+ [
+ 'name' => 'SizeInBytes',
+ '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',
+ ],
+ ],
+ [
+ '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',
+ 'in' => 'formData',
+ 'schema' => [
+ 'type' => 'string',
+ 'default' => 'UNSTRUCTURED',
+ 'enum' => [
+ 'UNSTRUCTURED',
+ 'SESSION_FILE',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'UseInternalEndpoint',
+ 'in' => 'formData',
+ 'schema' => [
+ 'type' => 'boolean',
+ 'default' => 'false',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => 'The status code.'."\n",
+ 'type' => 'string',
+ 'example' => 'DataCenter.FileTooLarge',
+ ],
+ 'Data' => [
+ 'description' => 'The returned data fields.'."\n",
+ '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',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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' => '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.',
+ ],
+ '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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'delete',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'FileId',
+ 'in' => 'path',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX',
+ ],
+ ],
+ [
+ 'name' => 'WorkspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'ws_3Nt27MYcoK191ISp',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'InvalidParameter',
+ ],
+ 'Data' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'FileId' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_XXXXXXXX',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ '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',
+ ],
+ '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 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' => 'FileId',
+ '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',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => 'The status code.'."\n",
+ 'type' => 'string',
+ 'example' => 'Success',
+ ],
+ 'Data' => [
+ '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",
+ ],
+ ],
+ 'ParseResultDownloadUrl' => [
+ 'type' => 'string',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ 403 => [
+ 'schema' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'type' => 'string',
+ ],
+ 'HttpStatusCode' => [
+ 'type' => 'integer',
+ 'format' => 'int32',
+ ],
+ 'Message' => [
+ 'type' => 'string',
+ ],
+ 'Success' => [
+ 'type' => 'boolean',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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.',
+ ],
+ 'UpdateFileTag' => [
+ 'summary' => 'Updates the tags of a specified document.',
+ 'path' => '/{WorkspaceId}/datacenter/file/{FileId}',
+ 'methods' => [
+ 'put',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'update',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeNodes' => [
+ 'FEATUREsfm8JET0F',
+ ],
+ 'autoTest' => true,
+ 'tenantRelevance' => 'tenant',
+ ],
+ 'parameters' => [
+ [
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'Tags',
+ 'in' => 'formData',
+ 'style' => 'json',
+ 'schema' => [
+ 'title' => '文档标签,单个文档最多支持添加10个标签',
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ 'required' => true,
+ 'maxItems' => 32,
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'CategoryId',
+ 'in' => 'query',
+ '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',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ '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",
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ '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',
+ ],
+ '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.',
+ 'path' => '/{WorkspaceId}/datacenter/parser/settings',
+ 'methods' => [
+ 'put',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ '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',
+ ],
+ ],
+ [
+ '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,
+ ],
+ ],
+ [
+ 'name' => 'FileType',
+ 'in' => 'formData',
+ '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',
+ ],
+ ],
+ ],
+ [
+ '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",
+ 'type' => 'string',
+ 'required' => true,
+ 'enumValueTitles' => [
+ 'DOCMIND' => '',
+ 'DOCMIND_LLM_VERSION' => '',
+ 'DOCMIND_DIGITAL' => '',
+ 'DASH_QWEN_VL_PARSER' => '',
+ ],
+ 'example' => 'DOCMIND',
+ 'enum' => [
+ 'DOCMIND',
+ 'DOCMIND_DIGITAL',
+ 'DOCMIND_LLM_VERSION',
+ 'DASH_SENSEVOICE',
+ 'RAG_VIDEO_PARSER',
+ 'DASH_QWEN_VL_PARSER',
+ 'BAILIAN_TXT_PARSER',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'ParserConfig',
+ 'in' => 'formData',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => 'The parser configuration. Currently, this is available only for Qwen VL parsing.'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'modelName' => [
+ 'description' => 'The model name.'."\n"
+ ."\n"
+ .'Valid values:'."\n"
+ ."\n"
+ .'* qwen-vl-max'."\n"
+ .'* qwen-vl-plus'."\n",
+ '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',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ 'required' => false,
+ ],
+ ],
+ ],
+ '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' => '7BA8ADD9-53D6-53F0-918F-A1E776AD230E',
+ ],
+ 'Data' => [
+ 'description' => 'The returned data fields.'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'ChangeResult' => [
+ 'description' => 'The result of the modification.'."\n",
+ 'type' => 'boolean',
+ 'example' => 'true',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ '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.',
+ 'path' => '/{WorkspaceId}/index/create',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'create',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ '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',
+ ],
+ ],
+ [
+ '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' => '',
+ ],
+ ],
+ [
+ 'name' => 'StructureType',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => 'The type of the knowledge base. Valid values:'."\n"
+ ."\n"
+ .'* unstructured: The document search type.'."\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",
+ 'type' => 'string',
+ 'required' => true,
+ 'enumValueTitles' => [
+ 'unstructured' => 'unstructured',
+ ],
+ 'example' => 'structured',
+ ],
+ ],
+ [
+ 'name' => 'EmbeddingModelName',
+ '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"
+ ."\n"
+ .'* text-embedding-v2'."\n"
+ ."\n"
+ .'The default value is null, which means using text-embedding-v2.'."\n",
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => [],
+ 'example' => 'text-embedding-v2',
+ ],
+ ],
+ [
+ 'name' => 'RerankModelName',
+ '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"
+ ."\n"
+ .'* gte-rerank-hybrid'."\n"
+ .'* gte-rerank'."\n"
+ ."\n"
+ .'The default value is empty, which means using gte-rerank-hybrid.'."\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",
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'gte-rerank-hybrid' => '',
+ 'gte-rerank' => 'gte-rerank',
+ ],
+ 'example' => 'gte-rerank-hybrid',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'Separator',
+ 'in' => 'query',
+ 'allowEmptyValue' => true,
+ 'schema' => [
+ 'description' => '> This parameter is not available. Do not specify this parameter.'."\n",
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => ',',
+ ],
+ ],
+ [
+ '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"
+ ."\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"
+ ."\n"
+ .'> If set to DATA_CENTER_CATEGORY, `CategoryIds` is required. If set to DATA_CENTER_FILE, `DocumentIds` is required.'."\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",
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'DATA_CENTER_CATEGORY' => '',
+ 'DATA_CENTER_FILE' => '',
+ ],
+ 'example' => 'DATA_CENTER_FILE',
+ ],
+ ],
+ [
+ 'name' => 'DocumentIds',
+ 'in' => 'query',
+ '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",
+ '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',
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ 'name' => 'CategoryIds',
+ 'in' => 'query',
+ '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",
+ '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',
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ 'name' => 'TableIds',
+ 'in' => 'query',
+ 'allowEmptyValue' => false,
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => '> This parameter is not available. Do not specify this parameter.'."\n",
+ '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,
+ ],
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ 'name' => 'SinkType',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => 'The vector storage type of the knowledge base. For more information, see [Knowledge base](~~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"
+ ."\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",
+ 'type' => 'string',
+ 'required' => true,
+ 'enumValueTitles' => [
+ 'BUILT_IN' => 'BUILT_IN',
+ 'ADB' => 'ADB',
+ ],
+ 'example' => 'DEFAULT',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'Columns',
+ 'in' => 'query',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => '> This parameter is not available. Do not specify this parameter.'."\n",
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '> This parameter is not available. Do not specify this parameter.'."\n",
+ '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',
+ ],
+ 'Type' => [
+ 'description' => '> This parameter is not available. Do not specify this parameter.'."\n",
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => [],
+ 'example' => 'string',
+ ],
+ ],
+ 'required' => false,
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ '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' => '',
+ ],
+ ],
+ [
+ '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",
+ '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',
+ ],
+ 'Type' => [
+ 'description' => 'The type of the metadata field. Valid values:'."\n"
+ ."\n"
+ .'* constant'."\n"
+ .'* variable'."\n"
+ .'* custom_prompt'."\n"
+ .'* regular'."\n"
+ .'* keywords'."\n"
+ ."\n"
+ .'Enumerated value:'."\n"
+ ."\n"
+ .'* constant: constant extraction.'."\n"
+ .'* keywords: keyword extraction.'."\n"
+ .'* custom_prompt: LLM.'."\n"
+ .'* variable: variable extraction.'."\n"
+ .'* regular: regular expression.'."\n",
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'constant' => '',
+ 'keywords' => '',
+ 'custom_prompt' => '',
+ 'variable' => '',
+ 'regular' => '',
+ ],
+ 'example' => 'constant',
+ ],
+ '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",
+ ],
+ '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"
+ ."\n"
+ .'* true'."\n"
+ .'* false'."\n"
+ ."\n"
+ .'Default value: false.'."\n",
+ 'type' => 'boolean',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'true' => '',
+ 'false' => '',
+ ],
+ 'example' => 'false',
+ ],
+ '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"
+ ."\n"
+ .'* true'."\n"
+ .'* false'."\n"
+ ."\n"
+ .'Default value: false.'."\n",
+ 'type' => 'boolean',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'true' => '',
+ 'false' => '',
+ ],
+ 'example' => 'false',
+ ],
+ ],
+ 'required' => false,
+ 'description' => '',
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ '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"
+ ."\n"
+ .'> Enable this feature only when all imported files are in .xlsx or .xls format and contain headers. Otherwise, leave it disabled.'."\n"
+ ."\n"
+ .'Valid values:'."\n"
+ ."\n"
+ .'* true'."\n"
+ .'* false'."\n"
+ ."\n"
+ .'Default value: false.'."\n",
+ 'type' => 'boolean',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'true' => '',
+ 'false' => '',
+ ],
+ 'example' => 'false',
+ ],
+ ],
+ [
+ 'name' => 'chunkMode',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '> This parameter is not available. Do not specify this parameter.'."\n",
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'regex' => '',
+ 'length' => '',
+ 'h1' => '',
+ 'h2' => '',
+ 'page' => '',
+ ],
+ 'example' => 'regex',
+ ],
+ ],
+ [
+ 'name' => 'EnableRewrite',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => 'Whether to enable rewriting for multi-turn conversations. Valid values:'."\n"
+ ."\n"
+ .'* true'."\n"
+ .'* false'."\n"
+ ."\n"
+ .'Default value: true.'."\n",
+ 'type' => 'boolean',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'true' => '',
+ 'false' => '',
+ ],
+ 'example' => 'true',
+ ],
+ ],
+ [
+ 'name' => 'CreateIndexType',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '> This parameter is not available. Do not specify this parameter.'."\n",
+ 'type' => 'string',
+ 'required' => false,
+ ],
+ ],
+ [
+ 'name' => 'pipelineCommercialType',
+ 'in' => 'query',
+ 'allowEmptyValue' => false,
+ 'schema' => [
+ 'type' => 'string',
+ 'example' => 'standard',
+ 'default' => 'standard',
+ 'enum' => [
+ 'enterprise',
+ 'standard',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'pipelineCommercialCu',
+ 'in' => 'query',
+ 'allowEmptyValue' => false,
+ 'schema' => [
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'maximum' => '200',
+ 'minimum' => '1',
+ 'example' => '1',
+ 'default' => '1',
+ ],
+ ],
+ [
+ 'name' => 'pipelineRetrieveRateLimitStrategy',
+ 'in' => 'query',
+ 'allowEmptyValue' => false,
+ 'schema' => [
+ 'type' => 'string',
+ 'example' => 'downgrade',
+ 'default' => 'downgrade',
+ 'enum' => [
+ 'downgrade',
+ ],
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => 'The error code.'."\n",
+ 'type' => 'string',
+ 'example' => 'Forbidden',
+ ],
+ 'Data' => [
+ 'description' => 'The data returned if the request is successful.'."\n",
+ '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',
+ ],
+ ],
+ ],
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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"
+ ."\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: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"
+ ."\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"
+ .'* **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"
+ ."\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"
+ ."\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',
+ ],
+ 'security' => [
+ [
+ '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' => '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',
+ ],
+ ],
+ [
+ 'name' => 'JobId',
+ 'in' => 'query',
+ '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',
+ ],
+ ],
+ [
+ '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' => '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',
+ ],
+ ],
+ [
+ 'name' => 'pageSize',
+ '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',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ '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 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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => 'HTTP status code'."\n",
+ 'type' => 'string',
+ 'example' => 'InvalidParameter',
+ ],
+ 'Data' => [
+ 'description' => 'The data returned.'."\n",
+ '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',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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 \\"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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'create',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeNodes' => [
+ 'FEATUREsfm4VA8MJ',
+ ],
+ ],
+ '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_3Nt27MYcoK191ISp',
+ ],
+ ],
+ [
+ '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' => 'SourceType',
+ 'in' => 'query',
+ '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' => '',
+ ],
+ 'example' => 'DATA_CENTER_FILE',
+ ],
+ ],
+ [
+ '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',
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ '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,
+ ],
+ ],
+ [
+ 'name' => 'ChunkMode',
+ 'in' => 'query',
+ 'schema' => [
+ 'type' => 'string',
+ ],
+ ],
+ [
+ 'name' => 'Separator',
+ 'in' => 'query',
+ 'schema' => [
+ 'type' => 'string',
+ ],
+ ],
+ [
+ 'name' => 'ChunkSize',
+ 'in' => 'query',
+ 'schema' => [
+ 'type' => 'integer',
+ 'format' => 'int32',
+ ],
+ ],
+ [
+ 'name' => 'OverlapSize',
+ 'in' => 'query',
+ 'schema' => [
+ 'type' => 'integer',
+ 'format' => 'int32',
+ ],
+ ],
+ [
+ 'name' => 'EnableHeaders',
+ 'in' => 'query',
+ 'schema' => [
+ 'type' => 'boolean',
+ ],
+ ],
+ ],
+ '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' => '778C0B3B-03C1-5FC1-A947-36EDD13606AB',
+ ],
+ 'Data' => [
+ 'description' => 'The data returned.'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Id' => [
+ 'description' => 'The primary key ID of the task, `JobId`.'."\n",
+ 'type' => 'string',
+ 'example' => '42687eb254a34802bed398357f5498ae',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ '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.',
+ ],
+ 'Retrieve' => [
+ 'summary' => 'Queries information from a specified knowledge base.',
+ 'path' => '/{WorkspaceId}/index/retrieve',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'none',
+ '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' => 'DenseSimilarityTopK',
+ 'in' => 'query',
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'EnableReranking',
+ 'in' => 'query',
+ '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' => '',
+ ],
+ 'example' => 'true',
+ ],
+ ],
+ [
+ 'name' => 'EnableRewrite',
+ 'in' => 'query',
+ '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' => '',
+ ],
+ 'example' => 'false',
+ ],
+ ],
+ [
+ '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,
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'RerankTopN',
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'Rewrite',
+ 'in' => 'query',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => 'Conversation rewriting configurations.'."\n",
+ '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' => '',
+ ],
+ 'example' => 'conv-rewrite-qwen-1.8b',
+ ],
+ ],
+ 'required' => false,
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ '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' => '5pwe0m2g6t',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'SearchFilters',
+ 'in' => 'query',
+ 'style' => 'json',
+ '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",
+ ],
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ 'name' => 'Images',
+ 'in' => 'query',
+ 'allowEmptyValue' => true,
+ 'style' => 'simple',
+ 'schema' => [
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'string',
+ 'required' => false,
+ ],
+ 'required' => false,
+ ],
+ ],
+ [
+ 'name' => 'QueryHistory',
+ 'in' => 'query',
+ 'allowEmptyValue' => false,
+ 'style' => 'json',
+ 'schema' => [
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'role' => [
+ 'type' => 'string',
+ ],
+ 'content' => [
+ 'type' => 'string',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => 'HTTP status code'."\n",
+ 'type' => 'string',
+ 'example' => 'Index.InvalidParameter',
+ ],
+ 'Data' => [
+ 'description' => 'The returned data.'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Nodes' => [
+ 'description' => 'The list of queried chunks.'."\n",
+ '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' => '',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ '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"
+ ."\n"
+ .'* The filter conditions support sub groups. By default, the default semantics between sub groups is AND and cannot be modified. '."\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',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/x-www-form-urlencoded',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'list',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ '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' => 'DocumentStatus',
+ 'in' => 'query',
+ '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' => '',
+ ],
+ 'example' => 'FINISH',
+ ],
+ ],
+ [
+ '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' => '',
+ ],
+ ],
+ [
+ 'name' => 'EnableNameLike',
+ 'in' => 'query',
+ 'schema' => [
+ 'type' => 'string',
+ ],
+ ],
+ [
+ 'name' => 'PageNumber',
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'PageSize',
+ 'in' => 'query',
+ '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',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ ],
+ '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' => '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',
+ ],
+ 'Data' => [
+ 'description' => 'The returned data.'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Documents' => [
+ 'description' => 'The list of documents in the knowledge base.'."\n",
+ 'type' => 'array',
+ 'items' => [
+ 'description' => 'The document 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',
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ 'Status' => [
+ 'description' => 'The status code.'."\n",
+ 'type' => 'string',
+ 'example' => '200',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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' => '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",
+ ],
+ 'ListIndexFileDetails' => [
+ 'summary' => '查询Index文件详情',
+ 'path' => '/{WorkspaceId}/index/list_index_file_detail',
+ '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' => 'IndexId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '79c0alxxxx',
+ ],
+ ],
+ [
+ 'name' => 'DocumentStatus',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'INSERT_ERROR' => 'INSERT_ERROR',
+ 'RUNNING' => 'RUNNING',
+ 'DELETED' => 'DELETED',
+ 'FINISH' => '',
+ ],
+ 'example' => 'FINISH',
+ ],
+ ],
+ [
+ 'name' => 'DocumentName',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ [
+ 'name' => 'PageNumber',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'example' => '1',
+ ],
+ ],
+ [
+ 'name' => 'PageSize',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'example' => '10',
+ ],
+ ],
+ [
+ 'name' => 'WorkspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-3z7uw7fwz0vexxxx',
+ ],
+ ],
+ [
+ 'name' => 'EnableNameLike',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => [
+ 'true' => 'true',
+ 'false' => '',
+ ],
+ 'example' => 'false',
+ ],
+ ],
+ ],
+ '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' => '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',
+ ],
+ 'Data' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'Documents' => [
+ 'description' => '',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '',
+ 'type' => 'object',
+ 'properties' => [
+ 'Status' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'RUNNING',
+ ],
+ '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",
+ ],
+ ],
+ ],
+ ],
+ 'IndexId' => [
+ 'description' => '',
+ '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',
+ ],
+ ],
+ ],
+ 'Status' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => 'RUNNING',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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' => 'ListIndexFileDetails',
+ ],
+ 'UpdateIndex' => [
+ 'summary' => '更新索引任务',
+ 'path' => '/{WorkspaceId}/index/update',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'update',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'WorkspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-3shx2gu255oqxxxx',
+ ],
+ ],
+ [
+ 'name' => 'Id',
+ 'in' => 'query',
+ 'allowEmptyValue' => false,
+ 'schema' => [
+ 'title' => '幂等参数',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '79c0alxxxx',
+ ],
+ ],
+ [
+ 'name' => 'Name',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ [
+ 'name' => 'Description',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ [
+ 'name' => 'RerankMinScore',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '0.01',
+ ],
+ ],
+ [
+ 'name' => 'DenseSimilarityTopK',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'maximum' => '100',
+ 'minimum' => '0',
+ 'example' => '100',
+ 'default' => '100',
+ ],
+ ],
+ [
+ 'name' => 'SparseSimilarityTopK',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'maximum' => '100',
+ 'minimum' => '0',
+ 'example' => '100',
+ 'default' => '100',
+ ],
+ ],
+ [
+ 'name' => 'PipelineCommercialType',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'standard',
+ 'enum' => [
+ 'standard',
+ 'enterprise',
+ ],
+ ],
+ ],
+ [
+ 'name' => 'PipelineCommercialCu',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'maximum' => '200',
+ 'minimum' => '1',
+ 'example' => '3',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'delete',
+ '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_3Nt27MYcoK191ISp',
+ ],
+ ],
+ [
+ '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' => '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,
+ ],
+ ],
+ ],
+ '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-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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'list',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeNodes' => [
+ 'FEATUREsfm4VA8MJ',
+ ],
+ ],
+ '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' => 'PageSize',
+ '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',
+ ],
+ ],
+ ],
+ '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-xxxx-4F9A-8464-2446A84821CA',
+ ],
+ '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",
+ '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' => [
+ 'type' => 'string',
+ ],
+ 'EnableRewrite' => [
+ 'type' => 'boolean',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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' => 'ListIndices',
+ 'description' => 'This interface is idempotent.'."\n",
+ ],
+ 'DeleteIndex' => [
+ 'summary' => 'Deletes a specified knowledge base permanently.',
+ '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' => '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' => 'f89ie0fj5a',
+ ],
+ ],
+ [
+ 'name' => 'WorkspaceId',
+ 'in' => 'path',
+ '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",
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'ws_3AXoiweeTyTd03IN',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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' => '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.',
+ 'path' => '/{WorkspaceId}/index/list_chunks',
+ '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 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',
+ ],
+ ],
+ [
+ 'name' => 'body',
+ 'in' => 'body',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => 'The body of the request parameters.'."\n",
+ '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",
+ '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',
+ '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',
+ ],
+ ],
+ 'required' => false,
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Code' => [
+ 'description' => 'The error code.'."\n",
+ 'type' => 'string',
+ 'example' => 'Index.InvalidParameter',
+ ],
+ 'Data' => [
+ 'description' => 'The data returned.'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'Nodes' => [
+ 'description' => 'The list of chunks.'."\n",
+ '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.'."\n",
+ 'type' => 'number',
+ 'format' => 'double',
+ 'example' => '0.3',
+ ],
+ 'Text' => [
+ 'description' => 'The text of the chunk.'."\n",
+ 'type' => 'string',
+ 'example' => '',
+ ],
+ ],
+ ],
+ ],
+ 'Total' => [
+ 'description' => 'The total number of chunks returned.'."\n",
+ 'type' => 'integer',
+ 'format' => 'int64',
+ 'example' => '16',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'update',
+ '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' => 'DataId',
+ '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",
+ ],
+ ],
+ [
+ 'name' => 'ChunkId',
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'IsDisplayedChunkContent',
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'content',
+ '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",
+ ],
+ ],
+ [
+ 'name' => 'title',
+ 'in' => 'query',
+ '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',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ ],
+ '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'."\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',
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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"
+ ."\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: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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'delete',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'PipelineId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => 'The knowledge base ID, which is the `Data.Id` parameter returned by **CreateIndex**.'."\n",
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '79c0alxxxx',
+ ],
+ ],
+ [
+ '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',
+ ],
+ ],
+ [
+ 'name' => 'ChunkIds',
+ '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,
+ ],
+ ],
+ ],
+ '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'."\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",
+ ],
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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"
+ ."\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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ '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-3shx2gu255oqxxxx',
+ ],
+ ],
+ [
+ 'name' => 'IndexId',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'enumValueTitles' => [],
+ 'example' => 'kb-123456xxxx'."\n",
+ ],
+ ],
+ [
+ 'name' => 'StartTimestamp',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int64',
+ 'required' => true,
+ 'example' => '1767604500',
+ ],
+ ],
+ [
+ 'name' => 'EndTimestamp',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int64',
+ 'required' => true,
+ 'example' => '1767604500',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ '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',
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ '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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'create',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-czal8nvvwb8d4xxx'."\n",
+ ],
+ ],
+ [
+ 'name' => 'name',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => '模板名称',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '',
+ ],
+ ],
+ [
+ 'name' => 'content',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => 'prompt模板内容',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'PromptTemplate.ContentInvalid',
+ 'errorMessage' => 'Input parameter Content is invalid.',
+ ],
+ [
+ 'errorCode' => 'PromptTemplate.NameInvalid',
+ 'errorMessage' => 'Input parameter Name is invalid.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'PromptTemplate.InternalError',
+ 'errorMessage' => 'Prompt template service inner exception.',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ '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',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ '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",
+ 'type' => 'array',
+ 'items' => [
+ 'description' => 'The template variable.'."\n",
+ 'type' => 'string',
+ 'example' => 'theme',
+ ],
+ 'example' => '["theme"]',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 404 => [
+ [
+ 'errorCode' => 'PromptTemplate.TemplateNotFound',
+ 'errorMessage' => 'Prompt template not found.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'PromptTemplate.InternalError',
+ 'errorMessage' => 'Prompt template service inner 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',
+ ],
+ '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',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'update',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ 'description' => 'The workspace ID.'."\n",
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdxxx',
+ ],
+ ],
+ [
+ 'name' => 'promptTemplateId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => 'prompt模板Id',
+ 'description' => 'The template ID.'."\n",
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6e49109bfeb94a39bb268f4e483ccxxx',
+ ],
+ ],
+ [
+ 'name' => 'name',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => '模板名称',
+ 'description' => 'The template name.'."\n",
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ [
+ 'name' => 'content',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => 'prompt模板内容',
+ 'description' => 'The template content.'."\n",
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'requestId' => [
+ 'title' => '请求Id',
+ 'description' => 'The request ID.'."\n",
+ 'type' => 'string',
+ 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx'."\n",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'PromptTemplate.ContentInvalid',
+ 'errorMessage' => 'Input parameter Content is invalid.',
+ ],
+ [
+ 'errorCode' => 'PromptTemplate.NameInvalid',
+ 'errorMessage' => 'Input parameter Name is invalid.',
+ ],
+ ],
+ 404 => [
+ [
+ 'errorCode' => 'PromptTemplate.TemplateNotFound',
+ 'errorMessage' => 'Prompt template not found.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'PromptTemplate.InternalError',
+ 'errorMessage' => 'Prompt template service inner exception.',
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ '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',
+ ],
+ 'security' => [
+ [
+ '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' => '业务空间Id',
+ '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',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response'."\n",
+ 'type' => 'object',
+ 'properties' => [
+ 'requestId' => [
+ 'title' => '请求Id',
+ 'description' => 'The request ID.'."\n",
+ 'type' => 'string',
+ 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 404 => [
+ [
+ 'errorCode' => 'PromptTemplate.TemplateNotFound',
+ 'errorMessage' => 'Prompt template not found.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'PromptTemplate.InternalError',
+ 'errorMessage' => 'Prompt template service inner 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',
+ ],
+ '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' => [
+ 'title' => '业务空间Id',
+ 'description' => 'The workspace ID.'."\n",
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdxxx',
+ ],
+ ],
+ [
+ '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' => '模板类型,可选值:'."\n"
+ .'· System:系统预置模板'."\n"
+ .'· Custom:用户自定义模板',
+ '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' => [
+ 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"',
+ ],
+ ],
+ ],
+ 'description' => '',
+ ],
+ ],
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ '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',
+ ],
+ 'CreateMemory' => [
+ 'summary' => '创建Memory',
+ 'path' => '/{workspaceId}/memories',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'create',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdm5v',
+ ],
+ ],
+ [
+ 'name' => 'description',
+ 'in' => 'query',
+ 'allowEmptyValue' => true,
+ 'schema' => [
+ 'title' => '长期记忆体的描述信息,默认为空',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'memoryId' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3',
+ ],
+ 'requestId' => [
+ 'title' => '请求Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'Memory.DescriptionInvalid',
+ 'errorMessage' => 'Input parameter description is invalid.',
+ ],
+ ],
+ 404 => [
+ [
+ 'errorCode' => 'Memory.MemoryIdNotFound',
+ 'errorMessage' => 'Memory Id not exist or is not authorized.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner exception.',
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"memoryId\\": \\"6bff4f317a14442fbc9f73d29dbxxxx\\",\\n \\"requestId\\": \\"17204B98-xxxx-4F9A--2446A84821CA\\"\\n}","type":"json"}]',
+ ],
+ 'GetMemory' => [
+ 'summary' => '获取memory',
+ 'path' => '/{workspaceId}/memories/{memoryId}',
+ 'methods' => [
+ 'get',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdm5v'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n",
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'description' => [
+ 'description' => '',
+ 'type' => 'string',
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 404 => [
+ [
+ 'errorCode' => 'Memory.MemoryIdNotFound',
+ 'errorMessage' => 'Memory Id not exist or is not authorized.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner exception.',
+ ],
+ ],
+ ],
+ '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"}]',
+ ],
+ 'UpdateMemory' => [
+ 'summary' => '更新memory',
+ 'path' => '/{workspaceId}/memories/{memoryId}',
+ 'methods' => [
+ 'put',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ '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' => 'memoryId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3',
+ ],
+ ],
+ [
+ 'name' => 'description',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => '长期记忆描述信息',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => '',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'requestId' => [
+ 'title' => '请求Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad'."\n",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'Memory.DescriptionInvalid',
+ 'errorMessage' => 'Input parameter description is invalid.',
+ ],
+ ],
+ 404 => [
+ [
+ 'errorCode' => 'Memory.MemoryIdNotFound',
+ 'errorMessage' => 'Memory Id not exist or is not authorized.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner exception.',
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\"\\n}","type":"json"}]',
+ ],
+ 'DeleteMemory' => [
+ 'summary' => '删除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',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdm5v'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n",
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'requestId' => [
+ 'title' => '请求Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'example' => '6a71f2d9-f1c9-913b-818b-114029103cad'."\n",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 404 => [
+ [
+ 'errorCode' => 'Memory.MemoryIdNotFound',
+ 'errorMessage' => 'Memory Id not exist or is not authorized.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner exception.',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'list',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdm5v'."\n",
+ ],
+ ],
+ [
+ 'name' => 'maxResults',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => '最大返回数量',
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'example' => '10',
+ ],
+ ],
+ [
+ 'name' => 'nextToken',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => '由前一次的请求返回,传入时本次查询结果将基于前一次请求结果进行分页',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'dc270401186b433f975d7e1faaa34e0e',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => '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',
+ ],
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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.',
+ ],
+ ],
+ ],
+ '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"}]',
+ ],
+ 'CreateMemoryNode' => [
+ 'summary' => '创建记忆Node',
+ 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes',
+ 'methods' => [
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ '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' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'llm-us9hjmt32nysdm5v'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n",
+ ],
+ ],
+ [
+ 'name' => 'content',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => '长期记忆内容',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'Memory.MemoryNodeContentInvalid',
+ 'errorMessage' => '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.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner exception.',
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"memoryNodeId\\": \\"68de06c95368463a8be4a84efcxxxxxx\\",\\n \\"requestId\\": \\"8C56C7AF-xxxx-19CE-B018-E05E1EDCF4C5\\"\\n}","type":"json"}]',
+ ],
+ 'GetMemoryNode' => [
+ 'summary' => '获取记忆Node',
+ 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes/{memoryNodeId}',
+ 'methods' => [
+ 'get',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdm5v'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryNodeId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆节点Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '68de06c95368463a8be4a84efc872cc5'."\n",
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'Schema of Response',
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'Memory.MemoryNodeContentInvalid',
+ 'errorMessage' => '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.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner exception.',
+ ],
+ ],
+ ],
+ '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"}]',
+ ],
+ 'UpdateMemoryNode' => [
+ 'summary' => '更新记忆Node',
+ 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes/{memoryNodeId}',
+ 'methods' => [
+ 'put',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ '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' => 'memoryId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryNodeId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆节点Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '68de06c95368463a8be4a84efc872cc5',
+ ],
+ ],
+ [
+ 'name' => 'content',
+ 'in' => 'query',
+ 'schema' => [
+ 'title' => '长期记忆内容',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '',
+ ],
+ ],
+ ],
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'Memory.MemoryNodeContentInvalid',
+ 'errorMessage' => '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.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner 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',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ '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' => '业务空间Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdm5v'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryNodeId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆节点Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '68de06c95368463a8be4a84efc872cc5',
+ ],
+ ],
+ ],
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'Memory.MemoryNodeContentInvalid',
+ 'errorMessage' => '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.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner exception.',
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\"\\n}","type":"json"}]',
+ ],
+ 'ListMemoryNodes' => [
+ 'summary' => '获取记忆Node列表',
+ 'path' => '/{workspaceId}/memories/{memoryId}/memoryNodes',
+ 'methods' => [
+ 'get',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'list',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspaceId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '业务空间Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-us9hjmt32nysdm5v'."\n",
+ ],
+ ],
+ [
+ 'name' => 'memoryId',
+ 'in' => 'path',
+ 'schema' => [
+ 'title' => '长期记忆Id',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3',
+ ],
+ ],
+ [
+ 'name' => 'maxResults',
+ 'in' => 'query',
+ 'allowEmptyValue' => true,
+ 'schema' => [
+ 'title' => '最大返回数量',
+ 'description' => '',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'required' => false,
+ 'maximum' => '50',
+ 'minimum' => '1',
+ 'example' => '20',
+ 'default' => '10',
+ ],
+ ],
+ [
+ 'name' => 'nextToken',
+ 'in' => 'query',
+ 'allowEmptyValue' => true,
+ 'schema' => [
+ 'title' => '由前一次的请求返回,传入时本次查询结果将基于前一次请求结果进行分页',
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'dc270401186b433f975d7e1faaa34e0e'."\n",
+ ],
+ ],
+ ],
+ '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",
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ [
+ 'errorCode' => 'Memory.MaxResultsInvalid',
+ 'errorMessage' => 'Input parameter maxResults is invalid.',
+ ],
+ [
+ 'errorCode' => 'Memory.MemoryNodeContentInvalid',
+ 'errorMessage' => 'Memory node content is invalid.',
+ ],
+ [
+ 'errorCode' => 'Memory.NextTokenInvalid',
+ 'errorMessage' => 'Input parameter nextToken is invalid.',
+ ],
+ ],
+ 404 => [
+ [
+ 'errorCode' => 'Memory.MemoryIdNotFound',
+ 'errorMessage' => 'Memory Id not exist or is not authorized.',
+ ],
+ [
+ 'errorCode' => 'Memory.MemoryNodeNotFound',
+ 'errorMessage' => 'MemoryNode not found.',
+ ],
+ ],
+ 500 => [
+ [
+ 'errorCode' => 'Memory.InternalError',
+ 'errorMessage' => 'Memory service inner exception.',
+ ],
+ ],
+ ],
+ '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"}]',
+ ],
+ 'GetAlipayTransferStatus' => [
+ 'summary' => '查询支付宝打赏状态',
+ 'path' => '/openapi/alipay/transfer/status',
+ 'methods' => [
+ 'get',
+ 'post',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'none',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'autoTest' => true,
+ 'tenantRelevance' => 'tenant',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspace_id',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'llm-cxxxxxxb8d47ks',
+ ],
+ ],
+ [
+ 'name' => 'code',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ 'example' => 'xxx-xxxx',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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"}]',
+ ],
+ 'GetAlipayUrl' => [
+ 'summary' => '支付宝打赏链接',
+ 'path' => '/openapi/alipay/transfer/url',
+ 'methods' => [
+ 'get',
+ ],
+ 'schemes' => [
+ 'https',
+ ],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'consumes' => [
+ 'application/json',
+ ],
+ 'produces' => [
+ 'application/json',
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'none',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'autoTest' => true,
+ 'tenantRelevance' => 'tenant',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'workspace_id',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ ],
+ ],
+ [
+ 'name' => 'app_id',
+ 'in' => 'query',
+ 'schema' => [
+ 'description' => '',
+ 'type' => 'string',
+ 'required' => false,
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ '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"}]',
+ ],
+ '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',
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'none',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ ],
+ 'parameters' => [
+ [
+ 'name' => 'FileName',
+ 'in' => 'formData',
+ 'schema' => [
+ 'title' => '文件名称,需要包含文件后缀',
+ 'description' => 'The file name, including the file extension.'."\n",
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'example.txt',
+ ],
+ ],
+ [
+ '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' => [
+ 'title' => '百炼业务空间id',
+ 'description' => 'The Model Studio workspace ID.'."\n",
+ 'type' => 'string',
+ 'required' => true,
+ 'example' => 'llm-mbhn96xxxx',
+ ],
+ ],
+ ],
+ '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',
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'staticInfo' => [
+ 'returnType' => 'synchronous',
+ ],
+ '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',
+ ],
+ ],
+];