Retrieve a list of document chunks. You can filter them by query conditions.
Operation description
Prerequisites
- Alibaba Cloud Model Studio and the Tongyi Gold service are activated.
- Obtain the workspaceId: get the workspace identity.
Try it now
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Debug
RAM authorization
The following table lists 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:
- Action: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization for the operation. Details:
- For required resource types, an asterisk (*) is prefixed.
- For operations that do not support resource-level authorization,
All resourcesis used.
- Condition key: the condition keys defined by the cloud service itself.
- Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:GetDocumentChunkList | none | *All resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Path parameter, workspace ID | llm-xxxxx |
| body | object | No | Request body parameters. | |
| chunkIdList | array | No | List of document chunk IDs | |
| chunkIdList | string | No | Document chunk ID | 83648326438746 |
| docId | string | Yes | Document ID | 182364872346 |
| libraryId | string | Yes | Library ID | dsjgfdjgfxxx |
| order | string | No | Sorting method | desc |
| orderBy | string | No | Sort field | gmtCreate |
| page | integer | No | Page number | 1 |
| pageSize | integer | No | Page size | 10 |
| searchQuery | string | No | Search query keyword | test |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | ResultCode<PageVO > | ||
| cost | long | Time consumed | null |
| data | object | Response data | |
| currentPage | long | Current page | 1 |
| pageSize | long | Records per page | 10 |
| records | array<object> | Records | |
| record | object | ||
| chunkId | string | Document chunk ID | 28377468263482764 |
| chunkMeta | object | Document chunk metadata | {"a":"1"} |
| chunkOssUrl | string | Document chunk OSS address | oss-xxxx-hangzhou.com/test.pdf |
| chunkText | string | Document chunk text | This is a test text segment |
| chunkType | string | Document chunk type Valid values:
| text |
| docId | string | Document ID | 8947387648356 |
| fileType | string | Document type | |
| libraryId | string | Library ID | jhsdvne |
| libraryName | string | Library name | Test document library |
| nextChunkId | string | Next document chunk ID | 947538465 |
| pos | array<object> | Document chunk position | |
| po | object | Layout position information | |
| axisArray | array | Coordinate | |
| axisArray | double | Coordinate | 394.3 |
| page | integer | Page number | 1 |
| textHighlightArea | array | Text highlight area, used for highlighting text-type files | |
| textHighlightArea | integer | Text highlight area | 38 |
| preChunkId | string | Previous document chunk ID | 9848346548365 |
| score | float | Document chunk score | 0.5 |
| title | string | Document title | test |
| totalPages | long | Total pages | 10 |
| totalRecords | long | Total records | 100 |
| dataType | string | Data type | null |
| errCode | string | Error code | 0 |
| message | string | Error message | ok |
| requestId | string | Request ID | 2B8F6DC9-6FAF-576F-9095-CCD90FB2BDDF |
| success | boolean | Whether the request is successful | true |
| time | string | Timestamp | 2024-04-24 11:54:34 |
Examples
Success response
JSON format