Adds chunks to document search (document), data query (table), and image question answering (image) knowledge bases.
Usage notes
- For document search (document), data query (table), and image question answering (image) knowledge bases, this operation adds chunks to the specified knowledge base. Audio and video search (multimedia) knowledge bases are not supported. For data query and image question answering knowledge bases, this operation takes effect only when the data source is an Excel connector (excel).
- Before calling this operation, a RAM user must obtain Alibaba Cloud Model Studio API permissions (
AliyunBailianDataFullAccess, which includes sfm:ChunkList) and join a workspace. An Alibaba Cloud account can call this operation directly without additional authorization. We recommend using the latest Alibaba Cloud Model Studio SDK. - Before calling this operation, make sure that the knowledge base has been created and has not been deleted, and that its ID,
IndexId, is valid. - This operation is idempotent.
Try it out
You can call this operation in OpenAPI Explorer without calculating a signature. After a successful call, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
No authorization information is available for this API operation.
Request syntax
Path parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The workspace ID. | llm-19hxxxxx7htdf9lh |
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| PipelineId | string | Yes | The knowledge base ID. | 79c0alxxxx |
| dataId | string | No | The file ID. | doc_xxx |
| field | object | No | The chunk content to insert, specified as key-value pairs. Document search knowledge bases use the following fixed keys:
| { "content": "The Bailian platform supports parsing multiple document formats including PDF, Word, and PPT.", "title": "Document Parsing and Chunking", "image_urls": [ "https://example.com/images/chunk-flow.png", "https://example.com/images/parsing-result.png" ] } |
| any | No | The column header fields of the chunk to insert. This parameter is supported only for data query and image question answering knowledge bases. Headers used for retrieval or responses are required. Value requirements by type:
| {"Product Name": "Wireless Bluetooth Headphones", "Publish Time": 1752624000000, "Stock Quantity": 1580, "Unit Price": 299.99, "image_url":"https://example.com/images/headphones-front.jpg,https://example.com/images/headphones-side.jpg,https://example.com/images/headphones-package.jpg" } |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | The request ID. | 35A267BF-xxxx-54DB-8394-AA3B0742D833 |
| Code | string | The error status code. | Index.InvalidParameter |
| Message | string | The error message. | Required parameter(%s) missing or invalid, please check the request parameters. |
| Success | boolean | Indicates whether the API call succeeded.Valid values:
| true |
| Data | boolean | The business data returned when the request succeeds.Valid values:
| true |
| Status | string | The status code returned by the operation. | 200 |
Examples
Sample success response
JSON format