From 8303cea018af5fae48b8c312dbc2b6a2cf25fcab Mon Sep 17 00:00:00 2001 From: starmen1265 Date: Mon, 23 Mar 2026 23:01:29 +0800 Subject: [PATCH] feat(15-01): add enable_semantic_segmentation field to KBSettings - Add enable_semantic_segmentation: bool field with default=True - Allow override via KB_ENABLE_SEMANTIC_SEGMENTATION env var - Pydantic automatically parses boolean strings (true/false, yes/no, 1/0) - Update docstring to document new field CONFIG-01: LLM segmentation can be enabled/disabled via configuration Co-Authored-By: Claude Opus 4.6 --- kb_workflow/pipeline/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kb_workflow/pipeline/config.py b/kb_workflow/pipeline/config.py index 3422b5b..18c700b 100644 --- a/kb_workflow/pipeline/config.py +++ b/kb_workflow/pipeline/config.py @@ -62,6 +62,10 @@ class KBSettings(BaseSettings): overwrite_archives: bool = Field( default=False, description="覆盖已存在的归档文件(非交互模式)" ) + enable_semantic_segmentation: bool = Field( + default=True, + description="启用 LLM 语义分段(默认启用)" + ) @lru_cache