Imports a file from the temporary storage of Alibaba Cloud Model Studio into an Alibaba Cloud Model Studio data connection (formerly known as application data).
Operation description
-
Resource Access Management (RAM) users must first obtain API permissions for Alibaba Cloud Model Studio (requires
AliyunBailianDataFullAccess, which includes the sfm:AddFile permission), and join a workspace before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Invoke this operation by using the latest Alibaba Cloud Model Studio SDK. -
This operation is not idempotent.
Throttling: This operation is subject to throttling. Do not exceed 10 calls per second. If you are throttled, retry later.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sfm:AddFile |
create |
*All Resource
|
None | None |
Request syntax
PUT /{WorkspaceId}/datacenter/file HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
The workspace ID. The file is uploaded to this workspace. For information about how to obtain the workspace ID, see How to use a workspace. |
llm-3shx2gu255oqxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| LeaseId |
string |
Yes |
The upload lease ID, which corresponds to the |
68abd1dea7b6404d8f7d7b9f7fbd332d.17166xxxxxxxx |
| Parser |
string |
Yes |
The parser type. Valid values:
Note The uploaded file is parsed by using the currently specified parser. If you set this parameter to AUTO_SELECT, the parser configured for the category is used. |
AUTO_SELECT |
| CategoryId |
string |
Yes |
Set this parameter to the category ID of the uploaded file, which is the |
cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx |
| Tags |
array |
No |
|
|
|
string |
No |
The tag of the file. Each tag can contain up to 32 characters. The tag supports characters in the Unicode letter category (including English letters, Chinese characters, and digits), underscores (_), and hyphens (-). |
产品介绍 |
|
| CategoryType |
string |
No |
The category type. This parameter is optional. Default value: UNSTRUCTURED. Valid values:
|
UNSTRUCTURED |
| OriginalFileUrl |
string |
No |
Specifies a URL for the file. The system records this URL when building a document search knowledge base. When you use the Alibaba Cloud Model Studio console to interact with an agent application, this URL is returned with the retrieval results of the file through the Note
The agent application must have Knowledge Base enabled and the Show answer sources feature turned on. Otherwise, this parameter does not take effect. |
www.test.com/111.docx |
| ParserConfig |
object |
No |
The parser configuration. This parameter is required only when the parser type is set to Qwen VL parsing. |
|
| ModelName |
string |
No |
The model name. |
qwen-vl-max |
| ModelPrompt |
string |
No |
The prompt used when calling Qwen VL parsing. |
#角色 你是一个专业的图片内容标注人员,擅长识别并描述出图片中的内容。 # 任务目标 请结合输入图片,详细描述图片中的内容。 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Code |
string |
The error code. |
DataCenter.FileTooLarge |
| Data |
object |
The data field returned by the operation. |
|
| FileId |
string |
The file ID. Keep this value safe because it is used in all subsequent API operations related to this file. |
file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx |
| Parser |
string |
The parser type used to parse the file. Valid values:
|
DASHSCOPE_DOCMIND |
| Message |
string |
The error message. |
User not authorized to operate on the specified resource. |
| RequestId |
string |
The request ID. |
778C0B3B-xxxx-5FC1-A947-36EDD13606AB |
| Status |
string |
The status code returned by the operation. |
200 |
| Success |
string |
Indicates whether the call was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "DataCenter.FileTooLarge",
"Data": {
"FileId": "file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx",
"Parser": "DASHSCOPE_DOCMIND"
},
"Message": "User not authorized to operate on the specified resource.",
"RequestId": "778C0B3B-xxxx-5FC1-A947-36EDD13606AB",
"Status": "200",
"Success": "true"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.