知识库

部分更新知识库

Changed on

修改请求里出现的设置。未出现的字段保持不变,包括分块、索引和模型里没写到的项。

patch/knowledge-bases/{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/knowledge-bases/{id}
  • Auth
    • API key in header Authorization
    • or API key in header X-API-Key

Path parameters

idstring required

知识库ID

Request body

descriptionstring

New description. Omit to keep it; an empty string clears it.

embedding_model_idstring

Embedding model. Cannot change after the knowledge base has documents.

image_caption_enabledboolean

Run image captions in the default image pipeline. Set image_pipeline=default to select that pipeline.

image_ocr_enabledboolean

Run OCR in the default image pipeline. At least one of captions or OCR must stay enabled.

namestring

New name. Omit to keep the current one.

parser_enginestring

Engine name from knowledge_base.list_parser_engines; empty removes explicit routing for parser_file_types.

parser_file_typesstring[]

File extensions whose parser routing should change, e.g. ["pdf", "docx"]. Other file types keep their rules.

parser_xlsx_first_row_as_headerboolean

Treat the first XLSX row as headers. Requires parser_file_types including xlsx and an explicit parser_engine.

storage_backend_idstring

Storage instance to bind. Omit to keep the current one.

summary_model_idstring

Summary model. model.list returns the ids.

Response

更新后的知识库

successboolean

Example response

{
  "success": true
}

Changes