分块管理

更新指定分块的内容和属性

put/chunks/{knowledge_id}/{id}

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/chunks/{knowledge_id}/{id}
  • Auth
    • API key in header Authorization
    • or API key in header X-API-Key

Path parameters

knowledge_idstring required

知识ID

idstring required

分块ID

Request body

contentstring

Complete replacement content; omitted keeps the existing content.

expected_revisioninteger

Current content_revision from chunk.get; a stale value fails with HTTP 409.

is_enabledboolean

Whether this chunk participates in retrieval; omitted keeps its state.

Response

更新后的分块

descriptionstring
successboolean
summary_statusstring

Example response

{
  "success": true
}

Changes