Update the text content of a document chunk in a document.
Operation description
Before using this API, ensure that you fully understand the billing methods and pricing of Tongyi Dianjin.
Prerequisites
Alibaba Cloud Model Studio and Tongyi Dianjin services are activated.
Obtain the workspaceId: Obtain the workspace identifier.
Debugging
You can run this API directly in OpenAPI Explorer, which saves you the trouble of calculating signatures. After the operation succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Try it now
RAM authorization
The following table describes the authorization information for this API. You can use the Action element in RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
- Action: refers to the specific permission point.
- Access level: refers to the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: refers to the resource types that support authorization in the operation. Details are as follows:
- Required resource types are marked with a leading asterisk (*).
- For operations that do not support resource-level authorization,
All Resourcesis used.
- Condition key: refers to the condition keys defined by the cloud service itself.
- Dependent action: refers to other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions before the operation can succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:UpdateDocumentChunk | update | *All Resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Workspace ID. | llm-xxxxx |
| body | object | No | Request body parameters. | |
| libraryId | string | Yes | Document library ID. | sjdgdsfg |
| chunks | array<object> | Yes | List of document chunks. | |
| chunk | object | Yes | Document chunk. | |
| chunkId | string | Yes | Document chunk ID. | 1987834755763847 |
| chunkText | string | Yes | Document chunk text. | This is a test text |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | ResultCode | ||
| success | boolean | Is successful. | true |
| dataType | string | Data type. | null |
| time | string | Timestamp. | 2024-01-01 00:00:00 |
| errCode | string | Error code. | 0 |
| message | string | Error message. | ok |
| data | string | Response data. | SUCCESS |
| requestId | string | Request ID. | 003D019A-1BB3-53EC-A0D2-CE76DA5D73B1 |
| cost | long | Processing time | null |
Examples
Success response
JSON format