'1.0', 'info' => [ 'style' => 'ROA', 'product' => 'bailian', 'version' => '2023-12-29', ], 'directories' => [ [ 'id' => 260944, 'title' => '应用数据', 'type' => 'directory', 'children' => [ 'ListFile', 'DeleteCategory', 'ListCategory', 'AddCategory', 'AddFile', 'AddFilesFromAuthorizedOss', 'ApplyFileUploadLease', 'DeleteFile', 'DescribeFile', 'UpdateFileTag', 'GetParseSettings', 'GetAvailableParserTypes', 'ChangeParseSetting', ], ], [ 'id' => 260955, 'title' => '知识库', 'type' => 'directory', 'children' => [ 'CreateIndex', 'GetIndexJobStatus', 'SubmitIndexJob', 'SubmitIndexAddDocumentsJob', 'Retrieve', 'ListIndexDocuments', 'ListIndexFileDetails', 'UpdateIndex', 'DeleteIndexDocument', 'ListIndices', 'DeleteIndex', 'ListChunks', 'UpdateChunk', 'DeleteChunk', 'GetIndexMonitor', ], ], [ 'id' => 260969, 'title' => 'Prompt工程', 'type' => 'directory', 'children' => [ 'CreatePromptTemplate', 'GetPromptTemplate', 'UpdatePromptTemplate', 'DeletePromptTemplate', 'ListPromptTemplates', 'ListPromptTemplates', ], ], [ 'id' => 260986, 'title' => '其他', 'type' => 'directory', 'children' => [ [ 'id' => 260975, 'title' => '长期记忆(旧)', 'type' => 'directory', 'children' => [ 'CreateMemory', 'GetMemory', 'UpdateMemory', 'DeleteMemory', 'ListMemories', 'CreateMemoryNode', 'GetMemoryNode', 'UpdateMemoryNode', 'DeleteMemoryNode', 'ListMemoryNodes', ], ], 'GetAlipayTransferStatus', 'GetAlipayUrl', 'ApplyTempStorageLease', ], ], ], 'components' => [ 'schemas' => [], ], 'apis' => [ 'ListFile' => [ 'summary' => '获取指定类目下一个或多个文档的详细信息。', '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' => '类目所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", ], ], [ 'name' => 'CategoryId', 'in' => 'query', 'schema' => [ 'description' => ''."\n" ."\n" .'类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以在[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取。'."\n" ."\n" .'', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', ], ], [ 'name' => 'NextToken', 'in' => 'query', 'schema' => [ 'description' => '查询凭证(Token),取值为上一次 API 调用返回的NextToken参数值。', 'type' => 'string', 'required' => false, 'example' => 'AAAAAdH70eOCSCKtacdomNzak4U=', ], ], [ 'name' => 'MaxResults', 'in' => 'query', 'schema' => [ 'description' => '分页查询时每页行数。取值范围[1-200]。'."\n" ."\n" .'默认值:'."\n" .'当不设置值或设置的值小于 1 时,默认值为20。当设置的值大于 200 时,默认值为 200。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20', ], ], [ 'name' => 'FileName', 'in' => 'query', 'schema' => [ 'description' => '文件名称(不含后缀),仅支持按照文件名精准查找,不支持模糊搜索。', 'type' => 'string', 'required' => false, 'example' => 'product-overview', ], ], ], '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' => [ 'FileList' => [ 'description' => '类目下的文件列表。', 'type' => 'array', 'items' => [ 'description' => '文件对象。', 'type' => 'object', 'properties' => [ 'CategoryId' => [ 'description' => '文件所属类目ID。', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', ], 'CreateTime' => [ 'description' => '文件实际添加到阿里云百炼中的时间戳,格式: yyyy-MM-dd HH:mm:ss,时区:UTC + 8。', 'type' => 'string', 'example' => '2024-09-09 11:03:35', ], 'FileId' => [ 'description' => '文件 ID,即 **AddFile** 接口返回的`FileId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)页面,单击文件名称旁的图标获取。', 'type' => 'string', 'example' => 'file_5ff599b3455a45db8c41b0054b361518_xxxxxxxx', ], 'FileName' => [ 'description' => '文件名称。', 'type' => 'string', 'example' => 'product-overview.pdf', ], 'FileType' => [ 'description' => '文件格式类型。可能值为:pdf、docx、doc、txt、md、pptx、ppt、xlsx、xls、html、png、jpg、jpeg、bmp、gif。', 'type' => 'string', 'example' => 'docx', ], 'Parser' => [ 'description' => '文档解析器。可能值为:'."\n" .'- DASHSCOPE_DOCMIND:阿里云文档智能解析。', 'type' => 'string', 'example' => 'DASHSCOPE_DOCMIND', ], 'SizeInBytes' => [ 'description' => '文件大小,单位字节。', 'type' => 'integer', 'format' => 'int64', 'example' => '512', ], 'Status' => [ 'description' => '文件解析状态,可能值为:'."\n" .'- INIT: 初始化状态,等待调度中。'."\n" .'- PARSING: 解析中。'."\n" .'- PARSE_SUCCESS:解析完成。'."\n" .'- PARSE_FAILED:解析失败。', 'type' => 'string', 'example' => 'PARSE_SUCCESS', ], 'Tags' => [ 'description' => '文件关联的标签列表,一个文档支持关联多个标签。', 'type' => 'array', 'items' => [ 'description' => '文件的标签。', 'type' => 'string', 'example' => 'tag-A', ], ], ], ], ], 'HasNext' => [ 'description' => '符合查询条件的类目数据是否存在下一页,可能值为:'."\n" .'- true:是。'."\n" .'- false:否。', '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。', 'type' => 'string', 'example' => '8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。 '."\n" .'- false:失败。', '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' => '文件列表', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:ListFile权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 分页查询首页时,仅需设置`MaxResults`以限制返回信息的条目数,返回结果中的`NextToken`将作为查询后续页的凭证。查询后续页时,将`NextToken`参数设置为上一次返回结果中获取到的`NextToken`作为查询凭证(如果`NextToken`为空,表示结果已经完全返回,不需要再请求),并设置`MaxResults`限制返回条目数。'."\n" ."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过5次/秒。如遇限流,请稍后重试。', ], 'DeleteCategory' => [ 'summary' => '永久性删除指定的类目。', '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' => ''."\n" ."\n" .'类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以在[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取。'."\n" ."\n" .'', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '类目所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Data' => [ 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'CategoryId' => [ 'description' => '被删除的类目 ID。', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', ], ], ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功:'."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '删除类目', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:DeleteCategory权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过5次/秒。如遇限流,请稍后重试。', ], 'ListCategory' => [ 'summary' => '获取指定业务空间下一个或多个类目的详细信息。', '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' => '业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', ], ], [ 'name' => 'CategoryType', 'in' => 'formData', 'schema' => [ 'description' => '要查询的类目类型。取值范围:'."\n" .'- UNSTRUCTURED:类目。'."\n" ."\n" .''."\n" ."\n" .'> 暂不支持通过API查询表格(数据表)。'."\n" .'>'."\n" ."\n" .''."\n" .''."\n" ."\n" .'> 暂不支持通过API查询结构化数据表。'."\n" .'>'."\n" ."\n\n" .'', 'type' => 'string', 'required' => true, 'example' => 'UNSTRUCTURED', 'enum' => [ 'UNSTRUCTURED', ], ], ], [ 'name' => 'ParentCategoryId', 'in' => 'formData', 'schema' => [ 'description' => '要查询类目的父类目 ID。', 'type' => 'string', 'required' => false, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', ], ], [ 'name' => 'NextToken', 'in' => 'formData', 'schema' => [ 'description' => '查询凭证(Token),取值为上一次 API 调用返回的NextToken参数值。', 'type' => 'string', 'required' => false, 'example' => 'AAAAAdH70eOCSCKtacdomNzak4U=', ], ], [ 'name' => 'MaxResults', 'in' => 'formData', 'schema' => [ 'description' => '分页查询时每页类目数量。最大值为 200。取值范围[1-200]'."\n" ."\n" .'默认值:'."\n" .'当不设置值或设置的值小于 1 时,默认值为20。当设置的值大于 200 时,默认值为 200。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '500', 'minimum' => '0', 'example' => '20', ], ], [ 'name' => 'CategoryName', 'in' => 'formData', 'schema' => [ 'description' => '即根据类目名称对接口返回的类目列表进行精确匹配/过滤。默认值为空,即不启用类目名称过滤。', 'type' => 'string', 'required' => false, 'example' => '产品清单', ], ], ], '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' => '类目 ID。', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', ], 'CategoryName' => [ 'description' => '类目名称。', 'type' => 'string', 'example' => '类目1', ], 'CategoryType' => [ 'description' => '类目类型,可能值为:'."\n" .'- UNSTRUCTURED:类目。', 'type' => 'string', 'example' => 'UNSTRUCTURED', ], 'IsDefault' => [ 'description' => '是否为默认类目。可能值为:'."\n" .'- true:是。'."\n" .'- false:否。'."\n" ."\n" .'默认类目不允许删除。', 'type' => 'boolean', 'example' => 'true', ], 'ParentCategoryId' => [ 'description' => '父类目的类目 ID。', 'type' => 'string', 'example' => 'cate_addd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', ], ], ], ], 'HasNext' => [ 'description' => '符合查询条件的类目数据是否存在下一页,可能值为:'."\n" ."\n" .'- true:是。'."\n" .'- false:否。', '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。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '类目列表', 'description' => '- 暂不支持通过API查询数据表。'."\n" .'- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:ListCategory权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 分页查询首页时,仅需设置`MaxResults`以限制返回信息的条目数,返回结果中的`NextToken`将作为查询后续页的凭证。查询后续页时,将`NextToken`参数设置为上一次返回结果中获取到的`NextToken`作为查询凭证(如果`NextToken`为空,表示结果已经完全返回,不需要再请求),并设置`MaxResults`限制返回条目数。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'注意本接口频繁调用会被限流,频率请勿超过5次/秒。如遇限流,请稍后重试。', ], 'AddCategory' => [ 'summary' => '在指定的业务空间中创建一个类目,用于分类和管理文件。每个业务空间最多创建500个类目。', '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' => '业务空间 ID,即在该业务空间中新增类目。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', ], ], [ 'name' => 'CategoryName', 'in' => 'formData', 'schema' => [ 'description' => '类目名称。长度为 1~20 个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文、中文和数字等)。可以包含半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。', 'type' => 'string', 'required' => true, 'example' => '产品清单', ], ], [ 'name' => 'CategoryType', 'in' => 'formData', 'schema' => [ 'description' => '类目类型。取值范围:'."\n" .'- UNSTRUCTURED:类目。', 'type' => 'string', 'required' => true, 'example' => 'UNSTRUCTURED', 'enum' => [ 'UNSTRUCTURED', ], ], ], [ 'name' => 'ParentCategoryId', 'in' => 'formData', 'schema' => [ 'description' => '父类目的类目 ID。在此父类目下创建新类目,此值为空时创建一级类目。', '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' => '类目 ID。请妥善保管该值,它将用于后续所有与此类目相关的API操作。', '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。', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。 '."\n" .'- false:失败。', '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' => '新增类目', 'description' => '- 不支持通过API新增数据表,请通过控制台的[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)操作。'."\n" .'- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:AddCategory权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 本接口不具备幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过5次/秒。如遇限流,请稍后重试。', ], 'AddFile' => [ 'summary' => '将存储于阿里云百炼临时存储空间内的文件导入至阿里云百炼应用数据。', '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' => '上传租约 ID,对应 **ApplyFileUploadLease** 接口返回的` FileUploadLeaseId`。', 'type' => 'string', 'required' => true, 'example' => '68abd1dea7b6404d8f7d7b9f7fbd332d.17166xxxxxxxx', ], ], [ 'name' => 'Parser', 'in' => 'formData', 'schema' => [ 'description' => '解析器类型。取值范围:'."\n" .'- DASHSCOPE_DOCMIND:阿里云文档智能解析(不支持更改)。'."\n" ."\n" .''."\n" .'解析器会根据当前类目的数据解析设置,对您上传的文件进行解析。'."\n" .''."\n" ."\n" .''."\n" .'当CategoryType为UNSTRUCTURED时,解析器会根据当前类目的数据解析设置,对您上传的文件进行解析。'."\n" .'当CategoryType为SESSION_FILE时,系统将使用默认方式(不支持更改)解析文件内容。'."\n" .'', 'type' => 'string', 'required' => true, 'example' => 'DASHSCOPE_DOCMIND', ], ], [ 'name' => 'CategoryId', 'in' => 'formData', 'schema' => [ 'description' => ''."\n" ."\n" .'- 当CategoryType为UNSTRUCTURED时,需传入上传文件所属类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以前往[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取类目 ID。此处允许传入default,即使用系统创建的“默认类目”。'."\n" ."\n" .'- 当CategoryType为SESSION_FILE时,传入“default”即可。'."\n" .''."\n" ."\n" .''."\n" ."\n" .'需传入上传文件所属类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以前往[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取类目 ID。此处允许传入default,即使用系统创建的“默认类目”。'."\n" .'', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '业务空间 ID,即文件将上传至该业务空间中。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", ], ], [ 'name' => 'Tags', 'in' => 'formData', 'style' => 'json', 'schema' => [ 'description' => '文件关联的标签列表。默认值为空,即文件不关联任何标签。最多传入32个标签。', 'type' => 'array', 'items' => [ 'description' => '文件的标签。每个标签最多32个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文、中文和数字等),下划线_,中划线-。', 'type' => 'string', 'required' => false, 'example' => '产品介绍', ], 'required' => false, 'maxItems' => 32, 'minItems' => 1, ], ], [ 'name' => 'CategoryType', 'in' => 'formData', 'schema' => [ 'description' => '类目类型,可选,默认值为UNSTRUCTURED,取值范围:'."\n" .'- UNSTRUCTURED:类目,用于构建知识库场景。'."\n" ."\n" .''."\n" .'- SESSION_FILE:用于智能体应用[会话交互](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction)的文件。'."\n" .'在使用 `SESSION_FILE` 的情况下,调用ApplyFileUploadLease接口时,CategoryType 参数也应传入 `SESSION_FILE`。'."\n" .'仅用户当前会话有效,用户关闭会话后文件过期(最长有效期为7天),不支持长期保存。'."\n" .'', 'type' => 'string', 'required' => false, 'example' => 'UNSTRUCTURED', 'default' => 'UNSTRUCTURED', 'enum' => [ 'UNSTRUCTURED', 'SESSION_FILE', ], ], ], [ 'name' => 'OriginalFileUrl', 'in' => 'formData', 'schema' => [ 'description' => ''."\n" ."\n" .'通过此参数为文件添加一个URL,系统将在构建[文档搜索类知识库](~~2807740~~)时记录该链接。在使用阿里云百炼控制台与[智能体应用](~~2842749~~)对话时,随该文件召回结果返回(通过`docUrl`字段)。'."\n" ."\n" .'> 智能体应用必须开启**知识库**,并启用**展示回答来源**功能,否则此参数不生效。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'通过此参数为文件添加一个URL,系统将在构建[文档搜索类知识库](~~2807740~~)时记录该链接。在使用阿里云百炼控制台与[智能体应用](~~2842749~~)对话时,随该文件召回结果返回(通过`docUrl`字段)。'."\n" ."\n" .'> 智能体应用必须开启**知识库**,并启用**展示回答来源**功能,否则此参数不生效。'."\n" ."\n" .'', 'type' => 'string', 'required' => false, 'example' => 'www.test.com/111.docx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'DataCenter.FileTooLarge', ], 'Data' => [ 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'FileId' => [ 'description' => '文件 ID,请妥善保管该值,它将用于后续与此文件相关的所有API操作。', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', ], 'Parser' => [ 'description' => '解析该文件使用的解析器类型。可能值为:'."\n" .'- DASHSCOPE_DOCMIND:阿里云文档智能解析。', 'type' => 'string', 'example' => 'DASHSCOPE_DOCMIND', ], ], ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource.', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '添加文件', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:AddFile权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" ."\n" .'- 本接口不具备幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], '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' => '业务空间 ID,将文件导入至该业务空间。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', ], ], [ 'name' => 'CategoryId', 'in' => 'formData', 'schema' => [ 'description' => '用于指定文件导入目标类目。即 AddCategory 接口返回的`CategoryId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取类目 ID。此处允许传入 default,即使用系统创建的“默认类目”。', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', ], ], [ 'name' => 'CategoryType', 'in' => 'formData', 'schema' => [ 'description' => '类目类型,可选,默认值为UNSTRUCTURED,取值范围:'."\n" .'- UNSTRUCTURED:类目,用于构建知识库场景。'."\n" ."\n" .''."\n" ."\n" .'> 本接口不支持导入用于智能体应用[会话交互](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction)的SESSION_FILE,请使用 **AddFile** 接口从本地上传SESSION_FILE。'."\n" ."\n" .'', 'type' => 'string', 'required' => true, 'enumValueTitles' => [ 'UNSTRUCTURED' => 'UNSTRUCTURED', ], 'example' => 'UNSTRUCTURED', 'enum' => [ 'UNSTRUCTURED', 'SESSION_FILE', ], ], ], [ 'name' => 'OssRegionId', 'in' => 'formData', 'schema' => [ 'description' => 'OSS Bucket的地域ID。获取方式请参见[OSS地域和访问域名](~~31837~~)。', 'type' => 'string', 'required' => true, 'example' => 'cn-beijing', ], ], [ 'name' => 'OssBucketName', 'in' => 'formData', 'schema' => [ 'description' => 'OSS Bucket名称,详见[存储空间](~~177682~~)。', 'type' => 'string', 'required' => true, 'example' => 'bucketNamexxxxx', ], ], [ 'name' => 'FileDetails', 'in' => 'formData', 'style' => 'json', 'schema' => [ 'description' => '导入文件列表。一次最多可上传10个文件。'."\n" .'> 一次最多可上传10个文件。'."\n" .'>', 'type' => 'array', 'items' => [ 'description' => '文件对象。', 'type' => 'object', 'properties' => [ 'FileName' => [ 'description' => '导入文件的名称,注意后缀需要带上文件格式类型。'."\n" .'- 支持格式:pdf、docx、doc、txt、md、pptx、ppt、xlsx、xls、html、png、jpg、jpeg、bmp、gif。'."\n" .'- 文件名称长度限制4-128个字符。'."\n" .'- 对文件上传要求限制,请参见[知识库配额与限制](~~2880605~~)。'."\n" .'> 如需新增数据表并上传数据,请使用阿里云百炼控制台,API不支持。', 'type' => 'string', 'required' => true, 'example' => 'this_is_temp_xxxx.pdf', 'maxLength' => 500, 'minLength' => 1, ], 'OssKey' => [ 'description' => '导入文件在OSS Bucket中的键名(Key),详见[对象命名](~~273129~~)。', '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' => '文件关联的标签列表。默认值为空,即文件不关联任何标签。最多传入 10 个标签。', 'type' => 'array', 'items' => [ 'description' => '文件的标签。每个标签最多 12 个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文、中文和数字等),下划线_,中划线-。', 'type' => 'string', 'required' => false, 'example' => '产品介绍', ], 'required' => false, ], ], [ 'name' => 'OverWriteFileByOssKey', 'in' => 'formData', 'schema' => [ 'title' => '是否按照osossKey覆盖类目中的相同文件', 'description' => '是否按照OssKey覆盖类目中的相同文件,默认值为false,即不覆盖。', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], ], ], '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' => '文件 ID,请妥善保管该值,它将用于后续与此文件相关的所有API操作。', 'type' => 'string', 'example' => 'file_809f469a59ac449586ec692576xxxxx_102248XXX', ], 'OssKey' => [ 'description' => '导入文件在OSS Bucket中的键名(Key)。', 'type' => 'string', 'example' => 'root/path/this_is_temp_xxxx.pdf', ], 'Status' => [ 'description' => '文件导入状态。状态可能值为:'."\n" ."\n" .'- SUCCESS:导入(应用数据)完成。'."\n" .'- FAILED:导入(应用数据)失败。'."\n" ."\n" .'> 状态为SUCCESS的文件才能用于创建/更新知识库。'."\n" .'>', '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。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功 。'."\n" .'- false:失败。', '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"}]', 'title' => '从已授权OSS Bucket中导入文件', 'description' => '- 请确保该OSS Bucket与阿里云百炼同属一个阿里云账号(主账号),并已按[从OSS导入数据配置说明](~~2782155~~)完成授权。'."\n" .' '."\n" .' - 支持的Bucket存储类型不包括归档、冷归档或深度冷归档。支持内容加密的Bucket。支持公共读写/公共读/私有的Bucket。'."\n" .' - 如需使用开启[Referer防盗链](~~2636937~~)的Bucket,须参考[仅允许受信任的网站访问](~~2636937~~)将域名`*.console.aliyun.com`添加到白名单Referer中。'."\n" ."\n" .'- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:AddFilesFromAuthorizedOss权限点)并[加入一个业务空间](~~2851098~~)方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 本接口不具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过5次/秒。如遇限流,请稍后重试。', ], 'ApplyFileUploadLease' => [ 'summary' => '请求一个上传租约用于上传知识库文件,或智能体应用会话交互的文件。', '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' => '上传用于构建[知识库](~~2807740~~)的文件时:'."\n" ."\n" .'- 该字段代表上传文件所属类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取。此处允许传入default,即使用系统创建的“默认类目”。'."\n" .'> 如需新增数据表并上传数据,请使用阿里云百炼控制台,API不支持。'."\n" .'>'."\n" .''."\n" .'上传用于智能体应用[会话交互](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction)的文件时:'."\n" ."\n" .'- 此处传入default即可,系统会自动创建或者匹配默认类目,后续会开放动态文件类目接口及控制台管理页面。'."\n" .'', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', ], ], [ 'name' => 'FileName', 'in' => 'formData', 'schema' => [ 'description' => '上传用于构建[知识库](~~2807740~~)的文件:'."\n" .'- 该字段代表上传文件的名称,注意后缀需要带上文件格式类型。支持格式:pdf、docx、doc、txt、md、pptx、ppt、xlsx、xls、html、png、jpg、jpeg、bmp、gif。'."\n" .'- 文件名称长度限制4-128个字符。其它限制请参考[知识库配额与限制](~~2880605~~)。'."\n" .'> 如需新增数据表并上传数据,请使用阿里云百炼控制台,API不支持。'."\n" .'>'."\n" .''."\n" .'上传用于智能体应用[会话交互](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction)的文件:'."\n" ."\n" .'- 该字段代表上传文件的名称,注意后缀需要带上文件格式类型。支持格式:'."\n" .' - 文档:doc、docx、wps、ppt、pptx、xls、xlsx、md、txt、pdf。'."\n" .' - 图片:png、jpg、jpeg、bmp、gif。'."\n" .' - 音频:aac、amr、flac、flv、m4a、mp3、mpeg、ogg、opus、wav、webm、wma。'."\n" .' - 视频:mp4、mkv、avi、mov、wmv。'."\n" .'- 文件名称长度限制4-128个字符。'."\n" .'', 'type' => 'string', 'required' => true, 'example' => 'XXXX产品清单.pdf', ], ], [ 'name' => 'Md5', 'in' => 'formData', 'schema' => [ 'description' => '上传文件的MD5值,服务端会验证该字段(当前暂未开启),请正确填写。', 'type' => 'string', 'required' => true, 'example' => '19657c391f6c70bcea63c154d8606bb3', 'maxLength' => 64, 'minLength' => 1, ], ], [ 'name' => 'SizeInBytes', 'in' => 'formData', 'schema' => [ 'description' => '上传文件的大小,单位字节,服务端会验证该字段(当前暂未开启),请正确填写。取值范围:1B-100M。', 'type' => 'string', 'required' => true, 'example' => '1000', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '上传文件所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'CategoryType', 'in' => 'formData', 'schema' => [ 'description' => '类目类型,不传入该参数时,默认值为UNSTRUCTURED。取值范围:'."\n" ."\n" .'UNSTRUCTURED:类目,用于构建[知识库](~~2807740~~)场景。'."\n" .''."\n" .'SESSION_FILE:上传用于智能体应用[会话交互](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction)的文件。'."\n" .''."\n" ."\n" .'> 如需新增数据表并上传数据,请使用阿里云百炼控制台,API不支持。'."\n" .'>', 'type' => 'string', 'required' => false, 'example' => 'UNSTRUCTURED', 'default' => 'UNSTRUCTURED', 'enum' => [ 'UNSTRUCTURED', 'SESSION_FILE', ], ], ], [ 'name' => 'UseInternalEndpoint', 'in' => 'formData', 'schema' => [ 'description' => ''."\n" ."\n" .'若您使用了[阿里云百炼安全存储空间](https://help.aliyun.com/zh/model-studio/configure-resources-in-private-network),需要生成仅阿里云同地域内网可访问的租约URL链接时,此处可传入true,以提高安全性。不传入该参数时,默认值为false,即生成公网可访问的租约URL。'."\n" .'> 若您未开通阿里云百炼安全存储空间,或不确定是否在使用,此处请勿传入true(会上传失败)。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'若您使用了阿里云百炼安全存储空间,需要生成仅阿里云同地域内网可访问的租约URL链接时,此处可传入true,以提高安全性。不传入该参数时,默认值为false,即生成公网可访问的租约URL。'."\n" .'> 若您未开通阿里云百炼安全存储空间,或不确定是否在使用,此处请勿传入true(会上传失败)。'."\n" .'', 'type' => 'boolean', 'required' => false, 'enumValueTitles' => [], 'example' => 'false', 'default' => 'false', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'DataCenter.FileTooLarge', ], 'Data' => [ 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'FileUploadLeaseId' => [ 'description' => '租约唯一 ID,后续调用 **AddFile** 接口时,需要使用该参数。', 'type' => 'string', 'example' => '1e6a159107384782be5e45ac4759b247.1719325231035', ], 'Param' => [ 'description' => '用于上传文件的 HTTP 请求参数。', 'type' => 'object', 'properties' => [ 'Headers' => [ 'description' => '需要放到Header中的K-V字段,K和V均为字符串。'."\n" ."\n" .'> 返回的Content-Type可能为空值,后续按照空值上传即可。', 'type' => 'any', 'example' => '"X-bailian-extra":"MTAwNTQyNjQ5NTE2OTE3OA==",'."\n" .'"Content-Type":"application/pdf"', ], 'Method' => [ 'description' => 'HTTP 调用方法,可能值为:'."\n" .'- PUT'."\n" .'- POST', 'type' => 'string', 'example' => 'PUT', ], 'Url' => [ 'description' => '文件的上传 URL 地址。'."\n" ."\n" .'> 该URL为预签名URL,不支持FormData方式上传,需使用二进制方式上传。', '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' => '文件的上传方式,可能值为:'."\n" .'- OSS.PreSignedURL'."\n" .'- HTTP', 'type' => 'string', 'example' => 'HTTP', ], ], ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" ."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '申请文件上传租约', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:ApplyFileUploadLease权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" ."\n\n" .'- 本接口不具备幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'DeleteFile' => [ 'summary' => '永久删除应用数据中的指定文件。不支持通过API删除数据表,详见下方接口说明。', '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' => '文件 ID,即 **AddFile** 接口返回的`FileId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)页面,单击文件名称旁的 ID 图标获取。', 'type' => 'string', 'required' => true, 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '文件所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oxxxx', ], ], ], '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' => '文件 ID。', '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。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功 。'."\n" .'- false:失败。', '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' => '删除文件', 'description' => '- 不支持通过API删除数据表。如需删除数据表或表中特定的数据,请前往[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)操作。'."\n" .'- 本接口用于删除[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)中的文件,不会影响已构建好的知识库。如需删除知识库中的文件,请调用 **DeleteIndexDocument** 接口。'."\n" .'- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:DeleteFile权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 本接口仅能删除状态为解析失败(PARSE_FAILED)或解析完成(PARSE_SUCCESS)的文件。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'DescribeFile' => [ 'summary' => '查询应用数据中文件的基本信息,包括文件名称、类型、状态等。', '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' => '文件所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', ], ], [ 'name' => 'FileId', 'in' => 'path', 'schema' => [ 'description' => '文件 ID,即 **AddFile** 接口返回的`FileId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击文件名称旁的 ID 图标获取。', 'type' => 'string', 'required' => true, 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', ], ], ], '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' => '文件所属类目 ID。', 'type' => 'string', 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx', ], 'CreateTime' => [ 'description' => '文件实际添加到阿里云百炼中的时间戳,格式: yyyy-MM-dd HH:mm:ss,时区:UTC + 8。', 'type' => 'string', 'example' => '2024-09-09 12:45:43', ], 'FileId' => [ 'description' => '文件 ID。', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', ], 'FileName' => [ 'description' => '文件名称。', 'type' => 'string', 'example' => 'XXX产品介绍.pdf', ], 'FileType' => [ 'description' => '文件类型,扩展名。可能值为: pdf、docx、doc、txt、md、pptx、ppt、xlsx、xls、html、png、jpg、jpeg、bmp、gif。', 'type' => 'string', 'example' => 'pdf', ], 'Parser' => [ 'description' => '解析该文件使用的解析器类型。可能值为:'."\n" .'- DASHSCOPE_DOCMIND:默认文档解析器。', 'type' => 'string', 'example' => 'DASHSCOPE_DOCMIND', ], 'SizeInBytes' => [ 'description' => '文件大小,单位字节Byte。', 'type' => 'integer', 'format' => 'int64', 'example' => '1234', ], 'Status' => [ 'description' => ''."\n" ."\n" .'用于文档类知识库的文件(类型为UNSTRUCTURED),状态可能值为:'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'用于非结构化知识库的文件(类型为UNSTRUCTURED),状态可能值为:'."\n" ."\n\n" .''."\n" ."\n" .'- INIT: 待解析。'."\n" .'- IN_PARSE_QUEUE:解析队列排队中。'."\n" .'- PARSING: 解析中。'."\n" .'- PARSE_SUCCESS:解析完成。'."\n" .'必须等到状态为PARSE_SUCCESS才能将文档导入知识库。'."\n" .'- PARSE_FAILED:解析失败。'."\n" ."\n" .''."\n" .'用于智能体应用[会话交互](https://help.aliyun.com/zh/model-studio/user-guide/file-interaction)的文件(类型为SESSION_FILE),状态可能值为:'."\n" ."\n" .'- INIT: 待解析。'."\n" .'- IN_PARSE_QUEUE:解析队列排队中。'."\n" .'- PARSING: 解析中。'."\n" .'- PARSE_SUCCESS:解析完成。'."\n" .'- PARSE_FAILED:解析失败。'."\n" .'- SAFE_CHECKING: 安全检测中。'."\n" .'- SAFE_CHECK_FAILED: 安全检测失败。'."\n" .'- INDEX_BUILDING:索引构建中。'."\n" .'- INDEX_BUILD_SUCCESS:索引构建成功。'."\n" .'- INDEX_BUILDING_FAILED:索引构建失败。'."\n" .'- INDEX_DELETED:文件索引已删除。'."\n" .'- FILE_IS_READY:文件准备完毕。'."\n" .'必须等到状态为FILE_IS_READY才能进行问答。'."\n" .'- FILE_EXPIRED:文件过期。'."\n" .'仅用户当前会话有效,用户关闭会话后文件过期(最长有效期为7天),不支持长期保存。'."\n" .'', 'type' => 'string', 'example' => 'PARSE_SUCCESS', ], 'Tags' => [ 'description' => '文件关联的标签列表,一个文件支持关联多个标签。', 'type' => 'array', 'items' => [ 'description' => '文件的标签。', 'type' => 'string', 'example' => '产品介绍', ], ], 'ParseResultDownloadUrl' => [ 'type' => 'string', ], ], ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'Requests throttling triggered.', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '查询文件状态', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(`AliyunBailianDataFullAccess`或`AliyunBailianDataReadOnlyAccess`均可,已包括sfm:DescribeFile权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" ."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'UpdateFileTag' => [ 'summary' => '更新指定文件标签。', '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' => '文件所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', ], ], [ 'name' => 'FileId', 'in' => 'path', 'schema' => [ 'description' => '数据中心的文件 ID,您可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)页面,单击文件名称旁的 ID 图标获取。', 'type' => 'string', 'required' => true, 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', ], ], [ 'name' => 'Tags', 'in' => 'formData', 'style' => 'json', 'schema' => [ 'title' => '文档标签,单个文档最多支持添加10个标签', 'description' => '文件的标签。最多传入32个标签,每个标签最多32个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文、中文和数字等),下划线_,中划线-,标签中不能包含空格。', 'type' => 'array', 'items' => [ 'description' => '标签值。', 'type' => 'string', 'required' => false, 'example' => '标签A', ], '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' => '文件 ID', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', ], ], ], 'Message' => [ 'description' => '错误信息', 'type' => 'string', 'example' => 'Requests throttling triggered.', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833', ], 'Status' => [ 'description' => '接口返回的状态码', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" ."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '更新文件标签', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:UpdateFileTag权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过5次/秒。如遇限流,请稍后重试。', ], 'GetParseSettings' => [ 'summary' => '查询指定类目的数据解析设置。', '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' => '文件所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => false, 'example' => 'llm-3shx2gu255oqxxxx', ], ], [ 'name' => 'CategoryId', 'in' => 'query', 'schema' => [ 'description' => '类目 ID,即 **AddCategory** 接口返回的`CategoryId`,或者在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签[应用数据](https://bailian.console.alibabacloud.com/?tab=app#/data-center)-非结构化数据页签,单击类目名称旁的 ID 图标获取。', 'type' => 'string', 'required' => false, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '本次请求requestId', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833', ], 'Data' => [ 'description' => '请求成功返回的业务数据。', 'type' => 'array', 'items' => [ 'description' => '返回具体内容', 'type' => 'object', 'properties' => [ 'FileType' => [ 'description' => '文件类型,扩展名,可能值为: pdf、docx、doc等,列举当前类目中支持的所有文件类型。', 'type' => 'string', 'example' => 'pdf', ], 'ParserDisplayName' => [ 'description' => '解析方式的显示名称。', 'type' => 'string', 'example' => '电子文档解析', ], 'ParserConfig' => [ 'description' => '解析器配置,仅在类型被设置为Qwen VL解析时才会返回。', 'type' => 'object', 'properties' => [ 'ModelName' => [ 'description' => '模型名称。', 'type' => 'string', 'enumValueTitles' => [ 'qwen-vl-max' => 'qwen-vl-max', 'qwen-vl-plus' => 'qwen-vl-plus', ], 'example' => 'qwen-vl-max', ], 'ModelPrompt' => [ 'description' => '调用Qwen VL解析时的Prompt。', 'type' => 'string', 'example' => '#角色'."\n" .'你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。'."\n" .'# 任务目标'."\n" .'请结合输入图片,详细描述图片中的内容。', ], ], ], 'Parser' => [ 'description' => '解析该类目下当前类型文件使用的解析器。可能值为:'."\n" .'- DOCMIND:智能文档解析'."\n" .'- DOCMIND_DIGITAL:电子文档解析'."\n" .'- DOCMIND_LLM_VERSION:大模型文档解析'."\n" .'- DASH_QWEN_VL_PARSER:Qwen VL解析', 'type' => 'string', 'example' => 'DOCMIND', ], ], ], ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功 。'."\n" .'- false:失败。', '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\\": \\"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' => '获取类目解析设置', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(`AliyunBailianDataFullAccess`或`AliyunBailianDataReadOnlyAccess`均可,已包括sfm:GetParseSettings权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" ."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'GetAvailableParserTypes' => [ 'summary' => '根据输入的文件类型(文件扩展名),获取所有支持的解析器类型列表。', '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' => '文件所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', ], ], [ 'name' => 'FileType', 'in' => 'query', 'schema' => [ 'description' => '文件类型(扩展名),用于获取支持该文件类型的解析器。可能值为: '."\n" .'- doc'."\n" .'- docx'."\n" .'- ppt'."\n" .'- pptx'."\n" .'- xls'."\n" .'- xlsx'."\n" .'- md'."\n" .'- txt'."\n" .'- pdf'."\n" .'- png'."\n" .'- jpg'."\n" .'- jpeg'."\n" .'- bmp'."\n" .'- gif'."\n" .'- html', 'type' => 'string', 'required' => true, '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', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-7734-4F9A-8464-2446XXXXXXX', ], 'Data' => [ 'description' => '请求成功返回的业务数据。', 'type' => 'object', 'properties' => [ 'FileType' => [ 'description' => '文件类型,与输入参数中的FileType相同。', 'type' => 'string', 'example' => 'pdf', ], 'ParserList' => [ 'description' => '当前类型支持的解析器列表。', 'type' => 'array', 'items' => [ 'description' => '解析器对象。', 'type' => 'object', 'properties' => [ 'DisplayName' => [ 'description' => '解析方式的显示名称。', 'type' => 'string', 'example' => '智能文档解析', ], 'Parser' => [ 'description' => '解析器code。可能值为:'."\n" .'- DOCMIND(智能文档解析)'."\n" .'- DOCMIND_DIGITAL (电子文档解析)'."\n" .'- DOCMIND_LLM_VERSION (大模型文档解析)'."\n" .'- DASH_QWEN_VL_PARSER (Qwen-VL解析)', 'type' => 'string', 'example' => 'DOCMIND', ], ], ], ], ], ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'description' => '错误信息', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource', ], 'Code' => [ 'description' => '返回的错误code。', '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' => '获取文件支持的解析器类型', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(`AliyunBailianDataFullAccess`或`AliyunBailianDataReadOnlyAccess`均可,已包括sfm:GetAvailableParserTypes权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" ."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'ChangeParseSetting' => [ 'summary' => '配置特定文件类型的解析方式。例如,为 .pdf 文件指定使用大模型文档解析,为 .jpg 文件指定使用Qwen VL解析。', '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' => '类目所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', ], ], [ 'name' => 'CategoryId', 'in' => 'formData', 'schema' => [ 'description' => '类目 ID,即 **AddCategory** 接口返回的`CategoryId`,或者在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签[应用数据](https://bailian.console.alibabacloud.com/?tab=app#/data-center)-非结构化数据页签,单击类目名称旁的 ID 图标获取。', 'type' => 'string', 'required' => true, 'example' => 'cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx', 'maxLength' => 128, 'minLength' => 1, ], ], [ 'name' => 'FileType', 'in' => 'formData', 'schema' => [ 'description' => '文件类型,扩展名,可能值为:'."\n" .'- doc'."\n" .'- docx'."\n" .'- ppt'."\n" .'- pptx'."\n" .'- xls'."\n" .'- xlsx'."\n" .'- md'."\n" .'- txt'."\n" .'- pdf'."\n" .'- png'."\n" .'- jpg'."\n" .'- jpeg'."\n" .'- bmp'."\n" .'- gif'."\n" .'- html', 'type' => 'string', 'required' => true, 'example' => 'pdf', 'enum' => [ 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'md', 'txt', 'pdf', 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'html', ], ], ], [ 'name' => 'Parser', 'in' => 'formData', 'schema' => [ 'description' => '解析器标识code。不同解析器适用于不同场景,具体参见“知识库”。可能值为:'."\n" .'- DOCMIND(智能文档解析)'."\n" .'- DOCMIND_DIGITAL (电子文档解析)'."\n" .'- DOCMIND_LLM_VERSION (大模型文档解析)'."\n" .'- DASH_QWEN_VL_PARSER (Qwen VL解析)', 'type' => 'string', 'required' => true, 'enumValueTitles' => [ 'DOCMIND' => '智能文档解析', 'DOCMIND_LLM_VERSION' => '大模型文档解析', 'DOCMIND_DIGITAL' => '电子文档解析', 'DASH_QWEN_VL_PARSER' => 'QWEN VL解析', ], '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' => '解析器配置,仅当类型被设置为Qwen VL解析时才需要传入。', 'type' => 'object', 'properties' => [ 'modelName' => [ 'description' => '模型名称。', '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' => '调用Qwen VL解析时的Prompt。', 'type' => 'string', 'required' => false, 'example' => '#角色'."\n" .'你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。'."\n" .'# 任务目标'."\n" .'请结合输入图片,详细描述图片中的内容。', ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '7BA8ADD9-53D6-53F0-918F-A1E776AD230E', ], 'Data' => [ 'description' => '请求成功返回的业务数据。', 'type' => 'object', 'properties' => [ 'ChangeResult' => [ 'description' => '配置是否发生变更。'."\n" .'- true:配置已更新。'."\n" .'- false:配置未发生变更,修改失败。', 'type' => 'boolean', 'example' => 'true', ], ], ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功 。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource.', ], 'Code' => [ 'description' => '错误状态码。', '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' => '修改类目解析设置', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:ChangeParseSetting权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" ."\n" .'- 本接口不具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'CreateIndex' => [ 'summary' => '使用此API可创建两类知识库:基于文档或音视频的非结构化知识库,以及用于数据查询或图片问答的结构化知识库。', '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' => '业务空间 ID,即在该业务空间中创建知识库。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'Name', 'in' => 'query', 'allowEmptyValue' => false, 'schema' => [ 'description' => '知识库名称。长度为 1~20 个字符,支持中文、英文、数字、下划线(_)、短划线(-)、半角句号(.)和半角冒号(:)。', 'type' => 'string', 'required' => true, 'example' => '企业帮助文档库', ], ], [ 'name' => 'StructureType', 'in' => 'query', 'schema' => [ 'description' => '知识库类型。取值范围:'."\n" ."\n" .'- unstructured:文档搜索类知识库。'."\n" .'使用场景默认为为基础文档问答,如需创建图文并茂回复场景还需传递knowledgeScene参数并设置为visual_document_qa。'."\n" ."\n" .''."\n" ."\n" .'- structured:数据查询或图片问答类知识库。'."\n" ."\n" .'- multimedia:音视频知识库。'."\n" ."\n" .''."\n" ."\n" .'> 请注意,知识库创建后将无法更改其类型。'."\n" .'>', 'type' => 'string', 'required' => true, 'enumValueTitles' => [ 'unstructured' => 'unstructured', ], 'example' => 'unstructured', ], ], [ 'name' => 'EmbeddingModelName', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'description' => ''."\n" ."\n" .'知识库使用的向量模型。向量模型用于将原始输入prompt和知识文本转换为数值化向量,以便对二者进行相似度比较。text-embedding-v4模型在语种支持、代码片段向量化效果和向量维度选择等方面,相比text-embedding-v3模型进行了全面升级,适用于大部分场景。更多信息,请参见[向量化](~~2842587~~)。取值范围:'."\n" .'- text-embedding-v4'."\n" .'- text-embedding-v3'."\n" ."\n" .'默认值为空,此时使用text-embedding-v3模型。'."\n" ."\n\n" .''."\n" ."\n" .''."\n" ."\n" .'知识库使用的向量模型。向量模型用于将原始输入prompt和知识文本转换为数值化向量,以便对二者进行相似度比较。默认的text-embedding-v2模型(暂不支持更改)除了支持中英文双语外,还支持多种语言,并对向量结果进行归一化处理。更多信息,请参见[向量化](~~2842587~~)。取值范围:'."\n" .'- text-embedding-v2'."\n" ."\n" .'默认值为空,此时使用text-embedding-v2模型。'."\n" ."\n" .'', 'type' => 'string', 'required' => false, 'enumValueTitles' => [], ], ], [ 'name' => 'RerankModelName', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'description' => '知识库使用的排序模型。排序模型是位于知识库外部的评分系统,它会计算用户问题与知识库中每个文本切片的相似度分数并按此降序排列,并返回分数最高的前K个文本切片。取值范围:'."\n" ."\n\n" .''."\n" ."\n" .'- qwen3-rerank-hybrid:qwen3-rerank(hybrid)排序。'."\n" .'- qwen3-rerank:qwen3-rerank排序。'."\n" .'- gte-rerank-hybrid:gte-rerank(hybrid)排序'."\n" .'- gte-rerank:gte-rerank排序。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'- gte-rerank-hybrid:官方排序。'."\n" .'- gte-rerank:gte-rerank排序。'."\n" ."\n" .''."\n" ."\n\n" ."\n" .''."\n" ."\n" .'默认值为空,此时使用qwen3-rerank。'."\n" .'> 如仅需语义排序,可使用`qwen3-rerank`;若同时需要语义排序和文本匹配特征以确保相关性,建议使用`qwen3-rerank-hybrid`。'."\n" .'>'."\n" ."\n\n" .''."\n" ."\n" .''."\n" ."\n" .'默认值为空,此时使用gte-rerank-hybrid。'."\n" .'> 如仅需语义排序,可使用`gte-rerank`;若同时需要语义排序和文本匹配特征以确保相关性,建议使用`gte-rerank-hybrid`。'."\n" .'>'."\n" ."\n\n" .''."\n" ."\n\n" .''."\n" ."\n" .'> `gte-rerank-hybrid`与`gte-rerank`后续停止更新,不建议使用。'."\n" .'>'."\n" ."\n\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' => '相似度阈值,仅相似度分数超过此数值的文本切片才会被召回,用于筛选排序模型返回的文本切片。取值范围[0.01-1.00]。'."\n" ."\n" .'若未指定,默认采用 0.01。', 'type' => 'number', 'format' => 'double', 'required' => false, 'example' => '0.20', ], ], [ 'name' => 'ChunkSize', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'description' => ''."\n" ."\n" .'分段长度,即每个文本切片的字符数上限。超过该长度时:'."\n" ."\n" .'- **智能切分**(未指定`chunkMode`):文本很可能会被截断。'."\n" .'- **自定义切分**(指定了`chunkMode`):文本将被强制截断。'."\n" ."\n" .''."\n" ."\n" .''."\n" .'分段长度,即每个文本切片的字符数上限。超过该长度时,文本很可能会被截断。'."\n" .''."\n" ."\n\n" .'取值范围[1-6000]。若未指定,默认采用 500。'."\n" ."\n" .'> 若设置了`ChunkSize`且小于100,则必须同时设置`OverlapSize`。您也可以不指定这2个参数,系统将使用默认值。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '128', ], ], [ 'name' => 'OverlapSize', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'description' => '分段重叠长度,表示当前文本切片与前一个文本切片的重叠字符数。取值范围[0-1024]。'."\n" ."\n" .'若未指定,默认采用 100。'."\n" .'>`OverlapSize`必须小于`ChunkSize`,否则将导致切分异常。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '16', ], ], [ 'name' => 'Separator', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'description' => ''."\n" ."\n" .'分句标识符,仅在`chunkMode`=**regex**时生效(其他模式下即使传入也不生效)。可传入一个正则表达式(不支持多个),用于将文件分割为小段的文本切片。'."\n" ."\n" .'使用智能切分(未指定`chunkMode`)时,保持默认空值即可。'."\n" ."\n" .''."\n" ."\n\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'', 'type' => 'string', 'required' => false, 'example' => '(?<=。)', ], ], [ 'name' => 'SourceType', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'description' => '>此参数在最新版SDK中已改为必传,否则调用 SubmitIndexJob 接口将报错:Required parameter(data_sources) missing or invalid。>'."\n" ."\n" .'导入数据来源。取值范围:'."\n" .'- DATA_CENTER_CATEGORY:类目类型,即导入[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)中指定类目下的所有文件,可同时导入多个类目。'."\n" .'- DATA_CENTER_FILE:文件类型,即导入[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)下的指定文件,可同时导入多个文件。'."\n" ."\n" .'> 如果本参数传入DATA_CENTER_CATEGORY,则必须指定`CategoryIds`参数;如果本参数传入DATA_CENTER_FILE,则必须指定`DocumentIds`参数。'."\n" .'>'."\n" ."\n" .'> 要创建空知识库,可使用不含文件的空类目:本参数传入DATA_CENTER_CATEGORY,`CategoryIds`传入空类目 ID。'."\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' => '创建知识库时可同步导入文件。此处可指定需要导入的文件列表(传入文件 ID,建议导入不超过10000个。如有剩余文件,后续可调用 **SubmitIndexAddDocumentsJob** 接口继续导入)。', 'type' => 'array', 'items' => [ 'description' => '文件 ID,即 **AddFile** 接口返回的`FileId`,或者在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击文件名称旁的 ID 图标获取。', 'type' => 'string', 'required' => false, 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', ], 'required' => false, ], ], [ 'name' => 'CategoryIds', 'in' => 'query', 'allowEmptyValue' => true, 'style' => 'json', 'schema' => [ 'description' => '创建知识库时可同步导入文件。此处通过指定类目 ID,可导入对应类目下的所有文件(建议导入不超过10000个。如有剩余文件,后续可调用 **SubmitIndexAddDocumentsJob** 接口继续导入)。', 'type' => 'array', 'items' => [ 'description' => '类目 ID,即 **AddCategory** 接口返回的`CategoryId`。或者在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center'."\n" .')-文件页签,单击类目旁的 ID 图标获取。', 'type' => 'string', 'required' => false, 'example' => 'ca_hiu2383nfxxxx', ], 'required' => false, ], ], [ 'name' => 'TableIds', 'in' => 'query', 'allowEmptyValue' => false, 'style' => 'json', 'schema' => [ 'description' => ''."\n" ."\n" .'在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-表格页签,单击表格名称旁的 ID 图标获取。若列表包含多个ID时,只取第一个。'."\n" ."\n" .''."\n" ."\n\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" .'', 'type' => 'array', 'items' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], 'required' => false, ], ], [ 'name' => 'DataSource', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'object', 'properties' => [ 'CredentialId' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], 'CredentialKey' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], 'Database' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, 'example' => 'xxx', ], 'Endpoint' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], 'IsPrivateLink' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'boolean', 'required' => false, ], 'Region' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], 'SubPath' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], 'SubType' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], 'Table' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], 'Type' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, ], ], 'required' => false, ], ], [ 'name' => 'SinkType', 'in' => 'query', 'schema' => [ 'description' => '知识库的向量存储类型。更多信息,请参见[知识库](~~2807740~~)。取值范围:'."\n" .'- BUILT_IN:将向量数据托管在阿里云百炼平台中。'."\n" .'- ADB:AnalyticDB for PostgreSQL数据库。如需高级功能,如管理、审计和监控数据库,推荐选择ADB。'."\n" .'> 若您尚未在阿里云百炼上使用过ADB存储,可前往[创建知识库](https://bailian.console.aliyun.com/#/knowledge-base/create)[创建知识库](https://bailian.console.alibabacloud.com/#/knowledge-base/create)页面选择向量存储类型为ADB-PG,并按界面提示完成授权。如果您传入了ADB,则必须指定`SinkInstanceId`和`SinkRegion`参数。', 'type' => 'string', 'required' => true, 'enumValueTitles' => [ 'BUILT_IN' => 'BUILT_IN', 'ADB' => 'ADB', ], 'example' => 'BUILT_IN', ], ], [ 'name' => 'SinkInstanceId', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'description' => 'AnalyticDB for PostgreSQL 实例 ID(仅在`SinkType`指定 ADB 时才需要传入)。请前往[AnalyticDB for PostgreSQL数据实例列表](https://gpdbnext.console.aliyun.com/gpdb/list)页面获取此ID。', 'type' => 'string', 'required' => false, 'example' => 'gp-bp32109xxxx', ], ], [ 'name' => 'SinkRegion', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'description' => 'AnalyticDB for PostgreSQL 实例所在地域(仅在`SinkType`指定 ADB 时才需要传入)。您可调用[ DescribeRegions ](https://help.aliyun.com/zh/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions)[ DescribeRegions ](https://www.alibabacloud.com/help/zh/analyticdb/analyticdb-for-postgresql/developer-reference/api-gpdb-2016-05-03-describeregions?spm=a2c63.p38356.0.i3)获取地域列表。', 'type' => 'string', 'required' => false, 'example' => 'cn-hangzhou', ], ], [ 'name' => 'Columns', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => ''."\n" .'数据表的结构(列名、类型等)。'."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" ."\n" .'', 'type' => 'array', 'items' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'object', 'properties' => [ 'Column' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, 'example' => 'school', ], 'IsRecall' => [ 'description' => ''."\n" ."\n" .'是否参与模型回复。开启后表示本列的检索结果将作为大模型生成回答时的输入信息。取值范围:'."\n" ."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" ."\n" .'', 'type' => 'boolean', 'required' => false, 'example' => 'true', ], 'IsSearch' => [ 'description' => ''."\n" ."\n" .'是否参与知识库检索。开启后表示允许知识库在此列数据中进行搜索。取值范围:'."\n" ."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n" .''."\n" ."\n\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" .'', 'type' => 'boolean', 'required' => false, 'example' => 'true'."\n", ], 'Name' => [ 'description' => ''."\n" .'字段名称。必须与应用数据中创建的数据表的表头一致。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" .'', 'type' => 'string', 'required' => false, 'example' => '学校', ], 'Type' => [ 'description' => ''."\n" ."\n" .'字段类型。必须与应用数据中创建的数据表的表头一致。取值范围:'."\n" ."\n" .'- string'."\n" .'- double'."\n" .'- long'."\n" .'- datetime'."\n" .'- image_url'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" ."\n" .'', 'type' => 'string', 'required' => false, 'enumValueTitles' => [], 'example' => 'string', ], ], 'required' => false, ], 'required' => false, ], ], [ 'name' => 'Description', 'in' => 'query', 'schema' => [ 'description' => '知识库描述。长度为 0~1000 个英文或中文字符。'."\n" .'默认值为空。', 'type' => 'string', 'required' => false, 'example' => '企业帮助文档库包括了公司制度、产品清单等重要资料。', ], ], [ 'name' => 'metaExtractColumns', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '元数据提取配置。元数据是与非结构化数据内容相关的一系列附加属性,这些属性以key-value键值对的形式集成到文本切片中。更多信息,请参见[知识库](~~2807740~~)。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'description' => '元数据字段,长度为 1~50 个字符,必须为英文或下划线。如果指定本参数,则必须指定`Value`和`Type`参数。', 'type' => 'string', 'required' => false, 'example' => 'author', ], 'Value' => [ 'description' => '元数据字段的值。', 'type' => 'string', 'required' => false, 'example' => 'Tim', ], 'Type' => [ 'description' => '元数据字段的取值方法。取值范围:'."\n" ."\n" .'- constant:常量。'."\n" .'- variable:变量。'."\n" .'- custom_prompt:大模型。'."\n" .'- regular:正则。'."\n" .'- keywords:关键词搜索。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'constant' => '常量抽取', 'keywords' => '关键词抽取', 'custom_prompt' => '大模型', 'variable' => '变量抽取', 'regular' => '正则', ], 'example' => 'constant', ], 'Desc' => [ 'description' => '元数据字段的中文描述。长度为 0~1000 个字符,支持中文、英文、数字、下划线(_)、短划线(-)、半角句号(.)和半角冒号(:)。默认值为空。', 'type' => 'string', 'required' => false, 'example' => '作者名', ], 'EnableLlm' => [ 'description' => '开启后表示该元数据字段和值将和文本切片的内容一同参与大模型的回答生成过程。取值范围:'."\n" ."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n" .'默认值为 false。', 'type' => 'boolean', 'required' => false, 'enumValueTitles' => [ 'true' => '开启', 'false' => '不开启', ], 'example' => 'false', ], 'EnableSearch' => [ 'description' => '开启后表示该元数据字段和值将和文本切片的内容一同参与知识库检索。取值范围:'."\n" ."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n" .'默认值为 false。', 'type' => 'boolean', 'required' => false, 'enumValueTitles' => [ 'true' => '开启', 'false' => '不开启', ], 'example' => 'false', ], ], 'required' => false, ], 'required' => false, ], ], [ 'name' => 'enableHeaders', 'in' => 'query', 'schema' => [ 'description' => '是否将所有xlsx、xls格式文件的第一行数据作为表头,并拼接到每个文本切片中,避免大模型误将表头当作普通数据行来处理。'."\n" ."\n\n" .'> 建议仅在导入文件均为 .xlsx、.xls 格式且包含表头时启用该功能,否则无需开启。'."\n" .'>'."\n" ."\n" .'取值范围:'."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n" .'若未指定,默认不开启。', 'type' => 'boolean', 'required' => false, 'enumValueTitles' => [ 'true' => '开启', 'false' => '不开启', ], 'example' => 'false', ], ], [ 'name' => 'chunkMode', 'in' => 'query', 'schema' => [ 'description' => ''."\n" ."\n" .'启用自定义切分,并指定切分策略。更多说明,请参见[知识库](~~2807740~~)。'."\n" ."\n" .'可能取值(不支持同时传入多个值):'."\n" ."\n" .'- **length**:按长度切分。严格按照您指定的`ChunkSize`和`OverlapSize`切分。 若您未传入这两个参数,系统将采用默认值(`ChunkSize`为500,`OverlapSize`为100)。按长度切分不支持`Separator`(即使传入也不生效)。'."\n" .'- **page**:按页切分。如果指定了`ChunkSize`,切分时将一并考虑(未传入时,将使用默认值500)。按页切分不支持`OverlapSize`和`Separator`(即使传入也不生效)。'."\n" .'- **h1**:按照一级标题切分。如果指定了`ChunkSize`,切分时将一并考虑(未传入时,将使用默认值 500)。按照一级标题切分不支持`OverlapSize`和`Separator`(即使传入也不生效)。'."\n" .'- **h2**:按照二级标题切分。如果指定了`ChunkSize`,切分时将一并考虑(未传入时,将使用默认值 500)。按照二级标题切分不支持`OverlapSize`和`Separator`(即使传入也不生效)。'."\n" .'- **regex**:按照正则切分,此时必须指定`Separator`参数。如果指定了`ChunkSize`,切分时将一并考虑(未传入时,将使用默认值 500)。按正则切分不支持`OverlapSize`(即使传入也不生效)。'."\n" ."\n" .'若未指定,默认采用智能切分。'."\n" ."\n\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" ."\n" .'', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'regex' => '按照正则切分', 'length' => '按长度切分', 'h1' => '按照一级标题切分', 'h2' => '按照二级标题切分', 'page' => '按页切分', ], 'example' => 'regex', ], ], [ 'name' => 'EnableRewrite', 'in' => 'query', 'schema' => [ 'description' => '是否开启多轮对话改写。取值范围:'."\n" ."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n" .'若未指定,默认为开启。', 'type' => 'boolean', 'required' => false, 'enumValueTitles' => [ 'true' => '开启', 'false' => '不开启', ], 'example' => 'true', ], ], [ 'name' => 'CreateIndexType', 'in' => 'query', 'schema' => [ 'description' => '> 该参数暂不开放,请勿传入。'."\n" .'>', 'type' => 'string', 'required' => false, 'example' => '1', ], ], [ 'name' => 'pipelineCommercialType', 'in' => 'query', 'allowEmptyValue' => false, 'schema' => [ 'description' => ''."\n" ."\n" .'知识库的[规格类型](~~2997110~~)。取值范围:'."\n" .'- standard:标准版'."\n" .'- enterprise:旗舰版'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" .'', 'type' => 'string', 'required' => false, 'example' => 'standard', 'default' => 'standard', 'enum' => [ 'enterprise', 'standard', ], ], ], [ 'name' => 'pipelineCommercialCu', 'in' => 'query', 'allowEmptyValue' => false, 'schema' => [ 'description' => '指定知识库的 RCU 数量(仅当 pipelineCommercialType 指定 enterprise 时才需要传入)。取值范围:[1-200]。'."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" .'', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '200', 'minimum' => '1', 'example' => '1', 'default' => '1', ], ], [ 'name' => 'pipelineRetrieveRateLimitStrategy', 'in' => 'query', 'allowEmptyValue' => false, 'schema' => [ 'description' => '知识库依赖链路限流处理策略(仅当 pipelineCommercialType 指定 enterprise 时才需要传入)。'."\n" .'取值:'."\n" .'downgrade:降级处理(改为使用轻量级链路检索)。'."\n" .'若未指定,默认downgrade。'."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" .'>'."\n" .'', 'type' => 'string', 'required' => false, 'example' => 'downgrade', 'default' => 'downgrade', 'enum' => [ 'downgrade', ], ], ], [ 'name' => 'datasourceCode', 'in' => 'query', 'schema' => [ 'description' => '数据源Code。创建数据查询类知识库时必填,与table、database配合使用。'."\n" ."\n" .'可在[应用数据](https://bailian.console.aliyun.com/cn-beijing/?tab=app#/data-center/data-source)页面的数据源卡片上获取。'."\n" .'> '."\n" .'> - 本接口不支持关联自定义数据库,请使用阿里云百炼控制台创建。', 'type' => 'string', 'required' => false, 'example' => '260xxx', ], ], [ 'name' => 'table', 'in' => 'query', 'schema' => [ 'description' => '数据表名称。创建数据查询类知识库时必填。'."\n" ."\n" .'该数据表必须存在于由 datasourceCode 指定的数据源内。', 'type' => 'string', 'required' => false, 'example' => 'lance', ], ], [ 'name' => 'database', 'in' => 'query', 'schema' => [ 'description' => '数据库名称。创建数据查询知识库时必填。'."\n" ."\n" .'该数据表必须存在于由 datasourceCode 指定的数据源内。', 'type' => 'string', 'required' => false, 'example' => 'database_a6eacabe6', ], ], [ 'name' => 'knowledgeScene', 'in' => 'query', 'schema' => [ 'description' => '创建文档搜索类知识库(StructureType 为 unstructured)时需选择的使用场景。'."\n" ."\n" .'- 默认基础文档问答场景:不传递当前参数'."\n" ."\n" .'- 图文并茂回复场景:参数值设置为visual_document_qa'."\n" ."\n" .'> '."\n" .'> - 传递当前参数时必须设置StructureType 为 unstructured。', 'type' => 'string', 'required' => false, ], ], [ 'name' => 'connectId', 'in' => 'query', 'schema' => [ 'type' => 'string', 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码', 'type' => 'string', ], 'Data' => [ 'description' => '请求成功时返回的业务数据', 'type' => 'object', 'properties' => [ 'Id' => [ 'description' => '知识库 ID,又称`IndexId`,创建的知识库唯一标识'."\n" .'> 请妥善保管该值,它将用于后续所有与此知识库相关的API操作.'."\n" .'>', 'type' => 'string', 'example' => 'jkurxhxxxx', ], ], ], 'Message' => [ 'description' => '错误信息', 'type' => 'string', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A--2446A84821CA', ], 'Status' => [ 'description' => '接口返回的状态码', 'type' => 'string', 'example' => '"200"', ], 'Success' => [ 'description' => '请求是否成功,可能值为:'."\n" .'- true:成功'."\n" .'- false:失败', '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' => '创建知识库', 'description' => '- **权限要求**:'."\n" .' - **RAM用户(子账号)**:需先获取阿里云百炼的[API权限](~~2848578~~)(可使用`AliyunBailianDataFullAccess`策略,该策略已包含本接口所需的sfm:CreateIndex权限点),并[加入一个业务空间](~~2851098~~)后,才能调用本接口。'."\n" .' - **阿里云账号(主账号)**:默认拥有权限,可直接调用。'."\n" .'- **调用方式**:推荐使用最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)调用,SDK已封装复杂的签名计算逻辑,可简化您的调用过程。'."\n" .'- **后续操作**:本接口仅初始化知识库创建作业。完成调用后,必须调用 **SubmitIndexJob** 接口以完成创建(否则,您将得到一个空的知识库)。相应代码示例请参见[知识库API指南](~~2852772~~)。'."\n" .'- **幂等性**:本接口不具有幂等性,重复调用可能会创建多个同名知识库。建议通过“先查询、后创建”的逻辑实现幂等调用。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'GetIndexJobStatus' => [ 'summary' => '查询指定的知识库创建任务或知识库追加任务的当前状态。', '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' => '业务空间 ID,请确保您要操作的知识库在此业务空间中。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'JobId', 'in' => 'query', 'schema' => [ 'description' => '知识库作业任务 ID,即 **SubmitIndexJob** 接口或 **SubmitIndexAddDocumentsJob** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => '20230718xxxx-146c93bf', ], ], [ 'name' => 'IndexId', 'in' => 'query', 'schema' => [ 'description' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'description' => '**SubmitIndexJob** 接口和 **SubmitIndexAddDocumentsJob** 接口均支持批量导入文件。本接口返回的字段包括知识库作业任务的总状态`Status`及各文件导入的状态`Document.Status`。若文件较多,可通过`PageNumber`参数进行分页查询。起始值为 1,默认值为 1。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], ], [ 'name' => 'pageSize', 'in' => 'query', 'schema' => [ 'description' => '指定分页查询时每页展示的文件导入任务数量。最大值不限。默认值为 10。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'Index.Forbidden', ], 'Data' => [ 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'Documents' => [ 'description' => '本次导入的文件列表。', 'type' => 'array', 'items' => [ 'description' => '文件对象。', 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'Index.Document.ChunkError', ], 'DocId' => [ 'description' => '文件 ID。', 'type' => 'string', 'example' => 'file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx', ], 'DocName' => [ 'description' => '文件名称。', 'type' => 'string', 'example' => 'XXX产品介绍', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'document parse error', ], 'Status' => [ 'description' => '文件导入状态。可能值:'."\n" .'- INSERT_ERROR:文件导入失败。'."\n" .'- RUNNING:文件导入中。'."\n" .'- DELETED:文件已删除。'."\n" .'- FINISH:文件导入成功。', 'type' => 'string', 'enumValueTitles' => [], 'example' => 'RUNNING', ], 'GmtModified' => [ 'type' => 'integer', 'format' => 'int64', ], ], ], ], 'JobId' => [ 'description' => '作业任务ID。', 'type' => 'string', 'example' => '66122af12a4e45ddae6bd6c84555xxxx', ], 'Status' => [ 'description' => '知识库作业任务的当前状态。可能值:'."\n" .'- COMPLETED:执行成功。'."\n" .'- FAILED:执行失败。'."\n" .'- RUNNING:执行中。'."\n" .'- PENDING:等待执行。', 'type' => 'string', 'enumValueTitles' => [ 'COMPLETED' => '执行成功', 'FAILED' => '执行失败', 'RUNNING' => '执行中', 'PENDING' => '等待执行', ], 'example' => 'PENDING', ], ], ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource.', ], 'RequestId' => [ 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Status' => [ 'title' => 'Id of the request', 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '查询知识库创建任务状态', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(`AliyunBailianDataFullAccess`或`AliyunBailianDataReadOnlyAccess`均可,已包括sfm:GetIndexJobStatus权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 您需要有一个正在执行中的知识库作业任务(创建知识库任务可以调用 **SubmitIndexJob** 接口,创建知识库追加任务可以调用 **SubmitIndexAddDocumentsJob** 接口),并且获得相应的`JobId`。'."\n" .'- 本接口调用间隔建议在 5 秒以上。'."\n" .'- 本接口具有幂等性。', ], 'SubmitIndexJob' => [ 'summary' => '提交指定的 CreateIndex 任务以完成知识库创建。', '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' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", ], ], [ 'name' => 'IndexId', 'in' => 'query', 'schema' => [ 'description' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'Index.InvalidParameter', ], 'Data' => [ 'description' => '接口返回的业务字段。', 'type' => 'object', 'properties' => [ 'Id' => [ 'description' => '任务 ID,即调用 **GetIndexJobStatus** 接口时需要用到的任务`JobId`。', 'type' => 'string', 'example' => 'eFDr2fGRzP9gdDZWAdo3xxxx', ], 'IndexId' => [ 'description' => '知识库 ID。', 'type' => 'string', 'example' => '79c0alxxxx', ], ], ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值:'."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '提交知识库创建任务', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:SubmitIndexJob权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,您必须预先调用 **CreateIndex** 接口,并且获取到对应的`IndexId`。'."\n" .'- 调用本接口后,任务需一定时间执行,高峰期可能耗时数小时。任务完成前请勿重复发起请求。如果需要查询任务的执行状态,可调用 **GetIndexJobStatus** 接口查询。'."\n" .'- 知识库创建完成后,接下来您便可以在[应用管理](https://bailian.console.aliyun.com/?tab=app#/app-center)[应用管理](https://modelstudio.console.alibabacloud.com/?tab=app#/app-center)中将创建好的知识库与您位于相同的业务空间里的智能体应用或者工作流应用'."\n" .'关联(或者通过[应用调用](~~2846132~~)的`rag_options`传入`IndexID`),以便为您的阿里云百炼应用补充私有知识和提供最新信息。当然,您也可以选择不使用阿里云百炼应用,直接通过调用 **Retrieve** 接口来查询知识库。'."\n" .'- 本接口不具备幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'SubmitIndexAddDocumentsJob' => [ 'summary' => '向指定知识库中追加导入已解析的文件。', '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' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", ], ], [ 'name' => 'IndexId', 'in' => 'query', 'schema' => [ 'description' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', ], ], [ 'name' => 'SourceType', 'in' => 'query', 'schema' => [ 'description' => '数据来源类型。取值范围:'."\n" .'- DATA_CENTER_CATEGORY:类目类型,即导入[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)中指定类目下的所有文档,支持导入多个类目。'."\n" .'- DATA_CENTER_FILE:文档类型,即导入[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)下的指定文件,支持导入多个文件。'."\n" ."\n" .'> 如果本参数传入DATA_CENTER_CATEGORY,则必须指定`CategoryIds`参数;如果本参数传入DATA_CENTER_FILE,则必须指定`DocumentIds`参数。'."\n" .'>', 'type' => 'string', 'required' => true, 'enumValueTitles' => [ 'DATA_CENTER_CATEGORY' => '类目类型', 'DATA_CENTER_FILE' => '文档类型', ], 'example' => 'DATA_CENTER_FILE', ], ], [ 'name' => 'DocumentIds', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '文件 ID 列表。', 'type' => 'array', 'items' => [ 'description' => '文件 ID,即 **AddFile** 接口返回的`FileId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)页面,单击文件名称旁的 ID 图标获取。', 'type' => 'string', 'required' => false, 'example' => 'doc_ea4a504d9ce545508d8aa6d90371bf54xxxxxxxx', ], 'required' => false, ], ], [ 'name' => 'CategoryIds', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '类目 ID 列表。', 'type' => 'array', 'items' => [ 'description' => '类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击类目旁的 ID 图标获取。', 'type' => 'string', 'required' => false, 'example' => 'cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx'."\n", ], 'required' => false, ], ], [ 'name' => 'ChunkMode', 'in' => 'query', 'schema' => [ 'description' => ''."\n" .'启用自定义切分(仅对您本次追加的文件生效)。更多信息,请参见[知识库](~~2807740~~)。可能取值(不支持同时传入多个值):'."\n" ."\n" .'- **length**:按长度切分。严格按照您指定的`ChunkSize`和`OverlapSize`切分。 若您未传入这两个参数,系统将采用默认值(`ChunkSize`为500,`OverlapSize`为100)。按长度切分不支持`Separator`(即使传入也不生效)。'."\n" .'- **page**:按页切分。如果指定了`ChunkSize`,切分时将一并考虑(未传入时,将使用默认值500)。按页切分不支持`OverlapSize`和`Separator`(即使传入也不生效)。'."\n" .'- **h1**:按照一级标题切分。如果指定了`ChunkSize`,切分时将一并考虑(未传入时,将使用默认值 500)。按照一级标题切分不支持`OverlapSize`和`Separator`(即使传入也不生效)。'."\n" .'- **h2**:按照二级标题切分。如果指定了`ChunkSize`,切分时将一并考虑(未传入时,将使用默认值 500)。按照二级标题切分不支持`OverlapSize`和`Separator`(即使传入也不生效)。'."\n" .'- **regex**:按照正则切分,此时必须指定`Separator`参数。如果指定了`ChunkSize`,切分时将一并考虑(未传入时,将使用默认值 500)。按正则切分不支持`OverlapSize`(即使传入也不生效)。'."\n" ."\n" .'默认值为空,采用智能切分。'."\n" ."\n\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" ."\n" .'', 'type' => 'string', 'required' => false, 'example' => 'length', ], ], [ 'name' => 'Separator', 'in' => 'query', 'schema' => [ 'description' => ''."\n" .'分句标识符,仅在`chunkMode`=**regex**时生效(否则即使传入也不生效)。可传入一个正则表达式(不支持多个),用于将文件分割为小段的文本切片。更多信息,请参见[知识库](~~2807740~~)。'."\n" ."\n" .'使用智能切分(未指定`chunkMode`)时,保持默认空值即可。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" ."\n" .'', 'type' => 'string', 'required' => false, 'example' => '(?<=。)', ], ], [ 'name' => 'ChunkSize', 'in' => 'query', 'schema' => [ 'description' => ''."\n" .'分段长度,即您希望每个文本切片的字符数上限(仅对您本次追加的文件生效)。超过该长度时:'."\n" ."\n" .'- **智能切分**(未指定`chunkMode`):文本很可能会被截断。'."\n" .'- **自定义切分**(指定了`chunkMode`):文本将被强制切割。'."\n" ."\n" .'取值范围[1-6000]。如果未传入本参数,将使用默认值 500。'."\n" ."\n" .'更多信息,请参见[知识库](~~2807740~~)。'."\n" ."\n" .'> 请注意,如果您指定了`ChunkSize`参数且小于100,则必须指定`OverlapSize`参数。您也可以不指定这2个参数(系统将采用默认值)。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" ."\n" .'', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '128', ], ], [ 'name' => 'OverlapSize', 'in' => 'query', 'schema' => [ 'description' => ''."\n" .'分段重叠长度(仅对您本次追加的文件生效)。它表示当前文本切片与上一个文本切片的重叠字符数。更多信息,请参见[知识库](~~2807740~~)。取值范围[0-1024]。'."\n" ."\n" .'如果未传入本参数,将使用默认值 100。'."\n" .'>请注意,`OverlapSize`的值必须小于`ChunkSize`的值,否则会导致切分异常。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'> 该参数暂不开放,请勿传入。'."\n" ."\n" .'', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '16', ], ], [ 'name' => 'EnableHeaders', 'in' => 'query', 'schema' => [ 'description' => 'Excel文件表头是否支持拼装。开启后,知识库会将所有xlsx、xls格式文件的首行数据视为表头,并自动拼接到每个文本切片中(数据行),避免大模型误将表头视为普通数据行来处理。'."\n" ."\n\n" .'> 建议仅在导入文件均为xlsx、xls格式且含表头时开启,否则无需开启。'."\n" .'>'."\n" ."\n" .'取值范围:'."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n" .'默认值为 false,即不开启。', 'type' => 'boolean', 'required' => false, 'enumValueTitles' => [ '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。', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', ], 'Data' => [ 'description' => '接口返回的业务字段。', 'type' => 'object', 'properties' => [ 'Id' => [ 'description' => '任务 ID,又称`JobId`。', 'type' => 'string', 'example' => '42687eb254a34802bed398357f5498ae', ], ], ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" ."\n" .'- true:成功。'."\n" .'- false:失败。', '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' => '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' => '提交知识库追加任务', 'description' => ''."\n" ."\n" .'- 本接口不支持数据查询/图片问答类知识库。关于如何更新数据查询/图片问答类知识库,请参见[知识库](~~2807740~~)一文中关于更新知识库的说明。'."\n" ."\n\n" .''."\n" .''."\n" ."\n" .'- 本接口不支持数据查询/图片问答类知识库。关于如何更新数据查询/图片问答类知识库,请参见[知识库](~~2807740~~)一文中关于更新知识库的说明。'."\n" ."\n\n" .''."\n" ."\n" .'- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:SubmitIndexAddDocumentsJob权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,请确保您的知识库已经创建完成且未被删除(即知识库ID`IndexId`有效)。'."\n" .'- 调用该接口前,请先调用 **AddFile** 接口将您需要追加导入的文件上传至阿里云百炼。'."\n" .'- 调用本接口后,任务需一定时间执行,高峰期可能耗时数小时。任务完成前请勿重复发起请求。如果需要查询任务的执行状态,可调用 **GetIndexJobStatus** 接口查询。此接口返回的文件列表`Documents`为您本次追加(由您提供的`job_id`唯一确定)全部文件,您可以查看每个文件是否导入(解析)成功。注意频繁调用 GetIndexJobStatus 接口会被限流,频率请勿高于20次/分钟。 '."\n" .'- 本接口调用成功后,将执行一段时间,请求返回前请勿重复发起请求。本接口不具备幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'Retrieve' => [ 'summary' => '在指定的知识库中检索信息。', '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' => '输入文本(原始输入prompt)。Query的长度和字符没有限制。', 'type' => 'string', 'required' => false, 'example' => '阿里云百炼平台介绍', ], ], [ 'name' => 'DenseSimilarityTopK', 'in' => 'query', 'schema' => [ 'description' => '向量检索 Top K,通过生成输入文本的向量并在知识库中检索与其向量表示最相似的 K 个文本切片。K的取值范围[0-100]。'."\n" .'`DenseSimilarityTopK`和`SparseSimilarityTopK`二者之和小于等于200。'."\n" ."\n" .'默认值为100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100', ], ], [ 'name' => 'EnableReranking', 'in' => 'query', 'schema' => [ 'description' => '是否开启重排序。更多信息,请参见[知识库](~~2807740~~)。取值范围:'."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n" .'默认值为 true。', 'type' => 'boolean', 'required' => false, 'enumValueTitles' => [ 'true' => '开启', 'false' => '不开启', ], 'example' => 'true', ], ], [ 'name' => 'EnableRewrite', 'in' => 'query', 'schema' => [ 'description' => '是否开启[多轮对话改写](https://help.aliyun.com/model-studio/use-cases/rag-optimization#b7031e2ad6cji)[多轮对话改写](https://www.alibabacloud.com/help/model-studio/use-cases/rag-optimization#b7031e2ad6cji)。'."\n" .'取值范围:'."\n" .'- true:开启。'."\n" .'- false:不开启。'."\n" ."\n" .'默认值为 false。', 'type' => 'boolean', 'required' => false, 'enumValueTitles' => [ 'true' => '开启', 'false' => '不开启', ], 'example' => 'false', ], ], [ 'name' => 'Rerank', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '重排序配置。', 'type' => 'array', 'items' => [ 'description' => '重排序配置对象。', 'type' => 'object', 'properties' => [ 'ModelName' => [ 'description' => '使用指定的排序模型。此处指定值将覆盖创建知识库时所选择的排序模型。取值范围:'."\n" ."\n" .''."\n" ."\n" .'- qwen3-rerank-hybrid:qwen3-rerank(hybrid)排序。'."\n" .'- qwen3-rerank:qwen3-rerank排序。'."\n" .'- gte-rerank-hybrid:gte-rerank(hybrid)排序。'."\n" .'- gte-rerank:gte-rerank排序。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'- gte-rerank-hybrid:官方排序。'."\n" .'- gte-rerank:gte-rerank排序。'."\n" ."\n\n" ."\n" .''."\n" ."\n\n" .'默认值为空,使用创建知识库时选择的排序模型。'."\n" ."\n\n" .''."\n" ."\n" .'> 如仅需语义排序,可使用`qwen3-rerank`;若同时需要语义排序和文本匹配特征以确保相关性,建议使用`qwen3-rerank-hybrid`。'."\n" .'>'."\n" ."\n\n" .''."\n" ."\n\n" ."\n" .''."\n" ."\n" .'> 如仅需语义排序,可使用`gte-rerank`;若同时需要语义排序和文本匹配特征以确保相关性,建议使用`gte-rerank-hybrid`。'."\n" .'>'."\n" ."\n\n" .''."\n" ."\n\n" ."\n" .''."\n" ."\n" .'> `gte-rerank-hybrid`与`gte-rerank`后续停止更新,不建议使用。'."\n" .'>'."\n" ."\n\n" .'', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'gte-rerank-hybrid' => 'gte-rerank(hybrid)排序', 'gte-rerank' => 'gte-rerank排序', ], 'example' => 'gte-rerank-hybrid', ], ], 'required' => false, ], 'required' => false, ], ], [ 'name' => 'RerankMinScore', 'in' => 'query', 'schema' => [ 'description' => '相似度阈值。该阈值表示允许召回的文本切片的最低相似度分数,用于筛选Rank模型返回的文本切片,即只有分数超过此数值的文本切片才会被召回。取值范围[0.01-1.00]。此参数的优先级大于知识库相似度阈值配置。'."\n" ."\n" .'当未指定具体值时,默认采用该知识库配置的相似度阈值。', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0.20', ], ], [ 'name' => 'RerankTopN', 'in' => 'query', 'schema' => [ 'description' => '重排序后的 Top N 返回数据。取值范围[1-20],默认值为5。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '5', ], ], [ 'name' => 'Rewrite', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '多轮对话改写配置。', 'type' => 'array', 'items' => [ 'description' => '多轮对话改写配置对象。', 'type' => 'object', 'properties' => [ 'ModelName' => [ 'description' => '多轮对话改写模型名称。它会基于会话上下文自动调整原始输入prompt(用户问题)以提升检索效果。取值范围:'."\n" .'- conv-rewrite-qwen-1.8b:conv-rewrite-qwen-1.8b模型(目前只支持该模型)'."\n" ."\n" .'默认值为空,采用conv-rewrite-qwen-1.8b模型。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'conv-rewrite-qwen-1.8b' => 'conv-rewrite-qwen-1.8b模型', ], 'example' => 'conv-rewrite-qwen-1.8b', ], ], 'required' => false, ], 'required' => false, ], ], [ 'name' => 'SparseSimilarityTopK', 'in' => 'query', 'schema' => [ 'description' => '关键词检索TopK,即在知识库中查找与输入文本的关键词精确匹配的切片。它可以帮助您过滤掉无关的文本切片,提供更准确的结果。'."\n" .'取值范围[0-100]。'."\n" .'`DenseSimilarityTopK`和`SparseSimilarityTopK`二者之和小于等于200。'."\n" ."\n" .'默认值为:100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx'."\n", ], ], [ 'name' => 'IndexId', 'in' => 'query', 'schema' => [ 'description' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。'."\n" ."\n" .'> - 请确保对应知识库已成功创建且未被删除。', 'type' => 'string', 'required' => true, 'example' => '5pwe0mxxxx', ], ], [ 'name' => 'SaveRetrieverHistory', 'in' => 'query', 'schema' => [ 'description' => '是否保存历史文本切片召回测试数据。取值范围:'."\n" .'- true:保存。'."\n" .'- false:不保存。'."\n" ."\n" .'默认值为:false。', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'default' => 'false', ], ], [ 'name' => 'SearchFilters', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '支持通过SearchFilter设置个性化的检索条件(比如标签),对语义检索结果进行过滤,以排除与查询Query无关的信息。使用方法请参见[知识库SearchFilters](~~2869641~~)。', 'type' => 'array', 'items' => [ 'description' => '检索条件对象。', 'type' => 'object', 'required' => false, 'additionalProperties' => [ 'type' => 'string', ], ], 'required' => false, ], ], [ 'name' => 'Images', 'in' => 'query', 'allowEmptyValue' => true, 'style' => 'simple', 'schema' => [ 'description' => '支持在提问时传入图片URL地址。', 'type' => 'array', 'items' => [ 'description' => ''."\n" ."\n" .'检索图片问答类知识库时您可传入图片URL地址。当该知识库中存在图片索引时,系统会将输入图片转为向量并检索到相关记录;如果不存在图片索引,则输入的图片不会用于检索。'."\n" .'> 本字段不支持文档搜索/数据查询/音视频搜索类知识库(即使传入也不生效)'."\n" ."\n" .'> 请确保链接公开可访问且指向一个有效的图片文件。格式示例:https://example.com/downloads/pic.jpg'."\n" ."\n" .''."\n" ."\n\n" ."\n\n" .''."\n" ."\n" .'检索图片问答知识库时您可传入图片URL地址。当该知识库中存在图片索引时,系统会将输入图片转为向量并检索到相关记录;如果不存在图片索引,则输入的图片不会用于检索。'."\n" .'> 本字段不支持文档搜索/数据查询知识库(即使传入也不生效)'."\n" ."\n" .'> 请确保链接公开可访问且指向一个有效的图片文件。格式示例:https://example.com/downloads/pic.jpg'."\n" ."\n\n" .'', 'type' => 'string', 'required' => false, 'example' => 'https://example.com/downloads/pic.jpg', ], 'required' => false, ], ], [ 'name' => 'QueryHistory', 'in' => 'query', 'allowEmptyValue' => false, 'style' => 'json', 'schema' => [ 'description' => '[多轮对话改写](https://help.aliyun.com/model-studio/use-cases/rag-optimization#b7031e2ad6cji)[多轮对话改写](https://www.alibabacloud.com/help/model-studio/use-cases/rag-optimization#b7031e2ad6cji)支持您传入自己管理的对话历史。仅在EnableRewrite=**true** 时生效(否则即使传入也不生效)。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'role' => [ 'description' => '角色。'."\n" ."\n" .'取值范围:'."\n" ."\n" .'- user:传入此角色,此时content表示您输入给阿里云百炼应用的文本。'."\n" .'- assistant:传入此角色,此时content表示阿里云百炼应用的回复。', 'type' => 'string', 'required' => false, 'example' => 'user'."\n", ], 'content' => [ 'description' => '对应角色的问题或者回答内容。', 'type' => 'string', 'required' => false, 'example' => '代表一段文本。', ], ], 'required' => false, ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'Index.InvalidParameter', ], 'Data' => [ 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'Nodes' => [ 'description' => '命中的文本切片列表。', 'type' => 'array', 'items' => [ 'description' => '文本切片对象。', 'type' => 'object', 'properties' => [ 'Metadata' => [ 'description' => ''."\n" ."\n" .'文本切片的元数据Map。'."\n" ."\n" .'> 文档搜索类知识库的元数据Map中`file_path`字段无意义,请勿在业务代码中使用。'."\n" ."\n" .'> 检索文档搜索类识库时,若切片包含图片,将通过元数据 Map 中` image_url `字段透出,并附有过期时间。'."\n" ."\n" .'> 检索音视频搜索类知识库时,若切片包含音频,将通过元数据 Map 中` audio_url `字段透出,并附有过期时间。'."\n" ."\n" .'> 检索音视频搜索类知识库时,若切片包含视频,将通过元数据 Map 中` video_url `字段透出,并附有过期时间。'."\n" ."\n" .''."\n" .''."\n" ."\n" .'文本切片的元数据Map。'."\n" ."\n" .'> 文档搜索类知识库的元数据Map中`file_path`字段无意义,请勿在业务代码中使用。'."\n" ."\n" .'> 检索文档搜索类知识库时,若切片包含图片,将通过元数据 Map 中` image_url `字段透出,并附有过期时间。'."\n" ."\n" .'', 'type' => 'any', 'example' => '{'."\n" .' "parent": "",'."\n" .' "file_path": "https://***",'."\n" .' "image_url": ['."\n" .' "http://***"'."\n" .' ],'."\n" .' "nid": "***",'."\n" .' "title": "阿里云百炼文档",'."\n" .' "doc_id": "doc_***",'."\n" .' "content": "阿里云百炼是基于通义大模型、行业大模型以及三方大模型的一站式大模型开发平台。面向企业客户和个人开发者,提供完整的模型服务工具和全链路应用开发套件,预置丰富的能力插件,提供API及SDK等便捷的集成方式,高效完成大模型应用构建",'."\n" .' "workspace_id": "ws_***",'."\n" .' "hier_title": "阿里云百炼文档",'."\n" .' "doc_name": "阿里云百炼文档介绍.pdpf",'."\n" .' "pipeline_id": "rhd***",'."\n" .' "_id": "ws_***"'."\n" .'}', ], 'Score' => [ 'description' => '文本切片的相似度得分,可能值范围:[0-1]。', 'type' => 'number', 'format' => 'double', 'example' => '0.3', ], 'Text' => [ 'description' => '文本切片内容。', 'type' => 'string', 'example' => '阿里云百炼是基于通义大模型、行业大模型以及三方大模型的一站式大模型开发平台。面向企业客户和个人开发者,提供完整的模型服务工具和全链路应用开发套件,预置丰富的能力插件,提供API及SDK等便捷的集成方式,高效完成大模型应用构建。', ], ], ], ], ], ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-7734-4F9A-8464-2446A84821CA', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], ], ], ], ], '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' => '检索知识库', 'description' => ''."\n" ."\n" .'- **调用方式**:可通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)(配合阿里云访问密钥[AccessKey](~~116401~~))或[Spring AI Alibaba](~~2990886~~)(配合阿里云百炼[API-Key](~~2712195~~))检索知识库,两者均已封装复杂的签名计算逻辑,可简化您的调用过程。'."\n" .'- **权限要求**:'."\n" .' - **RAM用户(子账号)**:需先获取阿里云百炼的[API权限](~~2848578~~)(可使用`AliyunBailianDataFullAccess`策略,该策略已包含本接口所需的sfm:Retrieve权限点),并[加入一个业务空间](~~2851098~~)后,才能调用本接口。'."\n" .' - **阿里云账号(主账号)**:默认拥有权限,可直接调用。'."\n" .'- **响应延迟**:由于接口调用包含复杂的检索和匹配,响应时间可能较长,建议您合理设置请求的超时与重试策略。'."\n" .'- **幂等性**:本接口具有幂等性。'."\n" ."\n" .''."\n" ."\n\n" .''."\n" ."\n" .'- **调用方式**:推荐使用最新版[阿里云百炼 SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)调用,SDK 已封装复杂的签名计算逻辑,可简化您的调用过程。'."\n" .'- **权限要求**:'."\n" .' - **RAM用户(子账号)**:需先获取阿里云百炼的[API权限](~~2848578~~)(可使用`AliyunBailianDataFullAccess`策略,该策略已包含本接口所需的sfm:Retrieve权限点),并[加入一个业务空间](~~2851098~~)后,才能调用本接口。'."\n" .' - **阿里云账号(主账号)**:默认拥有权限,可直接调用。'."\n" .'- **响应延迟**:由于接口调用包含复杂的检索和匹配,响应时间可能较长,建议您合理设置请求的超时与重试策略。'."\n" .'- **幂等性**:本接口具有幂等性。'."\n" .'', ], 'ListIndexDocuments' => [ 'summary' => '获取指定知识库中的文件,以及它们的概要信息。', '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' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', ], ], [ 'name' => 'DocumentStatus', 'in' => 'query', 'schema' => [ 'description' => '即通过文件导入状态对接口返回的文件列表进行过滤。取值范围:'."\n" .'- INSERT_ERROR:文件导入失败。'."\n" .'- RUNNING:文件导入中。'."\n" .'- DELETED:文件已删除。'."\n" .'- FINISH:文件导入成功。'."\n" ."\n" .'默认值为空,即不使用文件导入状态对结果进行过滤。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'INSERT_ERROR' => '文件导入失败', 'RUNNING' => '文件导入中', 'DELETED' => '文件已删除', 'FINISH' => '文件导入成功', ], 'example' => 'FINISH', ], ], [ 'name' => 'DocumentName', 'in' => 'query', 'schema' => [ 'description' => '即通过文件名称(不含后缀)对接口返回的文件列表进行过滤。默认值为空,即不使用文件名称对结果进行过滤。', 'type' => 'string', 'required' => false, 'example' => 'product-overview', ], ], [ 'name' => 'EnableNameLike', 'in' => 'query', 'schema' => [ 'description' => '是否开启文件名称的模糊匹配,与`DocumentName`参数配合使用。取值范围:'."\n" .'- true:根据文件名称对接口返回的文件列表进行模糊匹配。'."\n" .'- false:默认根据文件名称进行精确匹配。'."\n" ."\n" .'默认值为false。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'true' => '开启', 'false' => '不开启', ], 'example' => 'false', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'description' => '指定要查询的页码。起始值为1。默认值为1。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'description' => '指定分页查询时每页展示的文件数量。最大值不限。'."\n" .'默认值为10。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833', ], 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'InvalidParameter', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', ], 'Success' => [ 'description' => '接口调用是否成功,可能值:'."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], 'Data' => [ 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'Documents' => [ 'description' => '返回知识库中的文件列表,按文档导入时间倒序排序(与控制台一致)。', 'type' => 'array', 'items' => [ 'description' => '文件对象。', 'type' => 'object', 'properties' => [ 'SourceId' => [ 'description' => ''."\n" ."\n" .'对于文档搜索/音视频搜索类知识库,该参数指的是类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取。'."\n" ."\n\n" .'对于数据查询/图片问答类知识库,该参数指的是数据表 ID。您可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-表格页签,单击数据表名称旁的 ID 图标获取。'."\n" ."\n\n" .''."\n" ."\n" .''."\n" ."\n" .'对于文档搜索类知识库,该参数指的是类目 ID,即 **AddCategory** 接口返回的`CategoryId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签,单击类目名称旁的 ID 图标获取。'."\n" ."\n\n" .'对于数据查询/图片问答类知识库,该参数指的是数据表 ID。您可以在[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-表格页签,单击数据表名称旁的 ID 图标获取。'."\n" ."\n" .'', 'type' => 'string', 'example' => 'cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx', ], 'Id' => [ 'description' => '文件 ID。', 'type' => 'string', 'example' => 'doc_c134aa2073204a5d936d870bf960f56axxxxxxxx', ], 'Name' => [ 'description' => '文件名称。', 'type' => 'string', 'example' => 'product-overview', ], 'Size' => [ 'description' => '文件大小,单位字节Byte。', 'type' => 'integer', 'format' => 'int32', 'example' => '996765', ], 'DocumentType' => [ 'description' => '文件格式类型。可能值为: pdf、docx、doc、txt、md、pptx、ppt、png、jpg、jpeg、bmp、gif、EXCEL。', 'type' => 'string', 'example' => 'pdf', ], 'Status' => [ 'description' => '文件导入状态。可能值为:'."\n" .'- INSERT_ERROR:文件导入失败。'."\n" .'- RUNNING:文件导入中。'."\n" .'- DELETED:文件已删除。'."\n" .'- FINISH:文件导入成功。', 'type' => 'string', 'enumValueTitles' => [ 'INSERT_ERROR' => '文件导入失败', 'RUNNING' => '文件导入中', 'DELETED' => '文件已删除', 'FINISH' => '文件导入成功', ], 'example' => 'RUNNING', ], 'Code' => [ 'description' => '文件导入错误状态码。', 'type' => 'string', 'example' => '110002', ], 'Message' => [ 'description' => '文件导入错误信息。', 'type' => 'string', 'example' => 'check fileUrlKey[file_path] / fileNameKey[null] / fileExtensionKey[file_extension] is invalid', ], 'GmtModified' => [ 'description' => '文件导入知识库的时间,采用Unix timestamp格式。', 'type' => 'integer', 'format' => 'int64', 'example' => '1744856423000', ], ], ], ], 'IndexId' => [ 'description' => '知识库 ID。', 'type' => 'string', 'example' => 'pno97txxxx', ], 'TotalCount' => [ 'description' => '返回结果的总条数。', 'type' => 'integer', 'format' => 'int64', 'example' => '2437', ], 'PageNumber' => [ 'description' => '返回指定的页码。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'PageSize' => [ 'description' => '返回指定的每页条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], ], ], 'Status' => [ 'description' => '接口返回的状态码。', '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' => '查询知识库下的文件列表', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:ListIndexFiles权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,请确保您的知识库已经创建完成且未被删除(即知识库 ID`IndexId`有效)。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过15次/秒。如遇限流,请稍后重试。', ], 'ListIndexFileDetails' => [ 'summary' => '获取指定知识库中的文件,以及它们的详细信息。', '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' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => false, 'example' => '79c0alxxxx', ], ], [ 'name' => 'DocumentStatus', 'in' => 'query', 'schema' => [ 'description' => '即通过文件导入状态对接口返回的文件列表进行过滤。取值范围:'."\n" ."\n" .'- INSERT_ERROR:文件导入失败。'."\n" .'- RUNNING:文件导入中。'."\n" .'- DELETED:文件已删除。'."\n" .'- FINISH:文件导入成功。'."\n" ."\n" .'默认值为空,即不使用文件导入状态对结果进行过滤。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'INSERT_ERROR' => '文件导入失败', 'RUNNING' => '文件导入中', 'DELETED' => '文件已删除', 'FINISH' => '文件导入成功', ], 'example' => 'FINISH', ], ], [ 'name' => 'DocumentName', 'in' => 'query', 'schema' => [ 'description' => '即通过文件名称对接口返回的文件详情列表进行过滤。默认值为空,即不使用文件名称对结果进行过滤。', 'type' => 'string', 'required' => false, 'example' => '翻译平台运维文档', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'description' => '指定要查询的页码。起始值为 1。默认值为 1。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'description' => '指定分页查询时每页展示的文件数量 ,最大值10。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'EnableNameLike', 'in' => 'query', 'schema' => [ 'description' => '是否开启文件名称的模糊匹配,与`DocumentName`参数配合使用。取值范围:'."\n" ."\n" .'- true:根据文件名称对接口返回的文件列表进行模糊匹配。'."\n" .'- false:默认根据文件名称进行精确匹配。'."\n" ."\n" .'默认值为 false。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ '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。', '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' => '接口调用是否成功,可能值:'."\n" ."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], 'Data' => [ 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'Documents' => [ 'description' => '返回知识库中的文件列表,按文件导入时间倒序排序(与控制台一致)。', 'type' => 'array', 'items' => [ 'description' => '文件对象。', 'type' => 'object', 'properties' => [ 'Status' => [ 'description' => '文件导入状态。可能值为:'."\n" ."\n" .'- INSERT_ERROR:文件导入失败。'."\n" .'- RUNNING:文件导入中。'."\n" .'- DELETED:文件已删除。'."\n" .'- FINISH:文件导入成功。', 'type' => 'string', 'example' => 'RUNNING', ], 'EnableHeaders' => [ 'description' => 'Excel文件表头是否支持拼装。', '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' => '文件大小,单位字节Byte。', 'type' => 'integer', 'format' => 'int32', 'example' => '996764'."\n", ], 'SourceId' => [ 'description' => '类目 ID。', 'type' => 'string', 'example' => 'cate_21a407a3372c4ba7aedc649709143f0cxxxxxxxx'."\n", ], 'GmtModified' => [ 'description' => '文件导入知识库的时间,采用 Unix timestamp 格式。', 'type' => 'integer', 'format' => 'int64', 'example' => '1744856423000'."\n", ], 'DocumentType' => [ 'description' => '文件格式类型。可能值为: pdf、docx、doc、txt、md、pptx、ppt、png、jpg、jpeg、bmp、gif、EXCEL。', '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' => '翻译平台运维文档'."\n", ], 'ChunkSize' => [ 'description' => '分段长度,即文本切片的字符数。', 'type' => 'string', 'example' => '600', ], 'Id' => [ 'description' => '文件 ID。', 'type' => 'string', 'example' => 'doc_c134aa2073204a5d936d870bf960f56axxxxxxxx'."\n", ], ], ], ], 'IndexId' => [ 'description' => '知识库 ID。', 'type' => 'string', 'example' => '79c0alxxxx', ], 'TotalCount' => [ 'description' => '返回结果的总条数。', 'type' => 'integer', 'format' => 'int64', 'example' => '2437', ], 'PageNumber' => [ 'description' => '返回指定的页码。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'PageSize' => [ 'description' => '返回指定的每页条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], ], ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], ], ], ], ], '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' => '查询知识库下的文件详情', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:ListIndexFiles权限点),然后才能调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,请确保您的知识库已经创建完成且未被删除(即知识库 ID`IndexId`有效)。'."\n" .'- 本接口具有幂等性。', ], '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' => '业务空间 ID', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', ], ], [ 'name' => 'Id', 'in' => 'query', 'allowEmptyValue' => false, 'schema' => [ 'title' => '幂等参数', 'description' => '知识库 ID', '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' => '排序最低分数,取值范围[0-1]', 'type' => 'string', 'required' => false, 'example' => '0.01', ], ], [ 'name' => 'DenseSimilarityTopK', 'in' => 'query', 'schema' => [ 'description' => '向量检索 Top K,通过生成输入文本的向量并在知识库中检索与其向量表示最相似的 K 个文本切片。K的取值范围[0-100]。'."\n" .'`DenseSimilarityTopK`和`SparseSimilarityTopK`二者之和小于等于200。'."\n" ."\n" .'默认值为100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '100', 'minimum' => '0', 'example' => '100', 'default' => '100', ], ], [ 'name' => 'SparseSimilarityTopK', 'in' => 'query', 'schema' => [ 'description' => '关键词检索TopK,即在知识库中查找与输入文本的关键词精确匹配的切片。它可以帮助您过滤掉无关的文本切片,提供更准确的结果。'."\n" .'取值范围[0-100]。'."\n" .'`DenseSimilarityTopK`和`SparseSimilarityTopK`二者之和小于等于200。'."\n" ."\n" .'默认值为:100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '100', 'minimum' => '0', 'example' => '100', 'default' => '100', ], ], [ 'name' => 'PipelineCommercialType', 'in' => 'query', 'schema' => [ 'description' => '知识库的规格类型。取值范围:'."\n" ."\n" .'- standard:标准版'."\n" ."\n" .'- enterprise:旗舰版', 'type' => 'string', 'required' => false, 'example' => 'standard', 'enum' => [ 'standard', 'enterprise', ], ], ], [ 'name' => 'PipelineCommercialCu', 'in' => 'query', 'schema' => [ 'description' => '指定旗舰版知识库的 RCU 数量,即仅当 pipelineCommercialType 指定 enterprise 时才需要传入。'."\n" ."\n" .'取值范围:[1-200]。', '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' => '请求 ID', 'type' => 'string', 'example' => '17204B98-7734-4F9A-8464-xxx', ], 'Data' => [ 'description' => '接口业务数据字段', 'type' => 'object', 'properties' => [ 'Id' => [ 'description' => '知识库ID', 'type' => 'string', 'example' => '79c0alxxxx', ], ], ], 'Status' => [ 'description' => '接口返回的状态码', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" ."\n" .'true:成功'."\n" ."\n" .'false:失败', '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"}]', 'title' => '更新知识库', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,请确保您的知识库已经创建完成且未被删除(即知识库 ID`IndexId`有效)。'."\n" .'- 本接口具有幂等性。', 'requestParamsDescription' => '参数Name,Description,RerankMinScore ,至少填写一项,不能同时为空。', ], 'DeleteIndexDocument' => [ 'summary' => '永久删除指定知识库中的文件。', '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' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', ], ], [ 'name' => 'IndexId', 'in' => 'query', 'schema' => [ 'description' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', ], ], [ 'name' => 'DocumentIds', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '文件 ID 列表。', 'type' => 'array', 'items' => [ 'description' => '文件 ID,即 **AddFile** 接口返回的`FileId`。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击文件名称旁的 ID 图标获取。', 'type' => 'string', 'required' => false, 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx', ], 'required' => true, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'Index.InvalidParameter', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', ], 'Success' => [ 'description' => '接口调用是否成功,可能值为:'."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], 'Data' => [ 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'DeletedDocument' => [ 'description' => '已成功删除的文件 ID 列表。', 'type' => 'array', 'items' => [ 'description' => '文件 ID。', 'type' => 'string', 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx', ], ], ], ], 'Status' => [ 'description' => '接口返回的状态码。', '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' => '删除知识库下的文件', 'description' => '- 本接口不支持删除数据查询/图片问答类知识库中的数据。请通过阿里云百炼控制台操作。'."\n" .'- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:DeleteIndexDocument权限点),然后才能调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,请确保您的知识库已经创建完成且未被删除(即知识库 ID`IndexId`有效)。'."\n" .'- 仅能删除知识库中状态为导入失败(INSERT_ERROR)或导入成功(FINISH)的文件。如需查询指定知识库下的文件状态,可调用 **ListIndexDocuments** 接口。'."\n" .'- 删除操作不可逆,被删的文件内容将无法恢复,且 **Retrieve** 接口将无法再获取其相关信息,请谨慎操作。'."\n" .'- 调用本接口不会删除[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)中已导入的文档。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'ListIndices' => [ 'summary' => '获取指定业务空间下知识库列表。', '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' => '知识库的名称。支持通过名称查找知识库。长度为 1~20 个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文、中文和数字等)。可以包含半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。'."\n" ."\n" .'默认值为空,即查询指定业务空间下的所有知识库。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [], 'example' => 'idx_status_score', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'description' => '指定要查询的页码。起始值为 1。默认值为 1。', 'type' => 'string', 'required' => false, 'example' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'description' => '指定分页查询时每页展示的知识库数量。最大值不限。'."\n" .'默认值为10。', 'type' => 'string', 'required' => false, 'example' => '10', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oq6xxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Data' => [ 'description' => '返回数据。', 'type' => 'object', 'properties' => [ 'PageNumber' => [ 'description' => '返回指定的页码。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'PageSize' => [ 'description' => '返回指定的每页条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'TotalCount' => [ 'description' => '返回结果的总条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '48', ], 'Indices' => [ 'description' => '知识库列表。', 'type' => 'array', 'items' => [ 'description' => '知识库对象。', 'type' => 'object', 'properties' => [ 'Id' => [ 'description' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'example' => 'lecxr5xxxx', ], 'Name' => [ 'description' => '知识库名称。', 'type' => 'string', 'example' => 'XXXX产品清单', ], 'Description' => [ 'description' => '知识库描述。', 'type' => 'string', 'example' => '清单中产品主要面向海外客户。', ], 'StructureType' => [ 'description' => '知识库类型。可能值:'."\n" ."\n" .'- UNSTRUCTURED:文档搜索类。', 'type' => 'string', 'enumValueTitles' => [], 'example' => 'UNSTRUCTURED', ], 'ChunkSize' => [ 'description' => '分段预估长度。可能值范围[1-2048]。', 'type' => 'integer', 'format' => 'int32', 'example' => '5', ], 'OverlapSize' => [ 'description' => '分段重叠长度。可能值范围[0-1024]。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'Separator' => [ 'description' => '分句标识符。如果有多个分句标识符,则用 | 分隔。可能值:'."\n" .'- \\\\n:换行'."\n" .'- ,:中文逗号'."\n" .'- ,:英文逗号'."\n" .'- 。:中文句号'."\n" .'- .:英文句号'."\n" .'- !:中文叹号'."\n" .'- !:英文叹号'."\n" .'- ;:中文分号'."\n" .'- ;:英文分号'."\n" .'- ?:中文问号'."\n" .'- ?:英文问号', 'type' => 'string', 'example' => '\\n', ], 'EmbeddingModelName' => [ 'description' => 'Embedding模型名称。可能值:'."\n" ."\n" .''."\n" ."\n" .'- text-embedding-v4:text-embedding-v4模型。'."\n" .'- text-embedding-v3:text-embedding-v3模型。'."\n" .'- text-embedding-v2:text-embedding-v2模型。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'- text-embedding-v2:text-embedding-v2模型。'."\n" ."\n" .'', 'type' => 'string', 'example' => 'text-embedding-v2', ], 'RerankModelName' => [ 'description' => 'Rank模型名称。可能值:'."\n" ."\n" .''."\n" ."\n" .'- qwen3-rerank-hybrid:qwen3-rerank(hybrid)排序。'."\n" .'- qwen3-rerank:qwen3-rerank排序。'."\n" .'- gte-rerank-hybrid:gte-rerank(hybrid)排序。'."\n" .'- gte-rerank:gte-rerank排序。'."\n" ."\n" .''."\n" ."\n" .''."\n" ."\n" .'- gte-rerank-hybrid:官方排序。'."\n" .'- gte-rerank:gte-rerank排序。'."\n" ."\n" .'', 'type' => 'string', 'example' => 'gte-rerank-hybrid', ], 'RerankMinScore' => [ 'description' => '相似度阈值。范围[0.01-1.00]。', 'type' => 'string', 'example' => '0.01', ], 'SourceType' => [ 'description' => '阿里云百炼[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)的数据类型。'."\n" ."\n\n" .'对于文档搜索/音视频搜索类知识库,可能值:'."\n" .'- DATA_CENTER_CATEGORY:类目类型。'."\n" .'- DATA_CENTER_FILE:文件类型。'."\n" ."\n" .'对于数据查询/图片问答类知识库,可能值:'."\n" .'- DATA_CENTER_STRUCTURED_TABLE:数据表类型。', 'type' => 'string', 'example' => 'DATA_CENTER_FILE', ], 'DocumentIds' => [ 'description' => '文件 ID 列表。', 'type' => 'array', 'items' => [ 'description' => '文件 ID。', 'type' => 'string', 'example' => 'file_8c67b438043848199ffaa903d29addd4_xxxxxxxx', ], ], 'SinkType' => [ 'description' => '知识库的向量存储类型。可能值:'."\n" .'- ES:内置的向量数据库。'."\n" .'- BUILT_IN:内置的向量数据库。'."\n" .'- ADB:AnalyticDB for PostgreSQL数据库。', 'type' => 'string', 'example' => 'BUILT_IN', ], 'SinkInstanceId' => [ 'description' => '知识库的向量存储的实例 ID。', 'type' => 'string', 'example' => 'gp-bp1gq62t1788yxxxx', ], 'SinkRegion' => [ 'description' => '知识库的向量存储的实例地域。', 'type' => 'string', 'example' => 'cn-hangzhou', ], 'ConfgModel' => [ 'description' => '此知识库采用的配置模式。可能值:'."\n" .'- recommend:推荐配置。'."\n" .'- user-defined:自定义。', 'type' => 'string', 'example' => 'recommend', ], 'EnableRewrite' => [ 'description' => '此知识库是否开启了[多轮对话改写](https://help.aliyun.com/model-studio/use-cases/rag-optimization#b7031e2ad6cji)[多轮对话改写](https://www.alibabacloud.com/help/model-studio/use-cases/rag-optimization#b7031e2ad6cji)。可能值:'."\n" .'- true:已开启。'."\n" .'- false:未开启。', 'type' => 'boolean', 'example' => 'false', ], ], ], ], ], ], 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'Index.InvalidParameter', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', ], 'Success' => [ 'description' => '接口调用是否成功,可能值:'."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], 'Status' => [ 'description' => '接口返回的状态码。', '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' => '查询知识库列表', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:ListIndex权限点),然后才能调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'DeleteIndex' => [ 'summary' => '永久性删除指定的知识库。', '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' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => 'f89ie0xxxx', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'Index.InvalidParameter', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A-8464-2446A84821CA', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值:'."\n" .'- true:成功'."\n" .'- false:失败', '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' => '删除知识库', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:DeleteIndex权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,请确保您的知识库已经创建完成且未被删除(即知识库 ID`IndexId`有效)。'."\n" .'- 如果知识库正在被应用调用,需要先解除关联后才可删除。此操作当前只能通过控制台完成。具体操作请参见[知识库](~~2807740~~)。'."\n" .'- 删除操作不可逆,被删知识库将无法恢复,请谨慎操作。'."\n" .'- 调用本接口不会删除[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)中已导入的文件。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'ListChunks' => [ 'summary' => '查看文本切片列表及信息。', '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' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vxxxx', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求参数的主体信息。', 'type' => 'object', 'properties' => [ 'Fields' => [ 'description' => 'Fields是一个字段名数组,用于对本接口返回的Metadata字段中的非私有Field(以_下划线为前缀)进行过滤。默认Fields为空时,Metadata字段中的所有非私有的Field都会返回。若您希望返回的Metadata字段只包含指定的非私有Field,比如只包含title,则此处传入title即可。'."\n" ."\n" .'默认值为空。', 'type' => 'array', 'items' => [ 'description' => '字段名。', 'type' => 'string', 'required' => false, 'example' => 'name', ], 'required' => false, ], 'Filed' => [ 'description' => '本字段为阿里云百炼旧版SDK中的文件ID字段。具体用法和默认值与`FileId`字段完全一致。如果您使用的阿里云百炼SDK是以下版本(或更新版本),推荐改用 `FileId` 字段指定文件 ID。如果您使用的是SWIFT语言的阿里云百炼SDK,请继续使用本字段。'."\n" ."\n" .'- Java(异步):1.0.18'."\n" .'- Java:1.10.2'."\n" .'- TypeScript:1.10.2'."\n" .'- Go:1.10.2'."\n" .'- PHP:1.10.2'."\n" .'- Python:1.10.2'."\n" .'- C#:1.10.2'."\n" .'- C++:1.10.17'."\n" ."\n" .'> **如何查看阿里云百炼SDK版本**:访问[阿里云百炼SDK中心](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK中心](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29),单击左侧导航栏中的“**安装**”,API版本选择“**2023-12-29**”,然后选择您的开发语言,再单击“**历史版本**”即可查看。', 'type' => 'string', 'required' => false, 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx', ], 'FileId' => [ 'description' => ''."\n" ."\n" .'文件 ID,即 **AddFile** 接口返回的`FileId`。数据查询/图片问答类知识库不用传入此字段;文档搜索/音视频搜索类知识库必须传入此字段。您也可以在[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件页签,单击文件名称旁的 ID 图标获取。可以通过文件 ID 筛选返回的切片。默认值为空。'."\n" ."\n\n" .''."\n" ."\n" .''."\n" ."\n" .'文件 ID,即 **AddFile** 接口返回的`FileId`。数据查询/图片问答类知识库不用传入此字段;文档搜索类知识库必须传入此字段。您也可以在'."\n" .'[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击文件名称旁的 ID 图标获取。可以通过文件 ID 筛选返回的切片。默认值为空。'."\n" ."\n" .'', 'type' => 'string', 'required' => false, 'example' => 'file_5f03dfea56da4050ab68d61871fc4cb3_xxxxxxxx', ], 'IndexId' => [ 'description' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => 'otoru9xxxx', ], 'PageNum' => [ 'description' => '指定要查询的页码。起始值为 1,默认值为 1。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], 'PageSize' => [ 'title' => '', 'description' => '指定分页查询时每页展示的文本切片数量。最大为100。默认值为10。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', 'example' => 'Index.InvalidParameter', ], 'Data' => [ 'description' => '接口返回的业务字段。', 'type' => 'object', 'properties' => [ 'Nodes' => [ 'description' => '文本切片列表。', 'type' => 'array', 'items' => [ 'description' => '文本切片对象。', 'type' => 'object', 'properties' => [ 'Metadata' => [ 'description' => ''."\n" ."\n" .'文本切片的元数据Map。'."\n" ."\n" .'> 文档搜索类知识库的元数据Map中`file_path`字段无意义,请勿在业务代码中使用。'."\n" ."\n" .'> 检索文档搜索类识库时,若切片包含图片,将通过元数据 Map 中` image_url `字段透出,并附有过期时间。'."\n" ."\n" .'> 检索音视频搜索类知识库时,若切片包含音频,将通过元数据 Map 中` audio_url `字段透出,并附有过期时间。'."\n" ."\n" .'> 检索音视频搜索类知识库时,若切片包含视频,将通过元数据 Map 中` video_url `字段透出,并附有过期时间。'."\n" ."\n" .''."\n" .''."\n" ."\n" .'文本切片的元数据Map。'."\n" ."\n" .'> 文档搜索类知识库的元数据Map中`file_path`字段无意义,请勿在业务代码中使用。'."\n" ."\n" .'> 检索文档搜索类知识库时,若切片包含图片,将通过元数据 Map 中` image_url `字段透出,并附有过期时间。'."\n" ."\n" .'', 'type' => 'any', 'example' => '{'."\n" .' "file_path": "https://bailian-***",'."\n" .' "parent": "阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。",'."\n" .' "is_displayed_chunk_content": "true",'."\n" .' "image_url": [],'."\n" .' "nid": "83***",'."\n" .' "source": "0",'."\n" .' "_score": 0,'."\n" .' "title": "",'."\n" .' "doc_id": "file_24e***",'."\n" .' "content": "阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。",'."\n" .' "_rc_score": 0,'."\n" .' "workspace_id": "llm-zna***",'."\n" .' "hier_title": "",'."\n" .' "doc_name": "什么是阿里云百炼",'."\n" .' "pipeline_id": "j6b***",'."\n" .' "_id": "llm-zna5***"'."\n" .'}', ], 'Score' => [ 'description' => '文本切片的相似度得分。', 'type' => 'number', 'format' => 'double', 'example' => '0', ], 'Text' => [ 'description' => '文本切片内容。', 'type' => 'string', 'example' => '阿里云百炼是一站式的大模型开发及应用构建平台。不论是开发者还是业务人员,都能深入参与大模型应用的设计和构建。您可以通过简单的界面操作,在 5分钟内开发出一款大模型应用,或在几小时内训练出一个专属模型,从而将更多精力专注于应用创新。', ], ], ], ], 'Total' => [ 'description' => '返回结果的总条数。', 'type' => 'integer', 'format' => 'int64', 'example' => '1', ], ], ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'Required parameter(%s) missing or invalid, please check the request parameters.', ], 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1', ], 'Status' => [ 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'description' => '接口调用是否成功,可能值:'."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], ], ], ], ], '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' => '查询索引下的分片列表', 'description' => '- 对于文档搜索或音视频搜索类知识库,本接口可查询指定文件的所有切片内容;而对于数据查询或图片问答类知识库,则可获取全部文本切片的信息。'."\n" .'- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`,已包括sfm:ChunkList权限点),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,请确保您的知识库已经创建完成且未被删除(即知识库 ID`IndexId`有效)。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'UpdateChunk' => [ 'summary' => '修改知识库中指定文本切片的内容(content)和标题(title),并设置是否参与知识库检索。', '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' => '知识库 ID,即通过 **CreateIndex** 接口创建时返回的`Data.Id`,或在[知识库](https://bailian.console.aliyun.com/?tab=app#/knowledge-base)[知识库](https://modelstudio.console.alibabacloud.com/?tab=app#/knowledge-base)页面获取。', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx'."\n", ], ], [ 'name' => 'DataId', 'in' => 'query', 'schema' => [ 'description' => '文件 ID,即 **AddFile** 接口返回的`FileId`,也可在阿里云百炼控制台的[应用数据](https://bailian.console.aliyun.com/?tab=app#/data-center)-文件[应用数据](https://modelstudio.console.alibabacloud.com/?tab=app#/data-center)-文件页签,单击对应文件旁的 ID 图标获取。', 'type' => 'string', 'required' => true, 'example' => 'doc_c134aa2073204a5d936d870bf960f56axxxxxxxx'."\n", ], ], [ 'name' => 'ChunkId', 'in' => 'query', 'schema' => [ 'description' => '需要修改的文本切片ID,可通过 **ListChunks** 接口获取,其值位于返回结果中Node.Metadata._id字段。', 'type' => 'string', 'required' => true, 'example' => 'llm-5ip55o1zrzxx_09fe52x_xxxxx_033b551e10024029992e79767b151fxx_10024xx_0', ], ], [ 'name' => 'IsDisplayedChunkContent', 'in' => 'query', 'schema' => [ 'description' => '指定此文本切片是否参与知识库检索。可能值:'."\n" ."\n" .'- true:参与。'."\n" .'- false:不参与。'."\n" ."\n" .'默认值为true。', 'type' => 'boolean', 'required' => true, 'example' => 'true', ], ], [ 'name' => 'content', 'in' => 'query', 'schema' => [ 'description' => '文本切片的新内容。内容长度必须在10到6000个字符之间,且不能超过创建知识库时设定的最大分段长度。', 'type' => 'string', 'required' => true, 'example' => '在哲学中所获得的确定性类型不是科学的确定性(即对每个人的理智来说都一样的确定性),而是一种要在人类的整体本质中才能获得的亲证。哲学的每一形态都不同于科学,因为所有的哲学都没有得到一致的认可...', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx'."\n", ], ], [ 'name' => 'title', 'in' => 'query', 'schema' => [ 'description' => '文本切片的新标题。长度限制为0-50个字符,允许传入空字符串。如果传入空字符串,将清空已有标题;如果不传此参数,则保持原标题不变。', '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。', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833', ], 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', ], 'Success' => [ 'description' => '接口调用是否成功,可能值:'."\n" ."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true', ], 'Data' => [ 'description' => '请求成功返回的业务数据。', 'type' => 'boolean', 'example' => 'true', ], 'Status' => [ 'description' => '接口返回的状态码。', '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' => '修改切片', 'description' => '- **关键限制**:本接口仅支持文档搜索类知识库,不支持数据查询和图片问答类知识库。'."\n" .'- **权限要求**:'."\n" .' - **RAM用户(子账号)**:需先获取阿里云百炼的[API权限](~~2848578~~)(可使用`AliyunBailianDataFullAccess`策略,该策略已包含本接口所需的sfm:UpdateChunk权限点),并[加入一个业务空间](~~2851098~~)后,才能调用本接口。'."\n" .' - **阿里云账号(主账号)**:默认拥有权限,可直接调用。'."\n" .'- **调用方式**:推荐使用最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)调用,SDK已封装复杂的签名计算逻辑,可简化您的调用过程。'."\n" .'- **生效延迟**:更新后通常立即生效,高峰期可能稍有延迟(秒级)。'."\n" .'- **幂等性**:本接口具有幂等性。对已成功更新的文本切片进行重复操作时,接口将返回成功响应。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'DeleteChunk' => [ 'summary' => '删除知识库中的指定文本切片,被删的文本切片将无法被检索和召回。', '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' => '知识库 ID,即 **CreateIndex** 接口返回的`Data.Id`。', 'type' => 'string', 'required' => true, 'example' => '79c0alxxxx', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'description' => '知识库所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'ChunkIds', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '需要删除的文本切片列表(单次最多传入10个文本切片ID)。', 'type' => 'array', 'items' => [ 'description' => '文本切片ID,即 **ListChunks** 接口返回的Node对象里`Metadata`中的`_id`字段。', 'type' => 'string', 'required' => true, 'example' => 'llm-5ip55o1zrzxx_09fe52x_xxxxx_033b551e10024029992e79767b151fxx_10024xx_0', ], 'required' => true, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '35A267BF-xxxx-54DB-8394-AA3B0742D833'."\n", ], 'Code' => [ 'description' => '错误状态码。', 'type' => 'string', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', ], 'Success' => [ 'description' => '接口调用是否成功,可能值:'."\n" ."\n" .'- true:成功。'."\n" .'- false:失败。', 'type' => 'boolean', 'example' => 'true'."\n", ], 'Data' => [ 'description' => '请求成功返回的业务数据。', 'type' => 'boolean', 'example' => 'true'."\n", ], 'Status' => [ 'description' => '接口返回的状态码。', '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' => '删除切片', 'description' => ' 文本切片被删除后无法恢复(硬删除),请谨慎操作。'."\n" .'- **权限要求**:'."\n" .' - **RAM用户(子账号)**:需先获取阿里云百炼的[API权限](~~2848578~~)(可使用`AliyunBailianDataFullAccess`策略,该策略已包含本接口所需的sfm:DeleteChunk权限点),并[加入一个业务空间](~~2851098~~)后,才能调用本接口。'."\n" .' - **阿里云账号(主账号)**:默认拥有权限,可直接调用。'."\n" .'- **调用方式**:推荐使用最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)调用,SDK已封装复杂的签名计算逻辑,可简化您的调用过程。'."\n" .'- **生效延迟**:更新后通常立即生效,高峰期可能稍有延迟(秒级)。'."\n" .'- **幂等性**:本接口具有幂等性。对已成功删除的文本切片进行重复操作时,接口将返回成功响应。'."\n" ."\n" .'**限流说明:**'."\n" .'本接口频繁调用会被限流,频率请勿超过10次/秒。如遇限流,请稍后重试。', ], 'GetIndexMonitor' => [ 'summary' => '调用GetIndexMonitor接口,查询指定知识库在特定时间范围内的监控数据。这些数据对于性能分析、容量规划和成本管理至关重要。'."\n" ."\n" .'监控数据主要包含两大维度:'."\n" ."\n" .'存储监控:获取知识库的索引存储限额和当前使用量。'."\n" .'检索(QPS)监控:获取查询时间段内总的及按时间窗口细分的检索性能指标,包括QPS峰值、总请求数、平均QPS,并细分为成功、失败和被限流的请求。', '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' => '知识库所在工作空间ID', 'type' => 'string', 'required' => true, 'example' => 'llm-3shx2gu255oqxxxx', ], ], [ 'name' => 'IndexId', 'in' => 'query', 'schema' => [ 'description' => '目标知识库的唯一ID', 'type' => 'string', 'required' => true, 'enumValueTitles' => [], 'example' => 'kb-123456xxxx'."\n", ], ], [ 'name' => 'StartTimestamp', 'in' => 'query', 'schema' => [ 'description' => '查询起始时间,秒级Unix时间戳', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'example' => '1767604500', ], ], [ 'name' => 'EndTimestamp', 'in' => 'query', 'schema' => [ 'description' => '查询结束时间,最大支持起始时间+30d,秒级Unix时间戳', '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' => '请求 ID', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', ], 'Code' => [ 'description' => '状态码', 'type' => 'string', 'example' => '200', ], 'Data' => [ 'description' => '响应的核心数据对象。'."\n" ."\n" .'**storageMonitorData**(Object): 知识库的存储监控数据。'."\n" ."\n\n" .' - indexStorageLimit(Number): 知识库的索引存储限额,单位为 GB。'."\n" ."\n" .'- indexStorageUsage(Number): 知识库当前已占用的索引存储额度,单位为 GB。'."\n" ."\n" .'**qpsMonitorData** (Object): 知识库在整个查询时间段内的检索(QPS)聚合监控数据。'."\n" ."\n" .'- peakQps(Integer): 整个时间段内的最高 QPS 峰值。'."\n" ."\n" .'- totalRequests(Integer): 整个时间段内的总请求次数。'."\n" ."\n" .'- avgQpsOfActiveSeconds(Number): 整个时间段内,所有活跃秒(即有调用的秒)的平均 QPS。'."\n" ."\n" .'- monitorData(Array): 按时间窗口划分的详细监控数据数组。数组中的每个对象代表一个时间窗口的统计信息。'."\n" ."\n\n" .'
'."\n" .' 子属性'."\n" .' '."\n" .' - successData(Object):该窗口内请求成功的统计数据。'."\n" ."\n" .' - limitData(Object): 该窗口内被限流的统计数据。'."\n" ."\n" .' - failData(Object): 该窗口内调用失败的统计数据。'."\n" ."\n" .' - peakQpsInWindowRange(Integer): 该窗口内的总 QPS 峰值(成功+限流+失败)。'."\n" ."\n" .' - totalRequests(Integer): 该窗口内的总请求数(成功+限流+失败)。'."\n" ."\n" .' - windowRange(Integer): 时间窗口的开始时间(秒级 Unix 时间戳)。'."\n" ."\n" .' - windowRangeEnd(Integer): 时间窗口的结束时间(秒级 Unix 时间戳)。'."\n" ."\n" .' - avgQpsOfActiveSeconds(Number): 该窗口内活跃秒的平均 QPS。'."\n" ."\n" .' **successData, limitData, failData 这三个对象的内部结构完全相同,具体如下:**'."\n" ."\n" .' - peakQpsInWindowRange(Integer): 对应状态下的 QPS 峰值。'."\n" ."\n" .' - totalRequests(Integer): 对应状态下的总请求数。'."\n" ."\n" .' - avgQpsOfActiveSeconds(Number): 对应状态下活跃秒的平均 QPS。'."\n" ."\n" .'
', '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"}]', 'title' => '获取知识库监控数据', 'description' => '- RAM用户(子账号)需要首先获取阿里云百炼的[API权限](~~2848578~~)(需要`AliyunBailianDataFullAccess`),并[加入一个业务空间](~~2851098~~)后,方可调用本接口。阿里云账号(主账号)可直接调用无须授权。建议您通过最新版[阿里云百炼SDK](https://api.aliyun.com/api-tools/sdk/bailian?version=2023-12-29)[阿里云百炼SDK](https://api.alibabacloud.com/api-tools/sdk/bailian?version=2023-12-29)来调用本接口。'."\n" .'- 调用本接口前,请确保您的知识库已经创建完成且未被删除(即知识库 ID`IndexId`有效)。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'> - 查询时间范围(EndTimestamp - StartTimestamp)最大支持30天。'."\n" .'返回数据中的时间窗口粒度会根据您查询的时间范围动态调整。', ], 'CreatePromptTemplate' => [ 'summary' => '创建Prompt模板。', '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' => '业务空间Id', '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' => 'prompt模板内容', 'type' => 'string', 'required' => true, 'example' => '请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'promptTemplateId' => [ 'title' => 'prompt模板Id', 'description' => 'prompt模板Id', 'type' => 'string', 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', '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' => '创建Prompt模板', 'description' => '本接口暂不支持文生图Prompt模板的创建。', ], 'GetPromptTemplate' => [ 'summary' => '基于模板Id获取Prompt模板。', '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' => '业务空间Id', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdxxx', ], ], [ 'name' => 'promptTemplateId', 'in' => 'path', 'schema' => [ 'title' => '模板Id', 'description' => '模板Id', 'type' => 'string', 'required' => true, 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'content' => [ 'title' => '模板内容', 'description' => '模板内容', 'type' => 'string', 'example' => '请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}', ], 'name' => [ 'title' => '模板名称', 'description' => '模板名称', 'type' => 'string', 'example' => '小红书文案助手', ], 'promptTemplateId' => [ 'title' => '模板Id', 'description' => '模板Id', 'type' => 'string', 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5', ], 'workspaceId' => [ 'title' => '业务空间Id', 'description' => '业务空间Id', 'type' => 'string', 'example' => 'llm-us9hjmt32nysdxxx', ], 'variables' => [ 'title' => '模板变量', 'description' => '模板变量列表', 'type' => 'array', 'items' => [ 'description' => '模板变量', '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' => '获取Prompt模板', ], 'UpdatePromptTemplate' => [ 'summary' => '基于模板Id增量更新Prompt模板。', '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' => '业务空间Id', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdxxx', ], ], [ 'name' => 'promptTemplateId', 'in' => 'path', 'schema' => [ 'title' => 'prompt模板Id', 'description' => 'prompt模板Id', 'type' => 'string', 'required' => true, 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', ], ], [ 'name' => 'name', 'in' => 'query', 'schema' => [ 'title' => '模板名称', 'description' => '模板名称', 'type' => 'string', 'required' => false, 'example' => '小红书文案助手', ], ], [ 'name' => 'content', 'in' => 'query', 'schema' => [ 'title' => 'prompt模板内容', 'description' => 'prompt模板内容', 'type' => 'string', 'required' => false, 'example' => '请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', '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' => '更新Prompt模板', ], 'DeletePromptTemplate' => [ 'summary' => '基于模板Id删除Prompt模板。', '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' => '业务空间Id', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdxxx', ], ], [ 'name' => 'promptTemplateId', 'in' => 'path', 'schema' => [ 'title' => '模板Id', 'description' => '模板Id', 'type' => 'string', 'required' => true, 'example' => '6e49109bfeb94a39bb268f4e483ccxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', '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' => '删除Prompt模板', ], 'ListPromptTemplates' => [ 'summary' => '获取Prompt模板列表。', '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' => '业务空间Id', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdxxx', ], ], [ 'name' => 'name', 'in' => 'query', 'schema' => [ 'title' => '基于模板名称搜索', 'description' => '基于模板名称关键字搜索', 'type' => 'string', 'required' => false, 'example' => '小红书', ], ], [ 'name' => 'type', 'in' => 'query', 'schema' => [ 'title' => '模板类型,可选值:'."\n" .'· System:系统预置模板'."\n" .'· Custom:用户自定义模板', 'description' => '模板类型,可选值:'."\n" .'· System:系统预置模板'."\n" .'· Custom:用户自定义模板', 'type' => 'string', 'required' => false, 'example' => 'System', ], ], [ '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' => [ 'title' => '最大返回数量', 'description' => '最大返回数量', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'nextToken' => [ 'title' => '用于实现基于令牌的分页', 'description' => '用于实现基于令牌的分页', 'type' => 'string', 'example' => 'dc270401186b433f975d7e1faaa34e0e', ], 'promptTemplates' => [ 'title' => '模板列表', 'description' => '模板列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'content' => [ 'title' => '模板内容', 'description' => '模板内容', 'type' => 'string', 'example' => '请写一篇小红书种草笔记,增加丰富的emoji元素,结尾作总结,并加上相关标签。主题为:${theme}', ], 'name' => [ 'title' => '模板名称', 'description' => '模板名称', 'type' => 'string', 'example' => '小红书文案'."\n", ], 'promptTemplateId' => [ 'title' => '模板Id', 'description' => '模板Id', 'type' => 'string', 'example' => 'd6935b7efbe34d11b13df9307151cf8c', ], 'type' => [ 'title' => '模板类型', 'description' => '模板类型', 'type' => 'string', 'example' => '"System"', ], 'variables' => [ 'title' => '模板变量', 'description' => '模板变量列表', 'type' => 'array', 'items' => [ 'description' => '模板变量', 'type' => 'string', 'example' => '"theme"', ], ], ], ], ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'FE9B6CBF-47E6-5D76-9C5D-B814DD5AB071', ], 'totalCount' => [ 'title' => '数据总数', 'description' => '数据总数', 'type' => 'integer', 'format' => 'int32', 'example' => '15', ], 'workspaceId' => [ 'title' => '业务空间Id', 'description' => '业务空间Id', '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' => '获取Prompt模板列表', ], 'CreateMemory' => [ 'summary' => '创建一个长期记忆体。', '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' => '长期记忆体所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'description', 'in' => 'query', 'allowEmptyValue' => true, 'schema' => [ 'title' => '长期记忆体的描述信息,默认为空', 'description' => '长期记忆体的描述信息。长度为 1~50 个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文、中文和数字等)。可以包含半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。', 'type' => 'string', 'required' => false, 'example' => '我的大模型应用$APP_ID关于A用户的长期记忆体', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'memoryId' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体 ID。'."\n" .'> 请妥善保管该值,它将用于后续所有与此长期记忆体相关的API操作。'."\n" .'>', 'type' => 'string', 'example' => '6bff4f317a14442fbc9f73d29dbxxxx', ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求 ID。', 'type' => 'string', 'example' => '17204B98-xxxx-4F9A--2446A84821CA', ], ], ], ], ], '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"}]', 'title' => '创建长期记忆体', 'description' => '- 您可以将对话过程中的特定信息(即记忆片段,详见[长期记忆](https://help.aliyun.com/zh/model-studio/user-guide/long-term-memory))存储到长期记忆体(Memory)中,智能体应用将在后续对话中持续引用这些信息(非自动,您需要先调用[ CreateMemory ](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-creatememory)接口创建长期记忆体,获取`memoryId`。然后[通过API调用智能体应用](https://help.aliyun.com/zh/model-studio/user-guide/application-calling)时,传入该`memoryId`)。'."\n" .' > 长期记忆体尚不支持存储与管理用户画像,请您通过控制台进行相关操作,详见[长期记忆](https://help.aliyun.com/zh/model-studio/user-guide/long-term-memory#578ebae524m6l)。'."\n" .'- 若传入`memoryId`,系统会根据对话记录,在指定长期记忆体下自动创建记忆片段(MemoryNode)。您也可以调用[ CreateMemoryNode ](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-creatememorynode)接口手动创建记忆片段。'."\n" .'- 本接口不具备幂等性。'."\n" ."\n" .'**限流说明:** 请确保两次请求间隔至少 1 秒,否则可能触发系统限流。如遇限流,请稍后重试。', ], 'GetMemory' => [ 'summary' => '获取指定长期记忆体的描述信息。', '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' => '长期记忆体所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'memoryId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体 ID,对应 [CreateMemory](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-creatememory) 接口返回的`memoryId`。', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbxxxx'."\n", ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'description' => [ 'description' => '长期记忆体的描述信息。', 'type' => 'string', 'example' => '我的大模型应用$APP_ID关于A用户的长期记忆体', ], 'memoryId' => [ 'description' => '长期记忆体 ID。', 'type' => 'string', 'example' => '6bff4f317a14442fbc9f73d29dbdxxxx', ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求 ID。', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx', ], 'workspaceId' => [ 'title' => '业务空间Id', 'description' => '长期记忆体所属的业务空间 ID。', 'type' => 'string', 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], ], ], ], '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"}]', 'title' => '获取长期记忆体', 'description' => '- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:** 请确保两次请求间隔至少 1 秒,否则可能触发系统限流。如遇限流,请稍后重试。', ], 'UpdateMemory' => [ 'summary' => '更新指定长期记忆体的描述信息。', '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' => '长期记忆体所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'memoryId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体 ID,对应[ CreateMemory ](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-creatememory)接口返回的`memoryId`。', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbdxxxx', ], ], [ 'name' => 'description', 'in' => 'query', 'schema' => [ 'title' => '长期记忆描述信息', 'description' => '新的描述信息。长度为 1~50 个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文、中文和数字等)。可以包含半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。', 'type' => 'string', 'required' => false, 'example' => '我的大模型应用$APP_ID关于B用户的长期记忆体'."\n", ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'requestId' => [ 'title' => '请求Id', 'description' => '请求 ID。', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx', ], ], ], ], ], '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"}]', 'title' => '更新长期记忆体', 'description' => '- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:** 请确保两次请求间隔至少 1 秒,否则可能触发系统限流。如遇限流,请稍后重试。', ], 'DeleteMemory' => [ 'summary' => '永久性删除指定的长期记忆体。', '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' => '长期记忆体所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx', ], ], [ 'name' => 'memoryId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体 ID,对应[ CreateMemory ](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-creatememory)接口返回的`memoryId`。', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbdxxxx'."\n", ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'requestId' => [ 'title' => '请求Id', 'description' => '请求 ID。', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\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"}]', 'title' => '删除长期记忆体', 'description' => '- 调用本接口前,请确保您的长期记忆体已经创建完成且未被删除(即`memoryId`有效)。'."\n" .'- 删除操作不可逆,被删的长期记忆体包括它的所有长期记忆体节点将无法恢复,且[ GetMemory ](https://help.aliyun.com/zh/model-studio/developer-reference/api-bailian-2023-12-29-getmemory)接口将无法再获取其相关信息,请谨慎操作。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:** 请确保两次请求间隔至少 1 秒,否则可能触发系统限流。如遇限流,请稍后重试。', ], 'ListMemories' => [ 'summary' => '获取指定业务空间下一个或多个长期记忆体的详细信息。', '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' => '长期记忆体所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => true, 'example' => 'llm-3z7uw7fwz0vexxxx'."\n", ], ], [ 'name' => 'maxResults', 'in' => 'query', 'schema' => [ 'title' => '最大返回数量', 'description' => '分页查询时每页行数。取值范围[1-50]。'."\n" ."\n" .'默认值: 当不设置值时,默认值为 10。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], ], [ 'name' => 'nextToken', 'in' => 'query', 'schema' => [ 'title' => '由前一次的请求返回,传入时本次查询结果将基于前一次请求结果进行分页', 'description' => '查询凭证(Token),取值为上一次 API 调用返回的 NextToken 参数值。', 'type' => 'string', 'required' => false, 'example' => 'dc270401186b433f975d7e1faaa3xxxx', ], ], ], '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' => [ 'description' => '长期记忆体对象。', 'type' => 'object', 'properties' => [ 'description' => [ 'description' => '长期记忆体的描述信息。', 'type' => 'string', 'example' => '我的大模型应用$APP_ID关于A用户的长期记忆体', ], 'memoryId' => [ 'description' => '长期记忆体 ID。', 'type' => 'string', 'example' => '3fc531f4519444beaafffa4538f6xxxx', ], ], ], ], 'nextToken' => [ 'description' => '本次调用返回的查询凭证值。', 'type' => 'string', 'example' => 'dc270401186b433f975d7e1faaa3xxxx', ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求 ID。', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n", ], 'totalCount' => [ 'description' => '返回结果的总条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '105', ], 'workspaceId' => [ 'title' => '业务空间Id', 'description' => '长期记忆体列表所属的业务空间 ID。', 'type' => 'string', 'example' => 'llm-3z7uw7fwz0vexxxx'."\n", ], ], ], ], ], '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"}]', 'title' => '获取长期记忆体列表', 'description' => '- 分页查询首页时,仅需设置`MaxResults`以限制返回信息的条目数,返回结果中的`NextToken`将作为查询后续页的凭证。查询后续页时,将`NextToken`参数设置为上一次返回结果中获取到的`NextToken`作为查询凭证(如果`NextToken`为空,表示结果已经完全返回,不需要再请求),并设置`MaxResults`限制返回条目数。'."\n" .'- 本接口具有幂等性。'."\n" ."\n" .'**限流说明:** 请确保两次请求间隔至少 1 秒,否则可能触发系统限流。如遇限流,请稍后重试。', ], 'CreateMemoryNode' => [ 'summary' => '创建记忆片段。', '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' => '长期记忆体所属的业务空间 ID。获取方式请参见[如何使用业务空间](~~2587495~~)。', 'type' => 'string', 'required' => false, 'example' => 'llm-us9hjmt32nysdm5v'."\n", ], ], [ 'name' => 'memoryId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体 ID。即 **CreateMemory** 接口返回的`memoryId`。', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", ], ], [ 'name' => 'content', 'in' => 'query', 'schema' => [ 'title' => '长期记忆内容', 'description' => '记忆片段内容。长度为 1~200 个字符,支持中文、英文、数字、下划线(_)、短划线(-)、半角句号(.)和半角冒号(:)。', 'type' => 'string', 'required' => true, 'example' => '用户喜欢吃西红柿炒鸡蛋', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'memoryNodeId' => [ 'title' => '长期记忆节点Id', 'description' => '记忆片段 ID。', 'type' => 'string', 'example' => '68de06c95368463a8be4a84efcxxxxxx', ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求 ID。', 'type' => 'string', 'example' => '8C56C7AF-xxxx-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"}]', 'title' => '创建记忆片段', ], 'GetMemoryNode' => [ 'summary' => '获取记忆片段。', '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' => '业务空间Id', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdm5v'."\n", ], ], [ 'name' => 'memoryId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体Id', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", ], ], [ 'name' => 'memoryNodeId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆节点Id', 'description' => '记忆片段Id', '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' => '用户喜欢吃西红柿炒鸡蛋'."\n", ], 'memoryId' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体Id', 'type' => 'string', 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", ], 'memoryNodeId' => [ 'title' => '长期记忆节点Id', 'description' => '记忆片段Id', 'type' => 'string', 'example' => '68de06c95368463a8be4a84efc872cc5', ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => '8C56C7AF-6573-19CE-B018-E05E1EDCF4C5'."\n", ], 'workspaceId' => [ 'title' => '业务空间Id', 'description' => '业务空间Id', '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"}]', 'title' => '获取记忆片段', ], 'UpdateMemoryNode' => [ 'summary' => '更新记忆片段。', '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' => '业务空间Id', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdm5v'."\n", ], ], [ 'name' => 'memoryId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体Id', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", ], ], [ 'name' => 'memoryNodeId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆节点Id', 'description' => '记忆片段Id', 'type' => 'string', 'required' => true, 'example' => '68de06c95368463a8be4a84efc872cc5', ], ], [ 'name' => 'content', 'in' => 'query', 'schema' => [ 'title' => '长期记忆内容', 'description' => '记忆片段内容', 'type' => 'string', 'required' => true, 'example' => '用户喜欢吃西红柿炒鸡蛋'."\n", ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', '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"}]', 'title' => '更新记忆片段', ], 'DeleteMemoryNode' => [ 'summary' => '删除记忆片段。', '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' => '业务空间Id', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdm5v'."\n", ], ], [ 'name' => 'memoryId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体Id', 'type' => 'string', 'required' => true, 'example' => '6bff4f317a14442fbc9f73d29dbd5fc3'."\n", ], ], [ 'name' => 'memoryNodeId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆节点Id', 'description' => '记忆片段Id', 'type' => 'string', 'required' => true, 'example' => '68de06c95368463a8be4a84efc872cc5', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', '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 \\"requestId\\": \\"8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\\"\\n}","type":"json"}]', 'title' => '删除记忆片段', ], 'ListMemoryNodes' => [ 'summary' => '获取记忆片段列表。', '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' => '业务空间Id', 'type' => 'string', 'required' => true, 'example' => 'llm-us9hjmt32nysdm5v'."\n", ], ], [ 'name' => 'memoryId', 'in' => 'path', 'schema' => [ 'title' => '长期记忆Id', 'description' => '长期记忆体Id', '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' => '用户喜欢吃西红柿炒鸡蛋'."\n", ], 'memoryNodeId' => [ 'title' => '长期记忆节点Id', 'description' => '记忆片段Id', 'type' => 'string', 'example' => '68de06c95368463a8be4a84efc872cc5', ], ], ], ], 'nextToken' => [ 'title' => '用于实现基于令牌的分页', 'description' => '用于实现基于令牌的分页', 'type' => 'string', 'example' => 'dc270401186b433f975d7e1faaa34e0e'."\n", ], 'requestId' => [ 'title' => '请求Id', 'description' => '请求Id', '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"}]', 'title' => '获取记忆片段列表', ], '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' => '百炼工作空间ID', 'type' => 'string', 'required' => false, 'example' => 'llm-cxxxxxxb8d47ks', ], ], [ 'name' => 'code', 'in' => 'query', 'schema' => [ 'description' => '支付宝打赏链接请求返回的打赏code', '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' => '请求的唯一ID', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n", ], 'data' => [ 'description' => '打赏的结果数据', 'type' => 'object', 'properties' => [ 'code' => [ 'description' => '打赏对应的code', 'type' => 'string', 'example' => '0', ], 'walletItemCode' => [ 'description' => '支付宝商品钱包code', 'type' => 'string', 'example' => 'xsdfsdf', ], 'mainAccountId' => [ 'description' => '主账号id(API忽略)', 'type' => 'string', 'example' => '1007576424487905', ], 'accountId' => [ 'description' => '子账号id(API忽略)', 'type' => 'string', 'example' => '1348393307144609', ], 'alipayOrderId' => [ 'description' => '支付宝的订单id', 'type' => 'string', 'example' => '1234234', ], 'status' => [ 'description' => '打赏状态'."\n" .'- 1 (成功)'."\n" .'- 0 (删除)'."\n" .'- 2 (待打赏)'."\n" .'- 3 (取消)'."\n" .'- 4 (退款)'."\n" .'- 5(关闭)'."\n" .'- 6(失败)'."\n" .'- 7(纠纷、异常)', 'type' => 'integer', 'format' => 'int64', 'example' => '1', ], 'creator' => [ 'description' => '创建者(API忽略)', 'type' => 'string', 'example' => '234234', ], 'modifier' => [ 'description' => '修改者(API忽略)', 'type' => 'string', 'example' => '234234', ], 'alipayOrderDetail' => [ 'description' => '支付细节(API忽略)', 'type' => 'string', 'example' => '{}', ], 'title' => [ 'description' => '转账标题', 'type' => 'string', 'example' => 'test', ], 'qrURL' => [ 'description' => '打赏链接(API忽略)', 'type' => 'string', 'example' => 'https://xxx.aliyun.com', ], 'transAmount' => [ 'description' => '订单总金额,单位为:元。', 'type' => 'string', 'example' => '0.22', ], 'scope' => [ 'description' => '打赏应用的所属状态', 'type' => 'string', 'example' => 'publish', ], ], ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"6a71f2d9-f1c9-913b-818b-11402910xxxx\\\\n\\",\\n \\"data\\": {\\n \\"code\\": \\"0\\",\\n \\"walletItemCode\\": \\"xsdfsdf\\",\\n \\"mainAccountId\\": \\"1007576424487905\\",\\n \\"accountId\\": \\"1348393307144609\\",\\n \\"alipayOrderId\\": \\"1234234\\",\\n \\"status\\": 1,\\n \\"creator\\": \\"234234\\",\\n \\"modifier\\": \\"234234\\",\\n \\"alipayOrderDetail\\": \\"{}\\",\\n \\"title\\": \\"test\\",\\n \\"qrURL\\": \\"https://xxx.aliyun.com\\",\\n \\"transAmount\\": \\"0.22\\",\\n \\"scope\\": \\"publish\\"\\n }\\n}","type":"json"}]', 'title' => '查询支付宝打赏状态', ], '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' => '百炼工作空间的id', 'type' => 'string', 'required' => false, 'example' => 'xxxllm-czb8d47ks', ], ], [ 'name' => 'app_id', 'in' => 'query', 'schema' => [ 'description' => '百炼应用的id', 'type' => 'string', 'required' => false, 'example' => 'asfasdfxxasdf', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'requestId' => [ 'description' => '请求的唯一id', 'type' => 'string', 'example' => '6a71f2d9-f1c9-913b-818b-11402910xxxx'."\n", ], 'data' => [ 'description' => '返回数据', 'type' => 'object', 'properties' => [ 'qrUrl' => [ 'description' => '生成的打赏链接', 'type' => 'string', 'example' => 'https://xxxxxx.aliyun-inc.com', ], 'code' => [ 'description' => '对应的打赏的code,用于回查打赏状态', '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"}]', 'title' => '获取支付宝打赏URL', ], 'ApplyTempStorageLease' => [ 'summary' => '该接口用于高代码部署,其他场景暂不支持。用于申请临时文件上传许可,之后需要自己完成文件上传动作。', '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' => '文件名称,需要包含文件后缀', 'type' => 'string', 'required' => true, 'example' => 'example.txt', ], ], [ 'name' => 'SizeInBytes', 'in' => 'formData', 'schema' => [ 'title' => '文件大小(单位字节)', 'description' => '文件大小(单位字节)', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'minimum' => '0', 'example' => '1024', ], ], [ 'name' => 'WorkspaceId', 'in' => 'path', 'schema' => [ 'title' => '百炼业务空间id', 'description' => '百炼业务空间id', 'type' => 'string', 'required' => true, 'example' => 'llm-mbhn96xxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'Code' => [ 'title' => '错误状态码。', 'description' => '错误状态码。', 'type' => 'string', 'example' => 'DataCenter.FileTooLarge', ], 'Data' => [ 'title' => '接口业务数据字段。', 'description' => '接口业务数据字段。', 'type' => 'object', 'properties' => [ 'TempStorageLeaseId' => [ 'title' => '租约唯一 ID,后续应用内获取上传的文件时,需要使用该参数。', 'description' => '租约唯一 ID,后续应用内获取上传的文件时,需要使用该参数。', 'type' => 'string', 'example' => '1e6a159107384782be5e45ac4759b247.1719325231035', ], 'Param' => [ 'title' => '用于上传文件的 HTTP 参数。', 'description' => '用于上传文件的 HTTP 参数。', 'type' => 'object', 'properties' => [ 'Headers' => [ 'title' => '需要放到Header中的K-V字段,K和V均为字符串。', 'description' => '需要放到Header中的K-V字段,K和V均为字符串。', 'type' => 'any', 'example' => 'Content-Type: application/json', ], 'Method' => [ 'title' => 'HTTP 调用方法,可能值为:'."\n" .'PUT'."\n" .'POST', 'description' => 'HTTP 调用方法,可能值为:'."\n" .'PUT'."\n" .'POST', 'type' => 'string', 'example' => 'PUT', ], 'Url' => [ 'title' => '文件上传的授权 URL 地址。', 'description' => '文件上传的授权 URL 地址。', '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' => '错误信息。', 'type' => 'string', 'example' => 'User not authorized to operate on the specified resource', ], 'RequestId' => [ 'title' => '请求 ID。', 'description' => '请求 ID。', 'type' => 'string', 'example' => '778C0B3B-xxxx-5FC1-A947-36EDD13606AB', ], 'Status' => [ 'title' => '接口返回的状态码。', 'description' => '接口返回的状态码。', 'type' => 'string', 'example' => '200', ], 'Success' => [ 'title' => '接口调用是否成功', 'description' => '接口调用是否成功', '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' => '申请临时文件上传许可', 'description' => '1、该接口用于高代码部署,其他场景暂不支持。'."\n" .'2、通过此接口获取到临时文件上传许可之后,需要自己完成文件上传动作。', ], ], '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', ], ], ];