DeleteChunk
Deletes specified text chunks from a knowledge base. Deleted text chunks cannot be retrieved or recalled.
Operation description
- Permission requirements:
Resource Access Management (RAM) user: Obtain API permissions for Model Studio first (you can use the
AliyunBailianDataFullAccesspolicy, which includes the sfm:DeleteChunk permission required by this operation), and join a workspace before invoking this operation.Alibaba Cloud account: Has permissions by default and can invoke this operation directly.
Invocation method: Use the latest Model Studio SDK. The SDK provides encapsulation of complex signature calculation logic and simplifies the invocation procedure.
Effective latency: Changes typically take effect immediately. During peak hours, there may be a slight delay (seconds).
Idempotence: This operation is idempotent. Repeated calls to delete an already deleted text chunk return a success response.
Rate limit: This operation is throttled if called too frequently. Do not exceed 10 calls per second. If throttled, retry later.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sfm:DeleteChunk |
delete |
*All Resource
|
None | None |
Request syntax
POST /{WorkspaceId}/chunk/delete HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
The workspace ID of the knowledge base. To obtain the workspace ID, refer to How to use a workspace. |
llm-3z7uw7fwz0vexxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PipelineId |
string |
Yes |
The knowledge base ID, which is the |
79c0alxxxx |
| ChunkIds |
array |
Yes |
The list of text chunks to delete. A maximum of 10 text chunk IDs can be specified in a single request. |
|
|
string |
Yes |
The text chunk ID, which is the |
llm-5ip55o1zrzxx_09fe52x_xxxxx_033b551e10024029992e79767b151fxx_10024xx_0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
35A267BF-xxxx-54DB-8394-AA3B0742D833 |
| Code |
string |
The error status code. |
|
| Message |
string |
The error message. |
|
| Success |
boolean |
Indicates whether the call was successful. Valid values:
|
true |
| Data |
boolean |
The business data returned upon a successful request. |
true |
| Status |
string |
The status code returned by the operation. |
200 |
Examples
Success response
JSON format
{
"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,
"Data": true,
"Status": "200\n"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.