/ src / config / chunking.py
chunking.py
 1  """Chunking configuration."""
 2  
 3  from typing import Any
 4  
 5  from pydantic import Field
 6  from pydantic_settings import BaseSettings
 7  
 8  from src.chunkers.types import ChunkerType
 9  
10  
11  class ChunkingConfig(BaseSettings):
12      """Chunking configuration."""
13  
14      chunker_name: ChunkerType = Field(
15          default=ChunkerType.LANGCHAIN,
16          description="Chunker type",
17      )
18      chunker_config: dict[str, Any] | None = Field(
19          default=None,
20          description="Chunker-specific configuration dictionary. "
21          "For langchain: chunk_size, chunk_overlap, method. "
22          "For hybrid: max_tokens, merge_peers, tokenizer, tokenizer_config.",
23      )