---
title: "部分更新知识库"
method: PATCH
path: "/knowledge-bases/{id}"
tags: ["知识库"]
---

# 部分更新知识库

`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: one of:
  - API key in header `Authorization`
  - API key in header `X-API-Key`

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

## Path parameters

- `id` string, required

## Request body

- InternalHandlerPatchKnowledgeBaseRequest
  - `asr_config` GithubComTencentWeKnoraInternalTypesASRConfig
    - `enabled` boolean: Enabled turns speech transcription on. Also send asr_model_id.
    - `language` string: Language is an optional hint for transcription, such as zh or en.
    - `model_id` string: Model that transcribes audio. model.list returns the ids.
  - `auto_tag_config` GithubComTencentWeKnoraInternalTypesAutoTagConfig
    - `enabled` boolean: Enabled turns automatic tagging on. The model picks from tags that already exist.
    - `max_tags` integer: MaxTags is how many tags one document may receive, from 1 to 10.
    - `model_id` string: ModelID overrides the summary model. Empty uses summary_model_id.
    - `skip_if_tagged` boolean: SkipIfTagged leaves a document alone when it already has tags. Empty means yes.
  - `chunking_config` GithubComTencentWeKnoraInternalTypesChunkingConfig
    - `child_chunk_size` integer: ChildChunkSize is the size of child chunks used for embedding (default: 384). Only used when EnableParentChild is true.
    - `chunk_overlap` integer: Chunk overlap in characters.
    - `chunk_size` integer: Chunk size in characters. Empty on create uses the server default.
    - `enable_parent_child` boolean: EnableParentChild splits into large parent chunks and small child chunks. Search matches a child and returns its parent.
    - `languages` string[]: Languages hints the splitter, for example de or zh. Empty detects the language from the document.
    - `parent_chunk_size` integer: ParentChunkSize is the size of parent chunks (default: 4096). Only used when EnableParentChild is true.
    - `parser_engine_rules` GithubComTencentWeKnoraInternalTypesParserEngineRule[]: ParserEngineRules configures which parser engine to use for each file type. When empty, DefaultParserEngine is used (builtin/simple routing, except types that only a specific engine can parse: ppt/pptx fall back to markitdown). A linked anydoc binding is preferred for every type it converts.
      - `engine` string
      - `file_types` string[]
      - `xlsx_first_row_as_header` boolean: XLSXFirstRowAsHeader restores row-1 column context for flat XLSX tables. nil preserves the parser default; an explicit false disables the mode.
    - `separators` string[]: Separators, in the order they are tried.
    - `strategy` 'auto' | 'heading' | 'heuristic' | 'recursive' | 'legacy': Strategy selects how documents are split: auto, heading, heuristic, recursive or legacy. Empty keeps the server default.
    - `table_metadata_instructions` string: TableMetadataInstructions is extra guidance for CSV and Excel summaries. The output format stays fixed.
    - `token_limit` integer: TokenLimit caps chunk size in approximate tokens. 0 uses ChunkSize as a character count.
  - `description` string: New description. Omit to keep it; an empty string clears it.
  - `embedding_model_id` string: Embedding model. Cannot change after the knowledge base has documents.
  - `extract_config` GithubComTencentWeKnoraInternalTypesExtractConfig
    - `custom_instructions` string: CustomInstructions adds domain guidance. The graph output format stays fixed.
    - `enabled` boolean: Enabled turns graph extraction on. Node and relation types are edited in the knowledge base editor.
    - `nodes` GithubComTencentWeKnoraInternalTypesGraphNode[]
      - `attributes` string[]
      - `chunks` string[]
      - `name` string
    - `relations` GithubComTencentWeKnoraInternalTypesGraphRelation[]
      - `node1` string
      - `node2` string
      - `type` string
    - `tags` string[]: Tags are the entity labels extraction may use.
    - `text` string: Text is the extraction prompt. Required when extraction is on and no text is saved yet.
  - `faq_config` GithubComTencentWeKnoraInternalTypesFAQConfig
    - `index_mode` 'question_only' | 'question_answer'
    - `question_index_mode` 'combined' | 'separate'
  - `image_caption_enabled` boolean: Run image captions in the default image pipeline. Set image_pipeline=default to select that pipeline.
  - `image_ocr_enabled` boolean: Run OCR in the default image pipeline. At least one of captions or OCR must stay enabled.
  - `image_processing_config` GithubComTencentWeKnoraInternalTypesImageProcessingConfig
    - `image_actions` GithubComTencentWeKnoraInternalTypesImageActionsConfig
      - `ocr` GithubComTencentWeKnoraInternalTypesImageOCRAction
        - `on` GithubComTencentWeKnoraInternalTypesImageAttrCondition[]: On is the list of attribute conditions that enable OCR. Matching any one turns OCR on.
          - `is` string
          - `prop` string
    - `image_attrs_enabled` boolean: ImageAttrsEnabled turns the attribute-observed image pipeline on for this knowledge base. It is off by default on purpose, so upgrading an existing deployment never changes what happens to documents already being ingested: with it off every image is described and OCR'd exactly as before. When on, the describe round also observes image attributes and the attribute policy decides whether OCR runs for it. A single upload can override it per document through KnowledgeProcessOverrides.ImageAttrsEnabled.
    - `image_pipeline` 'default' | 'smartocr': ImagePipelineID selects the image pipeline by id, so the choice the settings panel offers is the choice the backend runs. It is unset on knowledge bases configured before the field existed; those follow ImageAttrsEnabled — see ResolveImagePipelineID. An explicit id always wins over the switch.
    - `image_pipeline_params` object: ImagePipelineParams holds the tunables of ImagePipelineID, keyed by each field's slot — the pipeline id joined to the field's own key, built by SlotKey and read back by ImagePipelineParam. The map travels whole: a key a pipeline no longer declares is dropped when the run reads it, so an old stored config stays loadable rather than being rewritten on save.
    - `image_vector_enabled` boolean: ImageVectorEnabled lets a knowledge base whose embedding model takes images index each image by its own vector and recall it with one. It is off by default on purpose: a model that takes images is also used for plain text, and turning this on costs an embedding call per image and widens vector recall. Existing knowledge bases stay off after an upgrade because the stored JSON has no such key.
    - `model_id` string: Model ID used when describing images. Empty uses the knowledge base's caption model.
  - `indexing_strategy` GithubComTencentWeKnoraInternalTypesIndexingStrategy
    - `graph_enabled` boolean: GraphEnabled enables knowledge graph entity/relation extraction
    - `keyword_enabled` boolean: KeywordEnabled enables keyword-based (BM25) search
    - `vector_enabled` boolean: VectorEnabled enables semantic vector embedding and search
    - `wiki_enabled` boolean: WikiEnabled enables automatic wiki page generation from documents
  - `name` string: New name. Omit to keep the current one.
  - `parser_engine` string: Engine name from knowledge_base.list_parser_engines; empty removes explicit routing for parser_file_types.
  - `parser_file_types` string[]: File extensions whose parser routing should change, e.g. ["pdf", "docx"]. Other file types keep their rules.
  - `parser_xlsx_first_row_as_header` boolean: Treat the first XLSX row as headers. Requires parser_file_types including xlsx and an explicit parser_engine.
  - `profile_config` GithubComTencentWeKnoraInternalTypesKnowledgeBaseProfileConfig
    - `custom_instructions` string: CustomInstructions is extra guidance for the description, such as the audience. The format stays fixed.
    - `enabled` boolean: Enabled turns the AI knowledge-base description on.
    - `model_id` string: ModelID overrides the summary model. Empty uses summary_model_id.
  - `question_generation_config` GithubComTencentWeKnoraInternalTypesQuestionGenerationConfig
    - `custom_instructions` string: CustomInstructions describes who the questions are for. The question format stays fixed.
    - `enabled` boolean: Enabled turns question generation on. Generated questions are indexed beside the chunk.
    - `question_count` integer: QuestionCount is how many questions to write per chunk, from 1 to 10.
  - `storage_backend_id` string: Storage instance to bind. Omit to keep the current one.
  - `summary_model_id` string: Summary model. model.list returns the ids.
  - `vlm_config` GithubComTencentWeKnoraInternalTypesVLMConfig
    - `api_key` string: API Key
    - `base_url` string: Base URL
    - `custom_instructions` string: CustomInstructions adds image-reading guidance. The OCR and Markdown format stay fixed.
    - `description_language` string: DescriptionLanguage is the language of generated image captions. Empty follows the document language.
    - `enabled` boolean: Enabled turns image captions on. Also send vlm_model_id.
    - `interface_type` string: Interface Type: "ollama" or "openai"
    - `model_id` string: Model that writes image captions. model.list returns the ids.
    - `model_name` string: 兼容老版本 Model Name
  - `wiki_config` GithubComTencentWeKnoraInternalTypesWikiConfig
    - `content_instructions` string: ContentInstructions sets tone and emphasis for generated Wiki prose. Citations stay fixed.
    - `extraction_granularity` 'focused' | 'standard' | 'exhaustive'
    - `extraction_instructions` string: ExtractionInstructions tells page extraction which concepts to keep. The output format stays fixed.
    - `ingest_batch_size` integer: IngestBatchSize controls how many pending ops a single batch claims and processes before scheduling a follow-up. 0 falls back to the hard-coded default (5). Larger batches amortize per-batch setup and let more docs share the batch-internal Map/Reduce fan-out; smaller batches spread a KB's backlog across more concurrent batches (finer scheduling grain).
    - `ingest_map_parallel` integer: IngestMapParallel sets the errgroup limit for the Map phase (per-document extraction + summary + chunk citation) WITHIN one batch. 0 falls back to 10. Bound by the LLM provider's concurrency limit and the worker's outbound HTTP pool. Remember it multiplies with the number of concurrent batches (IngestMaxInflight).
    - `ingest_max_inflight` integer: IngestMaxInflight caps how many ingest batches for THIS KB may run concurrently in the shared wiki worker pool (standard/Redis mode only). 0 falls back to the hard-coded default (4). Since Phase 3 removed the exclusive per-KB lock, one KB's backlog could otherwise monopolize the whole pool during a bulk import and starve other KBs; this knob trades a single KB's peak throughput for cross-KB fairness. Set it >= the wiki pool size to effectively disable the cap.
    - `ingest_reduce_parallel` integer: IngestReduceParallel sets the errgroup limit for the Reduce phase (per-slug page write) WITHIN one batch. 0 falls back to 10. Bound by the same LLM concurrency / HTTP pool considerations as the Map phase, plus DB connection pool size. Same multiplier caveat as IngestMapParallel.
    - `max_pages_per_ingest` integer: MaxPagesPerIngest limits pages created or updated per ingest. 0 means no limit.
    - `synthesis_model_id` string: SynthesisModelID is the model that writes Wiki pages. Empty uses summary_model_id.

## Response `200`

更新后的知识库

- object
  - `data` InternalHandlerKnowledgeBaseView
    - `asr_config` GithubComTencentWeKnoraInternalTypesASRConfig
      - `enabled` boolean: Enabled turns speech transcription on. Also send asr_model_id.
      - `language` string: Language is an optional hint for transcription, such as zh or en.
      - `model_id` string: Model that transcribes audio. model.list returns the ids.
    - `auto_tag_config` GithubComTencentWeKnoraInternalTypesAutoTagConfig
      - `enabled` boolean: Enabled turns automatic tagging on. The model picks from tags that already exist.
      - `max_tags` integer: MaxTags is how many tags one document may receive, from 1 to 10.
      - `model_id` string: ModelID overrides the summary model. Empty uses summary_model_id.
      - `skip_if_tagged` boolean: SkipIfTagged leaves a document alone when it already has tags. Empty means yes.
    - `capabilities` GithubComTencentWeKnoraInternalTypesKBCapabilities
      - `faq` boolean: FAQ means the KB is a FAQ-type KB (Q/A pairs).
      - `graph` boolean: Graph means knowledge-graph extraction is enabled.
      - `keyword` boolean: Keyword means BM25 / sparse keyword search is indexed.
      - `vector` boolean: Vector means semantic (embedding) search is indexed.
      - `wiki` boolean: Wiki means the wiki feature is enabled and authored pages exist / will be generated.
    - `chunk_count` integer: Chunk count (not stored in database, calculated on query)
    - `chunking_config` GithubComTencentWeKnoraInternalTypesChunkingConfig
      - `child_chunk_size` integer: ChildChunkSize is the size of child chunks used for embedding (default: 384). Only used when EnableParentChild is true.
      - `chunk_overlap` integer: Chunk overlap in characters.
      - `chunk_size` integer: Chunk size in characters. Empty on create uses the server default.
      - `enable_parent_child` boolean: EnableParentChild splits into large parent chunks and small child chunks. Search matches a child and returns its parent.
      - `languages` string[]: Languages hints the splitter, for example de or zh. Empty detects the language from the document.
      - `parent_chunk_size` integer: ParentChunkSize is the size of parent chunks (default: 4096). Only used when EnableParentChild is true.
      - `parser_engine_rules` GithubComTencentWeKnoraInternalTypesParserEngineRule[]: ParserEngineRules configures which parser engine to use for each file type. When empty, DefaultParserEngine is used (builtin/simple routing, except types that only a specific engine can parse: ppt/pptx fall back to markitdown). A linked anydoc binding is preferred for every type it converts.
        - `engine` string
        - `file_types` string[]
        - `xlsx_first_row_as_header` boolean: XLSXFirstRowAsHeader restores row-1 column context for flat XLSX tables. nil preserves the parser default; an explicit false disables the mode.
      - `separators` string[]: Separators, in the order they are tried.
      - `strategy` 'auto' | 'heading' | 'heuristic' | 'recursive' | 'legacy': Strategy selects how documents are split: auto, heading, heuristic, recursive or legacy. Empty keeps the server default.
      - `table_metadata_instructions` string: TableMetadataInstructions is extra guidance for CSV and Excel summaries. The output format stays fixed.
      - `token_limit` integer: TokenLimit caps chunk size in approximate tokens. 0 uses ChunkSize as a character count.
    - `created_at` string: Creation time of the knowledge base
    - `creator_id` string: CreatorID records the user ID of whoever originally created the KB. Used by the workspace-level RBAC middleware to let Contributors edit their own KBs without granting them access to everyone else's. Nullable for backward compatibility with rows created before the RBAC migration backfilled the column to the workspace Owner.
    - `creator_name` string: CreatorName 是 CreatorID 对应用户的展示名（username / email 等）， 仅在列表场景由 handler 批量回填，不落库；为空表示创建者无法解析（用户已删除、 CreatorID 为空的老数据等）。前端用它在卡片来源徽章上做 mine vs workspace 的二分。
    - `deleted_at` GormDeletedAt
      - `time` string
      - `valid` boolean: Valid is true if Time is not NULL
    - `description` string: Description of the knowledge base
    - `embedding_model_id` string: ID of the embedding model. model.list returns the ids. Cannot change after the knowledge base has documents.
    - `extract_config` GithubComTencentWeKnoraInternalTypesExtractConfig
      - `custom_instructions` string: CustomInstructions adds domain guidance. The graph output format stays fixed.
      - `enabled` boolean: Enabled turns graph extraction on. Node and relation types are edited in the knowledge base editor.
      - `nodes` GithubComTencentWeKnoraInternalTypesGraphNode[]
        - `attributes` string[]
        - `chunks` string[]
        - `name` string
      - `relations` GithubComTencentWeKnoraInternalTypesGraphRelation[]
        - `node1` string
        - `node2` string
        - `type` string
      - `tags` string[]: Tags are the entity labels extraction may use.
      - `text` string: Text is the extraction prompt. Required when extraction is on and no text is saved yet.
    - `faq_config` GithubComTencentWeKnoraInternalTypesFAQConfig
      - `index_mode` 'question_only' | 'question_answer'
      - `question_index_mode` 'combined' | 'separate'
    - `generated_profile` GithubComTencentWeKnoraInternalTypesKnowledgeBaseProfile
      - `aggregate_hash` string: AggregateHash identifies the aggregate the gist was generated from. A mismatch with the live aggregate means the text is stale.
      - `error` string: Error holds the last generation error when Status is failed.
      - `generated_at` string: GeneratedAt records when the text was produced.
      - `gist` string: Gist is a short statement of what the knowledge base covers.
      - `model_id` string: ModelID records which chat model produced the text.
      - `stats` GithubComTencentWeKnoraInternalTypesKnowledgeBaseProfileStats
        - `doc_types` GithubComTencentWeKnoraInternalTypesNamedCount[]: DocTypes counts documents per model-assigned document type.
          - `count` integer
          - `name` string
        - `document_count` integer: DocumentCount is the number of eligible documents at generation time.
        - `earliest_at` string: EarliestAt and LatestAt bound document creation times.
        - `file_types` GithubComTencentWeKnoraInternalTypesNamedCount[]: FileTypes counts documents per file extension.
          - `count` integer
          - `name` string
        - `folders` string[]: Folders lists the top-level folder names present.
        - `latest_at` string
        - `profiled_count` integer: ProfiledCount is how many of them carried a document profile.
        - `raw_topics` GithubComTencentWeKnoraInternalTypesNamedCount[]: RawTopics counts documents per normalized topic keyword before merging.
          - `count` integer
          - `name` string
        - `tags` GithubComTencentWeKnoraInternalTypesNamedCount[]: Tags counts documents per knowledge-base tag.
          - `count` integer
          - `name` string
      - `status` string: Status is one of the KnowledgeBaseProfileStatus* values.
      - `topics` string[]: Topics is the merged topic list (at most KnowledgeBaseProfileMaxTopics).
      - `typical_questions` string[]: TypicalQuestions lists questions this knowledge base can answer.
    - `id` string: Unique identifier of the knowledge base
    - `image_processing_config` GithubComTencentWeKnoraInternalTypesImageProcessingConfig
      - `image_actions` GithubComTencentWeKnoraInternalTypesImageActionsConfig
        - `ocr` GithubComTencentWeKnoraInternalTypesImageOCRAction
          - `on` GithubComTencentWeKnoraInternalTypesImageAttrCondition[]: On is the list of attribute conditions that enable OCR. Matching any one turns OCR on.
            - `is` string
            - `prop` string
      - `image_attrs_enabled` boolean: ImageAttrsEnabled turns the attribute-observed image pipeline on for this knowledge base. It is off by default on purpose, so upgrading an existing deployment never changes what happens to documents already being ingested: with it off every image is described and OCR'd exactly as before. When on, the describe round also observes image attributes and the attribute policy decides whether OCR runs for it. A single upload can override it per document through KnowledgeProcessOverrides.ImageAttrsEnabled.
      - `image_pipeline` 'default' | 'smartocr': ImagePipelineID selects the image pipeline by id, so the choice the settings panel offers is the choice the backend runs. It is unset on knowledge bases configured before the field existed; those follow ImageAttrsEnabled — see ResolveImagePipelineID. An explicit id always wins over the switch.
      - `image_pipeline_params` object: ImagePipelineParams holds the tunables of ImagePipelineID, keyed by each field's slot — the pipeline id joined to the field's own key, built by SlotKey and read back by ImagePipelineParam. The map travels whole: a key a pipeline no longer declares is dropped when the run reads it, so an old stored config stays loadable rather than being rewritten on save.
      - `image_vector_enabled` boolean: ImageVectorEnabled lets a knowledge base whose embedding model takes images index each image by its own vector and recall it with one. It is off by default on purpose: a model that takes images is also used for plain text, and turning this on costs an embedding call per image and widens vector recall. Existing knowledge bases stay off after an upgrade because the stored JSON has no such key.
      - `model_id` string: Model ID used when describing images. Empty uses the knowledge base's caption model.
    - `indexing_strategy` GithubComTencentWeKnoraInternalTypesIndexingStrategy
      - `graph_enabled` boolean: GraphEnabled enables knowledge graph entity/relation extraction
      - `keyword_enabled` boolean: KeywordEnabled enables keyword-based (BM25) search
      - `vector_enabled` boolean: VectorEnabled enables semantic vector embedding and search
      - `wiki_enabled` boolean: WikiEnabled enables automatic wiki page generation from documents
    - `is_pinned` boolean: IsPinned and PinnedAt are computed per-caller from user_kb_pins (see migration 000050). They used to be stored on the row itself, which made pinning a workspace-wide ordering decision gated behind the kb-edit RBAC guard. The columns are still present in legacy schemas for rollback safety but are no longer read or written by the application — both fields are tagged `gorm:"-"` so GORM ignores them on every CRUD call and the list handler stamps them after enriching with the caller's pin set.
    - `is_processing` boolean: IsProcessing indicates if there is a processing import task (for FAQ type knowledge bases)
    - `is_temporary` boolean: Whether this knowledge base is temporary (ephemeral) and should be hidden from UI
    - `knowledge_count` integer: Knowledge count (not stored in database, calculated on query)
    - `my_permission` 'admin' | 'editor' | 'viewer': MyPermission is the caller's role on a knowledge base shared from another workspace; GET /knowledge-bases/{id} sets it.
    - `name` string, required: Name of the knowledge base
    - `pinned_at` string: PinnedAt records when the current caller pinned this knowledge base; nil when they have not.
    - `processing_count` integer: ProcessingCount indicates the number of knowledge items being processed (for document type knowledge bases)
    - `profile_config` GithubComTencentWeKnoraInternalTypesKnowledgeBaseProfileConfig
      - `custom_instructions` string: CustomInstructions is extra guidance for the description, such as the audience. The format stays fixed.
      - `enabled` boolean: Enabled turns the AI knowledge-base description on.
      - `model_id` string: ModelID overrides the summary model. Empty uses summary_model_id.
    - `question_generation_config` GithubComTencentWeKnoraInternalTypesQuestionGenerationConfig
      - `custom_instructions` string: CustomInstructions describes who the questions are for. The question format stays fixed.
      - `enabled` boolean: Enabled turns question generation on. Generated questions are indexed beside the chunk.
      - `question_count` integer: QuestionCount is how many questions to write per chunk, from 1 to 10.
    - `share_count` integer: ShareCount indicates the number of organizations this knowledge base is shared with (not stored in database)
    - `storage_backend_id` string: StorageBackendID binds this KB to one concrete storage instance. The legacy provider field remains readable during migration only.
    - `storage_config` GithubComTencentWeKnoraInternalTypesStorageConfig
      - `app_id` string: App ID (COS specific)
      - `bucket_name` string: Bucket Name
      - `endpoint` string: Endpoint (S3 specific) - e.g., s3.amazonaws.com, oss-cn-hangzhou.aliyuncs.com
      - `force_path_style` boolean: ForcePathStyle (S3 specific) - whether to use path-style URLs
      - `path_prefix` string: Path Prefix
      - `provider` string: Provider: "cos", "minio", "s3"
      - `region` string: Region
      - `secret_id` string: Secret ID (COS) / Access Key ID (S3, MinIO)
      - `secret_key` string: Secret Key (COS) / Secret Access Key (S3, MinIO)
      - `use_ssl` boolean: UseSSL (S3 specific) - whether to use HTTPS
    - `storage_provider_config` GithubComTencentWeKnoraInternalTypesStorageProviderConfig
      - `provider` string: "local", "minio", "cos", "tos", "s3", "oss", "ks3", "obs"
    - `summary_model_id` string: Summary model ID. model.list returns the ids. Used for summaries, and as the default for auto-tagging and the AI description.
    - `tenant_id` integer: Workspace ID
    - `type` 'document' | 'faq' | 'wiki': Type of the knowledge base: document, faq or wiki. Empty means document.
    - `updated_at` string: Last updated time of the knowledge base
    - `vector_store_engine_type` string
    - `vector_store_id` string: VectorStoreID references the VectorStore this knowledge base is bound to. When nil, the KB falls back to the workspace's effective engines derived from the RETRIEVE_DRIVER environment variable (env store flow). This field is set once at creation time and must not be modified afterwards; enforcement lives at the GORM layer (`<-:create`) plus the service-layer KB update path, which omits this field from its update DTO.
    - `vector_store_name` string
    - `vector_store_source` string
    - `vector_store_status` string
    - `vlm_config` GithubComTencentWeKnoraInternalTypesVLMConfig
      - `api_key` string: API Key
      - `base_url` string: Base URL
      - `custom_instructions` string: CustomInstructions adds image-reading guidance. The OCR and Markdown format stay fixed.
      - `description_language` string: DescriptionLanguage is the language of generated image captions. Empty follows the document language.
      - `enabled` boolean: Enabled turns image captions on. Also send vlm_model_id.
      - `interface_type` string: Interface Type: "ollama" or "openai"
      - `model_id` string: Model that writes image captions. model.list returns the ids.
      - `model_name` string: 兼容老版本 Model Name
    - `wiki_config` GithubComTencentWeKnoraInternalTypesWikiConfig
      - `content_instructions` string: ContentInstructions sets tone and emphasis for generated Wiki prose. Citations stay fixed.
      - `extraction_granularity` 'focused' | 'standard' | 'exhaustive'
      - `extraction_instructions` string: ExtractionInstructions tells page extraction which concepts to keep. The output format stays fixed.
      - `ingest_batch_size` integer: IngestBatchSize controls how many pending ops a single batch claims and processes before scheduling a follow-up. 0 falls back to the hard-coded default (5). Larger batches amortize per-batch setup and let more docs share the batch-internal Map/Reduce fan-out; smaller batches spread a KB's backlog across more concurrent batches (finer scheduling grain).
      - `ingest_map_parallel` integer: IngestMapParallel sets the errgroup limit for the Map phase (per-document extraction + summary + chunk citation) WITHIN one batch. 0 falls back to 10. Bound by the LLM provider's concurrency limit and the worker's outbound HTTP pool. Remember it multiplies with the number of concurrent batches (IngestMaxInflight).
      - `ingest_max_inflight` integer: IngestMaxInflight caps how many ingest batches for THIS KB may run concurrently in the shared wiki worker pool (standard/Redis mode only). 0 falls back to the hard-coded default (4). Since Phase 3 removed the exclusive per-KB lock, one KB's backlog could otherwise monopolize the whole pool during a bulk import and starve other KBs; this knob trades a single KB's peak throughput for cross-KB fairness. Set it >= the wiki pool size to effectively disable the cap.
      - `ingest_reduce_parallel` integer: IngestReduceParallel sets the errgroup limit for the Reduce phase (per-slug page write) WITHIN one batch. 0 falls back to 10. Bound by the same LLM concurrency / HTTP pool considerations as the Map phase, plus DB connection pool size. Same multiplier caveat as IngestMapParallel.
      - `max_pages_per_ingest` integer: MaxPagesPerIngest limits pages created or updated per ingest. 0 means no limit.
      - `synthesis_model_id` string: SynthesisModelID is the model that writes Wiki pages. Empty uses summary_model_id.
  - `success` boolean

## Other responses

- `400`: 请求参数错误
- `403`: 无权限
- `404`: 知识库不存在

## Changes

- **2026-10-15** `3e0b95dc59d5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tencentblueking/apis/weknora-api/changes/knowledge-bases/:id/patch.md)

---

[API](https://skmtc.dev/tencentblueking/apis/weknora-api.md) - [All operations](https://skmtc.dev/tencentblueking/apis/weknora-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tencentblueking/apis/weknora-api/revisions/685d1f9fce30?raw)
